Got a wee bit of an issue with both
ExecuteProcess, and
ShellExecute. I've made a command line tool, which calls another command line tool.
Here are the calls:
ExecuteProcess(strAppDir + 'bsarch.exe', strCommandLine, []);
if ShellExecute(0, nil, PChar(strAppDir + 'bsarch.exe'), PChar(strCommandLine), nil, 1) > 32 then
WriteLn('BSArch Success! ');
The commands are valid. But there are two problems.
ExecuteProcess Needs the file to have all permissions for user accounts, which is a total faff for the end user. Especially when I'm not writing to the file, just reading it. There is no documentation for
TExecuteFlags, so I've no idea what to put in
[].
ShellExecute Works, but the external program is ran and my code continues after it has launched. What I want to do, is run the program, and wait for it to close automatically.
How do I go about this?