El registro no se lee cuando se usa la búsqueda de registro en Wix

I have been searching the internet for an answer on this registry search issue.

I have a bigger wix file but i could not get multiple features working and its the conditioning of the features so I have created a basic test wix document to understand the features of wix but can not get the result i required.

El código es el siguiente:

<Property Id="BASICTEST" Secure="yes" >
  <RegistrySearch Id="_Regsearch_Basic" Root="HKLM" 
   Key="SOFTWARE\TGSL\BasicInstaller" Name="BASIC1" Type="raw" >
  </RegistrySearch>
</Property>

<Property Id="BASICTEST1" Secure="yes" >
  <RegistrySearch Id="_Regsearch_Test" Root="HKLM" 
   Key="SOFTWARE\TGSL\BasicInstaller" Name="TEST1"  Type="raw" >
  </RegistrySearch>
</Property>


<Feature Id="BasicFeature" Title="BasicFeat" Level="0">
  <Condition Level="1">NOT (BASICTEST="0")</Condition>
  <ComponentRef Id="BasicTest"/>
    </Feature>

<Feature Id="TestFeature" Title="TestFeat" Level="0" >
  <Condition Level="1">NOT (BASICTEST1="0") </Condition>
  <ComponentRef Id="BasicTest1"/>
</Feature>

I have set up four registry entries, all values are 1 (BASIC1=1 and TEST1=1) to test which registry it is using (either 2 in SOFTWARE\TGSL\BasicInstaller for 64bit or 2 in SOFTWARE\TGSL\BasicInstaller for 32bit)

I know it defaults to 32bit unless otherwise stated but still nothing. I was using process monitor to test to see if my .msi file was reading the registry...which it isnt.

I created a log file when installing the .msi and i get a error code when reading the registry:

AppSearch: Property: BARRIETEST, Signature: _Regsearch_BarrieTest1

Note: 1: 2262 2: Signature 3: -2147287038

Note: 1: 1402 2: HKEY_LOCAL_MACHINE32\SOFTWARE\TGSL\BasicInstaller 3: 2

The error code is not finding the file but it looks like it is looking in a directory that doesnt exist and when i change it to win64="yes" it takes away the 32 after the HKEY_LOCAL_MACHINE.

I have tried building this test script in wix 2.0 and it searches the registry fine and it changes the property to the value of the registry key "1" so i am in a quandary as to what im doing wrong??

Is there a difference between the registry search parameters between wix 2.0 and wix 3.5?

Can anyone suggest a possible fix or how i can get these features working?

Please help...thank in advance

preguntado el 01 de febrero de 12 a las 14:02

I have tested this example on a test server and a virtual machine and it works fine...does that mean it could be the version of visual studio i am using (im using vs 2010)?? -

My main machine is running windows 7 if that helps also?? -

Try to disable your antivirus. -

It could also be a lack of permissions reading those registry keys. Are you running the installer elevated as an Administrator? -

yeah the visual studio is running as administrator already, ill try turning off the antivirus to see if that helps :) -

1 Respuestas

For closure, as indicated in the question comments, this was a permissions issue where the user running the setup installer did not have enough privileges to access HKEY_LOCAL_MACHINE.

Respondido 07 Feb 12, 23:02

well, elevating the installer to work as admin does not seem to be a good idea, isn't there any work around for this problem? windows-installer-xml-wix-toolset.687559.n2.nabble.com/… - Hossein Shahdoost

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.