原始后台位置是否有windows注册表项?在“桌面面板\桌面”中,值"Wallpaper“为"C:\Users\CURRENTUSER\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper.jpg".
发布于 2010-12-01 15:51:35
这实际上取决于墙纸是如何到达那里的。
当通过控制面板设置墙纸并启用墙纸幻灯片时,这在Windows 7上有效:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource然而,在其他情况下,该密钥可能不存在或可能已过时。
(忽略它在路径中有"Internet Explorer“的事实。谁知道这是为什么,但IE并没有参与其中!)
(仅供参考,我在制作桌面上下文菜单(通过VBScript)来删除当前墙纸时发现/使用了这个。如果有用,请使用Here it is。)
发布于 2014-08-23 15:45:59
在gpedit中,“用户配置”|“管理模板”|“桌面”|“活动桌面”中的“活动桌面墙纸”设置会设置背景。忽略它位于Active Desktop部分的事实,因为它仍然在禁用Active Desktop的情况下工作。仅当使用JPG或HTML作为后台时,才需要启用Active Desktop。
发布于 2019-12-19 20:08:42
您可以编写自定义的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)
https://stackoverflow.com/questions/4321915
复制相似问题