How do I make a script that will...

How do I make a script that will restart my computer automatically say every monday morning? I had at one time a simple batch file that would restart my computer using scheduled task manager to execute it, but I can't find it, and there must be some new way to script the same thing to do it more efficiently.

Windows Software 5498 This topic was started by ,


data/avatar/default/avatar06.webp

286 Posts
Location -
Joined 2001-07-17
How do I make a script that will restart my computer automatically say every monday morning?
 
I had at one time a simple batch file that would restart my computer using scheduled task manager to execute it, but I can't find it, and there must be some new way to script the same thing to do it more efficiently.
 
Any ideas?
 
I know this sounds odd, but there is a reason behind it. Lets just say we have an employee at another office 30 miles away who can't even begin to restart a computer EVEN with written directions..so my manager asked if there was a way to automate it.

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar39.webp

3867 Posts
Location -
Joined 2000-02-04
You'll still have to use Task Scheduler even if your write a VB script.

data/avatar/default/avatar01.webp

738 Posts
Location -
Joined 2002-12-11
Quote:How do I make a script that will restart my computer automatically say every monday morning

As long as the Task Scheduler Service is running

You can script an entire reboot using the commands AT and the shutdown.exe resource kit tool (native in XP).

It shouldnt take more then one or 2 lines for a batch file.

Still it is easier to use the GUI portion of the task scheduler and just copy and paste the task where it is needed.

HTH

data/avatar/default/avatar20.webp

645 Posts
Location -
Joined 2000-09-16
Why is a person using a computer they cannot even restart! That's scary!

data/avatar/default/avatar12.webp

138 Posts
Location -
Joined 2002-04-07
I do this once a week after doing the autoupdate. I use task scheduler and a program called winkick.

data/avatar/default/avatar03.webp

581 Posts
Location -
Joined 2002-04-27
they added a new command in 2k/XP. its called "shutdown"
 
!!
 
Just put shutdown in a batch file, and NAME THE BATCHFILE something OTHER than shutdown, like restart.bat
 
Then use task scheduler to run it.

data/avatar/default/avatar20.webp

645 Posts
Location -
Joined 2000-09-16
I tried to run shutdown.exe and nothing happens.

data/avatar/default/avatar04.webp

239 Posts
Location -
Joined 2002-06-19
Try this...
Open a command prompt start->All Programs->Accessories->Command Prompt
 
then type in shutdown /?
 
that'll give you some options to use with shutdown. the /? option is pretty helpful when you need to use a command but aren't quite sure about how to use it. /? simply means help on this command.
Hope this helps
 
Jim

data/avatar/default/avatar22.webp

46 Posts
Location -
Joined 2002-12-01
%windir%\system32\shutdown.exe -r -t 00

data/avatar/default/avatar28.webp

530 Posts
Location -
Joined 2001-10-09
Any of you guys knows how to hibernate a computer. I can't do it with the shutdown command.

data/avatar/default/avatar06.webp

286 Posts
Location -
Joined 2001-07-17
OP
Quote:Why is a person using a computer they cannot even restart! That's scary!

Very scary hehe

data/avatar/default/avatar06.webp

286 Posts
Location -
Joined 2001-07-17
OP
Quote:Try this...
Open a command prompt start->All Programs->Accessories->Command Prompt

then type in shutdown /?
Jim

Is this a Win2k Server command? I can't get it to work for Win2k Pro.

data/avatar/default/avatar04.webp

239 Posts
Location -
Joined 2002-06-19
Quote:Quote:Try this...
Open a command prompt start->All Programs->Accessories->Command Prompt

then type in shutdown /?
Jim

Is this a Win2k Server command? I can't get it to work for Win2k Pro.

It's not built in like it is with XP. It's in the resource kit though. Sorry about that... just kinda assumed you were using XP for some reason

data/avatar/default/avatar04.webp

239 Posts
Location -
Joined 2002-06-19
Quote:Thing is though, I don't know if it IS native to XP or not... I do have it online here, but this setup is coming up on a year old now & over time I have forgotten EXACTLY what I extended the OS with in that folder!


Man, I can't even count the times anymore I've said that too! But, yes it is included in the default install of XP Pro. Probably is in home also, but I'm assuming that as well...

data/avatar/default/avatar04.webp

239 Posts
Location -
Joined 2002-06-19
Quote:So, if you ever want to change that, that's pretty much all the data you need to alter system-wide search paths for DLL's &/or EXECUTEABLES... apk

Whoa! go easy on me there... I just woke up! haven't even had coffee yet!!

Thanks for the info though I never really knew how Windows dealt with search paths. I'll keep this though since I can remember a few times I've wondered what the order was for searching.

Jim