How to determine in witch drive is the exe?


  • Example:

    I have a button that i want to run an app. But i can have in drive d and other guy in drive h. How can i run this app if that app is in different drives?

    PS: Sorry for my bad english :(

    Monday, September 5, 2016 2:46 PM


  • If the application to run and your program with button are placed on the same disk, then it is possible to adjust the path after determining the drive of the running program. This depends on programming language. In C++, use GetModuleFileName and _splitpath_s. Give some details about your program and relative location of application.

    Monday, September 5, 2016 6:25 PM