WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


Best Tech Support Question

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Solve a Problem Example on our WinBatch Technical Support Forum

Keywords: 	 solve problem  WinBatch Technical Support Forum


Dear Marty,

Please write the script file(using WSH) for me for the following purposes-

  1. Clear history in IE5 and files(offline content as well).

    Exact procedure-

    Go to TOOLS MENU in Internet Explorer5, click on INTERNET OPTIONS, click on DELETE FILES (DELETE ALL OFFLINE CONTENT). Then, click on CLEAR HISTORY. Close IE5.

  2. Run MICROSOFT REGCLEAN.(PATH=D:\downloadz!\net\Undo Regclean\RegClean.exe). Exact procedure-

    Microsoft Regclean is a utility software which corrects errors in the registry and backs-up the registry.When you double-click on its exe,it starts running and when finished shows whether there are errors in the registry or not.If there are errors, it prompts the user to correct them. According, a FIX IT button. (Also,an EXIT BUTTON is provided,but not highlighted) is provided. The user has the option to correct the errors if he desires to do so. Also,when there are no errors,the FIX IT Button is not highlighted, but the EXIT Button is highlighted.Now,I wish the file to do accordingly as required. You can download it at and check it out for yourself.Its a useful utility software.

  3. Goto start\settings\task bar and start menu and in the START MENU PROGRAMS and click on CLEAR (Click the clear button to remove the contents of the Documents menu and other personal history lists). Then click OK to exit.

    After this I want to start a small batch file I have written. Its path is c:\My Documents\Mycleanup.bat.

Thank you.


It appears that you may have a misunderstanding as to what the purpose of this WinBatch Technical Support Forum is for. This WinBatch Technical Support Forum is for providing technical and customer service to people using the WinBatch scripting language. This WinBatch Technical Support Forum is not a Windows Scripting Host (WSH) support forum. Microsoft has support articles and groups dedicated to the WSH tools and script interpreters.

You can get quick and free assistance with trouble shooting a WinBatch script that you are developing, but this WinBatch Technical Support Forum is not a place where you can request free development of a script and honestly expect somebody to just write it for you and give it to you.

Now, if you are actually trying to write a WinBatch script (not a WSH script) to perform the tasks that you listed in your posting, then I can recommend the following resources that you can refer to:

  1. Visit and search the knowledgebase for information about the tasks that you desire to perform. You might find some information about controlling IE via OLE/COM, in which case a WinBatch script could run as an OLE client and cause IE to perform these tasks through some OLE calls. For a code sample see our tech databse article: Shell Delete IE History Temporary and Cookies

  2. Visit and do the same type of searching there as you did in the technical support knowledgebase. The Microsoft Developer Network (MSDN) site is dedicated to providing developer support for Microsoft products. Again, this site is glutted with useful information, but you need to know what it is you want to do so that you can direct your search in the proper direction(s).

  3. Read the help files for IE and RegClean.

  4. If it turns out that the tasks that you want to perform with these other products cannot be readily performed by controlling them with OLE, then you may have to use the WinBatch Control Manager extender or even the SendKeys(), SendKeysTo() or SendMenus() functions to simply take control of the user interfaces of these programs and thus "drive" them from a WinBatch script.

  5. Read the WinBatch help files and the help file for the Control Manager extender. Read about the different categories of functions and learn what types of functions that they perform. This will give you a good basic understanding of what WinBatch is capable of doing. Please note that the Control Manager extender has a short but steep learning curve that you need to cross in order to use it effectively, but it is a very powerful extender and can give you a good shot at taking control of the UI of many regular Win32 application programs. We offer a tool called Roboscripter that can help you code your Control manager functionality. Here is a good place to get started: Tutorials - A look at RoboScripter

  6. Search the WinBatch technical support database. It, too, is loaded with useful and interesting WinBatch programming examles that solve a wide variety of problems. It is very much worth your time to search and peruse that database looking for similar tasks.

  7. Break down each task into as many individual steps that are as easy and manageable as possible. Divide and Conquer is the approach to take with any programming project that is non-trivial. Good planning and a structured approach to solving the problem will make things easier for you.

  8. If you get started on coding a script and you are having problems, please post a simple script of not more than approximately 10 lines that exhibits the problem. This makes it easier for the support staff to isolate the problem and provide you with assistance.
The key thing here is that you need to make an effort at doing the script development yourself and ask for help about a specific problem when you hit a brick wall and don't know how to get around it. Just posting your list of chores to perform asking for somebody to write you a script [for free] to perform them all is not going to result in you actually learning to do any of these things for yourself.

A few quick notes about some of the tasks that you have listed....

You can use a tool like SysDiff to take a before and after snapshot of your system that lets you analyze what has changed on your system. There are other tools besides SysDiff that can do this. What you do is take a before snapshot, perform some tasks that alter your system and then take an after snapshot. What you get is a report about all of the registry and file changes that were made. You can use this type of a report to discover what the low level changes are that your script needs to make to the system in order to emulate the functionality that IE is using to perform these cleanup tasks. A good place to look for other freeware/shareware/commercial tools that examine your system like SysDiff is at - they have a nice searchable list of useful software for Win32 systems.

WinBatch has various functions that it can use to launch other programs. Review the WinBatch help file looking for the Run*() functions and read up on them. If RegClean can simply be launched with some switches being passed to it on the command line then WinBatch can most definitely launch it and feed those switches to it. Read the RegClean help files to determine what switches need to be passed to it to make it perform the tasks that you want performed. Once you know what the command line syntax should look like, try it out in a DOS box and make sure that you know how to run RegClean they way that you need to have it run. Then, if you are having problems figuring out how to get WinBatch to run RegClean, you can post the command line syntax and I'm sure you'll get an answer very quickly that shows how to use at least one of the Run*() functions to run RegClean with the desired command line syntax.

Give it all a try and good luck..

Article ID:   W14757
File Created: 2017:07:28:12:58:08
Last Updated: 2014:06:17:13:17:25