Shutdonw /t 600 limit

B

Bildos

Hello,

How can I schedule shutdown my Vista with time more than 600 second ?

In XP there wasn't problem. In vista SHUTDOWN.exe /t is limited to 600
second
Any ideas ?


Redgards
Bildos
 
A

Andrew McLaren

Bildos said:
How can I schedule shutdown my Vista with time more than 600 second ?

Hi Bildos

Two possible approaches:

1) run shutdown.exe as a scheduled task. Use the "schtasks" command to
create the task from the command line:

C:\>schtasks /create /tn "My Long Shutdown" /tr
"C:\Windows\System32\shutdown.exe /s /f" /sc once /sd 03/10/2007 /st 16:02
/F /Z

.... will run shutdown.exe at 16:02 on 02 October 2007 (schtasks uses the
time and date formats for your configured region. For example, if you were
configured for the US, you would write 10/03/2007 instead). You can leave
out the "/sd 03/10/2007" parameter, and schtasks will default to the current
date:

C:\>schtasks /create /tn "My Long Shutdown" /tr
"C:\Windows\System32\shutdown.exe /s /f" /sc once /st 16:02 /F /Z

Put the command line in a batch file, to make it easier to run on a regular
basis:

C:\>MyShutdn.cmd 16:02

The main downside to this approach is the shutdown time is specified as an
absolute time (eg, 16:02) not a time relative to now (eg, in 700 seconds).


2) Call the WMI Win32Shutdown method in a VBScript. This method will
shutdown the computer immediately. But it will be trivial to add a couple of
lines to the script, to wait until the desired time, before calling the
method.

You'll find a description of Win32Shutdown here:
http://msdn2.microsoft.com/en-us/library/aa394058.aspx

and a sample script to shutdown immediately, here:
http://msdn2.microsoft.com/en-us/library/aa394591.aspx

Modifying this script to wait a certain number of seconds before calling
Win32Shutdown , is left as an exercise for the reader :) But it should be
easy.


There are probably several other techniques as well. Hope it helps,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top