liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Install upgrade in the same folder as the previous version

Hi,

I would like that when installing upgrade msi, the appication folder that presented to the user by default will be the same as the one that the previous version is installed in.

How do I do that?

Thannks, Lior
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install upgrade in the same folder as the previous version

Hi,

For this you can use the automated upgrade feature in Advanced Installer. This feature works like this:
  • open the AIP (Advanced Installer Project file) you used to build the old package
  • make the modifications you want to include in the upgraded package
  • go to the "Product Details" page and increase the version of the package
  • when you move from this page you are prompted about changing the Product Code
  • answer "Yes" in order to change it (the old and new version of the package must have different Product Codes)
  • build and install the new AIP
If you run this upgraded package on a machine which has the old package installed, the old package will be removed automatically (and silently) and the upgraded package will be installed. Also, the default installation folder of the upgraded package is the installation folder of the old package.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Re: Install upgrade in the same folder as the previous version

Hi cosmin, and thanks for the quick response.

I worked exactly as you said.
The upgrade indeed performs the unistall silently. But when the FolderDlg apperas it shows the default folder and NOT the folder that the program was installed on.

Can I programatticly change this folder, or maybe prevent it from appearing when upgrading?

thanks,
Lior
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install upgrade in the same folder as the previous version

Hi,

I'm not sure why you are encountering this behavior (on my test machines this works like I explained). Can you please send me a small test case which reproduces this behavior to support at advancedinstaller dot com so I can take a look?

The test case should include:
- the AIP (Advanced Installer Project) files you used to create the two packages
- the two packages which show this behavior

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
liorbk
Posts: 13
Joined: Tue Apr 08, 2008 2:44 pm

Re: Install upgrade in the same folder as the previous version

Hi,

I tried to create a small example but when I did that, the behaiviour was as expected by you.
I tried to figure out what is different: I saw that the registry value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Guid}\InstallLocation , is empty on my MSI but on the example I created it contains the right folder.


What do you think can cause this?

Thanks,
Lior
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Install upgrade in the same folder as the previous version

Hi,

This behavior may be encountered if the MSI package is not registered with Windows Installer (the "Do not register this product with Windows Installer" option is checked in the "Product Details" page) or if the installation has been corrupted (the registry entries have been altered). Note that this problem is caused by your machine, therefore you should investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”