I'm trying to install VC++ Redist without any user input using the following code. I do not want system restart as well – so supplied /norestart
flag
[Run]
Filename: "{tmp}\VC_redist.x64.exe"; \
Parameters: "/passive /Q:a /c:""msiexec /qb /norestart /i vcredist.msi"" "; \
StatusMsg: Installing VC++ RunTime...
But after the install, the setup tries to restart the machine automatically
The VC++ Redist probably schedules some files to be replaced after next restart. Inno Setup detects that and restarts the computer after it finishes.
You can disable Inno Setup from detecting this using RestartIfNeededByRun
directive:
When set to
yes
, and a program executed in the[Run]
section queues files to be replaced on the next reboot (by callingMoveFileEx
or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation.