Create batch file to run a command line script.
Posted on 2004-09-29
Currently we have a script that is run from a command prompt. The script is installed on several independent machines and the user types "cscript filescrc.vbs" from the C:\ prompt. The problem is that when a user goes to START -- RUN, types cmd and gets a command prompt, the user is usually sitting at "C:\Documents and Settings\<username>\...." or so other various place. It is almost impossible to explain how to use "cd.." to work their way to a "C:\" prompt and we have files going everywhere.
I would like to write a simple batch file that the user can double click on the desktop. When they click the batch file it will automatically bring up a command prompt, run the script "C:\cscript filescrc.vbs", and the command prompt box will stay open so they can see that the .vbs script successfully completes. I'm not worried about automatically closing the command prompt box. The user can exit the command prompt themselves.
Can this be done? I'm sure it would only be a few lines. If anyone knows I would sure appreciate the help.