Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory search in registry #5271

Closed
EMostafaAli opened this issue Apr 21, 2016 · 3 comments
Closed

Directory search in registry #5271

EMostafaAli opened this issue Apr 21, 2016 · 3 comments
Labels

Comments

@EMostafaAli
Copy link

Please provide answers to the following questions to help us narrow down, reproduce, and fix the problem. Fill out one section and delete the others.

Bugs

If this issue is a bug:

  • Which version of WiX are you building with?

3.10.2.2516

  • Which version of Visual Studio are you building with (if any)?

Visual Studio 2015 V 14.0.25123.00 Update 2

  • Which version of .NET are you building with?

4.5

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?

Windows 10

  • Describe the problem and the steps to reproduce it.

I have a registry entry "C:\Program Files\Computers and Structures\SAP2000 18" and I am writing the following property to get the directory.

<Property Id="SAP2000INSTALLATIONV18_64">
      <RegistrySearch Id="SAP2000Registryv18_64" Root="HKLM" Key="Software\Computers and Structures, Inc.\SAP2000\18" Name="Install path" Type="directory" Win64="yes">
        <DirectorySearch Id="SAP2000Pathv18_64" Path="[SAP2000INSTALLATIONV18_64]"/>
      </RegistrySearch>
    </Property>
    <Condition Message="Path does not exist">
      <![CDATA[SAP2000INSTALLATIONV18_64]]>
    </Condition>

I found the installer can't run unless I change the type to "raw" instead of "directory". For me, it seems a legitimate path.

Please note the same code works for the same path if it is 32 bit.

@barnson
Copy link
Member

barnson commented Apr 26, 2016

Works for me:

<Property Id="FOO">
    <RegistrySearch Root="HKLM" Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" Name="InstallRoot" Win64="yes" Type="directory" Id="NetFrameworkInstallRootSearch">
        <DirectorySearch Id="NetFrameworkInstallRootSearch" />
    </RegistrySearch>
</Property>

And the searches are a built-in functionality of Windows Installer. WiX can't change their behavior, only replace them.

@EMostafaAli
Copy link
Author

Actually, It works with me as well for other entries but not this one.

@barnson
Copy link
Member

barnson commented May 4, 2016

MSI owns the AppSearch process so unless you're finding that WiX isn't building the AppSearch tables correctly, there's nothing WiX can do to change AppSearch behavior.

@barnson barnson closed this as completed May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants