Link to home
Start Free TrialLog in
Avatar of schoi_ukuk
schoi_ukuk

asked on

menus within batch files

Basically I want a batch file to be able to start and stop services running on windows xp pro.

It should display the following list of options

1 Start LogMeIn
2 Stop LogMeIn
3 Start FTP
4 Stop FTP

I would like it to use the NET command to start and stop services.
SOLUTION
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Alternatively, if there's at all likely to be errors in the process, and you need to catch the output, then replace these lines in the code:

   echo Stopped service "FTP".
   ping -n 2 localhost >nul

with:

   echo.
   echo Press any key to return to the beginning . . .
   pause >nul
ASKER CERTIFIED 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 softplus
softplus

Must be correct if two people get the same result :))
Near enough.  ^_^
I am a little bit curious to why Softplus's answer was accepted..? Not only does my do the same (and more; including support for invalid input, as well as a cleaner layout), but my solution was posted first..

It just baffles me a little. :o\