How can I modify the BAT file in this post so it will randomly select 1 background contained in a folder containing multiple backgrounds?
Posted
by
Radical924
on Super User
See other posts from Super User
or by Radical924
Published on 2013-11-09T01:33:53Z
Indexed on
2013/11/09
4:01 UTC
Read the original article
Hit count: 180
Is there a way to modify the bat file from this post here: How do I set the desktop background on Windows from a script? so that it will randomly select 1 background image from a folder containing multiple images??? AND I would also like the background to randomly change to one of the backgrounds randomly contained in the same folder. If this is possible how would I modify the bat file below???
@echo off
reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "" /f
reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "C:\[LOCATION OF WALLPAPER HERE]" /f
reg delete "hkcu\Software\Microsoft\Internet Explorer\Desktop\General" /v WallpaperStyle /f
reg add "hkcu\control panel\desktop" /v WallpaperStyle /t REG_SZ /d 2 /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
exit
Also I noticed that this bat file won't work usually (9 times out of 10)... I receive an "ERROR: The system was unable to find the specified registry key or value."
I have Windows 7 64-BIT Home Premium Service Pack 1
© Super User or respective owner