cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

How to Force ..\Program Files\.. Folder from 32 bit installer

Is there anyway to force ..\Program Files\.. from a 32 bit basic MSI project install?

I have tried many things, but it seems the values are always forced back to ..\Program Files(x86)\.. on a 64 bit machine. It seems that the property WIN64DUALFOLDERS is forcing the 32 bit folder.

The main reason that we need this is that we are installing a 3rd party app that has hardcoded the folder where it looks for our software in the ..\Program Files\.. folder and therefore we have to have our software go there. But we do NOT want to have 2 installers, one for 64 bit machines and one for 32 bit machines.

So is there a way to created a 32 bit installer that will force or hardcode the ..\Program Files\.. folder?

Thanks,
Labels (1)
0 Kudos
(3) Replies
Mescalero
Level 7

Hi Tim,

Using Disable(WOW64FSREDIRECTION) in an Installscript custom action might allow for this.

The documentation mentions that this constant applies to the Windows system folder, but it may be worth a shot in this case, too.
0 Kudos
Tim_Mayert
Level 9

Thanks, I have created an InstallScript custom action that only contains the following:

///////////////////////////////////////////////////////////////////////////////
//
// FUNCTION: Disable_Wow64FSRedirection(hMSI);
//
// EVENT: Begin event is always sent as the first event during
// installation.
//
///////////////////////////////////////////////////////////////////////////////
function Disable_Wow64FSRedirection(hMSI)

begin
// TO DO: you may change default non-UI setting, for example
//
// You may also perform your custom initialization steps, check requirements, etc.
Disable(WOW64FSREDIRECTION);
end;

But it does not seem to do anything at all. Is there a particular Install Sequence that this custom action should be set to for it to work?
0 Kudos
Mescalero
Level 7

I would put it after Cost Finalize in the UI sequence, but I often find myself playing around with sequencing my CAs because I haven't yet got a good grasp on it, so please take that suggestion with a pinch of salt. 😉

And again, disabling this constant may make not a difference on the Program Files folder.

Let us know how it goes...
0 Kudos