#100455 - 2003-04-21 02:47 AM
Re: Passing Arguments from the Command Line
|
Allen
KiX Supporter
   
Registered: 2003-04-19
Posts: 4562
Loc: USA
|
Possible Solution #2
Positives: Works with all OSs. In its current state, I believe it will work with cmd line args. Negatives: Incomplete. It appears that the CSCRIPT parser removes quotes regardless of reason. This makes it impossible to pass kixtart arguments through it
Any ideas?
'kixstart.vbs set cmdargs=Wscript.arguments if cmdargs.count=0 then call help wscript.quit 1 elseif cmdargs.item(0)="/?" then wscript.echo "/?" call help wscript.quit 1 elseif cmdargs.count>=1 then kixscript=cmdargs.item(0) for i = 1 to cmdargs.count - 1 cmdline=cmdline + cmdargs(i) + " " next select case left(cmdargs.item(1),1) case "/" cmdline="$cmdargs=" + cmdline case "$" case else call help wscript.quit 1 end select else call help wscript.quit 1 end if
wscript.echo "kix32 " + kixscript + " " + cmdline
sub help wscript.echo "help" end sub
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 331 anonymous users online.
|
|
|