| <JOB>
<RESOURCE id="commandList">
<![CDATA[
mode con: cols=120
set PATH=C:\flex3\bin;%PATH%
prompt flex3$G
fcsh
]]>
</RESOURCE>
<OBJECT id="WshShell" progid="WScript.Shell" />
<OBJECT id="Fso" progid="Scripting.FileSystemObject" />
<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
strPath = WScript.ScriptFullName
Set obj = Fso.GetFile( strPath )
Set obj = obj.ParentFolder
WshShell.CurrentDirectory = obj.Path
aData = Split( GetInline( "commandList" ), vbCrLf )
strCommand = "cmd.exe /k " & aData(0)
For I = 1 to Ubound( aData )
strCommand = strCommand & "&" & aData(I)
Next
Call WshShell.Run( strCommand, 3 )
' ***********************************************************
' 関数
' ***********************************************************
Function GetInline( strName )
GetInline = RegTrim( getResource( strName ) ) & vbCrLf
End Function
Function RegTrim( strValue )
Dim regEx, str
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "^[ \s]+"
str = regEx.Replace( strValue, "" )
regEx.Pattern = "[ \s]+$"
RegTrim = regEx.Replace( str, "" )
End Function
</SCRIPT>
</JOB>
| |