Q

Looking for VB script that will automatically shut down Win2k and XP

I would like to write a VB script to auto shut down Win2k and WinXP. I wrote the script and kept it in a *.bat file, but it still failed to shut down. Please advise. When I started looking at this question, I didn't realize there were so many ways to shut down a machine! For Windows XP and Windows Server 2003, a new command line program, SHUTDOWN.EXE, takes all the work out of it. Using the command "SHUTDOWN -s -t 1" will turn off the...

computer immediately. The "-s" command line options specifies shutdown, and the "-t 1" says to delay one second (in other words, immediately). The SHUTDOWN program also powers off the machines if they have relatively recent BIOS.

In researching this question, I was all set to write some VBScript code to do the shutdown on Windows 2000 when I ran across Rob van der Woude's outstanding scripting resource page. On Rob's Web site there are all sorts of great Windows Script Hosting (WSH) examples as well as batch files galore.

This was first published in February 2003

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close