[tips0115.vbs] Option Explicit On Error Resume Next Dim objWshShell ' WshShell オブジェクト Set objWshShell = WScript.CreateObject("WScript.Shell") If Err.Number = 0 Then WScript.Echo objWshShell.ExpandEnvironmentStrings("%TEMP%") Else WScript.Echo "エラー: " & Err.Description End If Set objWshShell = Nothing
C:\> cscript //NoLogo tips0115.vbs C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp