Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I manually change the background image in the registry, how can I force it to refresh without logging off?

I know that bginfo does it, but I would like to keep things simple and not use any software.

share|improve this question
up vote 5 down vote accepted
RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters 1, True
share|improve this answer
This doesn't seem to work in win7 x64... anyone have something that works for that? – Jon Kloske Apr 29 '14 at 1:50
Using it as RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters 1, True seems to work on my machine (note the missing comma behind UpdatePerUserSystemParameters) – Nebula Aug 11 '15 at 9:28
  • Open Task manager
  • Kill explorer.exe
  • If the shell doesn't immediately restart
  • From the menu select File > New Task
  • Type "explorer.exe" and hit enter.
share|improve this answer
Good thought, but that simply doesn't solve it. – Nathan Strutz Sep 3 '15 at 14:01

I was trying to do something similar - update a registry setting for the start menu and then immediately have the start menu reflect the changes.

The solution from this MSDN question worked for me perfectly.

You could try broadcasting a WM_SETTINGCHANGE message. For example:

class Program
    [DllImport("user32.dll", SetLastError = true)]
    private static extern IntPtr SendMessageTimeout(IntPtr hWnd, int Msg, IntPtr wParam, string lParam, uint fuFlags, uint uTimeout, IntPtr lpdwResult);

    private static readonly IntPtr HWND_BROADCAST = new IntPtr(0xffff);
    private const int WM_SETTINGCHANGE = 0x1a;
    private const int SMTO_ABORTIFHUNG = 0x0002;

    static void Main(string[] args)
        SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, IntPtr.Zero, null, SMTO_ABORTIFHUNG, 100, IntPtr.Zero);
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .