[英]How a System.Configuration.Install.Installer instance can get the destination folder?
When my ProjectInstaller : System.Configuration.Install.Installer
is called by the Setup project the current path is c:\\windows\\system32
. 当安装项目调用我的
ProjectInstaller : System.Configuration.Install.Installer
,当前路径为c:\\windows\\system32
。 How can I get the path where the application is being installed without hard coding this to the project ? 如何在不对项目进行硬编码的情况下获得安装应用程序的路径? (the destination path is something like
c:\\program files\\[manufacturer]\\[service name]
) (目标路径类似于
c:\\program files\\[manufacturer]\\[service name]
)
This question is perfectly answered by the method described in the link below: 通过以下链接中描述的方法可以完美地回答此问题:
How to make a System.Configuration.Install.Installer to get a variable from the Setup project? 如何使System.Configuration.Install.Installer从安装项目中获取变量?
string path = System.Reflection.Assembly.GetExecutingAssembly().Location
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.