开发者

How a System.Configuration.Install.Installer instance can get the destination folder?

开发者 https://www.devze.com 2022-12-16 23:00 出处:网络
When my ProjectInstaller : System.Configuration.In开发者_Go百科stall.Installer is called by the Setup project the current path is c:\\windows\\system32. How can I get the path where the application is

When my ProjectInstaller : System.Configuration.In开发者_Go百科stall.Installer is called by the Setup project the current path is 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])


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?


string path = System.Reflection.Assembly.GetExecutingAssembly().Location
0

精彩评论

暂无评论...
验证码 换一张
取 消