dingir
asked on
Batch File Argument
I want a dos batch file that doing this;
from dos prompt:
c:\> run-xx-yy.cmd 1
the dos-batch-file will looks like this
@ECHO OFF
Select case
case 1
run iexplore.exe "http://webpage1"
case 2
run iexplore.exe "http://webpage2"
case 3
run iexplore.exe "http://webpage3"
case else
' nothing
end select
Hopes my psesudo VB code are understandable.
thank's in advanced!
from dos prompt:
c:\> run-xx-yy.cmd 1
the dos-batch-file will looks like this
@ECHO OFF
Select case
case 1
run iexplore.exe "http://webpage1"
case 2
run iexplore.exe "http://webpage2"
case 3
run iexplore.exe "http://webpage3"
case else
' nothing
end select
Hopes my psesudo VB code are understandable.
thank's in advanced!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem, glad it worked for you.
Steve
Steve
ASKER
And to share with the world (if anyone more needs it)
Batch file
-----
if "%1"=="" echo You need to supply an argument & goto :eof
REM 1 - create xinvoice
if %1==1 D:\xy.vbs "http://xy:718/?cmd=xxyy" & goto :eof
REM 2 - recieve payments
if %1==2 D:\dbs\xy.vbs "http://xy:718/?cmd=xxyy2" & goto :eof
REM 3 - recieve status
if %1==3 D:\dbs\xy.vbs "http://xy:718/?cmd=xxyy3" & goto :eof
echo No number matched & goto :eof
:eof
---------
And the vbs file xy...
---------
Dim objRequest, URL
Set objRequest = CreateObject("Microsoft.XM
URL = Wscript.Arguments.Item(0)
objRequest.open "POST", URL , false
objRequest.Send
Set objRequest = Nothing
---------