Upgrade still shows folder selection - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Upgrade still shows folder selection

Hi,

I'm new to this product so sorry if this is a repeat.

I can get the product to do an upgrade by installing version one and selecting the install path as c:\mynewpath thensetting automatically upgrade existing products, incrementing the version number and generating a new product code when prompted.

When i run the installer again it prompts for the install location (and remembers c:\mynewpath) however I dont want to be asked any questions on an upgrade! With installshield there is a separate sequence of dialogs (Welcome > This is an upgrade > Finish) for an upgrade whereas Advanced Installer always seem to use the First Time Install sequence?

Any ideas? The product seems very good btw.



Thanks,


Dave
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Upgrade still shows folder selection

Hi Dave and welcome to Advanced Installer Forums,

You can make use of the OLDPRODUCTS Windows Installer Property which is set when upgrading an already installed version. You can use this property to Conditionally display the FolderDlg dialog as described in the tutorial.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Upgrade still shows folder selection

OK thanks for the quick reply.

Its a shame that this doesn't work out of the box though something like a HideOnUpgrade property would be nice for dialogs.

If I have SQL database browser that the user selects the SQL Database on the First Installation will it remember that SQL Server connection details for future installs? (in the demo showdatabases.aip it forgets the previous settings when I do an upgrade).
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Upgrade still shows folder selection

Hi David,
Its a shame that this doesn't work out of the box though something like a HideOnUpgrade property would be nice for dialogs.
Note that a dialog is displayed by the previous dialog(s). In case there are more dialogs that display our dialog, it would not be possible to determine which one displays it during install.
If I have SQL database browser that the user selects the SQL Database on the First Installation will it remember that SQL Server connection details for future installs? (in the demo showdatabases.aip it forgets the previous settings when I do an upgrade).
Windows Installer does not support this behavior by default.
The following How to describes how to store property values in the registry, then use them at a later time. Note that removal of these registry keys should be prevented when your package is upgraded, since the new package will need them. You can achieve this by checking for the UPGRADINGPRODUCTCODE property.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Upgrade still shows folder selection

Hello,

OK problem one is solved thanks. On the Welcome Dialog Published events if OLDPRODUCTS ="" it moves to the first form, if OLDPRODUCTS <> "" then it goes directly to VerifyReadyDlg (thereby removing the need for users to see forms they have already seen).

I now need to remember settings that were input on the very first install - this doesn't work for me
http://www.advancedinstaller.com/user-g ... rties.html

1. I create a new dialog called TcpPortDlg with an Edit field called TCPPORT with a default value of 8000
2. I add a registry key to store the value called TCPPORT with a value of "[TCPPORT]"
3. When the installer runs I input port 9999 (different to the default of 8000) it correctly stores the TCPPORT value of 9999 in the registry (good)
4. I setup the Search to locate the TCPPORT registry entry and put it back into the TCPPORT property (I test this Search and it returns 9999) (good)
5. I increment the version number of my MSI and re-run setup - the TCP dialog shows with the default value (8000) (bad) - why is the search not setting this value correctly to 9999?



Thanks,


Dave
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Upgrade still shows folder selection

Hello,
why is the search not setting this value correctly to 9999?
The old product is uninstalled before the new one is installed. Which means the registry value was removed before the new installer had the chance to read it. The old installer should copy the registry somewhere before uninstall. Using reg is the recommended way since it does not register the value with Windows Installer.

If you still can not troubleshoot the issue, please send your .aip project file to support at advancedinstaller dot com so we can take a look at it.

Regards,
Gabriel
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Upgrade still shows folder selection

Hello,

The registry value is not being deleted by the upgrade process as you suggested because when the TCPPORT dialog is shown I can open regedit and see the HKEY_LOCAL_MACHINE\SOFTWARE\Your Company\ZZSuperApp\TCPPORT value is still set to 8000 (this is probably because I have the setup configured to install the new version first then uninstall the old version.

I have sent the source code to the email address



Thanks,


Dave
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Upgrade still shows folder selection

Thanks for the help on email - for anyone reading this its because I hadn't renamed the RESULT_PROPERTY name (next to the hour glass) in the search section to the name of the MSI property I wanted to set.

Settings now persist on the form between upgrades.

Return to “Common Problems”