VC++ Redist无需重新启动即可被动安装,却总是重新启动。

huangapple go评论61阅读模式
英文:

VC++ Redist install passively without restart always restarting

问题

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.

https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files#command-line-options-for-the-redistributable-packages

[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.

英文:

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

https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files#command-line-options-for-the-redistributable-packages

[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

答案1

得分: 3

VC++ Redist可能计划在下次重新启动后替换一些文件。Inno Setup检测到这一点,并在完成后重新启动计算机。

您可以使用RestartIfNeededByRun指令禁用Inno Setup检测此情况:

当设置为yes时,在[Run]部分执行的程序排队要在下次重新启动时替换的文件(通过调用MoveFileEx或修改wininit.ini),安装完成后,Setup将检测到此情况并提示用户在安装结束时重新启动计算机。

英文:

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 calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation.

huangapple
  • 本文由 发表于 2023年5月13日 11:01:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76240900.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定