Solved

Windows XP Reboot Script

Posted on 2011-02-10
8
645 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
8 Comments
 
LVL 3

Accepted Solution

by:
dn0rm earned 250 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 14

Assisted Solution

by:DonConsolio
DonConsolio earned 250 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now