原文 http://www.cnblogs.com/ahuo/archive/2009/07/30/1534998.html
[Code] function GetMyParam(PName:String):String;
var
CmdLine : String;
CmdLineLen : Integer;
i : Integer;
begin
CmdLineLen:=ParamCount();
for i:= to CmdLineLen do
begin
CmdLine:=ParamStr(i);
if CmdLine= PName then
begin
CmdLine:=ParamStr(i+);
Result := CmdLine;
Exit;
end;
end;
end;