wix 中的 InstallScope="perMachine" 没有区别

Dah*_*Sra 2 installation windows-installer wix

嗨,我需要我的应用程序才能在管理员模式和所有用户模式下工作。(即)它应该在所有模式下工作。我已经在WIX 中创建了设置,并且在浏览了很多之后我才知道在包中设置InstallScope="perMachine"使我们的应用程序可以在所有模式下工作。但我发现只有它在所有登录(管理员或其他用户)中的Add\Remove 程序下显示我们的应用程序

(ie):我可以在管理员模式下运行我的应用程序,如果我以任何用户身份登录,那么我的应用程序是不可见的。它只出现在Add\Remove 程序中

我的要求是我需要我的应用程序在所有模式下工作,管理员,登录,所有用户。

 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" ></Package>
Run Code Online (Sandbox Code Playgroud)

甚至我在 InstallScopeDlg 中尝试了 allUser 选项。我需要我的应用程序也适用于所有用户,包括管理员

use*_*438 5

在 Setup.wxs 文件中添加以下行

<Property Id="ALLUSERS" Value="1"></Property>
Run Code Online (Sandbox Code Playgroud)

该文件应如下所示:

<?xml version="1.0"?>  
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
         Name="programName"
         Language="1033"
         Version="1.0.0.0"
         UpgradeCode="183CC369-D86F-43B3-99E7-A82A16335E52"
         Manufacturer="CompanyName">
    <Package Description="#Description"
             Comments="Comments"
             InstallerVersion="200"
             Compressed="yes"/>
    <!--
        Source media for the installation. 
        Specifies a single cab file to be embedded in the installer's .msi. 
    -->
    <Media Id="1" Cabinet="contents.cab" EmbedCab="yes" CompressionLevel="high"/>

    <!-- Installation directory and files are defined in Files.wxs -->
    <Directory Id="TARGETDIR" Name="SourceDir"/>

    <Feature Id="Complete"
             Title="programName"
             Description="programName"
             Level="1">
        <ComponentRef Id="programNameFiles"/>
        <ComponentRef Id="programNameRegEntries"/>
    </Feature>

    <!--
        Using the Wix UI library

        WixUI_InstallDir does not allow the user to choose 
        features but adds a dialog to let the user choose a 
        directory where the product will be installed
    -->
    <Property Id="WIXUI_INSTALLDIR">INSTALLDIR</Property>
    <Property Id="ALLUSERS" Value="1"></Property>
    <UIRef Id="WixUI_InstallDir"/>
</Product>
Run Code Online (Sandbox Code Playgroud)