Installation 具有用户输入的WIX设置
我已经和WIX斗争了一段时间了。我希望我的程序安装在用户定义的位置,安装服务并在安装后启动程序 首先,我的msi包不要求安装路径Installation 具有用户输入的WIX设置,installation,wix,windows-services,wix3.5,Installation,Wix,Windows Services,Wix3.5,我已经和WIX斗争了一段时间了。我希望我的程序安装在用户定义的位置,安装服务并在安装后启动程序 首先,我的msi包不要求安装路径 <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER&quo
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Test" />
</Directory>
</Directory>
</Fragment>
有人能告诉我如何提示屏幕更改安装路径吗
第二,当安装我的服务时,出现一个错误,表示我缺少某些权限:
<File Id="FILE_Service" Source="$(var.Service.TargetPath)" />
<ServiceInstall Id="INSTALL_Service"
Name="Servcie"
Description=""
Start="auto"
ErrorControl="normal"
Type="ownProcess"/>
<ServiceControl Id="CONTROL_Service"
Name="Servcie"
Start="install"
Stop="both"
Remove="uninstall"
Wait="yes" />
有人能告诉我如何使用管理员权限启动我的服务吗
第三,安装的软件包只包含一个EXE文件,没有引用的程序集。有人能告诉我如何告诉WIX搜索引用并安装它们吗?WIX教程:这里有很多。您应该尝试WiX教程:
链接:以下是我的-处理WiX和部署的各种资源和提示
请注意,如果您对MSI和设置缺乏经验,这可能会帮助您更快、更可靠地进行设置
具体答案:以下是针对您具体问题的一些尝试性答案:
- (稍微向下一页)。基本上,您可以为功能元素设置
属性,以允许用户选择自定义安装目录(您可以进入对话框,通过选择以下内容更改安装路径):ConfigurableDirectory
- 主要升级安装目录:您需要读回主要升级的自定义目录。以下是方法:。或者,它将在主要升级期间恢复为默认值。这是因为主要升级是卸载旧版本和(重新)安装新版本
- 文件:要安装所有必需的文件,您需要通过依赖项扫描确定应用程序需要部署哪些文件才能工作,然后手动将它们添加到软件包中(或使用heat.exe自动生成要包含的文件列表)。请参阅上述快速入门链接以获取帮助,或参阅这篇hello wix风格的文章:
- 服务权限:如果在UAC提升提示后安装安装程序,则应使用管理员权限安装服务。它很可能不会启动,因为缺少文件,因此依赖关系被破坏。服务使用什么凭据运行?本地系统
实体模型:这里是一个快速的实体模型,符合您的需求。除其他事项外,您需要添加所有文件和依赖项,并插入服务构造:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="WiXSample" Language="1033" Version="1.0.0.0"
Manufacturer="Someone" UpgradeCode="cb24bedf-e361-4f25-9a06-ac84ce5d6f5c">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!--Default GUI - add reference to WixUIExtension.dll -->
<UIRef Id="WixUI_Mondo" />
<Feature Id="Core" Title="Core" Level="1" ConfigurableDirectory="INSTALLFOLDER" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="WiXSample">
<Component Feature="Core">
<File Source="D:\MyBinary.exe" />
</Component>
</Directory>
</Directory>
</Directory>
</Product>
</Wix>
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="WiXSample" Language="1033" Version="1.0.0.0"
Manufacturer="Someone" UpgradeCode="cb24bedf-e361-4f25-9a06-ac84ce5d6f5c">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!--Default GUI - add reference to WixUIExtension.dll -->
<UIRef Id="WixUI_Mondo" />
<Feature Id="Core" Title="Core" Level="1" ConfigurableDirectory="INSTALLFOLDER" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="WiXSample">
<Component Feature="Core">
<File Source="D:\MyBinary.exe" />
</Component>
</Directory>
</Directory>
</Directory>
</Product>
</Wix>