* quote parameters with spaces

git-svn-id: trunk@10111 -
This commit is contained in:
peter 2008-01-30 00:15:22 +00:00
parent eb00f047f3
commit 69363bad5e
2 changed files with 25 additions and 18 deletions

View File

@ -866,16 +866,19 @@ end;
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
Var
var
CommandLine: AnsiString;
i : Integer;
I: integer;
Begin
begin
Commandline := '';
For i:=0 to high(ComLine) Do
Commandline:=CommandLine+' '+Comline[i];
for I := 0 to High (ComLine) do
if Pos (' ', ComLine [I]) <> 0 then
CommandLine := CommandLine + ' ' + '"' + ComLine [I] + '"'
else
CommandLine := CommandLine + ' ' + Comline [I];
ExecuteProcess := ExecuteProcess (Path, CommandLine);
End;
end;
Procedure Sleep(Milliseconds : Cardinal);

View File

@ -676,16 +676,20 @@ end;
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
Var
var
CommandLine: AnsiString;
i : Integer;
I: integer;
Begin
begin
Commandline := '';
For i:=0 to high(ComLine) Do
Commandline:=CommandLine+' '+Comline[i];
for I := 0 to High (ComLine) do
if Pos (' ', ComLine [I]) <> 0 then
CommandLine := CommandLine + ' ' + '"' + ComLine [I] + '"'
else
CommandLine := CommandLine + ' ' + Comline [I];
ExecuteProcess := ExecuteProcess (Path, CommandLine);
End;
end;
Procedure Sleep(Milliseconds : Cardinal);