Click to See Complete Forum and Search --> : how to shutdown the windows but don't turn off the power of computer.


victor_liu
June 10th, 2003, 08:33 AM
Hi,

I try to shutdown/terminate the windows systems but don't power off the PC.
I use the InitiateSystemShutdown( NULL, NULL, 0, TRUE, FALSE) in NT4. 2000,XP(have no any service pack), it can help me to do that, but the strange thing is on widnows XP with service pack 1, when the program call InitiateSystemShutdown(), the system was shutdown then the PC was power off too, why ? this situation also happen on Windows Server 2003.
my PC is powered by ATX power supply and ACPI supported in mainboard.
I try the ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, NULL) also, whatever in Windows 98,ME,NT4,2000,XP,2003, it alway shutdown the system then power off the computer. although It have not EWX_POWEROFF parameter, but it still power off the computer.

did you know what method can help me to do this propose, to shutdown system only but not power off the computer ?

thanks.

Victor.

AlionSolutions
June 11th, 2003, 07:16 AM
Have you tried EWX_LOGOFF instead of EWX_SHUTDOWN ?

regards

Juergen

victor_liu
June 11th, 2003, 10:31 AM
Hi,

Actually I hope the system will staty the state of "you can safely to turn off your computer right now" when I ask the system to be shutdown, at this situation, I can safely power off PC at later by useing external method, such as auto switch. but if I ask system log off only, system will staty at state of logon, at this situation to power off PC is not safely.

in old PC system, it have no ATX Power suplly, that is easy to do shutdown system but not power off it. but almost PC at present, the ATX power supply was supported, that is become hard to do that.

did you have any idea to do shutdown only but not power off from the view of software or programming.

Thanks.

Victor.