Option Explicit
Dim wshShell, regValue
Set wshShell = CreateObject("WScript.Shell")
' 注册表路径
Dim regPath
regPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers"
' 要读取的值名称
Dim valueName
valueName = "BackgroundHistoryPath0"
' 读取注册表值
regValue = wshShell.RegRead(regPath & "\" & valueName)
' 输出值
If IsNull(regValue) Then
WScript.Echo "注册表中没有找到指定的值。"
Else
WScript.Echo "桌面背景路径: " & regValue
End If
' 清理对象
Set wshShell = Nothing
VBscript获取桌面背景图片路径
最新推荐文章于 2024-07-13 21:16:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)