Hi,

I want to launch an application via code. I know the location of the
file (it will always be the same directory as the application), but I
don't know the file extension. Under Linux it doesn't have an
extension and under Windows it will have '.exe' extension.

So how do I determine the file extension to use so I can pass it to
TProcess? I would prefer not to use IFDEF <OS>.  Is there  a constant
similar to PathDelim, ExtensionSeparator etc I can use?

As an option I was thinking of querying the current running program
(ParamStr(0)) and see what extension it has, and apply that to the
application I want to launch.  This should work, but I don't know if
this is the best method to use.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to