Discussion:
Power Options - Disable Prompt for password when computer resumes from standby
(too old to reply)
m***@gmail.com
2008-02-10 23:44:20 UTC
Permalink
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.

I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.

I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
Marco Shaw [MVP]
2008-02-11 13:03:50 UTC
Permalink
Post by m***@gmail.com
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.
I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.
I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
To enable:
POWERCFG /GLOBALPOWERFLAG on /OPTION RESUMEPASSWORD
To disable:
POWERCFG /GLOBALPOWERFLAG off /OPTION RESUMEPASSWORD

This might help you pinpoint the registry changes, or just use
wscript.shell or call it directly from PowerShell to modify.

Marco
--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
Marco Shaw [MVP]
2008-02-11 13:04:55 UTC
Permalink
Post by m***@gmail.com
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.
I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.
I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
To enable:
POWERCFG /GLOBALPOWERFLAG on /OPTION RESUMEPASSWORD
To disable:
POWERCFG /GLOBALPOWERFLAG off /OPTION RESUMEPASSWORD

This might help you pinpoint the registry changes, or just use
wscript.shell or call it directly from PowerShell to modify.

Marco
--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
J Ford
2008-02-11 13:18:01 UTC
Permalink
There is a cmd line tool in XP SP2 called POWERCFG.EXE that you can set that
option.

:\>POWERCFG.EXE /G OFF /OPTION RESUMEPASSWORD
Post by m***@gmail.com
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.
I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.
I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
J Ford
2008-02-11 13:21:02 UTC
Permalink
For the registry location it is:
HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies

However it is a REG_BINARY value that I am not sure how it is broken down.
Post by J Ford
There is a cmd line tool in XP SP2 called POWERCFG.EXE that you can set that
option.
:\>POWERCFG.EXE /G OFF /OPTION RESUMEPASSWORD
Post by m***@gmail.com
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.
I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.
I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
Fabrizio
2014-02-25 14:25:12 UTC
Permalink
I just saw on Xp Sp3 that the fourth last byte is 12 (Hex!) when no password requested but is 16 when password is requested.

It's worked:
1) Using a limited account I cannot change in no password on resume;
2) I changed from 16 to 12 the fourth last byte of HKCU\Control Panel\PowerCfg\GlobalPowerPolicy\Policies;
3) Hibernate;
4) On resume no password requested!

Fabrizio

Jon
2008-02-13 08:23:27 UTC
Permalink
Registry key on Vista is

ScreenSaverIsSecure (reg_sz type) - values 0 or 1

at

HKEY_CURRENT_USER\Control Panel\Desktop

It may be similar on XP.

but you'll probably need more than a registry change, for it to take effect.
--
Jon
Post by m***@gmail.com
Is there any way to script enabling and disabling of this setting on
the Advanced tab of the Power Options control panel applet? The script
needs to apply to Windows XP Professional SP2.
I've used regmon.exe to check which registry entries get modified when
you apply the setting change but it is not clear which registry key is
for the "Disable Prompt for password when computer resumes from
standby" setting.
I've also had a look through the WMI classes and although there is a
Win32_PowerManagementEvent class, I can't spot anything that looks
relevant to this setting.
Jon
2008-02-13 08:26:38 UTC
Permalink
Sorry ignore that one. I misread your question - that was for resume after
screen savers. Use powercfg as Marco suggested
--
Jon
Loading...