This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- 64-bit release installing files into 32-bit Program Files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2011
02:54 PM
64-bit release installing files into 32-bit Program Files
In my basic MSI project, under the Files and Folders view I have my [INSTALLDIR] under [ProgramFilesFolder], which is the 32 bit Program Files. This works good when I build 32 bit releases of my project. However, when I build a 64-bit release, all the files get installed to \Program Files(x86) when they should be getting installed to just plain \Program Files.
Is there a way to have Installshield install my files to the correct Program Files location in a 64-bit release?
Is there a way to have Installshield install my files to the correct Program Files location in a 64-bit release?
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
09:44 AM
I can get files to go to "C:\Program Files" on a 64-bit computer by doing this:
1.) Under General Information set INSTALLDIR to [ProgramFiles64Folder]MyCompany\MyApp
(note you use [ProgramFiles64Folder] instead of [ProgramFilesFolder]
2.) Under Template Summary use x64;1033
3.) At least one component must set "64-Bit Component" to Yes (you'll get a compile error if you don't do this).
1.) Under General Information set INSTALLDIR to [ProgramFiles64Folder]MyCompany\MyApp
(note you use [ProgramFiles64Folder] instead of [ProgramFilesFolder]
2.) Under Template Summary use x64;1033
3.) At least one component must set "64-Bit Component" to Yes (you'll get a compile error if you don't do this).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
09:53 AM
Thanks for the reply.
Here's the problem with doing as you suggested: I need to have both 32 and 64 bit releases in my project file. So, if I have my INSTALLDIR be [ProgramFiles64Folder], then when I build a 32 bit release and install on a 32 bit system nothing under that path gets installed. This is what I have found in my testing.
Here's the problem with doing as you suggested: I need to have both 32 and 64 bit releases in my project file. So, if I have my INSTALLDIR be [ProgramFiles64Folder], then when I build a 32 bit release and install on a 32 bit system nothing under that path gets installed. This is what I have found in my testing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
11:21 AM
Why not check property 'VersionNT64' in your InstallScript in something like OnBegin() or OnFirstUIBefore() event?
If it's true (or property exists) set your INSTALLDIR to be ProgramFiles64Folder, else set it to ProgramFiles.
If it's true (or property exists) set your INSTALLDIR to be ProgramFiles64Folder, else set it to ProgramFiles.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
12:43 PM
skolte wrote:
Why not check property 'VersionNT64' in your InstallScript in something like OnBegin() or OnFirstUIBefore() event?
If it's true (or property exists) set your INSTALLDIR to be ProgramFiles64Folder, else set it to ProgramFiles.
Hi skolte,
This is a basic MSI project, so I do not have those functions that you mention. I have found a solution that suites my needs. In the Files and Folders view, instead of putting all of my files under ProgramFilesFolder, I created my own folder called PROGRAMFILESFOLDER. Then I created 2 set Directory custom actions SetPROGRAMFILESFOLDERx86 and SetPROGRAMFILESFOLDERx64. For SetPROGRAMFILESFOLDERx86 I used NOT VersionNT64 for the condition and for SetPROGRAMFILESFOLDERx64 I used VersionNT64 for the condition, and put them after CostFinalize. In each I set PROGRAMFILESFOLDER to either [ProgramFilesFolder] or [ProgramFiles6Folder] depending on the custom action. I have them in both UI and execute sequence.
My concern was that if I ran the install silently and used the parameter INSTALLDIR="c:\TEST", the custom action would overwrite that value and install into the program files folder instead. But in my testing this is not the case. It works exactly how I need it to work.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
01:24 PM
I thought you would be able to override those events even in Basic MSI. If not, still you can use an InstallScript function that recognizes the OS platform and then set the INSTALLDIR accordingly. Just need to call this function from your custom action.
The approach you described seems a bit more work than needed. Here's a sample that I could put together in less than 15 mins to do what you want, and I am using Basic MSI. Take a look... let me know if you have any questions.
The approach you described seems a bit more work than needed. Here's a sample that I could put together in less than 15 mins to do what you want, and I am using Basic MSI. Take a look... let me know if you have any questions.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
01:33 PM
I've looked at your project, and although i haven't tested it, it seems it may not suit all of my needs. It seems that if you run your project in silent mode with INSTALLDIR=C:\TEST, the INSTALLDIR property is going to get overwritten when it goes into MyFunction.
Thank you for sharing that with me.
Thank you for sharing that with me.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 21, 2011
05:46 PM
No problem. I am glad that you already have it working the way you want.. I just wanted to give an alternative that I could think of.
By the way just for your info, to detect SILENT MODE in InstallScript, you need to simply modify my earlier code and add one more check such as
By the way just for your info, to detect SILENT MODE in InstallScript, you need to simply modify my earlier code and add one more check such as
if( MODE != SILENTMODE) then
//Your logic for FULL UI here
else
//Your logic for Silent Mode here
endif;