如何在运行时(安装时)从 wix 源代码中获取 MSI 文件所在的路径 [英] How to get the path of Where MSI file is located from wix source code at run time(Installation time)

查看:30
本文介绍了如何在运行时(安装时)从 wix 源代码中获取 MSI 文件所在的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在执行安装时从 WIX 源代码中找到 MSI 的路径.我尝试使用 $(sys.SOURCEFILEPATH) 返回我需要的内容(C:\temp\myProj\sample.msi)).但是,当我将 MSI 文件复制到不同的文件夹 (D:\temp\sample.msi) 并尝试安装时,我得到的路径与以前相同(C:\temp\myproj\sample.msi).

I want to Locate path of MSI from WIX Source code when we perform installation. I tried using $(sys.SOURCEFILEPATH) which returns what I need (C:\temp\myProj\sample.msi)). But when I copy MSI file to a different folder (D:\temp\sample.msi) and tried to install I am getting the same path as previous(C:\temp\myproj\sample.msi).

提前感谢您的回答

推荐答案

Windows Installer 将 OriginalDatabase 属性设置为用于启动安装的安装数据库的路径.

The Windows Installer sets the OriginalDatabase property to the path of the installation database used to launch the installation.

https://docs.microsoft.com/en-us/windows/desktop/msi/originaldatabase

这篇关于如何在运行时(安装时)从 wix 源代码中获取 MSI 文件所在的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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