I wrote an Autoit script to reboot the computer after running an uninstall of Office 2007 however, it just logs off the user and never reboots. The command I am using is Shutdown(2) and I have also tried Shutdown(4) . Should i use the windows built in shutdown command? Shutdown /f /r /t 00 ?
Thanks
Clients Windows 10 x64 pro
Scripting Languages
Last Comment
CityInfoSys
8/22/2022 - Mon
Ogandos
Shutdown /f /r /t 00
Yes, this command will restart your system completely using a forced way /f (if there is something open will be forced to close), /r (restart) and /t 00 (immediately, 0 seconds).
When you configure the task, use an administrative account, the system account or any other account with the necessary privileges.
CityInfoSys
ASKER
Would i need to run this as run("Shutdown /f /r /t 00")? Or another way?
Ogandos
It depends how you want to run it.
1. If you want to use one script file, you can create a file ending with .bat or .cmd and add exactly this line:
Shutdown /f /r /t 00
Then you save the file and instruct your schedule application to run your script.
2. If you are configuring a task, usually the entire command is introduced (depending the task program used), the syntax could be...
a) Shutdown /f /r /t 00
or
b) shutdown
and in a different field you put the parameters: /f /r /t 00
Yes, this command will restart your system completely using a forced way /f (if there is something open will be forced to close), /r (restart) and /t 00 (immediately, 0 seconds).
When you configure the task, use an administrative account, the system account or any other account with the necessary privileges.