[wix-users] "Program file" is replaced by "Program file (x86)" [P]

Yandex Mail it-proposition at yandex.com
Wed May 25 06:35:17 PDT 2016


Hi Steve

Please see my description in first message.

Also you can see the description here
https://github.com/wixtoolset/issues/issues/5305 
I do not know can we send message.

I create installer x86.
And it has the condition. It must check that the user has Microsoft Word
2013.

I use the standard code:
<Property Id="HOSTPATH">
  <RegistrySearch Id="RegSearch_HOSTEXE" Root="HKLM"
Key="SOFTWARE\Microsoft\Office\15.0\Word\InstallRoot" Name="Path"
Type="directory">
    <FileSearch Name="WINWORD.EXE" />
  </RegistrySearch>
</Property>
<Condition Message="!(loc.HostConditionMessage)"><![CDATA[Installed OR
HOSTPATH]]></Condition>

This condition does not work on Windows x64 with Microsoft Word x86.

I researched the user computer and found that Word x86 is set in "C:\Program
Files\Microsoft Office\root\Office15\".
And, accordingly, in key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Word\InstallRo
ot Path value has "C:\Program Files\Microsoft Office\root\Office15\"

I got procmon.exe and checked what was going on.

The install process can try open "C:\Program Files (x86)\Microsoft
Office\root\Office15\", although it should open "C:\Program Files\Microsoft
Office\root\Office15\" folder.

Why does it change from "Program Files" to "Program Files (x86)"?

----
Leonid


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Steven Ogilvie
Sent: Wednesday, May 25, 2016 4:16 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] "Program file" is replaced by "Program file (x86)"
[P]

Classification: Public
Did you build the MSI as 32 bit or 64 bit?
32 bit MSI *cannot* install to C:\program files\ on a 64 bit OS and vice
versa a 64 bit MSI cannot install to C:\Program Files (x86) on a 64 bit OS

Steve




This message has been marked as Public by Steven Ogilvie on May 25, 2016
9:17:48 AM.
The above classification labels were added to the message by TITUS Message
Classification.For More information visit www.titus.com.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Yandex Mail
Sent: May 25, 2016 7:52 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] "Program file" is replaced by "Program file (x86)"

Hi

 

WiX version: 3.10.3.2917

Visual Studio version: 2015 Update 2

.NET version: 3.5

 

Our program is installed in Windows 10 x64 with MS Word 2013 x86.

But the base configuration is Windows 8.1 x64 and MS Word 2013 x86. The
windows was updated to version 10.

This fact is important because after that Word x86 has location "C:\Program
Files\Microsoft Office\root\Office15\". We can see it in the registry:

msi-001

 

Thus, our installer should detect that the user computer has the installed
Word 2013 x86.

For this we used the standard scenario:

 

<Property Id="HOSTPATH">

  <RegistrySearch Id="RegSearch_HOSTEXE" Root="HKLM"
Key="SOFTWARE\Microsoft\Office\15.0\Word\InstallRoot" Name="Path"
Type="directory">

    <FileSearch Name="WINWORD.EXE" />

  </RegistrySearch>

</Property>

<Condition Message="!(loc.HostConditionMessage)"><![CDATA[Installed OR
HOSTPATH]]></Condition>

 

And in result this condition does not pass.

To found the problem I used procmon.exe and found that the installer looks
for WINWORD.EXE in another folder:

msi-002

The installer tries to find "C:\Program Files (x86)\Microsoft
Office\root\Office15\" but the registry contains "C:\Program Files\Microsoft
Office\root\Office15\" value.

 

In result the installer can not find WINWORD.EXE file and the condition can
not pass.

 

 

----

Thanks & Regards

Leonid Maliutin

 

 


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list