martinh.reg@xxxxxx wrote:
Quote:
> 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