Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: tspeirs on April 07, 2009, 02:48:40 pm

Title: wincontrol.exe - command line windows control
Post by: tspeirs on April 07, 2009, 02:48:40 pm
I know there are older programs that do the same thing but this one supports all windows controller options and deffinitly works with vista etc.

Pretty straightforward as long as you know what a command line interface utility is.

[.net 2 application.]
http://spesoft.com/wincontrol.zip

Here is the usage as shown when you run it.


--------------------------------------------------------------

WinControl by Tom Speirs.
Windows controller command line application.

Usage:
wincontrol.exe [-force] -shutdown|-logoff|-poweroff|-suspend|-restart|-hibernate
|-monitoroff|-close] [process names]

Control system state, turn off monitor or close process.

Use -force to force shutdown etc, or force kill a process if it does not close.

--------------------------------------------------------------
Title: Re: wincontrol.exe - command line windows control
Post by: drventure on April 07, 2009, 03:03:32 pm
Along the same lines, here's the excellent poweroff utility.

http://users.telenet.be/jbosman/applications.html

My main use is to turn off my monitors immediately and lock my machine with a quick hotkey. But it can sleep a machine, turn off, restart, etc, etc.
Title: Re: wincontrol.exe - command line windows control
Post by: headkaze on April 07, 2009, 03:08:29 pm
I've been using a 3rd party program to do this for years as I like to have icons to shutdown and restart on the desktop, but I have since found out that Windows has a command line app that can do it (located in WINDOWS\System32\shutdown.exe)

Code: [Select]
Usage: shutdown [/i | /l | /s | /r | /a | /p | /h | /e] [/f]
    [/m \\computer][/t xxx][/d [p:]xx:yy [/c "comment"]]

    No args    Display help. This is the same as typing /?
    /?         Display help. This is the same as not typing any options
    /i         Display the graphical user interface (GUI).
               This must be the first option
    /l         Log off. This cannot be used with /m or /d option
    /s         Shutdown the computer
    /r         Shutdown and restart the computer
    /a         Abort a system shutdown.
               This can only be used during the time-out period
    /p         Turn off the local computer with no time-out or warning.
               This can only be used with /d option
    /h         Hibernate the local computer.
               This can only be used with the /f option
    /e         Document the reason for an unexpected shutdown of a computer
    /m \\computer Specify the target computer
    /t xxx     Set time-out period before shutdown to xxx seconds.
               The valid range is 0-600, with a default of 30
    /c "comment" Comment on the reason for the restart or shutdown.
               Maximum of 127 characters allowed
    /f         Force running applications to close without forewarning users
    /d [p:]xx:yy  Provide the reason for the restart or shutdown
               p indicates that the restart or shutdown is planned
               xx is the major reason number (positive integer less than 256)
               yy is the minor reason number (positive integer less than 65536)
Title: Re: wincontrol.exe - command line windows control
Post by: tspeirs on April 07, 2009, 03:36:53 pm
and theres me thinking I was cool.  ;)