如何获取安装程序类中安装 MSI 的路径

问题描述 投票:0回答:2

我添加了一个 Installer 类,并且在该类中我重写了 Install 方法。在这个方法中我想获取安装MSI的路径? (目录用户已选择安装应用程序)?

我尝试了以下操作,它给了我空字符串,

string s = Context.Parameters["SrcDir"];
c# .net windows-installer setup-deployment
2个回答
7
投票

我终于找到了如何从安装程序类获取目标目录路径

string installationPath = this.Context.Parameters["assemblypath"];

0
投票

用户在向导中选择的安装路径

string installationPath = this.Context.Parameters["targetdir"]
© www.soinside.com 2019 - 2024. All rights reserved.