VBScriptでレジストリに書き込みをするサンプルです。
'下記任意に変更 Const HKEY_LOCAL_MACHINE = &H80000002 Const REGPATH = "SOFTWARE\XXXXX" Const REGNAME = "XXXXXx Const VAL = "1" Call RegWrite Function RegWrite //レジストリ書き込み用 Dim objRegistry Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv") Dim sPath sPath = REGPATH Dim lRC lRC = objRegistry.SetStringValue(HKEY_LOCAL_MACHINE, REGPATH, REGNAME, VAL) If (lRC = 0) And (Err.Number = 0) Then WScript.Echo "Write successful!" Else WScript.Echo "An error occurred. The return code is " & lRC & "." End If End Function