Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup Section [Run] with condition

I need a help with condition in [Run]. If it's possible...
I need to run a command that depends on a condition.

Like this:

if (UserPage.Values[0] = 'NC') then FileName: {sys}\inetsrv\appcmd.exe; Parameters: "set......"

Or other way to do it.

Regards.

like image 516
Robertopcn Avatar asked Feb 05 '16 18:02

Robertopcn


1 Answers

You are looking for the Check parameter:

[Run]
FileName: "{sys}\inetsrv\appcmd.exe"; Parameters: "set......"; Check: ShouldRun
[Code]

function ShouldRun: Boolean;
begin
  Result := (UserPage.Values[0] = 'NC');
end;
like image 153
Martin Prikryl Avatar answered Oct 28 '22 01:10

Martin Prikryl