How to Get the EXE name of WinBatch Program
Keywords: IntControl(1004,0,0,0,0)
Question:
How do I find out the exe name of the currently running parent program?Answer:
a=WinExeName("") Message("Parent Program",a)Or:a=IntControl(1004,0,0,0,0) Message("Parent Program. Method 2",a)This tells you the currently running EXE. We cannot determine the EXE that started a currently running EXE.Related Question:
How can i determine the path and name of a wb compiled exe from within the exe ? dirget() doesn't work when the exe is called from another directory eg.:c:\hereiam> q:\apps\public\runme.exedirget() called from within runme.exe would return c:\hereiam. a dirchange() can not be applied, as the working directory should stay as it is.And what about the path?
Answer:
Your choice of:myexe=IntControl(1004,0,0,0,0) mypath=Filepath(myexe) Message("The path is",mypath)Or:mypath=DirHome() Message("Home Path",mypath)
Article ID: W13156Filename: Get EXE Name and Path of Parent Program.txt