PDA

View Full Version : x64 Template Summary Does Not Work



mjanulaitis1234
10-05-2010, 01:03 PM
Per the the file I created a simple MSI project that installs a single .Net exe file. I have created a release and set the Template Summary to x64. After I build the release the files are installed in Program Files (x86). Next I tried setting the General Information | Template Summary to x64;1033. Still the files are installed in the x86 directory. What am I doing wrong?

joshstechnij
10-05-2010, 01:54 PM
Any components that need to install files to a 64-bit path need to be marked 64-bit, and their destination should use the ProgramFiles64Folder (if the component installs to INSTALLDIR, then INSTALLDIR should be a child of ProgramFiles64Folder).

mjanulaitis1234
10-05-2010, 02:25 PM
I already tried that. The files are still installed in the wrong location.

mjanulaitis1234
10-05-2010, 02:53 PM
If I set the Destination to ProgramFiles64Folder, the files are installed in the root of that location. Here's the deal, I need the files installed in the default location, if the user wants to specify another location, so be it. Using the value [INSTALLDIR] always puts the files in Program Files (x86).

On a side note, marking a component 64-bit seems very unproductive. I thought the whole idea of creating a single project for multiple platforms was so it was easy. How is this easy if I have to duplicate all 30 .Net components I have, one for 32-bit the other for 64-bit?

joshstechnij
10-11-2010, 06:43 PM
What is INSTALLDIR set to in your project? If it is using ProgramFilesFolder as the base path, then Windows Installer will install to Program Files (x86) at runtime. If INSTALLDIR is changed to use ProgramFiles64Folder, it would be expected that Windows Installer will then use Program Files as the base path for the installation.

If you have shared components between 32-bit and 64-bit packages that do not need to change bitness depending on the installer, then these probably don't need to be marked as 64-bit. However, the guidelines for 64-bit MSI packages in the following MSDN article do need to be followed:
Using 64-Bit Windows Installer Packages (http://msdn.microsoft.com/en-us/library/aa372396(v=VS.85).aspx)

Shuttledude
11-09-2010, 02:58 PM
I'm trying to do the same thing, install several C# assemblies that have been compiled with the "any CPU" compiler setting so that they will behave as 32-bit assemblies on 32-bit OS, or 64-bit assemblies on 64-bit OS.

So, a release flag is not helpful since I'm using the same files, not choosing between 32-bit or 64-bit files.

I can override the Template Summary in the Releases view (on the General tab), but I discovered, as you did, that this alone is insufficient. As joshstechnij stated, I must somehow conditionally set the install location based on ProgramFiles (for 32-bit) or ProgramFiles64 (for 64-bit). I'm just not sure how to do this without creating duplicate features or components, and then filter with a Release Flag. If that's the only way to do it, I'm just going to keep using completely separate InstallShield projects, one for 32-bit and one for 64-bit.

I could also create a user-defined path variable which I could subsequently calculate at runtime based on 32 vs. 64 bit, but I'd really like it if the value of INSTALLDIR was just automatically set at runtime to be based off either ProgramFiles or ProgramFiles64. No such luck though.

If you figured out an easier way let me know please. Thanks.

mjanulaitis1234
11-25-2010, 12:26 AM
Ok. I have 2 installs now. What is the technique for stopping the 32 bit version from installing over the 64 bit version...and visa-a-versa.