如何获得在正在内的安装程序类的MSI安装路径安装程序、如何获得、路径、MSI

2023-09-03 15:21:49 作者:十六情话

我添加了一个安装程序类和类中的即时覆盖安装方法。在这个方法我想正在安装MSI的路径? (Directory用户选择安装应用程序)?

我尝试以下,这让我空字符串,

 字符串s = Context.Parameters [SRCDIR];
 

解决方案

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

 字符串安装路径= this.Context.Parameters [assemblypath];
 

Win8系统下安装msi程序提示错误代码2502 2503的解决方法

I have added an Installer class and within the class i'm overriding Install method. Within this method i want to get the path where MSI is being installed? (Directory user have chosen to install the application) ?

I tried the following and it gives me empty string,

string s = Context.Parameters["SrcDir"];

解决方案

I finally found how to get the target directory path from installer class

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