INNO SETUP 获得命令行参数

[Code]

function GetMyParam(PName
:String):String;
var
  CmdLine 
: String;
  CmdLineLen 
: Integer;
  i 
: Integer;
begin
    CmdLineLen
:=ParamCount();
    
for i:=0 to CmdLineLen do
    begin
    CmdLine
:=ParamStr(i);
    
if CmdLine= PName then
      begin
          CmdLine
:=ParamStr(i+1);
          Result 
:= CmdLine;
          
Exit;
      end;
    end;
end;
posted @ 2009-07-30 14:04  ahuo  阅读(2158)  评论(0编辑  收藏  举报