Skip to content

Registry values not cleaned up on exit via power button — Windows power options permanently disabled #1428

@Sub2Nex

Description

@Sub2Nex

Bug Report

Title: Registry values not cleaned up on exit via power button — Windows power options permanently disabled

Describe the bug

When closing SEB using the integrated power button (with or without a quit password), the NoClose registry value is intermittently not deleted after SEB exits.

This causes Windows to permanently hide the power/energy options from the Start Menu and taskbar. The restriction survives reboots since the value is written to the persistent machine and user registry hives.

To Reproduce

  1. Launch SEB with any config (password-protected quit or confirmation-only).
  2. Close SEB using the integrated power button in the SEB taskbar.
  3. After SEB fully exits, open regedit and check for NoClose (DWORD 1) in:
    • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
    • HKEY_USERS\<SID>\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  4. Reboot the machine.
  5. Observe: Windows power/energy options are still missing from the Start Menu and taskbar after reboot.

Expected behavior

All registry values set during an exam session are fully reverted on exit, regardless of how SEB is closed.

Actual behavior

The NoClose DWORD persists permanently in the registry after exit. Power/energy options remain hidden even after rebooting. The only resolution is manually deleting the value via regedit.

Workaround

Manually delete NoClose from:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  • HKEY_USERS\<SID>\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Environment

  • OS: Windows 10 / 11
  • Reproducibility: Intermittent — more likely when the Explorer\Policies subkey did not already exist before SEB launched

Additional context

The issue appears to be in the lockdown feature configuration restore/cleanup path (SafeExamBrowser.Lockdown). Specifically, MachinePowerOptionsConfiguration and UserPowerOptionsConfiguration silently fail to revert their changes on shutdown under certain registry key states.

Metadata

Metadata

Assignees

Labels

can't reproduceThis issue cannot be reproduced and thus also not be fixed.information requiredThis issue lacks information or requires feedback.staleThis issue had no recent activity and will thus soon be closed.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions