Solved

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

Posted on 2009-04-07
5
596 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 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