开发者

nsis on Windows-7 reboot for .NET 4 installation does not continue installation

When installing my application I also install the .NET 4.0 redistri开发者_JAVA技巧butable if .NET 4.0 is not present on the machine.

On Windows-7 this sometimes (maybe always) causes a reboot (outside of nsis's control).

I should like the installation to continue after the reboot.

I should be grateful for advice on how to address this scenario with nsis.


You can use the RunOnce registry key.

NSIS does not support the restart manager (But it is probably possible to call RegisterApplicationRestart yourself with the system plugin).

Either way, the "restart command" probably needs to include a parameter you can detect so your installer does start from the beginning again (Use GetParameters and PageJump).


Call the .net installer with command line switch /norestart


Using /norestart might not be an option for you if you are installing other software that requires .NET 4.0 to already be installed. In my case for example, I am installing .NET 3.5 on Windows XP, then installing SQL Server 2008 R2. The SQL Server 2008 installer requires .NET 3.5 to already be installed, so /norestart is not an option here -- if used, SQL Server 2008 won't install. Therefore, Anders' suggestion to use the RunOnce registry key is the solution I'll need to go with.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜