Im using inno setup 5.3 latest to package my vb.net application. Im setting Environment variables during installation to the windows system. It needs a reboot of the system to implement the changes made in the Environment variables. How do i prompt the user to reboot the system so as to implement changes ( as done in many applications). Is there any sample iss code for reference.
views:
110answers:
1
+1
A:
You may use the [Setup]: AlwaysRestart
setting.
[Setup]
AlwaysRestart = yes
Alternativly you could use the ChangesEnvironment
setting in the [Setup]
section which may be more adequate in your case. The advantage is, that the user doesn't need to restart the system.
[Setup]: ChangesEnvironment
When set toyes
, at the end of the installation Setup will notify other running applications (notably Windows Explorer) that they should reload their environment variables from the registry.
splash
2010-09-22 07:13:46
Always restart works for me fine individually, but when i use it with dotnetfx setup installer which includes code to install dot net 3.5 if not there in the system, AlwaysRestart does not have any effect. Is there any other code which will override AlwaysRestart.
Naresh
2010-09-24 08:47:12
Maybe you have `RestartIfNeededByRun=false` somewhere in your code. Have you tried to set `UseSetupLdr=false`?
Vantomex
2010-10-10 05:47:17