OPTION EXPLICIT
DIM sAppPath
CONST rqAppFile = "rqFakeMsgBox.exe"
DIM oSH
DIM nRtn
CONST wsNormal = 1
CONST bWaitOnReturn = True
DIM sMsgParam
CONST sDQ = """"
sAppPath = Replace(WScript.ScriptFullName, WScript.ScriptName, rqAppFile)
SET oSH = WScript.CreateObject("WScript.Shell")
sMsgParam = sDQ & "Hi, from your wsh/vbs Script!" & sDQ
nRtn = oSH.RUN(sAppPath & " " & sMsgParam, wsNormal, bWaitOnReturn)
sMsgParam = sDQ & "Now you will (hopefully) see an icon" & sDQ _
& " " & "2"
nRtn = oSH.RUN(sAppPath & " " & sMsgParam, wsNormal, bWaitOnReturn)
sMsgParam = sDQ & "Finally, set Msg, Ico, and CAPTION!" & sDQ _
& " " & "1" & " " & sDQ & " Ain't this a Pretty Good MsgBox?" & sDQ
nRtn = oSH.RUN(sAppPath & " " & sMsgParam, wsNormal, bWaitOnReturn)
WScript.Quit
|