Start “” /b RUNDL元2.EXE user32. If “!Wtime!” geq “20” reg add “HKEY_CURRENT_USER\Control Panel\Desktop” /v Wallpaper /t REG_SZ /d “D:\MEGA\Obrazy\Tapety Desktop\mojave_dynamic\mojave_dynamic_15.jpeg” /f & goto done If “!Wtime!” leq “20” reg add “HKEY_CURRENT_USER\Control Panel\Desktop” /v Wallpaper /t REG_SZ /d “D:\MEGA\Obrazy\Tapety Desktop\mojave_dynamic\mojave_dynamic_8.jpeg” /f & goto done Using it as RUNDL元2.EXE USER32.
So I figured it out that the “dll line” should be repeated at least 5 times – now the code works everytime :DĪdd this batch script to your scheduler (at logon and at 20:01) and you will have automagic wallpaper changer based on the time of the off I have tried using the RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters ,1 ,True command but this will only update the wallpaper, not the background colour. As far as I am aware there is no built-in command to set the wallpaper, however you can create a function that will work in the same way. The problem was it sometimes did work at 1st attempt, sometimes after 5th attempt. RUNDL元2.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True This is not strictly PowerShell code, but will run fine from a powershell console or script.
Ive been working at this for a little while, and I would like to be able the change my desktop according to what day of the week it is. If past – sets night wallpaper if before – sets day wallpaper. Alexial (Programmer) (OP) 20 Feb 09 22:18.
It checks if it is before or after 20:00 o’clock.