Нет проблем, мы можем спросить, как вы решили проблему? (в интересах сделать ответ более применимым для других - если это возможно).

аюсь создать установщик с WiX для оконного сервиса, я попробовал все ответы, которые я нашел, и ничего. Установщик, созданный с помощью WiX, по-прежнему не будет установлен из-за разрешения, недостаточно прав ... это мой код ...

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'><?define G_TargetDir=$(var.G.TargetDir)?>
    <Product Id="*" Name="G.Installer" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="PUT-GUID-HERE">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <MediaTemplate EmbedCab="yes" />

        <Feature Id="ProductFeature" Title="G.Installer" Level="1">
            <ComponentGroupRef Id="ProductComponents" />
        </Feature>
    </Product>

    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="G.Installer" />          
            </Directory>
        </Directory>
    </Fragment>

    <Fragment>
        <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
            <Component Id="G.exe" Guid="*">
              <File Id="G.exe" Name="G.exe" Source="$(var.G_TargetDir)G.exe" Vital="yes" KeyPath="yes" />
        <ServiceInstall Id="G.exe" Type="ownProcess" Vital="yes" Name="G.exe" DisplayName="G" Description="Description" Start="auto" Account="LocalSystem" ErrorControl="critical" Arguments="-start" Interac,tive="yes">
          <util:PermissionEx  User="Everyone" ServicePauseContinue="yes" ServiceQueryStatus="yes" ServiceStart="yes" ServiceStop="yes" ServiceUserDefinedControl="yes" />
        </ServiceInstall>
        <ServiceControl Id="G.exe" Stop="both" Start="install" Remove="uninstall" Name="G.exe" Wait="no"/>
            </Component>
            <Component Id="G.exe.config" Guid="*">
              <File Id="G.exe.config" Name="G.exe.config" Source="$(var.G_TargetDir)G.exe.config" />
            </Component>
            <Component Id="MongoDB.Bson.dll" Guid="*">
              <File Id="MongoDB.Bson.dll" Name="MongoDB.Bson.dll" Source="$(var.G_TargetDir)MongoDB.Bson.dll" />
            </Component>
            <Component Id="System.Buffers.dll" Guid="*">
              <File Id="System.Buffers.dll" Name="System.Buffers.dll" Source="$(var.G_TargetDir)System.Buffers.dll" />
            </Component>
            <Component Id="DnsClient.dll" Guid="*">
              <File Id="DnsClient.dll" Name="DnsClient.dll" Source="$(var.G_TargetDir)DnsClient.dll" />
            </Component>
            <Component Id="System.Runtime.InteropServices.RuntimeInformation.dll" Guid="*">
              <File Id="System.Runtime.InteropServices.RuntimeInformation.dll" Name="System.Runtime.InteropServices.RuntimeInformation.dll" Source="$(var.G_TargetDir)System.Runtime.InteropServices.RuntimeInformation.dll" />
            </Component>
            <Component Id="MongoDB.Driver.Core.dll" Guid="*">
              <File Id="MongoDB.Driver.Core.dll" Name="MongoDB.Driver.Core.dll" Source="$(var.G_TargetDir)MongoDB.Driver.Core.dll" />
            </Component>
            <Component Id="MongoDB.Driver.dll" Guid="*">
              <File Id="MongoDB.Driver.dll" Name="MongoDB.Driver.dll" Source="$(var.G_TargetDir)MongoDB.Driver.dll" />
            </Component>
        </ComponentGroup>
    </Fragment>
</Wix>

Ответы на вопрос(1)

Ваш ответ на вопрос