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
精彩评论