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

Farrukh Waheed farrukh1 at gmail.com
Wed May 25 09:01:22 PDT 2016


Here is the logic, I would do (pseudo-code):

If VersionNT64
(
  //First search in 64bit registry
  WinwordExePath=Search("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\
Word\InstallRoot\\Path")
 if IsEmpty(WinwordExePath) or IsNull(WinwordExePath) //if not found
    //Let's search in x86bit registry
    WinwordExePath=Search("HKEY_LOCAL_MACHINE\SOFTWARE\
Wow6432Node\Microsoft\Office\15.0\Word\InstallRoot\\Path")
  if IsEmpty(WinwordExePath) or IsNull(WinwordExePath) //if still not found
    ShowMessage ("Microsoft Word not found").
)
else   //if it is Windows x86, then there would be only x86 part of
registry exist
(
 WinwordExePath=Search("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\
Word\InstallRoot\\Path")
  if IsEmpty(WinwordExePath) or IsNull(WinwordExePath) //if not found
    ShowMessage ("Microsoft Word not found").
)

Hope you'll get the idea..



On 25 May 2016 at 17:59, Yandex Mail <it-proposition at yandex.com> wrote:

> I did some test
>
> If we write following code then all works correct:
> <Property Id="HOSTPATH">
>   <DirectorySearch Id="Windows" Path="C:\Program Files\Microsoft
> Office\root\Office15">
>     <FileSearch Name="WINWORD.EXE" />
>   </DirectorySearch>
> </Property>
>
> And we do not see the redirect.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of
> Phill Hogland
> Sent: Wednesday, May 25, 2016 3:55 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)"
>
> OK
>
> I can't answer your question, but I would guess it has nothing to do with
> wix, and is related to the MSI package bitness and the OS redirect
> behavior.
> Verbose logs will clarify.
> ________________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of
> Yandex
> Mail <it-proposition at yandex.com>
> Sent: Wednesday, May 25, 2016 7:46:34 AM
> To: 'WiX Toolset Users Mailing List'
> Subject: Re: [wix-users] "Program file" is replaced by "Program file (x86)"
>
> Hello
>
> > Use RegistrySearch/@Win64="no"
> Why?
>
> The problem is that the path value contains the concrete value. It should
> not be distorted. This value is set by the user when he/she choose location
> of the program during installation.
>
> Why WiX distorts user settings?
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of
> Phill Hogland
> Sent: Wednesday, May 25, 2016 3:10 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)"
>
> Use RegistrySearch/@Win64="no"
>
> ________________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of
> Farrukh Waheed <farrukh1 at gmail.com>
> Sent: Wednesday, May 25, 2016 7:04:33 AM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] "Program file" is replaced by "Program file (x86)"
>
> On x86 windows, it would be Program Files, while on x64, it would be
> Program
> Files (x86).
> I'm on 64bit Windows 10 and here is the registry on my windows for Word
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Word\InstallRo
> ot
> while registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\,
> doesn't contain InstallRoot.
>
> I'm not sure if there is any x64 version of Office (Yeah, I'm not its big
> fan :p ) , you can define two searches for both locations.
>
>
>
>
>
> On 25 May 2016 at 16:52, Yandex Mail <it-proposition at yandex.com> wrote:
>
> > 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/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> 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