Skip to content

Instantly share code, notes, and snippets.

@thekingofspain
Created September 1, 2015 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thekingofspain/c08025f0f93896697107 to your computer and use it in GitHub Desktop.
Save thekingofspain/c08025f0f93896697107 to your computer and use it in GitHub Desktop.
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