开发者

Inno setup postinstall check box

Is there a way that check box is not shown to user or user cannot uncheck the checkbox? My purpose is I want to run a batch script at the end of installation and I must run it so I don't want this to be users decisi开发者_Go百科on.


Declare this procedure in your [Code] section

procedure CurStepChanged(CurStep: TSetupStep);
var
  ResultCode: Integer;
begin
  if CurStep = ssDone then
  begin
    ShellExec('', ExpandConstant('YOUR APP PATH AND NAME OR IN YOUR CASE YOUR BATCH SCRIPT'), '', '', SW_SHOWNORMAL,
     ewNoWait, ResultCode);
  end;
end;


this will execute your batch after you press the "finish" button.


Just don't add the postinstall flag.

For instance,

[Run]
Filename: "{app}\myfile.bat"; Flags: shellexec
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜