Skip to content

Instantly share code, notes, and snippets.

@hexiyou
Created December 13, 2018 10:12
Show Gist options
  • Save hexiyou/226c8fc6c7b81299ddd60fa110cf6e8c to your computer and use it in GitHub Desktop.
Save hexiyou/226c8fc6c7b81299ddd60fa110cf6e8c to your computer and use it in GitHub Desktop.
从剪贴板获取注册表路径并打开
' Created by hackkey <hackkey@qq.com>
Dim objHTA
Dim cClipBoard
Dim WshShell
set objHTA=createobject("htmlfile")
cClipBoard=objHTA.parentwindow.clipboarddata.getdata("text")
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey", cClipBoard, "REG_SZ"
WshShell.Run "regedit.exe -m"
Set objHTA = nothing
Set WshShell = nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment