Link to home
Start Free TrialLog in
Avatar of posae
posae

asked on

Auto restart of window 7 pc gracefully

Hello,

We have a pc that we would like to restart nightly.  the catch is that we cannot force the restart as Microsoft outlook is installed and running.  is there a way to bring down the applications and then restart the machine once they are done?
Avatar of viki2000
viki2000
Flag of Germany image

I assume you are using task scheduler to do the shutdown and are using the shutdown command to do the restart. I would just change the command to the following:

shutdown /l /f /r

/l = log off any user
/f = force close any program without prompt
/r = restart
Avatar of posae
posae

ASKER

thanks flubbster.  yes this is through safe mode.  The only issue is forcing the close...i am assuming this doesn't shut down outlook gracefully, correct?  The reason i ask is when the machine comes back up, if outlook did not close down it prompts to start in safe mode.
Any open program is "forced" to shutdown.
ASKER CERTIFIED SOLUTION
Avatar of posae
posae

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of posae

ASKER

this solution found was the best fit
Glad you go it. Funny... I found the exact same script on another webpage :)