ShellExecute not working

Issue #178 new
Rustam Shirgazin created an issue
if ShellExecute(Handle, 'open', 'sample.py', nil, nil, SW_SHOW) < 32 then
begin
  ShowMessage('Can not execute ShellExecute!');
end;

sample.py is executable and can be run from Terminal just by typing script name

![execute.png](https://bitbucket.org/repo/aoBB4L/images/1450089935-execute.png)

On Ubuntu ShellExecute does not execute. How to use ShellExecute correctly?

Comments (3)

  1. Rustam Shirgazin reporter

    WinExec doesn't deploy

    if WinExec('sample.py', SW_SHOW) < 32 then
    begin
      ShowMessage('Error WinExec !')
    end;
    

    Error [DCC Error] E2597 C:\Program Files (x86)\CrossVcl\Lib\20.0\Linux64\Release\Winapi.Windows.o:Winapi.Windows:function Winapi::Windows::WinExec(char*, unsigned int): error: undefined reference to 'WinExec'

  2. Eugene Kryukov repo owner

    ShellExecute launches default app for specified file, which registered in Desktop (not for terminal)

  3. Log in to comment