我添加了一个安装程序类和类中的即时覆盖安装方法。在这个方法我想正在安装MSI的路径? (Directory用户选择安装应用程序)?
我尝试以下,这让我空字符串,
字符串s = Context.Parameters [SRCDIR];
解决方案
我终于找到了如何从安装程序类获得目标目录路径
字符串安装路径= this.Context.Parameters [assemblypath];
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"];