I see a few mistakes in your code.

Case InStr($opt, "/computer=") <> 0
should be
Case InStr($parm, "/computer=")

$x = Trim(Right(InStr($parm, "=")))
should be
$x = Trim(Right($parm, InStr($parm, "=")))

Case InStr($CmdLine, "/repository=") <> 0
should be
Case InStr($parm, "/repository=")

code:
Function CmdLineParse()
Dim $CmdLine[20]

? "$$EXECmdLine = '" + $EXECmdLine + "'"

$CmdLine = Split($EXECmdLine, " ",-1)
? "Ubound of $$CmdLine = " + ubound($CmdLine)

For Each $parm In $CmdLine
? "$$parm = " + $parm
Select
Case InStr($parm, "/computer=")
$x = Trim(Right($parm, InStr($parm, "=")))
$_computer = Trim(Right($parm, Len($parm) - $x))

Case InStr($parm, "/repository=") <> 0
$x = Trim(Right($parm, InStr($parm, "=")))
$_repository = Trim(Right($parm, Len($parm) - $x))

Case 1
? "Unknown Parameter" + $parm
EndSelect
Next

EndFunction



[ 30. September 2003, 20:24: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/