Tech Support > Operating Systems > Windows 2003 > Automatic reboot
Automatic reboot
Posted by Paul Dussault on January 31st, 2004


Hi all,

We would like many Win XP machines to automatically reboot, at fixed
intervals, on a Win 2000 network. Is this possible using GPOs only? How can
this be done?

Thanks in advance

Paul Dussault, MCP


Posted by Chriss3 on January 31st, 2004


Schedule a Task to run shutdown -r

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNewJob = objWMIService.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create _
("shutdown -r", "********123000.000000-420", _
True , 1 OR 4 OR 16, , , JobID)
Wscript.Echo errJobCreated

Script Sample from Microsoft TechNet Script Center
(http://www.microsoft.com/technet/tre...chnet/scriptce
nter/schedule/Scrsch04.asp?frame=true)

Assign the script as an startup script within a Group Policy
http://www.microsoft.com/windows2000...tupscripts.htm


--
Regards,

Christoffer Andersson
No email replies please - reply in the newsgroup
If the information was help full, you can let me know at:
http://www.itsystem.se/employers.asp?ID=1

"Paul Dussault" <paulduss@hotmail.com> skrev i meddelandet
news:%23GkfxxA6DHA.2908@tk2msftngp13.phx.gbl...


Posted by Paul Dussault on February 3rd, 2004


Christoffer,

Seems to be exactly what I need.
I've tried some scripts, they worked fine.
I will assign them to GPOs in the next few days.
Thanks a lot!
Paul Dussault, MCP

"Chriss3" <noSpamHere@chrisse.se> a écrit dans le message de
news:eKnmZVB6DHA.2312@TK2MSFTNGP12.phx.gbl...


Posted by Shafiq ur Rehman on February 24th, 2004


this script makes a job to run on specific days of week, how to make a
job to run on dates of month say(1,10,20,25) of each month ?? i have
tried

at.exe 10:00 /every:1,10,20,25 C:\MyExe.exe for AT.exe solution

and for another try of the script that you people are discussing i
tried following code:

errJobCreated = objNewJob.Create _
("C:\Program Files\BPToolkit\VerChecker.exe", _
"********123000.000000-420", True, , 4 or 8 or 32 or 128, ,
Jobid)

as true is for reprating task and "4 or 8 or 32 or 128" is for the
days of month but the created task show me only 3, as binary value of
the "4" is 3 in enumeration.

if some one know any solution to run an exe on 1,10,20 of every month
then please help me.

Best Regards,

Shafiq Rao.


Similar Posts