• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 660
  • Last Modified:

Windows XP Reboot Script

Hello all,
One of my clients asked me a question and I couldn't answer.
This client has a Windows 2003 active directory domain.  He would like to setup a script or a GPO where each PC would be rebooted every night after the antivirus checks, etc.
Each user has their own user id and password so doing it via a program like RebootExWin would be a bit cumbersome.
Is their any nice freebie utility or nice script that can do this?
Any links would be great.
Thanks
0
chillepod
Asked:
chillepod
2 Solutions
 
dn0rmCommented:
you could create a batch file i imagine to run as a scheduled task with:

shutdown -f -r

that command run from a command line does a force shutdown (-f) and then a restart (-r)

would this do the trick?

let us know, thanks!
0
 
DonConsolioCommented:
use the "AT" scheduler to run the "shutdown.exe" utility

AT: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/at.mspx

you might try something like:
at \\computer 22:30 /every:M,T,W,Th,F,S,Su c:\WINDOWS\system32\shutdown.exe  -r -f
0
 
chillepodAuthor Commented:
Hello,
Would the force shutdown and restart log the user back on the PC?
Thanks
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
dn0rmCommented:
no it would not...it would simply restart the machine, do you need the user to be logged back on or would you prefer this not to happen?

i imagine that at the very least the machine would go into "lock" by the time they came back in in the morning if the reboots weren't happening so the machine would be in a pretty similar state - just no applications would be running (but this would be expected) due to the reboot :)

thanks and let us know if there are other questions.

0
 
johnb6767Commented:
You need to take into account the fact that you might cause user's to lose data. Its great that you can say "we warned you, so sorry" until the VP calls saying that he lost a days worth of critical work...

Then the crap hits the fan...

Just need to keep that in mind...

If you have to do this, consider a weekly thing over the weekend...
0
 
farjadarshadCommented:
@ECHO OFF
SHUTDOWN -r -f -m \\192.168.1.1 -t 00
EXIT /B 0

type this script in the notepad file and save it with any name but extension should be .bat or .cmd and now schedule it with task scheduler. For detail on task scheduler can be access from following sites

http://support.microsoft.com/kb/308569
http://www.iopus.com/guides/winscheduler.htm 
0
 
Guillermo FeijóoSystems administratorCommented:
Hi:

   Have you considered doing it using scheduled tasks?
0
 
chillepodAuthor Commented:
That was what I was looking for.  Thanks
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now