Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-07
5
Medium Priority
?
602 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 300 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

688 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