Inno Setup Section [Run] with condition

Deadly 提交于 2019-12-01 04:27:28

问题


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.


回答1:


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;


来源:https://stackoverflow.com/questions/35231455/inno-setup-section-run-with-condition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!