2

I have two cmd scrips that allow me to toggle my PC between "performance" and "quiet" modes, killing or relaunching some apps, switching power plans and so on.

I would like to make them also switch between visual effects settings, namely "Adjust for best performance" "Let Windows choose". I tried REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects /v VisualFXSetting /t REG_DWORD /d 2 /f and REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects /v VisualFXSetting /t REG_DWORD /d 0 /f, however the only thing, registry editing is achieving is changing the option picked in the setting GUI. Even the "Apply" button stays disabled. I tried logging off and even that doesn't apply the changes.

Is there a way to change the visual effects from a cmd script with a change being applied immediately? Something like powercfg.exe /setactive, but for the SystemPropertiesPerformance.exe? Maybe a small program, somebody designed specifically for that?

1

There are two registry changes required for changing the visual effects options, followed by logout or restart.

VisualFXSetting

This DWORD item is found at key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects and its values are:

  • 0 (zero) for Let Windows choose what's best for my computer settings
  • 1 for Adjust for best appearance settings
  • 2 for Adjust for best Performance settings
  • 3 for Custom settings, if the user changed individual visual effect settings.

UserPreferencesMask

This DWORD item is found at key HKEY_CURRENT_USER\Control Panel\Desktop and can have the following values:

  • Let Windows choose what's best for my computer : 9E 1E 07 80 12 00 00 00
  • Adjust for best appearance : 9E 3E 07 80 12 00 00 00
  • Adjust for best Performance : 9E 12 03 80 10 00 00 00
  • Custom : The binary value of 1001ABC0 00D1EF10 00000G11 in the first 3 bytes

Each of the above letters ABCDEFG has the value 0=off and 1=on, as follows:

  • A : Smooth-scroll list boxes
  • B : Slide open combo boxes
  • C : Fade or slide menus into view
  • D : Show shadows under mouse pointer
  • E : Fade or slide ToolTips into view
  • F : Fade out menu items after clicking
  • G : Show shadows under windows

References :

  • I was kind of hoping for a way to achieve this without logging off, but well. I guess that's Windows for you/ – HAWPIZNOTWORKman Nov 22 '18 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.