WIX 安装程序根目录和版本控制 [英] WIX installer root directory and versioning

查看:32
本文介绍了WIX 安装程序根目录和版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WIX 为我的应用程序创建了一个静默安装程序.我希望它将我的应用程序安装到 C:\MyApps 文件夹,但它的 Directory Id='TARGETDIR' Name='SourceDir' 标签随机选择C 或 D 驱动器.我只想强制安装到 C 驱动器.另外,如果我提供的版本号大于 4.0.5,我在安装过程中收到错误消息Windows Installer 服务无法安装此安装包.您必须安装较新版本的 Window Installer 服务".我使用的是 Windows XP Professional SP3 版本 2002.

I have created a silent installer Using WIX for my application. I want it to install my application to C:\MyApps folder but its Directory Id='TARGETDIR' Name='SourceDir' tag randomly picks C or D drive. I want to enforce my installation to C drive only. Also in case, I provide version number greater than 4.0.5, I am geting an error during installation saying "This installation package cannot be installed by the Windows Installer Service. You must install a newer version of the Window Installer service." I am having Windows XP professional SP3 Version 2002.

推荐答案

您的版本问题在于您正在更改 Windows Installer 版本(当您更改产品 版本时).

The problem with your versions is you're changing the Windows Installer version when you change your Product version.

<Package
    Id='*' 
    InstallerVersion='406'
    Compressed='yes'
    Description="Installer Number 406" />

InstallerVersion 属性应该是安装此程序包所需的 Windows Installer 的最低要求版本.您已安装 Windows Installer v4.5.当它设置为 406 时,它会查找 Windows Installer v4.6,坦率地说,它不存在.将此设置为 301(3.1 版)通常就足够了.

The InstallerVersion attribute should be the minimum required version of Windows Installer required to install this package. You have Windows Installer v4.5 installed. When this is set to 406, it looks for Windows Installer v4.6 which frankly, doesn't exist. Setting this to 301 (version 3.1) is usually sufficient.

    InstallerVersion='301'

虽然您的 description 属性很好,但我认为以下更有意义:

While your description attribute is fine, I would find the following more meaningful:

    Description="My Product v4.0.6 Installer"

这篇关于WIX 安装程序根目录和版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆