Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .