Exiting windows  
Author Message
Broeden





PostPosted: Fri Jul 25 18:53:29 CDT 2003 Top

Visual Basic >> Exiting windows

I want to make a program that will power off a computer. My question is what
command I can use to shut down and power off a local and network computer
and how do I find other commands to use in the future?

Thanks

Belmont

Visual Studio66  
 
 
Zoury





PostPosted: Fri Jul 25 18:53:29 CDT 2003 Top

Visual Basic >> Exiting windows I forgot to specify a important one :
http://www.mentalis.org/index2.shtml

they also provide a utility named APIGuide wich is *very* usefull.

--
Best Regards
Yanick Lefebvre


: I want to make a program that will power off a computer. My question is what
: command I can use to shut down and power off a local and network computer
: and how do I find other commands to use in the future?
:
: Thanks
:
: Belmont
:
:

 
 
Fosco





PostPosted: Sat Jul 26 23:38:43 CDT 2003 Top

Visual Basic >> Exiting windows "Belmont"
> I want to make a program that will power off a computer. My question is what
> command I can use to shut down and power off a local and network computer

The Short Version (Win 9x)
The shortcut command line should be as follows:
For a shortcut to RESTART Windows:
C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexec
For a shortcut to SHUT DOWN Windows:
C:\WINDOWS\RUNDLL32.EXE user,exitwindows

The Long Version (Win 98/ME)
The command line should be as follows:

C:\WINDOWS\RUNDLL32 SHELL32.DLL,SHExitWindowsEx n

Where n is one of the following values, depending on the task you want to accomplish:

n=0 LOGOFF: n=1 SHUTDOWN: n=2 REBOOT: n=4 FORCE:
n=8 POWEROFF: n=-1 RESTART EXPLORER:

Shutdown & Restart Shortcuts for Windows XP & Windows 2000
Windows XP has an actual shutdown command that can be launched from a command prompt - and which, therefore, also can be launched
from a shortcut. To see all available options for this command, click Start, click Run, and type:

SHUTDOWN /?
This command starts a 30-second countdown for a shutdown or restart, which permits you to abort it (with a shutdown -a command).
It you want the command to execute, use the -t flag, which lets you set the time lapse in seconds. The examples below use a
1-second delay.

For a shortcut to RESTART Windows XP:
SHUTDOWN -r -t 01

For a shortcut to SHUT DOWN Windows XP:
SHUTDOWN -s -t 01

> and how do I find other commands to use in the future?

www.google.com "windows+shutdown"
--
Fosco