Re: How Shutdown but not power off.
- From: "crus" <crus@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Feb 2007 18:37:55 +0100
Hello Konstantin,
your gues is right, even using
'ExitWindowsEx (EWX_FORCE | EWX_SHUTDOWN, 0)'
the system shuts down without warning message.
Looking in Device Manager at "ACPI uniprocessor PC" I see that power supply
mappings are s0->D0, S1, S2, S3, S4, S5 -> D3.
D0= PS ON D3=PS OFF.
Mapping is according bios since Hibernate is not enabled.
I fear that is not possible to modify behavior.
Thanks again for your help
"KM" <konstmor@xxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:u6pKFmlTHHA.1364@xxxxxxxxxxxxxxxxxxxxxxx
crus,
The problem is that if you are using ACPI HAL it reports back to app level
through power driver that your device supports PowerOFF (S5) state (and it
can be forced by software). If S5 state is supported and reported through
power capability flags (via NtPowerInformation API, for instance) then the
system will ignore PowerDownAfterShutdown key and the shell will always
call ExitWindows(EWX_POWEROFF) on shutdown.
You can try and write some test code to call ExitWindowsEx(EWX_SHUTDOWN)
(but not EWX_POWEROFF) manually to see if with the ACPI HAL you can even
see that dialog "It is safe now to turn off the computer" showing up. Just
make sure your calling process has the enough (SE_SHUTDOWN_NAME)
privileges to make the call.
(http://msdn2.microsoft.com/en-us/library/aa376868.aspx)
I don't think though it is going to work as the call gets forwarded to the
HAL anyway and it will turn the power off.
On the system with APM supported there is more that can be done but it is
a different story (you didn't mention APM at all in your post so I assume
it is not the feature on your hardware).
Btw, if instead of poweroff something like standby, hibernate or logoff is
accepted for your system specs, you can use "Shutdown settings" value
(feature of Explorer shell) to replace the default shutdown behavior. See
more here:
http://technet2.microsoft.com/WindowsServer/en/library/c187eb15-acc8-496d-b9bc-f95bb84cee1e1033.mspx
--
=========
Regards,
KM
Yes, I have done it, using Standard Pc or MPS Uniprocessor Pc the
behavior is as it should: no power off, but I should stay with ACPI
When I use Standard or MPS PC HAL init problem appears, such COMs and
Touch no more responding.
I'm investigating on that but a way to prevent power to go off on ACPI
should be better.
Regards
<jbcseri@xxxxxxxxx> ha scritto nel messaggio
news:1170871931.727825.137900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Have you tried to replace the computer component (ACPI Uniprocessor,
etc.) with Standard PC? You won't be able to use any other ACPI
functions, but you may get the behavior your looking for.
.
- References:
- How Shutdown but not power off.
- From: crus
- Re: How Shutdown but not power off.
- From: jbcseri
- Re: How Shutdown but not power off.
- From: crus
- Re: How Shutdown but not power off.
- From: KM
- How Shutdown but not power off.
- Prev by Date: Re: SP1 installation problem: CMI error
- Next by Date: help requried in building win xp-e
- Previous by thread: Re: How Shutdown but not power off.
- Next by thread: Startup is hiring in Silicon Valley
- Index(es):
Relevant Pages
|