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!

mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Installation problem on Modify and also when patching

AI 4.9.2. Installing on XP using Windows Installer 3.1 (R2)

I have two more problems which may or may not be related...these problems arise when a package is installed into the non-default APPDIR that is proposed by msiexec.

1. When doing a package modify from ARP, say to add a feature that was not originally installed, msiexec does not seem to know the the actual install directory for the base installation. Instead, it proposes the default location again. As a consequence, it is easy to end up adding the feature into the wrong place. I would have though that msiexec would somehow remember what directory was selected for the base install. What would you suggest to make this more idiot proof? (I suppose I could override the value of APPDIR by doing a registry search for my application registry value that holds this path. Would that work?).

2. Even more insidious: I make a small update package that updates a couple of the exe's. Then I generate a patch from this msi and the base msi. I apply the patch. The patch successfully updates the files (in the non-default APPDIR). However, it also incorrectly updates all my registry entries so that they point to the default APPDIR. Argghhh!! I have verified using orca that there are no registry transforms in the patch itself. So this is happening because when msiexec applies the patch, it has a value of APPDIR that is the default - not the actual location as per case (1) - and then seemingly 'repairs' the registry values to what it thinks they should now be. This is ridiculous! Once again, I guess I can either prevent the installer from doing these registry updates when applying a patch, by making it conditional, or would priming up APPDIR as above fix this?

Thanks again for your help.
Milt.
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

More info

I made a change to my msi project to initialise APPDIR with the raw value of the registry value that ends up holding the record of where the software was installed.

This solved problem 1, in-so-far as now when doing a package modify through ARP to add another feature, it goes to the right place without the user having to reselect the target directory. However, the dialog still displays the default location, which could be rather confusing...is there any way to get this to display the value coming back from the registry search?


But it did not solve problem 2. After applying the patch, the registry entries are all changed to the "default" value of APPDIR, and not the one that it should be.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

I cannot reproduce either of those behaviors on my test computer. On maintenance ("modify") the APPDIR stores the old installation folder not the default one. Same for patches.

So in order to investigate the problem please send a test project reproducing this behavior to support at advancedinstaller dot com.

Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Hmmm, that's really odd. If what you are saying is the expected behavior, then I would say these two things have the same root cause.

The question is, how is APPDIR normally primed up if the installation already exists? Where does it get the installation path from?

I'll just try a couple more things and if I can't find out what's doing it then I'll send you a test case.
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Problem solved

OK we finally got to the bottom of this.

The root cause is that we weren't installing any actual files to the top level directory of the APPDIR structure. They were all in subdirectories such as APPDIR\bin etc. I wouldn't have thought this was illegal, but for some reason, this confuses either AI or Windows Installer...it must be relying on there being at least one thing there. This results in problematic behavior when installing additional components or applying patches...they end up going to the default APPDIR rather than the actual installation directory.

Once we added a file to the root of APPDIR, it all started behaving as expected.

So is this a bug with the msi database that AI is creating?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

We manage to reproduce this behavior. It is a bug of AI and will be fixed in the next version (scheduled for release this week). Thank you for bringing this to our attention.

Until then the workaround is simple. You need to create a component for the folder and this can be done by selecting "Create folder on target machine" options in the folder "Properties" dialog.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Ah thankyou. If it's a bug in AI then it will be good to get this fixed because it does result in very confusing behaviour. But for now we'll just put a readme.txt in the root, which seems to also solve the problem.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

If you add that file (readme.txt) just as a dummy file then more recommended is to use "Create folder on target machine" option in the folder "Properties" dialog (because in this consist the fix).

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
mctozzy
Posts: 81
Joined: Wed Feb 14, 2007 7:37 am

Do you mean setting that property on the "Application Folder" itself?

I did my test putting an actual file (readme.txt) in this folder - in addition to eveything that went into the subdirectories - and this seemed to fix the problem without having to do what you said, so I'm not sure why it would be necessary to set that option too?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Do you mean setting that property on the "Application Folder" itself?
Yes, this option will create a component for the APPDIR folder allowing it to be set on maintenance.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”