BOWENWANG
Posts: 11
Joined: Mon Aug 18, 2008 2:29 pm

Update older product action

Hi everyone,

I got a question with the update action for installer. I already had our V1.0 of our product released, it installed in C:/XXXX/V1.0 folder by default, if i choose automatically upgrade older product versions from upgrades dialog for v2.0, it uninstall V1.0 and install v2.0 into C:/XXXX/V1.0 folder by default, which is not what we want, because our default installation folder for v2.0 is C:/XXXX/v2.0. Is there anyway we can automatically uninstall v1.0 and still set the default installation folder for v2.0 to be C:/XXXX/V2.0 folder? so if the user keep pressing next it will installed into V2.0 folder.

Anyone who got an idea please let me know. Thanks in advance !

P.S: when i changed the installation directory to C:/XXXX/v2.0 manually in the Select Installation Folder dialog and press next , a warning pop up said "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2318." This is only happens on Vista not XP.
cyb
Posts: 43
Joined: Wed Apr 15, 2009 1:06 pm

Re: Update older product action

Hi,

In order to install your new version into another folder, you have to use a custom action.
You can create a "Property Set with Formatted" custom action. This custom action should be placed under the InstallUISequence->AppSearch and also under the InstallExecuteSequence->AppSearch. The property should look like this:
- Property Name: APPDIR ;
- Formatted Text: [ProgramFilesFolder][Manufacturer]\[ProductName] ;
Try this solution and let us know if the problem persists.

Best regards,
cyb
Cosmin Budrica
Advanced Installer Team
http://www.advancedinstaller.com/
BOWENWANG
Posts: 11
Joined: Mon Aug 18, 2008 2:29 pm

Re: Update older product action

Hi,

i did want you suggest it works fine with the user who has older version of our product, the problem we found now is when our user who dont have the older version and try to install the software into different location rather than default one it will not work, it will always install to the default location, even they can change it in the installation process but installer ignores it. Any idea how to solve this? We hope user still be able to change the installation location if they want to.

PS: This could cause problem if user dont have enough space in c:/
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Update older product action

Hi,

Please note that the custom action should use the "Execute only once if present in both sequence tables" option in the Custom Action Properties pane. This way the custom action will run only once. Also, you can make sure that the custom action runs only during an upgrade by setting its condition to:

Code: Select all

OLDPRODUCTS
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BOWENWANG
Posts: 11
Joined: Mon Aug 18, 2008 2:29 pm

Re: Update older product action

Hi cosmin,

Followed by your last reply. Should i set "Execute only once if present in both sequence tables" for both custom action? And how can i do following:" set custom action runs only during an upgrade by setting its condition to:
Code: Select all
OLDPRODUCTS "

can you give me a guide how to set the condition, i find the edit condition dialog but have no idea how to set the condition. Thanks.

Regards,
Bowen
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Update older product action

Hi,
Should i set "Execute only once if present in both sequence tables" for both custom action?
Please note that you shouldn't create two different custom actions. Instead, you can drag while the SHIFT key is pressed the custom action from InstallUISequence -> AppSearch to InstallExecuteSequence -> AppSearch. This will share the custom action between sequences and the settings will be the same for both instances.
can you give me a guide how to set the condition, i find the edit condition dialog but have no idea how to set the condition.
In the "Custom Action Properties" pane you can click on the "..." button in the "Expression" field from the "Execution Condition" section. When the Edit Condition dialog appears you can add OLDPRODUCTS in the "Expression" field.

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

Return to “Common Problems”