Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

InnoSetup has the DefaultDirName and DefaultGroupName directives for specifying the install folder and group the first time the installer runs. The problem is that it remembers that foldername and group name for the next time the installer is run. This is not desirable for those people who install applications by repeatedly pressing Enter until there are no windows left open.

How can I override this behaviour and explicitly set those initial values?

The scenario is this: When the application is installed for the first time by default it goes into a folder {pf}\My Company\MyApp 1.1\ if the version they are installing is 1.1.

When I ship v1.2, I don't want that installation to overwrite the existing one - I want the default folder to be {pf}\My Company\MyApp 1.2\.

share|improve this question

1 Answer 1

There had to be a way. Add the following lines to the [Setup] section of the install script.

;   prevent InnoSetup recalling the last used installation groupname and folder.

UsePreviousGroup=no
UsePreviousAppDir=no   
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.