Batch file to shutdown computer through remote desktop in Windows XP?

In your first code snippet you used / for switches instead of - . Since you are remotely connected to the machine, all you would need to do is specify the code as follows: shutdown -s -f If you are allowed to send remote commands to the computer, instead of using remote desktop to manually access the machine, you can type the following command in YOUR command line and not the remote computer: shutdown -s -f -m \\computername EDIT: To create a DOS prompt for a shutdown via BATCH SCRIPT: :START SET /p sd=Would you like to shutdown? Y or N : IF "%sd%"=="Y" GOTO:SHUTDOWN IF "%sd%"=="y" GOTO:SHUTDOWN IF "%sd%"=="n" GOTO:EOF IF "%sd%"=="N" GOTO:EOF ECHO Incorrect Answer... Please Try Again PAUSE GOTO:START :SHUTDOWN shutdown -s.

I had tried that earlier and upon your suggested decided to try it again as a sanity check; it produces identical output to the original problem. For the record, the help text when doing "shutdown -?" or "shutdown /? " shows the switches as slashes.

I also tried your suggestion of using the -m switch with \\COMPUTERNAME which looked promising... Unfortunately I got an access denied message, but otherwise I think it probably would've worked. Good idea. – Kiley Naro Aug 31 at 22:34 For windows XP its -.

Not sure about vista. However, I will edit the post for a shutdown prompt for you. – Mechaflash Sep 1 at 13:32 Your script worked great!

It helped me to realize that I had a typo in the original script that I was using. I made a few tweaks (including @ECHO OFF) and posted the resulting script in my answer. Thanks for the help, you rock!

– Kiley Naro Sep 1 at 22:15.

After trying a few different things, here's the solution that I ended up settling with: I created a shutdown shortcut on the XP machine by right-clicking on the desktop and entering the following as a new shortcut path: shutdown -s As I mentioned in the question, I wanted a fail-safe in case I were to accidentally start a shutdown. Since the OS gives a 30 second timer after entering the shutdown command via the shortcut above, I decided to create an abort shortcut: shutdown -a EDIT Mechaflash provided a working solution. After reviewing the difference between his script and my original prompting for Y/N script, I realized that I had a typo in my script: the GOTO on the Y condition pointed to a section that didn't exist!

I made some slight modifications to his source so this is what I'm using today: @ECHO OFF :START SET /p sd=Would you like to shutdown? Y to continue : IF /I "%sd%"=="y" GOTO:SHUTDOWN GOTO:EOF :SHUTDOWN shutdown -s.

I'm a nub... totally forgot about /I switch for IF blush – Mechaflash Sep 2 at 13:01.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions