?
Solved

Windows XP Reboot Script

Posted on 2011-02-10
8
Medium Priority
?
657 Views
Last Modified: 2012-05-11
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
Comment
Question by:chillepod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 3

Accepted Solution

by:
dn0rm earned 1000 total points
ID: 34867640
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
 
LVL 15

Assisted Solution

by:DonConsolio
DonConsolio earned 1000 total points
ID: 34867649
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
 

Author Comment

by:chillepod
ID: 34867700
Hello,
Would the force shutdown and restart log the user back on the PC?
Thanks
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 3

Expert Comment

by:dn0rm
ID: 34867705
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
 
LVL 66

Expert Comment

by:johnb6767
ID: 34867817
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
 
LVL 11

Expert Comment

by:farjadarshad
ID: 34868471
@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
 
LVL 3

Expert Comment

by:Guillermin-go
ID: 34870757
Hi:

   Have you considered doing it using scheduled tasks?
0
 

Author Closing Comment

by:chillepod
ID: 34871728
That was what I was looking for.  Thanks
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Disclosure: Use this tutorial only when no other options helps to get Windows XP running without any problems and you don't want to format the drive. The back up of the data is the responsible of the user, however there is a description of how t…
If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month8 days, 2 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question