Solved

How do I write a script with a timer to reboot XP and 2K workstations?

Posted on 2009-04-07
5
598 Views
Last Modified: 2012-05-06
Hi Folks,

I'm a newbie to the world of Scripting. I will presume VBScript is able to restart systems as I have come across a few simple scripts to do that.

I will like to create a script to be pushed from SMS to do a mandatory restart of W2K and XP workstations. There should be a prompt telling the user to save all their files and restart now or it will restart automatically in 90mins.

- If the user click restart now, there will be another prompt to inform user to save their files before clicking on the restart button.
- If the user click restart in 90mins, there will  be a pop up timer to show how many minutes more before restart.

Any advice is greatly appreciated.

Thanks
Derek
0
Comment
Question by:Decarn
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:yehudaha
ID: 24094455
0
 

Author Comment

by:Decarn
ID: 24094582
Hi yehudaha,

PsShutdown is a utility and I have to insert the computer names in. As I already have SMS with the collection of all the computers, I'm looking at how I can push down a single script to restart all these systems without the need for any third party software.

0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24096199
most newer operating systems include shutdown.exe
Not sure if that would meet your needs or not?
We add a custom app to our sms packages that shutdown the pc after verifying some things using this:

shutdown -s -t 10 -f
0
 

Author Comment

by:Decarn
ID: 24103396
Hi sirbounty,

shutdown command does not exist for WIN2K. My environment has both W2K and XP system.
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 100 total points
ID: 24103629
Then use this method:

C:\Windows\Rundll32.exe shell32.dll,SHExitWindowsEx 0x2

outlined at http://www.trap17.com/index.php/automated-restarts-shutdown_t20408.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 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