So I have an odd issue. I've been creating a batch file that changes the desktop wallpaper periodically via changing the registry key and then refreshing it. The registry key changes just fine, however refreshing it doesn't work. I have to copy the path from the key, then copy it somewhere else (ex. the Chrome omnibox) and then copy that from that place and put it back into the key. After that, if I refresh it, it works perfectly fine. The code I'm using:
@reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "%~dp0IMGS\16.bmp" /f
(changes the path for the Wallpaper key to C:\Program Files (x86)\Sorted\Coding\Batch\WallpaperManager\IMGS\16.bmp
)
The refresh to apply it:
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
Does anyone know how to make it work for the batch file?