Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WIX单包安装程序-每台机器的快捷方式_Wix_Windows Installer_Shortcut_Wix3.11 - Fatal编程技术网

WIX单包安装程序-每台机器的快捷方式

WIX单包安装程序-每台机器的快捷方式,wix,windows-installer,shortcut,wix3.11,Wix,Windows Installer,Shortcut,Wix3.11,我使用ALLUSERS=2获得了一个每个用户/每台机器的功能安装程序。现在,我的问题是如何让快捷方式在这个设置中正常工作。如果我将MSIINSTALLPERUSER设置为1(单用户),则我的桌面和StartMenu快捷方式总是按HKCU中的每个用户添加。如果我设置msinstallperuser={},那么我可以获得每台机器的快捷方式。在自定义UI中,将根据UI高级部分中选定的单选按钮设置MSInstallPerUser。因此,尽管快捷方式是最后创建的,并且它们的注册表值设置为HKMU,但安装程

我使用ALLUSERS=2获得了一个每个用户/每台机器的功能安装程序。现在,我的问题是如何让快捷方式在这个设置中正常工作。如果我将MSIINSTALLPERUSER设置为1(单用户),则我的桌面和StartMenu快捷方式总是按HKCU中的每个用户添加。如果我设置msinstallperuser={},那么我可以获得每台机器的快捷方式。在自定义UI中,将根据UI高级部分中选定的单选按钮设置MSInstallPerUser。因此,尽管快捷方式是最后创建的,并且它们的注册表值设置为HKMU,但安装程序始终根据MSInstallPerUser的初始值选择快捷方式的放置位置

有人能告诉我正确的方向,根据高级用户界面中选择的安装类型(每个用户/每台机器)正确创建快捷方式吗

这是我的产品 `


= 601]]>
有特权的

`

您所说的
HKMU
是什么意思,可能是
HKCU
?@PavelAnikhouski HKMU作为注册表根值。如果按用户安装,则设置为so应将注册表项添加为HKCU,如果按机器安装,则设置为HKLM。您是否有支持按用户安装的业务案例?从历史上看,每台机器安装一直是Windows应用程序的更好模式。对于那些在自己的机器上没有管理员权限的用户通过口碑传播的应用程序,每个用户更为典型。每台机器都是有意分发的,支持机器上的所有用户。我们的业务案例是,由于需要管理员权限,我们的许多客户在安装像这样的简单应用程序时遇到问题。因此,历史上,我们一直使用squirrel.windows提供简单的安装体验。随着我们的应用程序越来越受欢迎,我们遇到了一个问题,即在同一台机器上有多个用户的大型客户端需要安装十几次。所以,现在我试图提供一个两全其美的选择。
<?xml version="1.0" encoding="UTF-8"?>        
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">      
        <Product Id="*" Name="HearCon" Language="1033" Version="2.0.299" Manufacturer="Tremetrics" UpgradeCode="73765816-7ba9-4a2b-89c3-ce1f26863b53">

        <Package InstallerVersion="500" Compressed="yes" />    
        <MediaTemplate EmbedCab="yes" />

        <Condition Message="Only Windows 7 and newer are supported">
            <![CDATA[Installed OR VersionNT >= 601]]>
        </Condition>

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

        <Feature Id="ProductFeature" Title="Application" Level="1">
            <ComponentGroupRef Id="HearConGroup" />
            <ComponentRef Id="RA660Folder_Permission" />
        </Feature>
        <Feature Id="DesktopShortcutFeature" Title="Desktop Shortcut" Level="1">
            <ComponentRef Id="DesktopShortcut" />
        </Feature>
        <Feature Id="StartMenuShortcutFeature" Title="Start Menu Shortcut">
            <ComponentRef Id="ProgramMenuShortcut" />
            <Condition Level="1">Privileged</Condition>
        </Feature>

        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="APPLICATIONFOLDER" Name="HearCon" />
            </Directory>
            <Directory Id="DesktopFolder" Name="Desktop" />
            <Directory Id="ProgramMenuFolder" />
            <Directory Id="CommonAppDataFolder">
               <Directory Id="RA660Folder" Name="RA660">
                   <Directory Id="RA660Driver" Name="Drivers" />
               </Directory>
            </Directory>
        </Directory>

        <Property Id="WixAppFolder" Value="WixPerUserFolder" />
        <Property Id="ApplicationFolderName" Value="HearCon" />
        <Property Id="ALLUSERS" Value="2" />
        <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
        <Property Id="MSIINSTALLPERUSER" Value="1" />
        <UIRef Id="WixUI_CustomAdvanced" />
        <WixVariable Id="WixUIBannerBmp" Value="HearConBanner.bmp" />
    </Product>

    <Fragment>
        <DirectoryRef Id="DesktopFolder">
            <Component Id="DesktopShortcut" Guid="10E3E42D-8B2E-471D-A6F9-6263C3491D4C">        
                <RegistryValue Root="HKMU" Key="Software\Tremetrics\HearCon" Name="installed" Type="integer" Value="1" KeyPath="yes" />
            </Component>
        </DirectoryRef>
    </Fragment>

    <Fragment>
        <DirectoryRef Id="ProgramMenuFolder">
            <Component Id="ProgramMenuShortcut" Guid="2C7EA878-B1B1-4B64-937A-6B583ED5E9B3">       
                <RegistryValue Root="HKMU" Key="Software\Tremetrics\HearCon" Name="installed" Type="integer" Value="1" KeyPath="yes" />
            </Component>
        </DirectoryRef>
    </Fragment>

    <Fragment>
        <DirectoryRef Id="RA660Folder">
            <Component Id="RA660Folder_Permission" Guid="0A538414-E53F-470E-9546-7EF193878F05">
                <CreateFolder>
                    <util:PermissionEx User="Users" GenericAll="yes"/>
                </CreateFolder>
            </Component>
       </DirectoryRef>
   </Fragment>
</Wix>