Solved

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

Posted on 2009-04-07
5
601 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
[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
  • 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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

628 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