Find executed from path?
-
- User
- Posts: 89
- Joined: Mon Aug 31, 2009 2:11 pm
Find executed from path?
For example, User downloaded the PB EXE in C:\username\Download\ on execute how to get the path from where PB EXE was executed from?
-----
Registered PureBasic Coder.
Registered PureBasic Coder.
Re: Find executed from path?
Code: Select all
path.s = GetPathPart(ProgramFilename())
Re: Find executed from path?
Also check GetCurrentDirectory().
Re: Find executed from path?
not really... The current directory is set by windows or the user, and can be totally different !cas wrote:Also check GetCurrentDirectory().
To find out the path from the executed exe, oO0XX0Oo ' s way is the one and only way (on windows os) !
Re: Find executed from path?
Yeah, my post was just a suggestion for checking another command that by default returns the same thing. He did not say what exactly he needs this path for so there is a possibility that GetCurrentDirectory() will serve him better for his specific needs.