Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save honda0510/958329 to your computer and use it in GitHub Desktop.
Save honda0510/958329 to your computer and use it in GitHub Desktop.
キー名を指定してレジストリエディタを開く
Option Explicit
Const REG_LAST_KEY = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit\LastKey"
Dim reg_key_path
Dim ws
reg_key_path = InputBox("レジストリエディタで開くキーをフルパスで入力して下さい")
reg_key_path = trim(reg_key_path)
if reg_key_path = "" then Wscript.Quit
Set ws = WScript.CreateObject("WScript.Shell")
ws.regWrite REG_LAST_KEY, reg_key_path, "REG_SZ"
ws.run "regedit.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment