Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutdown Windows 2000 in VB6

Status
Not open for further replies.

valdosta

MIS
Dec 18, 2002
50
US
Hi, we need to shutdown Windows 2000 in VB6. This program will do backup each night and then shutdown the workstation where the program resides. Thanks in advance!
 
Thanks, ca8msm! lamrin says in thread713-448206 that "ExitWindowEx function. Using this function in Windows 95/98/Me it is easy to shutdown." I tried it anyway on my w2k machine and it did nothing.
 
There are various solutions to this one posted-

Try searching for InitiateSystemShutdown

As mentioned, you do need certain permissions to use the function, which may be why
>I tried it anyway on my w2k machine and it did nothing.

These process priveleges can be got programatically - look at some of the threads. there is also a WMI solution lurking

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top