Registry search is failing and always saying "Registry key not found" in the log

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Registry search is failing and always saying "Registry key not found" in the log

Raghu12
This post has NOT been accepted by the mailing list yet.
I have two different installers. First Project1 needs to be installed and then Project2.

When uninstalling Project1, make sure Project2 is already installed, otherwise don't allow to uninstall Project1.

When I'm uninstalling Project1 without uninstalling Project2, it is getting uninstalled but it should not be uninstalled.

Below is the code and let me know where I'm making the mistake.

Project1.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

  <Bundle Name="Prerequisite Installer" Version="8.0.0" Manufacturer="Manufacturer" UpgradeCode="a6f1b423-53d8-4f83-b065-6fc543d2b0a0">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes"
                                              SuppressRepair="yes"
                                              ShowVersion="yes" />
    </BootstrapperApplicationRef>   
   
    <util:RegistrySearch Id="ApplicationId"
                         Root="HKLM"
                         Key="SOFTWARE\Manufacturer\ApplicationName"
                         Variable="AppInstalled"
                         Result="exists" />
    <bal:Condition Message="You are supposed to uninstall ApplicationName Application before Uninstalling the Prerequisites.">
      NOT AppInstalled
    </bal:Condition>

    <Chain>
      <PackageGroupRef Id="NetFx45Redist"/>
    </Chain>
  </Bundle>
</Wix>

Project2.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
        <Product Id="*" Name="ProjectOne" Language="1033" Version="1.0.0" Manufacturer="Manufacturer" UpgradeCode="dfgerdf3-98d3-4d50-b1de-b56b9d123eae">
                <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <Media Id="1" />
       
   
    <Feature Id="MainFeature" Title="Application Configuration" Level="1" >
      <ComponentRef Id="ApplicationFolder"/>
    </Feature>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="INETPUB" Name="inetpub">
        <Directory Id="WEBSITE" Name="Web Site"/>
      </Directory>
    </Directory>

    <DirectoryRef Id="WEBSITE" >
      <Component Id="ApplicationFolder" Guid="88484R91-2960-4987-A7A3-EF5C6645FBCB">
        <RegistryValue Root="HKLM" Key="SOFTWARE\Manufacturer\ApplicationName" Name="AppInstalled" Type="string" Value="Yes" />
      </Component>
    </DirectoryRef>

  </Product>
</Wix>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Registry search is failing and always saying "Registry key not found" in the log

Namrata
This post has NOT been accepted by the mailing list yet.
This post was updated on .


Hey I am getting this message while uninstalling project1 before uninstalling project2.

I would say this issue may be because of 32bit and 64bit machine, try using another test machine and let me know the results. If the issue is due to 32/64 bit machine then we need to read/write in wow64 in registry too
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Registry search is failing and always saying "Registry key not found" in the log

Raghu12
This post has NOT been accepted by the mailing list yet.
Hi Namrata,

Project1 is an .exe and Project2 is a .msi.

Does this really matters. For me it is not working.

Even both as .msi is not working. Took the fresh instance of the machine and tried.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Registry search is failing and always saying "Registry key not found" in the log

Namrata
This post has NOT been accepted by the mailing list yet.
Nope! msi or exe doesn't matters.


Date: Fri, 11 Mar 2016 14:46:24 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Registry search is failing and always saying "Registry key not found" in the log

Hi Namrata,

Project1 is an .exe and Project2 is a .msi.

Does this really matters. For me it is not working.

Even both as .msi is not working. Took the fresh instance of the machine and tried.


To unsubscribe from Registry search is failing and always saying "Registry key not found" in the log, click here.
NAML
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Registry search is failing and always saying "Registry key not found" in the log

Namrata
This post has NOT been accepted by the mailing list yet.
Try this!!!

Project1.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">

  <Bundle Name="Prerequisite Installer" Version="8.0.0" Manufacturer="Manufacturer" UpgradeCode="a6f1b423-53d8-4f83-b065-6fc543d2b0a0">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
      <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes"
                                              SuppressRepair="yes"
                                              ShowVersion="yes" />
    </BootstrapperApplicationRef>   
   
    <util:RegistrySearch Id="ApplicationId"
                         Root="HKLM"
                         Key="SOFTWARE\Manufacturer\ApplicationName"
                         Variable="AppInstalled1"
                         Result="exists" />
        <util:RegistrySearch Id="ApplicationId"
                         Root="HKLM"
                         Key="SOFTWARE\Wow6432Node\Manufacturer\ApplicationName"
                         Variable="AppInstalled2"
                         Result="exists" />
    <bal:Condition Message="You are supposed to uninstall ApplicationName Application before Uninstalling the Prerequisites.">
      NOT (AppInstalled1 OR  AppInstalled2)
    </bal:Condition>

    <Chain>
      <PackageGroupRef Id="NetFx45Redist"/>
    </Chain>
  </Bundle>
</Wix>

Project2.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
        <Product Id="*" Name="ProjectOne" Language="1033" Version="1.0.0" Manufacturer="Manufacturer" UpgradeCode="dfgerdf3-98d3-4d50-b1de-b56b9d123eae">
                <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <Media Id="1" />
       
   
    <Feature Id="MainFeature" Title="Application Configuration" Level="1" >
      <ComponentRef Id="ApplicationFolder"/>
    </Feature>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="INETPUB" Name="inetpub">
        <Directory Id="WEBSITE" Name="Web Site"/>
      </Directory>
    </Directory>

    <DirectoryRef Id="WEBSITE" >
      <Component Id="ApplicationFolder" Guid="88484R91-2960-4987-A7A3-EF5C6645FBCB">
        <RegistryValue Root="HKLM" Key="SOFTWARE\Manufacturer\ApplicationName" Name="AppInstalled" Type="string" Value="Yes" />
        <RegistryValue Root="HKLM" Key="SOFTWARE\Wow6432Node\Manufacturer\ApplicationName" Name="AppInstalled" Type="string" Value="Yes" />
      </Component>
    </DirectoryRef>

  </Product>
</Wix>
Loading...