Hibernate once - resume many

G

Guest

Does anyone know how to remove the hibernate option from the Power Off
options window? I only want "Turn Off" and "Restart" as options.
 
K

KM

Alec,

Just disable the Hibernation support at run time (power applet, IIRC) or in TD Configuration on HAL (PC) component settings page.
 
K

KM

Alec,

Yes, it will certainly disable HORM.

Unfortunately, the dialog you are asking about is a part of MS Gina. Without replacing the Winlogon's GINA I don't know any easy and
legal way to "change" the button layout on the dialog.
The dialog shows the Hibernate and StandBy button querying to NtPowerInformation to check whether the Hibernate and StandBy features
supported. There is no registry control of the button appearance :-(
 
G

Guest

Thanks for the help, please take a look at the following. In Target
Designer, please search under Help for "Design Considerations for using EWF
with Hibernation". The second paragraph under the first bullet recommends
removing the Hibernation option from the Shutdown menu. It does not say how
to accomplish this task.
 
K

KM

Alex,

Good catch. I'd also love to know how they were thinking to accomplish that. Unless they talk about a custom shell there where we
create the "shutdown" menu ourselves, I don't know an easy way to remove the Hibernate/Standby options (buttons) off the Explorer
standard shutdown dialog (more specifically, Winlogon/Gina).

If you find a way, let us know here. That would be an interesting finding.
 
G

Guest

Does anyone from Microsoft monitor this group? If so they may be able to
shed a little light on this one.
 
S

Slobodan Brcin \(eMVP\)

Alex,

I have no enough time right now to try to figure this out (test this), but
please try following and let us know:

Use LsaRemoveAccountRights to revoke SE_SHUTDOWN_NAME privilege for all user
accounts including admin accounts except the account which privileges you
will use for hibernation.
Or after HORM resume you can revoke this right for current user.

In registry I think that this info is stored in
HKLM\SECURITY\Policy\Accounts\AccountSID.

Have fun with this and let us know if you figured this out.

Regards,
Slobodan
 
K

KM

Slobodan,

Although it is a good idea I don't think it is going to work.
From my investigation it seeemed that that MS Gina code that is responsible for the "Turn Off" dialog requests for (enables) the
SE_SHUTDOWN_NAME privilege for the current user temporarily prior and while making the call to NtPowerInformation :-(

I guess this is one more feature to be requested for XPe to make it more *embedded*.

Regards,
Konstantin
 
S

Slobodan Brcin \(eMVP\)

Konstantin,

Are you sure that it enables the SE_SHUTDOWN_NAME privilege?
I think that this should work on principle if you have enough rights then
you can take SE_SHUTDOWN_NAME as we do when we want to reboot.

If we revoke that rights then you should not be able to associate
SE_SHUTDOWN_NAME right with your process token.
This should be tested or at least analyzed from doc I'm talking here from
head and it is 8:00 AM I'm too much dizzy to thinks straight.

Regards,
Slobodan
 
K

KM

Slobodan,
Are you sure that it enables the SE_SHUTDOWN_NAME privilege?

Yes, I am :-( I saw the calls to OpenThreadToken/LookupPrivilegeValue(SE_SHUTDOWN_NAME)/AdjustTokenPrivileges(SE_PRIVILEGE_ENABLED)
on the trace.

This is really not an embedded design but on XP Pro it is likely for good becuase regardless of the current user rights&priviledges
you want them to have all the buttons enabled on the Gina dialogs.

Regards,
Konstantin
 
S

Slobodan Brcin \(eMVP\)

Konstantin,

Just now I have tried this (or something else I will see) from gpedit.msc

gpedit.msc
Computer Configuration
Windows Settings
Security Settings
User Rights Assignement
Shut down the system

If your account is not in this list you won't be able to acquire
SE_SHUTDOWN_NAME regardless whether you are admin account or not.
Also GINA will remove dialog for restart/shutdown etc completely.

You could do hibernation with system account credential or with credentials
of some other account that is on the list.

Regards,
Slobodan
 
A

Alex C.

I expected this to be a simpler task. For now I just
disabled the "Show Shutdown" option in User Interface
Core. This is not a perfect solution, but accomplished
the basic goal. Proper power cycles in the field can be
accomplished thru command line commands.

Thanks for all of your help.

-----Original Message-----
Slobodan,
privilege?

Yes, I am :-( I saw the calls to OpenThreadToken/LookupPrivilegeValue
(SE_SHUTDOWN_NAME)/AdjustTokenPrivileges
(SE_PRIVILEGE_ENABLED)
on the trace.

This is really not an embedded design but on XP Pro it
is likely for good becuase regardless of the current user
rights&priviledges
you want them to have all the buttons enabled on the Gina dialogs.

Regards,
Konstantin
enough rights then you can take SE_SHUTDOWN_NAME as we do
when we want toto associate SE_SHUTDOWN_NAME right with your process
token.I'm talking here from head and it is 8:00 AM I'm too much
dizzy to thinkscode that is responsible for the "Turn Off" dialog
requests for (enables) thetemporarily prior and while making the call to
NtPowerInformation :-(this out (test this), but please try following and let us
know:SE_SHUTDOWN_NAME privilege for all user accounts
including admin accounts except thethinking to accomplish that. Unless they talk about a
custom shell there wherean easy way to remove the Hibernate/Standby options
(buttons) off theis a part of MS Gina. Without replacing the Winlogon's
GINA I don't know anybutton querying to NtPowerInformation to check whether
the Hibernate and StandBytime (power applet, IIRC) or in TD Configuration on HAL
(PC) componentnot related to the post itself. Let us know if you meant
something else.
 
K

KM

Slobodan,

We must have been talking about diferrent things. I was referring to particulary StandBy/Hibernate buttons on the Shutdown (Turn
Off) dialog and lack of the way to remove those. The original poster was not intending to remove the sutdown completely.

There is no doubt you can remove the shutdown option off the Explorer menu (start menu, e.g.) with the Explorer shell policies.

Regards,
Konstantin
 
S

Slobodan Brcin \(eMVP\)

Konstantin,

You are right, I forgot what was the original question and the problem.

Regards,
Slobodan
PS:
There is a way, but I would not consider using it, you can make a dummy
driver that you can start after first resume and that driver could tell OS
that it is not capable to do hibernation, this might help.
 
K

KM

Slobodan,
PS:
There is a way, but I would not consider using it, you can make a dummy
driver that you can start after first resume and that driver could tell OS
that it is not capable to do hibernation, this might help.

After you said that, I was thinking about similar thing but for Standby feature. If a [dummy] driver didn't support going to S3 mode
then the StandBy would not work. Even more, you can change some driver behaviour to not suport going to StandBy mode (some LAN card
have such options, modems, etc.), then with devcon it may be easy to utilize that.

Konstantin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

HORM 1
HORM: Reboot after hibernating 2
Windows XP Power Options 2
Unexpected Hibernate 4
Can't Manually Select Hibernate Mode 4
Hiberate has become Stand By 21
no hibernate button 15
Missing Hibernate 5

Top