Hi guys - can anyone see what I'm doing wrong? I've got a shutdown script that runs from a Scheduled Task, I've created an Admin type account to run the script. If I run it from the command prompt - everything is OK. If I run it as a scheduled task - it seems to hang - I can see psshutdown in the task manager - and if I kill it - the batch file finishes OK. Theere are entries in the log file up to where psshutdown is called, then nothing until I kill the process, and the completed entry is added to the log???
Heres the file :
echo "Starting PC Shutdown script" > "C:\Winapps\Logoffs\shutdown.log"
echo "Starting LimitLogon clearout" >> "C:\Winapps\Logoffs\shutdown.log"
"C:\Program Files\LimitLogin\llogincmd.exe" /c
echo "Starting PC Shutdown" >> "C:\Winapps\Logoffs\shutdown.log"
"C:\winapps\logoffs\PSShutdown.exe" @PCList.txt -m "Shutting down in 20 seconds - Press cancel to stay online" -f -c -n 10 >> "C:\Winapps\Logoffs\shutdown.log"
echo "Completed" >> "C:\Winapps\Logoffs\shutdown.log"