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 8434285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:36:55+00:00 2026-06-10T06:36:55+00:00

WiX 3.5. My installation project does nothing except: creates a registry key with value;

  • 0

WiX 3.5. My installation project does nothing except:

  1. creates a registry key with value;
  2. installs two certificates.

Can the WiX project be constructed without any “Directory” elements?

This is my XML code in my WiX project:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
  <Product
        Id="GUID"
        Name="SetupProject1" Language="1033" Version="1.0.0.0"
        Manufacturer="SetupProject1" UpgradeCode="GUID">
    <Package InstallerVersion="200" Compressed="yes" Languages="1033" SummaryCodepage="1252" />

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <Binary Id="testRootCABinaryStream"
            SourceFile="D:\testRootCA.cer" />
    <Binary Id="testSigningBinaryStream"
            SourceFile="D:\testSigning.cer" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLLOCATION" Name="SetupProject1">
          <Component Id="RegistrySetting" Guid="GUID">
            <iis:Certificate Id="testRootCA"
                             BinaryKey="testRootCABinaryStream"
                             Name="Test Root CA Certificate"
                             Overwrite="yes"
                             Request="no"
                             StoreLocation="localMachine"
                             StoreName="root"/>
            <iis:Certificate Id="testSigning"
                             BinaryKey="testSigningBinaryStream"
                             Name="Test Signing Certificate"
                             Overwrite="yes"
                             Request="no"
                             StoreLocation="localMachine"
                             StoreName="trustedPublisher"/>
            <RegistryValue Root="HKLM" Key="Software\Microsoft\Silverlight"
                           Name="AllowElevatedTrustAppsInBrowser"
                           Type="integer" Value="00000001" KeyPath="yes" />
          </Component>
        </Directory>
      </Directory>
    </Directory>

    <Feature Id="Complete" Title="SetupProject1" Level="1">
      <ComponentRef Id="RegistrySetting" />
      <ComponentGroupRef Id="Product.Generated" />
    </Feature>
  </Product>
</Wix>

Actually this code doesn’t create any directory in the Program Files folder, but if I compile my project without Directory element (the Component element immediately follows the Binary element in my case) it fails with the following error:

“The Component/@Directory attribute was not found; it is required.”

UPDATE

Thanks to Yan for detailed answer. Now my code snippet in directory part looks like (now it is more correct):

<Directory Id="TARGETDIR" Name="SourceDir" />

<DirectoryRef Id="TARGETDIR">
  <Component  Id="CompleteInstallation" Guid="Guid">
    <iis:Certificate Id="testRootCA"
                     BinaryKey="testRootCABinaryStream"
                     Name="Test Root CA Certificate"
                     Overwrite="yes"
                     Request="no"
                     StoreLocation="localMachine"
                     StoreName="root"/>
    <iis:Certificate Id="testSigning"
                     BinaryKey="testSigningBinaryStream"
                     Name="Test Signing Certificate"
                     Overwrite="yes"
                     Request="no"
                     StoreLocation="localMachine"
                     StoreName="trustedPublisher"/>
    <RemoveFolder Id="ProgramMenuDir" On="uninstall"/>
    <RegistryKey Root="HKLM" Key="Software\Microsoft\Silverlight">
      <RegistryValue Name="AllowElevatedTrustAppsInBrowser"
                     Type="integer" Value="00000001" KeyPath="yes" />
    </RegistryKey>
  </Component>
</DirectoryRef>
  • 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-06-10T06:36:57+00:00Added an answer on June 10, 2026 at 6:36 am

    The roots of this behavior goes down to the Windows Installer architecture. As you know, WiX is a set of tools to create Windows Installer packages, that is, it has to reflect the key concepts of this technology to some degree, hiding the most strange and ridiculous stuff behind the syntax sugar. And it does this job amazingly well, being improved from version to version!

    Each Windows Installer package must contain a Directory table. From MSDN:

    The Directory table must specify a single root directory with a
    Directory column value equal to the TARGETDIR property.

    The corresponding WiX element is:

    <Directory Id="TARGETDIR" Name="SourceDir">
      ...
    </Directory>
    

    So, it must be in your WiX authoring. In case you don’t plan to have any directories/files in your installation, you can place the components right under this root Directory element.

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

Sidebar

Related Questions

I have created a wix installer project which is working fine. It installs my
I am using WIX tool for creating installation file for our project. I want
Hi I have written code for my wix project such that it creates and
I created an installer (via WiX) that, as part of the installation, installs a
I've got a WIX installation project for my application. As part of my solution
I have created an installation package using Wix which installs a Windows service on
I'm working on a WiX 3.5 project that installs a Windows service and a
This is my very first wix project. I downloaded wix 3.6 rc. My installation
I am designing a WIX 3.6 installer project, during the installation we need to
I'm creating an installation package with WiX 3.6 primarily so I can take advantage

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.