ofb
Posts: 9
Joined: Tue Feb 06, 2007 10:43 am

Temporary files are replaced during upgrade

Mon Jan 21, 2008 2:18 pm

Hi,

I'am using AI 6.1

I have an installer 4.0 that installs my program and some temporary files using AI_ExtractTempFiles action.

I have an upgrade 4.2 that does the same but of course has new versions of my program and temporary files.

When I upgrade to the new version 4.2 the installer starts storing temporary files in my temp folder. Everything ok until now.

But then the installer discover that the old 4.0 must be executed in order to first uninstall 4.0. The old temporary files are then installed again.

When the old version 4.0 is uninstalled the new 4.2 installer continues the installation. But now my tempfolder contains the old temporary files and not the new ones designed for the 4.2 installer.

Have can I solve this?

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

Mon Jan 21, 2008 2:56 pm

Hi,

I'm not sure I understand the problem you are encountering. Can you please give me more details about this?

I have tried following the steps you mentioned but I cannot reproduce the behavior. Can you please specify the exact steps you are taking and the problem which occurs?

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

ofb
Posts: 9
Joined: Tue Feb 06, 2007 10:43 am

Mon Jan 21, 2008 3:25 pm

Hallo Cosmin,

Thanks for your reply!

These are the exact steps. My installer is very simple.

1. Install 4.0
2. Temporary files are stored in tempfolder.
3. Installation finished.

1. Upgrade to 4.2.
2.Temporary files are stored in tempfolder.
3.Upgrade executes 4.0 to uninstall 4.0.
4.Temporary files for 4.0 are stored in tempfolder(replacing 4.2 temporary files. No good. I need the 4.2 version of temporary files)
5. Uninstall 4.0 finished.
6. Upgrade continues.
7. Upgrade crashes because temporary files are old 4.0 version.

I have analyzed my project with Orca and can see that AI_ExtractTempFiles should be executed in both InstallUISequence and InstallExecuteSequence. But it does not seems to work in InstallExecuteSequence. Because if it did the 4.2 installer would simply replace the 4.0 temporary files when it continued the upgrade.

It seems to me that if the tempfolders could somehow have different names for the two installer there would be no conflict. I could manually rename them from version to version. Can I make my Tempfolder name dynamic? Using a property to define a different name from version to version? I have tried replacing my tempfolder with a property, but without luck.

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

Mon Jan 21, 2008 4:24 pm

Hi,

If you need the old temporary files during the uninstall process (and not during an upgrade), you can condition the temporary files with this condition:

Code: Select all

(REMOVE="ALL" AND (NOT UPGRADINGPRODUCTCODE))
This condition is set in the "Edit Temporary File" dialog (double-click the temporary file).

Another solution is to create a sub-folder for the TempFolder which has the name set to [|ProductVersion]. The name of this sub-folder will change with the version of the package. Since the two packages have different versions, the files will not overwrite one another because they will be in separate folders.

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

ofb
Posts: 9
Joined: Tue Feb 06, 2007 10:43 am

Tue Jan 22, 2008 11:05 am

Thank you,

That solved my problem!

Actually it opened a hole new world for me using properties for foldernames.

How can it be that when I use the property [|COMPANYNAME] for a sibling node of "Common Application Data" I get the error :"Invalid Folder Name!". There are no problem with other kind of MSI-properties.

Regards
OFB

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

Tue Jan 22, 2008 11:24 am

Hi,
How can it be that when I use the property [|COMPANYNAME] for a sibling node of "Common Application Data" I get the error :"Invalid Folder Name!"
Please note that there is no property named [|COMPANYNAME] in Advanced Installer. Most likely you are referring to the [|Manufacturer] property.

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

Return to “Common Problems”