PC Review


Reply
Thread Tools Rate Thread

command line option to shut down/log off

 
 
oni
Guest
Posts: n/a
 
      9th Oct 2004
hi all,

what is the command line option to shutdown/log off from a
particular profile in win2k.

any help in this regard highy appereciated.

thanks in advance.


 
Reply With Quote
 
 
 
 
Paul R. Sadowski [MVP]
Guest
Posts: n/a
 
      9th Oct 2004
There's a shutdown exectuable in the resource kit, and there are a number of
them available as freeware. Do a Google search to find one. Shutdown is
included in XP but not 2K.

Alternatively using WMI and a VBS script:

'Shutdown.vbs
set osSet = GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem")
for each os in osSet
os.Win32Shutdown 1
' coment the above and uncoment the below for forced shutdown
' os.Win32Shutdown 5
next

Other values depending on exactly waht you want to do:
(use 0or 4 for logoff)
0 Log Off
0 + 4 Forced Log Off
1 Shutdown
1 + 4 Forced Shutdown
2 Reboot
2 + 4 Forced Reboot
8 Power Off
8 + 4 Forced Power Off


--
Paul R. Sadowski
Microsoft MVP (MSN Client)
http://www.paulsadowski.com/

"oni" <(E-Mail Removed)> wrote in message
news:11dd01c4ae32$b8d37480$(E-Mail Removed)...
> hi all,
>
> what is the command line option to shutdown/log off from a
> particular profile in win2k.
>
> any help in this regard highy appereciated.
>
> thanks in advance.
>
>



 
Reply With Quote
 
oni
Guest
Posts: n/a
 
      9th Oct 2004
thank you.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Command line option syntax error. Type Command /? for Help §ñühw¤£f DIY PC 2 19th Apr 2009 10:23 PM
Command line option syntax.error.type command for hlp/? =?Utf-8?B?amVyZW15?= Microsoft Outlook Discussion 6 29th Oct 2006 07:16 PM
how do shut down outlook from a command line =?Utf-8?B?UGhpbA==?= Microsoft Outlook Form Programming 0 28th Jun 2005 06:06 PM
Command Line Option Syntax Error - Type Command /? for Help Bob Breslin Microsoft Outlook Interoperability 2 14th Dec 2004 06:01 AM
How to shut down a PC through Command Line Khalid Munir Microsoft Windows 2000 3 12th Aug 2003 11:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:55 PM.