General discussion

Locked

Shutdown Windows 2000 from command-line

By Peter Kovacs ·
Hi,

I would like to schedule my Windows 2000 Professional machine's shutdown. For this I would need a command-line utility which forcibly shut the system down.

I tried the SHUTDOWN.EXE (shutdown /l /t:0 /y) from NT4 ResKit but it frequently fails to stop the opsys.
Another utility was the winstop.exe it works better but also got problems sometimes.

Could you recommend something which shuts the sys down and closes/kills running applications?

Thank you.

This conversation is currently closed to new comments.

11 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Shutdown Windows 2000 from command-line

by avidetto In reply to Shutdown Windows 2000 fro ...

shutgui will do this, use the kill switch with it..also you may want to script in a kill command from the reskit..ie
rkill /nkill \\boxname servername (that you need to kill)

would go something like this:
rkill /install \\boxname
rkill /nkill \\boxname servicename
rkill /nkill \\boxname servicename (cont.for each)...
then the shutgui command here.

Note, I would list all services that are giving you problems, then kill them remote on each one..(all machines reguardless if they are giving errors).
note this can also be used with your shutdown.exe dame switches, just do the rkill prior to trying this, ,that way you won't fail with the opsys..this can kill them..also rem that shutgui has a kill all feature, that will allow it to kill anything that is still open after the rkill..good luck-Al

Collapse -

Shutdown Windows 2000 from command-line

by Peter Kovacs In reply to Shutdown Windows 2000 fro ...

The question was auto-closed by TechRepublic

Collapse -

Shutdown Windows 2000 from command-line

by wim In reply to Shutdown Windows 2000 fro ...

If you don't want a gui at all you can use shutdown.exe from the same reskit.
The /c option provides for forcing to close applications and you can also specify reboots etc.
An addition to the kill command in the previous answer might be to use 'pskill' from sysinternals (http://www.sysinternals.com)

Wim
--

http://www.win2kwereld.nl

Collapse -

Shutdown Windows 2000 from command-line

by Peter Kovacs In reply to Shutdown Windows 2000 fro ...

The question was auto-closed by TechRepublic

Collapse -

Shutdown Windows 2000 from command-line

by ryank In reply to Shutdown Windows 2000 fro ...

I have a windows VBScript that can do it. It's a code sample from microsoft. The code is below. Just save this as a .vbs file from a text editor and use the AT to schedule a batch file to run cscript and execute the vbs file at a specified time.
----------------begin code----------------


'********************************************************************
'*
'* File: REBOOT.VBS
'* Created: July 1998
'* Version: 1.0
'*
'* Main Function: Reboots a machine.
'* Usage: REBOOT.VBS [/S:server] [/U:username] [/W:password] [/F] [/Q]
'*
'* Copyright (C) 1998 Microsoft Corporation
'*
'********************************************************************

OPTION EXPLICIT
ON ERROR RESUME NEXT

'Define constants
CONST CONST_ERROR = 0
CONST CONST_WSCRIPT = 1
CONST CONST_CSCRIPT = 2
CONST CONST_SHOW_USAGE = 3
CONST CONST_PROCEED = 4
CONST CONST_REBOOT = 2
CONST CONST_FO

Collapse -

Shutdown Windows 2000 from command-line

by Peter Kovacs In reply to Shutdown Windows 2000 fro ...

The question was auto-closed by TechRepublic

Collapse -

Shutdown Windows 2000 from command-line

by ryank In reply to Shutdown Windows 2000 fro ...

Oops, email me for the VB script. I forgot that these forums have a word limit.

Ryan

Collapse -

Shutdown Windows 2000 from command-line

by Peter Kovacs In reply to Shutdown Windows 2000 fro ...

The question was auto-closed by TechRepublic

Collapse -

Shutdown Windows 2000 from command-line

by Aaron_Wurthmann In reply to Shutdown Windows 2000 fro ...

Okay call me crazy but did you try the one from the Windows 2000 Professional resource kit? Works fine for me, and yes you scan scehdule AT jobs to run it, and you can shutdown other machines on the network too.

I can e-mail it to you if you like.

Collapse -

Shutdown Windows 2000 from command-line

by Peter Kovacs In reply to Shutdown Windows 2000 fro ...

The question was auto-closed by TechRepublic

Back to Windows Forum
11 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums