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

Kur*_*ran 2 .net c# windows-installer setup-deployment

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

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

string s = Context.Parameters["SrcDir"];
Run Code Online (Sandbox Code Playgroud)

Kur*_*ran 6

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

string installationPath = this.Context.Parameters["assemblypath"];
Run Code Online (Sandbox Code Playgroud)