Page 1 of 1
Getting Program Exe directory?
Posted: Wed Aug 13, 2008 9:42 am
by Chirantha
How do I get the path to the program's exe and its directory?

Posted: Wed Aug 13, 2008 9:47 am
by srod
ProgramFilename()
Posted: Wed Aug 13, 2008 12:38 pm
by buzzqw
i use GetCurrentDirectory()
isn't good ?
BHH
Posted: Wed Aug 13, 2008 12:43 pm
by Fluid Byte
Try this code with a saved and unsaved project to see the difference:
Code: Select all
Debug ProgramFilename()
Debug GetCurrentDirectory()
Posted: Wed Aug 13, 2008 12:57 pm
by srod
GetCurrentDirectory() can be affected by all kinds of procedures. For example, if your application prints using MS document writer then that will reset the current directory (and cause srod many hours of bug hunting! grrrr....) The point is that GetCurrentDirectory() can never be trusted to return the folder in which the executable resides.
Posted: Wed Aug 13, 2008 5:51 pm
by Mistrel
I'm surprised no one has posted this yet:
Code: Select all
Debug GetFilePart(ProgramFilename()) ; Program name
Debug GetPathPart(ProgramFilename()) ; Program directory
Posted: Wed Aug 13, 2008 5:53 pm
by srod
Well, I didn't think it really needed posting what with ProgramFilename() already being listed!

Posted: Wed Aug 13, 2008 7:28 pm
by buzzqw
ok, thanks to all!
next time i will use programfilename()
BHH
Posted: Wed Aug 13, 2008 7:30 pm
by superadnim
what? did you use 2 accounts to post and then reply?. I sense that your "voice engine" doesn't really need to know all those things you asked on the previous posts ... are you writing malware?.
Posted: Thu Aug 14, 2008 2:33 am
by Chirantha
superadnim wrote:what? did you use 2 accounts to post and then reply?. I sense that your "voice engine" doesn't really need to know all those things you asked on the previous posts ... are you writing malware?.
Ofcourse not

Quit making me want to make one lol

Posted: Thu Aug 14, 2008 1:49 pm
by Little John
Also according to
another thread, it seems that it can't harm trying to clarify something ...
superadnim wrote:what? did you use 2 accounts to post and then reply?. I sense that your "voice engine" doesn't really need to know all those things you asked on the previous posts ... are you writing malware?.
You obviously mean the 2 accounts with the names "Chirantha" and "buzzqw", no? It seems to be a misunderstanding, and I think the situation is pretty simple:
buzzqw wrote:i use GetCurrentDirectory()
isn't good ?
People wrote some explanations, and then
buzzqw wrote:ok, thanks to all!
Everything as clear as mud?

I think we shouldn't suspect other people of doing strange things without knowing hard facts.
Regards, Little John
Posted: Sat Aug 16, 2008 12:17 am
by superadnim
I know but all those questions seemed to point towards malware to me, I just asked to ask - I didn't blame anyone nor pointed fingers saying he should be burnt with the witches...

Posted: Sat Aug 16, 2008 3:33 am
by idle