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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access97-shutdown

Status
Not open for further replies.

vilifm

Programmer
Feb 13, 2003
3
SI
How can I create modul for shotdown (reboot,or logoff)for machine. I have XP profesional. On win98,or ME works good with this example:

Declare Function Shutdown Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Global Const EWX_LOGOFF = 0
Global Const EWX_SHUTDOWN = 1
Global Const EWX_REBOOT = 2
Global Const EWX_FORCE = 4

Function Stop()
dim I as long
I = Shutdown(EWX_SHUTDOWN, 1)
end function
Thanks
 
Woody's Windows XP newsletter detailed a command line shutdown for XP.

Check out

Coupled with the call function you could shutdown the machine. That leaves you having to detect the OS. I didn't read the article but check out


I love freeanswers.com! I never would have found the KB article using the MS search.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top