如何通过命令提示符更改壁纸图片位置?
How to change wallpaper picture position through command prompt?
我有一个 VBScript 文件,每小时更换一次墙纸。
图片位置自动变为Fill,但我需要将其设置为Fit。我可以每小时手动更改它,但最好通过命令进行更改,我可以将其添加到 VBScript。
从 google 获得此代码。看看这是否有帮助
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,
来自 HKCU\Control Panel\Desktop\Wallpaper 的键 WallpaperStyle 具有三个值:0 – 中心; 1 – 瓷砖; 2 - 拉伸
根据您希望图片的显示方式,您将选择此选项之一。
我有一个 VBScript 文件,每小时更换一次墙纸。 图片位置自动变为Fill,但我需要将其设置为Fit。我可以每小时手动更改它,但最好通过命令进行更改,我可以将其添加到 VBScript。
从 google 获得此代码。看看这是否有帮助
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,
来自 HKCU\Control Panel\Desktop\Wallpaper 的键 WallpaperStyle 具有三个值:0 – 中心; 1 – 瓷砖; 2 - 拉伸 根据您希望图片的显示方式,您将选择此选项之一。