Click to See Complete Forum and Search --> : Arguments for Reebooting Windows


chem1
August 4th, 1999, 11:58 PM
what are the arguments that ExitWindowsEx ( or ExitWindows) API takes for reebooting windows.
Thanks

Lothar Haensler
August 5th, 1999, 02:01 AM
you cannot "reboot windows".
you can reboot your PC, which means that the PC is rebooted and you are confronted with the windows start menu.
There used to be an EW_RESTARTWINDOWS flag, but that was only in Win16 (WfW) AFAIK.
All you can do is reboot your PC IMHO using ExitWindowsEx(EWX_REBOOT)

chem1
August 5th, 1999, 02:12 AM
Thank You for the solution .When I said rebooting Windows I meant rebooting the PC.However I have already tried this argument but it does not work .Perhaps the problem lies somewhere else.In any case I am going to try again.
Thanks

Lothar Haensler
August 5th, 1999, 02:13 AM
if you do that under Windows NT, the process is rather difficult. You need to use the AdjustTokenPrivilege API to give yourself the privileges for shutting down Windows (NT).