Note from author: This function will allow you to code into your application a way to get the path to where the AMS 5 created application (aka. executable, .exe) is located. Do not confuse this with the "temp" (aka. temporary) run-from (as I call it) location!
--[[ NOTE: This function only works AFTER you Build (F7) the project! The following function takes one argument (runexe = path and name of .exe)... and returns one string (strPath = the path of... the location of the .exe), NOT the temp ran-from location! ]] function fnEXEOrigLoca(runexe) resFile = File.Run(runexe, "", "", SW_SHOWNORMAL, false) strCWF = Folder.GetCurrent() strPath = String.Replace(_CommandLineArgs, "SFXSOURCE:", "", true) return strPath; end -- An example "function call" (to use the function) fnEXEOrigLoca(_DesktopFolder.."\\app_name.exe") -- This Message box can be removed (it's just for visual feedback) Dialog.Message("", strPath)