Link to home
Start Free TrialLog in
Avatar of jplagens
jplagensFlag for United States of America

asked on

Create batch file to run a command line script.

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.

thanks,
Jeff

ASKER CERTIFIED SOLUTION
Avatar of PodExpert
PodExpert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jplagens

ASKER

That is EXACTLY what I needed.  Thank you for all of your help.  It is greatly appreciated.  I got this new script installed and taught the users to click on the batch file and it is working a lot smoother now.  Thanks!
Avatar of londell1
londell1

Hi, I have exchange 5.5 server running on Windows NT 4.0 server. In setting up server monitor and selecting launch a process, I would like to setup a script that will page me when there is a problem with the exchange server. How do I go about building a script for that purpose? Can any one help me? Many thanks!!

Londell