Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I find out the exe filename of the application

Status
Not open for further replies.

StewartUK

Programmer
Feb 19, 2001
860
GB
I have a prg file that is in more than one project.

I want the program to do different things according to whichever exe it is running in.

How do I find out the exe file name?

Thanks,

Stewart
 
Try SYS(16)...
from vfp help:
SYS(16) returns the name of the executable file if called from an executable (.exe) file;

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
I tried just SYS(16) but that returns the actual individual .prg file that is running.

Thanks Borislav, SYS(16,1) returns the exe name.

Stewart
 

Stewart,

I tried just SYS(16) but that returns the actual individual .prg file that is running.

If you do SYS(16) in your main prog, it will return the name of that PRG when running in the development environment, and the name of the EXE when running in the run time.

(I know you have already solved the problem; the above is just for future reference.)

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top