http://www.csdn.net/develop/read_article.asp?id=18996 VB: Dim FullPath As String Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly() Dim strConfigLoc As String strConfigLoc = Asm.Location Dim strTemp As String strTemp = strConfigLoc '提取安装路径 strTemp = strTemp.Remove(strTemp.LastIndexOf("\"), Len(strTemp) - strTemp.LastIndexOf("\"))
VB:
Dim FullPath As String
Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
Dim strConfigLoc As String
strConfigLoc = Asm.Location
Dim strTemp As String
strTemp = strConfigLoc
'提取安装路径
strTemp = strTemp.Remove(strTemp.LastIndexOf("\"), Len(strTemp) - strTemp.LastIndexOf("\"))