How to get the full path of the current executable file in VB?

那年仲夏 提交于 2019-12-05 01:04:19
hims056

Try App.Path. It will give you the current exe path. To get exe name you can use App.EXEName. Note that App.Path will contain the trailing \ when in the root of a drive so any extra \ will need to be added conditionally.

So to get full path with exe name try this:

App.Path & IIf(Right$(App.Path, 1) <> "\", "\", "") & App.EXEName & ".exe"

Also, It will give you CD or any memory stick's path too.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!