InstallScope ="perMachine";在维克斯没有区别 [英] InstallScope="perMachine" in wix makes no difference
问题描述
我需要我的应用程序仅能在管理员模式和所有用户模式下工作.(ie)它应该在所有模式下都能工作. 我已经在 WIX 中创建了安装程序,在浏览了很多之后,我才知道在软件包中设置 InstallScope ="perMachine" 可以使我们的应用程序在所有模式下工作.但是我发现只有它在所有登录名(管理员或其他用户)的添加\删除程序下显示了我们的应用程序.
Hi i need my application just to work in administator mode and all users mode.(ie)It should work in all the modes. I have created setup in WIX and after surfing a lot i came to know that setting InstallScope="perMachine" in package makes our application work in all the modes. But i found that only it shows our application under Add\Remove programs in all logins(admin or other users).
(即):我可以在管理员模式下使用我的应用程序,如果我以任何用户身份登录,则看不到我的应用程序可以正常工作.它仅显示在 Add \删除程序.
(ie): I am able to work my application in administrator mode and if i logged in as any user then my application is not visible for working.Its just appears in Add\Remove programs.
我的要求是我也需要我的应用程序以所有模式,管理员,登录名以及所有用户工作.
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" ></Package>
即使我在InstallScopeDlg中尝试了allUser选项. 我需要我的应用程序也应该对包括管理员在内的所有用户都有效
Even i tried allUser option in InstallScopeDlg. I need my application should work for all users including administrator too
推荐答案
在Setup.wxs文件中,添加以下行
In the Setup.wxs file add the following line
<Property Id="ALLUSERS" Value="1"></Property>
文件应类似于:
<?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>
这篇关于InstallScope ="perMachine";在维克斯没有区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!