I'm using a batch script to change the desktop background. I'm using a test script to just do this one component which will later be become a part of a more involved script. The test script has the following
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "C:\Users\username\Pictures\mypic.PNG" /f
RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters
This works as expected (refreshing instantly or after a sign out/sign in) and sometimes there is no change. I have also tried with .bmp files and have the same inconsistency. Any ideas why?