読者です 読者をやめる 読者になる 読者になる

vbsでレジストリ操作

wsh

読み取り

Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.RegRead("HKCU\Software\Test\")
WScript.Echo WshShell.RegRead("HKCU\Software\Test\TestKey")

書き込み

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Test\", 1, "REG_DWORD"
WshShell.RegWrite "HKCU\Software\Test\TestKey", "hoge", "REG_SZ"

削除

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegDelete "HKCU\Software\Test\"
WshShell.RegDelete "HKCU\Software\Test\TestKey"

ネタ元