[tips0112.vbs] Option Explicit On Error Resume Next Dim objWshShell ' WshShell オブジェクト Set objWshShell = WScript.CreateObject("WScript.Shell") If Err.Number = 0 Then WScript.Echo objWshShell.RegRead("HKCU\WshTest\Test1") WScript.Echo objWshShell.RegRead("HKCU\WshTest\Test2") Else WScript.Echo "エラー: " & Err.Description End If Set objWshShell = Nothing
C:\> cscript //NoLogo tips0112.vbs test #1 2