原始后台位置是否有 Windows 注册表项?在“HKEY_CURRENT_USER\Control Panel\Desktop”中,“Wallpaper”的值是“C:\Users\CURRENTUSER\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper.jpg”。
24872 次
3 回答
4
这实际上取决于壁纸是如何到达那里的。
这适用于 Windows 7,当通过控制面板设置壁纸并启用壁纸幻灯片时:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource
但是,在其他情况下,该密钥可能不存在或可能已过时。
(忽略它在路径中有“Internet Explorer”的事实。谁知道为什么会这样,但不涉及 IE!)
(FWIW,我在制作桌面上下文菜单(通过 VBScript)来删除当前壁纸时发现/使用了它。如果它有用的话就在这里。)
于 2010-12-01T07:51:34.690 回答
0
在 gpedit 中,用户配置|管理模板|桌面|活动桌面中的“活动桌面墙纸”设置确实设置了背景。忽略它位于 Active Desktop 部分的事实,因为它仍然可以在禁用 Active Desktop 的情况下工作。只有在使用 JPG 或 HTML 作为背景时才需要启用 Active Desktop。
于 2014-08-23T07:45:59.070 回答
0
您可以编写自定义 vb 脚本和右键菜单。
--- 创建 reg 文件并双击。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\DesktopWallpaperLocation]
"icon"="imageres.dll,-5346"
@="Desktop Wallpaper Location"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\DesktopWallpaperLocation\command]
@=hex(2):77,00,73,00,63,00,72,00,69,00,70,00,74,00,20,00,22,00,25,00,77,00,69,\
00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,\
33,00,32,00,5c,00,57,00,61,00,6c,00,6c,00,70,00,61,00,70,00,65,00,72,00,50,\
00,61,00,74,00,68,00,2e,00,76,00,62,00,73,00,22,00,00,00
这将创建一个指向右侧菜单的链接,例如“桌面墙纸位置”,它将在资源管理器中打开。
--- Vb 脚本文件(为多个监视器编辑)。
Const HKCU = &H80000001 'HKEY_CURRENT_USER
sComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& sComputer & "\root\default:StdRegProv")
sKeyPath = "Control Panel\Desktop\"
sValueName = "TranscodedImageCache_001"
oReg.GetBinaryValue HKCU, sKeyPath, sValueName, sValue
sContents = ""
For i = 24 To UBound(sValue)
vByte = sValue(i)
If vByte <> 0 And vByte <> "" Then
sContents = sContents & Chr(vByte)
End If
Next
arrValues = Split(sContents, "\\")
b = ubound(arrValues)
result = arrValues(0)
CreateObject("Wscript.Shell").Run "explorer.exe /select,""" & result & """"
sValueName = "TranscodedImageCache_000"
oReg.GetBinaryValue HKCU, sKeyPath, sValueName, sValue
sContents = ""
For i = 24 To UBound(sValue)
vByte = sValue(i)
If vByte <> 0 And vByte <> "" Then
sContents = sContents & Chr(vByte)
End If
Next
arrValues = Split(sContents, "\\")
b = ubound(arrValues)
result = arrValues(0)
CreateObject("Wscript.Shell").Run "explorer.exe /select,""" & result & """"
sValueName = "TranscodedImageCache"
oReg.GetBinaryValue HKCU, sKeyPath, sValueName, sValue
sContents = ""
For i = 24 To UBound(sValue)
vByte = sValue(i)
If vByte <> 0 And vByte <> "" Then
sContents = sContents & Chr(vByte)
End If
Next
arrValues = Split(sContents, "\\")
b = ubound(arrValues)
result = arrValues(0)
CreateObject("Wscript.Shell").Run "explorer.exe /select,""" & result & """"
另存为 *.vbs 文件并复制到 c:\windows\system32 文件夹。(c:\windows\system32\WallpaperPath.vbs)
于 2019-12-19T12:08:41.917 回答