Page 1 of 1

"Get Folder Location System->Program Files" is broken

Posted: Thu Jan 05, 2012 3:43 pm
by spicymikey
IA 2012 SA, 32 bit installs and patches:

"Get Folder Location System->Program Files" correctly returns the program file director as c:\program files (x86)\ when running a 32 bit installation (the default) on a 64 bit OS. However, when you are running a later patch off that same installation, script commands interogating the PROGRAMFILES variable will return c:\program files\.

That's a problem if you are trying to read saved files from the installation as part of the patch logic. The related $TARGETDIR$ variable also is wrong showing C:\program files\<install folder> when in fact the application was installed in c:\program files (x86). Not sure how to get around this since i can't assume the user installed the software in the default location.

Am I doing something wrong here or is this another bug? if its a bug, is there a workaround?

Thanks
Mike

Re: "Get Folder Location System->Program Files" is broken

Posted: Fri Jan 06, 2012 9:20 am
by spicymikey
It would be good to know if I am doing something wrong or if this is indeed a flaw in IA. However, to avoid the problem I decided to store the info in the registry under HKLC. Of course, you have that whole Wow6432Node issue to deal with, however its determinable with some logic so that is not a show stopper.

The issue raised in this first post is a show stopper for me only because this "bug" seems to carry forward to the TARGETDIR variable also. Because of that, it seems you have no programatic way of knowing where the product was installed during a patch process unless you save that info some other way

Re: "Get Folder Location System->Program Files" is broken

Posted: Fri Jan 06, 2012 3:31 pm
by giaviv
Hi,

Are you familiar / using the Set 64 Bit Mode command?

Re: "Get Folder Location System->Program Files" is broken

Posted: Fri Jan 06, 2012 3:36 pm
by spicymikey
32bit setup. When I do a Get Folder for Program Files it returns C:\Program Files (x86) as I would expect when running this setup. It doesn't return the right value when I run the Setup after its been cached in the Installer folder (e.g. for patching) but that's a different issue I think. I posted that as a separate thread before.

WHy do you ask? is it all related?

Re: "Get Folder Location System->Program Files" is broken

Posted: Fri Jan 06, 2012 5:56 pm
by spicymikey
Sorry I thought you were responding to my other post. I got criss crossed.

Again, yes I am familiar with the 64 bit switch. The application is setup as a 32 bit app. As I mentioned, the install works fine, its when you run that same setup afterwards to process an incoming patch.exe. The PROGRAMFILES variable returns the wrong location. Its the same setup as before just being run with a switch to process a patch. Also, this application is currently installed correctly into the Program Files (x86) folder.

Seems to be some sort of quirk in IA deriving the correct location for Program Files. I tried to explicitly adding the Set Win32 command to the beginning of the script but that didn't make a difference

Re: "Get Folder Location System->Program Files" is broken

Posted: Mon Jan 09, 2012 10:48 pm
by giaviv
Hi,

Please try checking (ctrl + f) if there are any Set 64 Bit Mode commands that you are not aware of - this might be causing your issue.

Re: "Get Folder Location System->Program Files" is broken

Posted: Tue Jan 10, 2012 10:14 am
by spicymikey
No eroneous "Set Win32 - 64 Bit" script statements anywhere in my app. There could be something tripping it up I suppose, but that's not it.

Since the MSI seems to have no problem knowing where the app is installed when doing modifies or removals, I just decided to code around the issue. I was using the file system to store some info used later by the patcher, I changed it to store in the registry instead. Problem not solve but avoided.

Thanks