Page 1 of 1

Noob needs help with TARGETDIR

Posted: Fri Aug 07, 2009 2:51 pm
by BillMacEachern
I'm not new to Windows Installer, but I am having trouble with IA during my evaluation.

I've created an x64 installer, but it insists on defaulting to installing under \\Program Files (x86)\\MyFolder instead of \\Program Files\\MyFolder. I have the 64-bit OS box checked under Application Requirements. What else am I missing? I've been all over the IDE and I can't find where these vars are defined.

Posted: Fri Aug 07, 2009 4:02 pm
by CandiceJones
Set the 64 bit installation mode using Set 64 Bit Mode.

Posted: Mon Aug 10, 2009 8:14 am
by BillMacEachern
Hi,

Thanks for the reply. I hadn't waded into MSIcode just yet. I looked at my main project MSIcode page and the Set 64 Bit command is already in there after a 64-bit system check. Is there something else I should check for? My dev system is an x86 XP box. Is that ok or do I need to author on an x64 system to do x64 builds?

Posted: Mon Aug 10, 2009 8:31 am
by CandiceJones
You of course need a 64 bit box to test on, but you don't need one for building 64 bit setups.

I'd run the code under the debugger to track the value of the $TARGETDIR$ variable.

Posted: Mon Aug 10, 2009 9:37 am
by BillMacEachern
I tried installing with logging enabled and the installer seems to be evaluating my test server as 32-bit, or at least it's assigning all the standard shell folders to their 32-bit equivalents. For example, this was in my list of variables:

PROGRAMFILES,"C:\\Program Files (x86)\\"
COMMONFILES,"C:\\Program Files (x86)\\Common Files\\"

But this is right below those:

ISWINDOWS64BIT,TRUE

So something is getting confused. The server is a standard Dell PowerVault NF500 with dual Quad-core Xeons and 8 GB of RAM.

We are trying to switch away from Wise for Windows Installer which I have used for about 8 years now, and was an Altiris Forum Advisor for their MSI products. Our setup installs our software which consists on several services and some kernel drivers. I have only this week to try and reproduce our old installer (which is large and complicated) in InstallAware before I move on to consider other install builders, and I'm being stumped by something that shouldn't be an issue.

I have not tried debugging in the IDE as that would entail installing IA on my clean server and moving the project over, and I'd like to avoid that if I can help it but will do it if absolutely necessary.

Posted: Mon Aug 10, 2009 2:12 pm
by CandiceJones
Are you saying that after you set 64 bit installation mode (not just determine 64 bit capability) the Get Folder Location command still returns 32 bit compatibility paths?

Posted: Mon Aug 10, 2009 2:59 pm
by BillMacEachern
Yes, that's exactly what I'm saying. I would have thought simply setting the "64-bit OS" flag would do it. In Wise, when you create a new project you specify the target platform as being 32- or 64-bit and that's all you need to do. I'm not trying to start some kind of IA vs Wise thing, but this is really bugging me. Does IA do any kind of "smart" thinking based on file binaries? My project has a dog's breakfast of win32, x64 and .NET apps, drivers & services. Could that affect IA's environment?

Edit: I did not manually add any Get Folder Location command. I created a base setup as 64-bit with targetdir defaults of $PROGRAMFILES$\\$TITLE$ and when run on my x64 server it wants to install to \\Program Files (x86)\\MyProduct. If I manually change the install folder at runtime to \\Program Files\\, it creates a MyProduct folder under it but installs all the files to \\Program Files (x86)\\MyProduct.

Posted: Tue Aug 11, 2009 10:18 am
by CandiceJones
Can you send us a minimum project which just creates a folder, for instance, in the wrong place, despite being properly coded?

Posted: Tue Aug 11, 2009 10:53 am
by BillMacEachern
A dummy project with just notepad.exe installs into the correct folder so that won't be of much use to you.

Posted: Tue Aug 11, 2009 2:13 pm
by neillans
Hi Bill,

Thats annoying ... we were hoping it would be possible to produce a sample :(

However, because a simplified script works correctly for you, it indicates that there must be an error somewhere in the script I'm afraid.

Posted: Tue Aug 11, 2009 2:23 pm
by BillMacEachern
Thanks. I'm the support manager at my company (yes, and I write the setups... many hats etc) and I was also frustrated that I couldn't reproduce it. I have since hacked up a quickie duplicate setup and the problem has not reproduced so I will move forward. A shame that I let 2 days go by with this, but whatever. I was actually hoping I did something wrong and had a chance to learn something.