Skip to content

Conversation

zhou7510
Copy link

Previously, the code relied on language-specific output from powercfg -q to extract the GUIDs for the current power scheme, display subgroup, and brightness setting. This approach failed on Windows systems using non-English languages due to localized descriptions (e.g., (Display) or (Display brightness) not matching).

This fix:

  • Uses powercfg /getactivescheme to reliably obtain the active power scheme GUID.
  • Leverages powercfg -aliases combined with findstr to extract the GUIDs for SUB_VIDEO and VIDEONORMALLEVEL aliases.
  • Eliminates dependency on localized output, ensuring compatibility across different Windows language settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant