| 1. |
Solve : shutdown issue? |
|
Answer» I am working on a shut down bat that will shutdown a list of computers remotely. I am having issues getting it to work correctly. I have narrowed the issue down to the shut down command. Any IDEAS on what the cause of the issue might be? It will hit the shutdown command and then loop back to the :SHUT portion of the bat. This behavior can occur if the Unlock Computer dialog box appears on the desktop, or if the computer is locked. this is not the behavior of the issue I am seeing. If you WISH you can copy and RUN the bat. You just need to change the system names. when the batch gets to the shutdown command it will loop back to the top of the :SHUT portion and continue to loop. it will not process past the shutdown command. any ideas?If you enable echo, what messages do you see? it will hit the shutdown command then go back to the :SHUT portion and continue from there. there are no error messages. If I rem out the shutdown command the batch will continue to process correctly. If I copy the command from the batch file and paste it into a cmd window the command will work correctly. That is how I know there is an issue with the batch file and this command.Is the %A% variable being expanded correctly? what happens if you put echo %errorlevel% straight after the shutdown LINE? Quote from: Salmon Trout on July 21, 2009, 02:14:11 PM Is the %A% variable being expanded correctly? yes it is because I see it when it runs the following line: Code: [Select]ECHO TESTING %A% Quote from: Salmon Trout on July 21, 2009, 02:14:11 PM
nothing because the lines after the shutdown command do not process. It is strange because if I enter each command in to a cmd window they work correctly. But, if I run the batch the shutdown command creates a loop. |
|