I have a VBScript file, that change wallpaper once per hour. The picture position automatically changes to Fill, but I need to set it to Fit. I can change it manually each hour, but it is better make it by command, that I could add to the VBScript.
Asked
Active
Viewed 1,748 times
-3
-
6Post your code whatever you have tried till now – Mithilesh Indurkar Jul 02 '17 at 10:27
-
Ok, it is here: www.beetxt.com/xd8 – 0x0 Jul 02 '17 at 15:45
-
[Why is “Can someone help me?” not an actual question?](http://meta.stackoverflow.com/q/284236) – EJoshuaS - Stand with Ukraine Jul 02 '17 at 23:20
1 Answers
1
Got this code from google. See if this helps
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
sWinDir = oFSO.GetSpecialFolder(0)
sWallPaper = "C:\winnt.bmp"
' update in registry oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper",sWallPaper
' let the system know about the change oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,
The key WallpaperStyle from HKCU\Control Panel\Desktop\Wallpaper has three values: 0 – Center; 1 – Tile; 2 - Stretch Depending on how you want the picture to be displayed, you will choose one of this options.

Mithilesh Indurkar
- 481
- 1
- 5
- 12