>Look in the Win32API.hlp file (Fox 2.6 & 3.0). There is a function in there to shut down the PC. The function is ExitWindows or ExitWindowsEx. I have used this but failed to get it working properly. Apparently due to permissions. If you get it working, I would like to see the command combination you use.
Assuming Win95 with APM enabled, the following will work:
DECLARE SHORT ExitWindowsEx IN Win32API ;
INTEGER nShutDownMode, ;
INTEGER nReserved
DECLARE INTEGER ExitProcess IN Win32API ;
INTEGER ExitCode
#DEFINE LoginNewUserFlagValue 0
* This will start the new user login w/o complete shutdown, and under some circumstances
* leaves the app running when the new user logs in if you don't take care to die quickly
#DEFINE ShutdownFlagValue 1
* This will force a complete shutdown, with APM, power off
#DEFINE RestartFlagValue 2 && This will restart Windows
* This shuts down Windows and warm-boots
* Pick your poison, and execute:
ON SHUTDOWN ExitProcess(0)
nMyReturnValue=ExitWindowsEx(nChosenSutdownMode,0)
Ed
CLOSE ALL
FLUSH