What can be the cause of that?You probably free it too early.
I simplified the code in my post. I did it like You wrote. There is no difference. For example other apps run without problem... May it be because the game is in SDL ?Do you have "AProcess.Options := AProcess.Options + [poWaitOnExit];" added, yes?
I just want the app to start just like I would click on it in windows explorer. I don't care if there is console or not.
I simplified the code in my post. I did it like You wrote. There is no difference. For example other apps run without problem... May it be because the game is in SDL ?Do you have "AProcess.Options := AProcess.Options + [poWaitOnExit];" added, yes?
I just want the app to start just like I would click on it in windows explorer. I don't care if there is console or not.
you can try it this way.
uses shellapi,LConvEncoding; procedure TForm1.Button1Click(Sender: TObject); begin ShellExecute(0,nil, PChar(UTF8ToCP1254('C:\Program Files (x86)\Google\Chrome\Application\chrome.exe')),nil,nil,1); end;
There may be parameters in the shortcut of the exe you are trying to run. You can see this in the shortcut properties. Can you check this situation?
I have prepared a sample parameter for you.