检测安装位置 [英] detect the installation location
本文介绍了检测安装位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用installshield来安装我的控件,现在我需要检测客户安装它的位置,是否有解决方案?
解决方案
I我不确定,但我想最简单的解决方案是使用注册表。另请参阅以下链接。
http://stackoverflow.com/questions/1957118/a-installshield-installdir-and-targetdir-issue [ ^ ]
如果需要在控件代码中检测到,您可以使用Assembly的CodeBase属性:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly()。CodeBase)
I am using installshield to install my control, now I need to detect where the customer has installed it,is there a solution to do that?
解决方案
I am not sure but I guess the easiest solution is using the registry. Also see the below link.
http://stackoverflow.com/questions/1957118/a-installshield-installdir-and-targetdir-issue[^]
If you need to detect that inside the code of your control, you can use the CodeBase property of Assembly:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
这篇关于检测安装位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文