怎么获取当前程序所在的路径?
vb2010吧
全部回复
仅看楼主
level 7
古斯不惑 楼主
例如:程序文件在C:\Users\Administrator\Desktop\2013115\1119
用Application.StartupPath
AppDomain.CurrentDomain.SetupInformation.ApplicationBase
都只能得到C:\Users\Administrator
,求各位友友解惑!
2013年11月20日 04点11分 1
level 9
你的那个exe文件在哪里放着的
2013年11月20日 13点11分 2
放在C:\Users\Administrator\Desktop\2013115\1119里面
2013年11月20日 14点11分
C:\Users\Administrator\Desktop\2013115\1119\v\bin\Debug 是我想错啦,我以为会返回到程序保存的文件夹,谢谢哈!
2013年11月20日 15点11分
level 4
返回应用程序所在路径应该用My.Application.Info.DirectoryPath,无论程序移动到何处,都能返回准确的路径,也就是exe文件所在的文件夹。
2013年11月21日 01点11分 3
非常感谢哈!
2013年11月21日 01点11分
1