>Please bear with me because I may have missed something very basic. I cannot seem to find a command or function in VFP which will tell me with certainty where the EXE file that I am running is located. I discovered this when attempting to run an update program off a CD. If the CD is drive 'F' and the program files are copied into the windows temp directory and then run from the program operating on the CD then sys(5),curdir,sys(2014) etc all return drive 'F' or an invalid path. Can anyone give me any guidance on this, any help will be greatly appreciated...
If your main module for the app is a .PRG, you can parse the .EXE name out of the return from SYS(16,0) - if the return starts with the string "PROCEDURE ", the name of the .APP or .EXE is SUBST(SYS(16,0),AT(' ',SYS(16,0),2)+1).