|
#11
|
||||
|
||||
|
Quote:
And in terms of deleting the files "arc.exe" and "arc.ini", do you specify the working folder (temp) in the same location where the program is located? PS: My function for execute: Code:
function ExecAndWait(const AFileName, AParameters: string; const ShowCmd: integer): Cardinal;
var
ShellExecuteInfo: TShellExecuteInfoW;
begin
Result := 0;
FillChar(ShellExecuteInfo, SizeOf(ShellExecuteInfo), #0);
ShellExecuteInfo.cbSize := SizeOf(TShellExecuteInfo);
with ShellExecuteInfo do
begin
fMask := SEE_MASK_NOCLOSEPROCESS;
Wnd := Application.Handle;
lpFile := PChar(AFileName);
lpParameters := PChar(AParameters);
lpDirectory := PChar(ExtractFilePath(AFileName));
nShow := ShowCmd;
end;
if ShellExecuteEx(@ShellExecuteInfo) then
begin
repeat
while WaitForSingleObject(ShellExecuteInfo.hProcess, 0) = WAIT_TIMEOUT do
Application.ProcessMessages;
GetExitCodeProcess(ShellExecuteInfo.hProcess, Result);
until
(ExitCode <> STILL_ACTIVE) or Application.Terminated;
end;
end;
__________________
Practice makes perfect. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista beta 2 blocking Starforce | ronandex | CD/DVD Copy Protections & Utilities | 4 | 31-05-2006 02:37 |
| Neverwinter Nights v1.66.8071 (Beta) | doomerdgr8 | PC Games | 1 | 28-05-2005 10:18 |
| Copying Socom2 Beta Is It Possible | dblue | PS2 Games | 6 | 14-10-2003 19:14 |
| OT: Opinion and BETA testers neded for my upcomming products! | krondike | PC Games | 3 | 06-10-2003 08:29 |
| PAL Patcher 0.93 Beta | Megalexxx | DC Games | 18 | 03-01-2003 09:23 |