Hi I want to create a batch
which performs more than one operations. Like it should display
1.Restart
2.Shutdown
3.Close all Windows
4.Log off
5.Switch User
Then "Enter your choice
:(User Choice
)
Then it should perform the operation
Can you help in this?
This way is even better...
Now someone just put is this your homework... I almost don't want to paste this! lol
but... I will anyway :p
You can swap goto begin to goto exit in each of the sections if you want it to run the command then close the batch file, which is what I would recommend, seeing as you want to shutdown.
Hope this helps.
Martyn
This should get you started. The CHOICE command is available in most versions of Windows but may require that you get the Windows NT 4 resource kit. The CHOICE command is available in Windows 7.
There a a lot of tutorials available on internet for batch programming like http://www.infionline.net/~wtnewton/batch/batguide.html .you can go through it
The commands 1.Restart 2.Shutdown 3.Close all Windows 4.Log off 5.Switch User are available from execution from command like but require admin privileges. you can try this for available options.
on command line.