Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6322491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:20:27+00:00 2026-05-24T16:20:27+00:00

WiX first timer here. I am building an installer for my product using WiX,

  • 0

WiX first timer here.

I am building an installer for my product using WiX, and I am attempting to validate that MSMQ is installed before continuing the installation, following this SO answer. I am using a Condition element, defined like this:

  <Condition Message="MSMQ must be installed in order to proceed.">
    <![CDATA[MSMQ_INSTALLED<>"false"]]>
  </Condition>

My Property and RegistrySearch look like this:

  <Property Id="MSMQ_INSTALLED" Value="false" Secure="yes">
    <RegistrySearch Id="Msmq.RS"
                    Root="HKLM"
                    Key="SOFTWARE\Microsoft\MSMQ"
                    Name="Values"
                    Type="raw"/>
  </Property>

But it never evaluates properly. The installation stops with the message, regardless that the Registry Key does exist. So my questions are:

  1. Am I using the Condition element correctly?
  2. What have I defined incorrectly in the evaluation?

On further testing, I have found that the MSMQ_INSTALLED property contains the value “1: 0 2:”, regardless of the Registry Key that I search for, either existing or fake.

EDIT: The Condition element exists inside the Product element; that is an important distinction as the Condition element is overloaded.

EDIT: Modified Condition to use CDATA directive, and invert Inner Condition logic, to more accurately reflect issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T16:20:28+00:00Added an answer on May 24, 2026 at 4:20 pm

    Well, the answer was on SO the whole time. Apparently, searching for a Registry Key is not supported out of the box with WiX, so I created a Custom Actions project and used the Binary tag to import it into my MSI, then run the Custom Action at the appropriate spot during the install. In my case, it was before LaunchConditions.

    For reference, the code is:

    public class CustomActions
    {
        [CustomAction]
        public static ActionResult CustomAction1(Session session)
        {
            session.Log("Begin CustomAction1");
    
            var key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MSMQ");
            session["MSMQ_INSTALLED"] = key == null ? "-1" : "1";
    
            return ActionResult.Success;
    
        }
    }
    

    (The only class in the Custom Actions project)

    <Binary Id="WixCustomAction" SourceFile="C:\work\RelayMed\src\dev\WixCustomAction\bin\Debug\WixCustomAction.CA.dll"/>
    <CustomAction Id="CheckMsmq" BinaryKey="WixCustomAction" DllEntry="CustomAction1" Execute="immediate" Return="check"/>
    

    (The import of the Binary into WiX, under the Product node.)

    <InstallUISequence>
      <Custom Action="CheckMsmq"
              Before="LaunchConditions"/>
    </InstallUISequence>
    

    (The running of the Custom Action before LaunchConditions)

    The Condition and the Property remained the same from the original post. The RegistrySearch was removed completely.

    EDIT: Noted removal of the RegistrySearch tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building my first WiX installer after becoming sick of the sight of Wise
I am writing a installer using WiX that will create a website and virtual
WiX is great in that there is no GUI, you just write the installer
Using WiX (Windows Installer XML) I have created an MSI installer which installs Word
I am using WiX to create an installer, and wish to share a folder
I am using the WiX installer to install an application, and I need to
I'm creating a Windows Installer setup file using Wix and the standard UI library.
Following some example code on the net, I got my first WiX installer to
I want to replace a file that has been installed by my installer. In
When I tried to run the installer that I created in WIX, the error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.