I am trying to change my wallpaper with a relatively simple batch file:
reg add "HKEY_CURRENT_USER\control panel\desktop" /v wallpaper /t REG_SZ /d C:\Users\*censored*\Picture.jpg /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
exit
This code is only working every 3rd or 4rth trial. This actually really confuses me since in my little programming history a code either worked or failed. I have never had the experience that a code has to be in the right mood to actually run ;).
My first intuition was to try the brute force way and just copy-paste this one liner a few dozen times.
This did not solve the problem but quite contrary reduced the likelyhood that it actually changed my desktop wallpaper by a lot. I've also tried .png
and .bmp
pictures instead of .jpg
. Since i am not at all educated in this type of programming, im pretty much screwed at the moment. Maybe someone of you can help me out. Thank you in advance if you can.
PS: Before anyone suggests to just change my wallpaper in the settings: I am trying to change it remotely by using alexa in order to match it with my philips hue lighting.