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

Got a problem you cannot solve? Try here.
Post Reply
spicymikey
Posts: 92
Joined: Thu Dec 08, 2011 9:23 am

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

Post 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
spicymikey
Posts: 92
Joined: Thu Dec 08, 2011 9:23 am

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

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

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

Post by giaviv »

Hi,

Are you familiar / using the Set 64 Bit Mode command?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
spicymikey
Posts: 92
Joined: Thu Dec 08, 2011 9:23 am

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

Post 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?
spicymikey
Posts: 92
Joined: Thu Dec 08, 2011 9:23 am

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

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

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

Post 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.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
spicymikey
Posts: 92
Joined: Thu Dec 08, 2011 9:23 am

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

Post 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
Post Reply