user32.dll,UpdatePerUserSystemParameters - no longer works [Windows 7 Ultimate x64] RRS feed

  • Question

  • This command no longer works on windows 7 ultimate x64.
    My intended use was to refresh/update the desktop background after the background is changed in the registry (so that the new one shows up)
    %WinDir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
    Any fix/workaround would be appreciated, thanks
    Tuesday, February 2, 2010 4:34 AM

All replies

  • The best way to change the desktop background programmatically is using the Win32 API. The Win32 API is supported by Microsoft and unlikely to change in next versions of Windows:

    SystemParametersInfo Function


    If you have questions about this API, post them to the MSDN forums: http://social.msdn.microsoft.com/Forums/en-US/windowsuidevelopment/threads
    Microsoft MVP Windows Desktop Experience
    Tuesday, February 2, 2010 12:00 PM
  • Hello,

        How do you access this new function in a batch file on a WIndows 7 machine?

    Monday, July 8, 2013 7:15 PM
  • This command line should do the job:

    %windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

    With a VBScript:

    Set oShell = CreateObject("WScript.Shell")
    oShell.Run _
    "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
    1, True

    love is rock!!!

    Tuesday, July 9, 2013 8:01 PM