Hi, I am trying to write one batch script to shutdown the pc if no user is login. Here is the script : -
qwinsta | find /c "Active" > C:\WINDOWS\Temp\res.txt
set /p shutvar=<C:\WINDOWS\Temp\res.txt
if %shutvar%==0 (
shutdown -s -t 60 -c "system shutdown")But this script is not working. System is not getting shutdown with this
sgadmin , do you have a screensaver or some other proggie running in the background which might make it appear the machine's 'active'? Otherwise you'll likely get more and more knowledgeable responses in the programming forum @:
http://www.computing.net/forum/prog...
HTH.
Ed in Texas.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |