Если вы хотите анализировать аргументы командной строки из кода inno, используйте метод, подобный этому. Просто вызовите скрипт inno из командной строки следующим образом:
C:\MyInstallDirectory>MyInnoSetup.exe -myParam parameterValue
Затем вы можете вызывать GetCommandLineParam следующим образом:
myVariable := GetCommandLineParam('-myParam');
// ============================================= =====================
{ Allows for standard command line parsing assuming a key/value organization }
function GetCommandlineParam (inParam: String):String;
var
LoopVar : Integer;
BreakLoop : Boolean;
begin
{ Init the variable to known values }
LoopVar :=0;
Result := '';
BreakLoop := False;
{ Loop through the passed in arry to find the parameter }
while ( (LoopVar < ParamCount) and
(not BreakLoop) ) do
begin
{ Determine if the looked for parameter is the next value }
if ( (ParamStr(LoopVar) = inParam) and
( (LoopVar+1) < ParamCount )) then
begin
{ Set the return result equal to the next command line parameter }
Result := ParamStr(LoopVar+1);
{ Break the loop }
BreakLoop := True;
end
{ Increment the loop variable }
LoopVar := LoopVar + 1;
end;
end;
Надеюсь, это поможет ...