Skip to content

Documentation for "Create a Windows Service Installer" may be out of date #43228

@thelowman

Description

@thelowman

Type of issue

Code doesn't work

Description

I have been trying to set up a Windows Service Installer project using the WIX Toolset. There is a section under the code to update the Package.wxs file, part of which reads:

<!-- Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFiles64Folder">

        <!-- Create a folder inside program files -->
        <Directory Id="ROOTDIRECTORY" Name="$(var.Manufacturer)">

            <!-- Create a folder within the parent folder given the name -->
            <Directory Id="INSTALLFOLDER" Name="$(Name)" />
        </Directory>
    </Directory>
</Directory>

This directory structure section caused me to get several errors. After some research I eventually changed the directory structure to read as follows:

<!-- Define the directory structure -->
<StandardDirectory Id="System64Folder">
  <Directory Id="INSTALLFOLDER" Name="$(var.Name)" />
</StandardDirectory>

I am not saying that my solution is the correct one by any means, probably not 🤔. I'm new to the WIX Toolset. But it looks like WIX has been updated recently causing the code on the tutorial to be out of date.

Page URL

https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service-with-installer?tabs=wix

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/extensions/windows-service-with-installer.md

Document Version Independent Id

83c4d805-1394-90b7-6def-cf809c33ae22

Article author

@IEvangelist

Metadata

  • ID: e044209a-0802-07c0-7518-208967a3ef02
  • Service: dotnet-fundamentals

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions