Best way to find an executable
Posted: 22 Feb 2018, 16:51
My script is a GUI for another program, but it needs to assure that the other program is installed, and needs to find the file path.
The program could be installed anywhere - c:\program files\thisapp, c:\program files (x86)\thisapp, c:\thisapp, etc.
However, it always resides in a folder with it's own application name, in my example here, "thisapp".
Sometimes it may also be an environmental variable.
What is the best approach to discovering it's location?
I want to add a sort of wizard that will locate the executable.
So far, all I can think of is to use FileLoop somehow and hope it doesn't take forever, or look in the most likely places and hope it's just there.
The program could be installed anywhere - c:\program files\thisapp, c:\program files (x86)\thisapp, c:\thisapp, etc.
However, it always resides in a folder with it's own application name, in my example here, "thisapp".
Sometimes it may also be an environmental variable.
What is the best approach to discovering it's location?
I want to add a sort of wizard that will locate the executable.
So far, all I can think of is to use FileLoop somehow and hope it doesn't take forever, or look in the most likely places and hope it's just there.