From d15b4137b93ba81ced2e1de606915f62ac544f0c Mon Sep 17 00:00:00 2001 From: guschin Date: Mon, 9 Jan 2023 22:23:13 +0300 Subject: [PATCH] !!! --- DCLPlatform/uDCLUtils.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DCLPlatform/uDCLUtils.pas b/DCLPlatform/uDCLUtils.pas index 7f4f5ea..2f5a670 100644 --- a/DCLPlatform/uDCLUtils.pas +++ b/DCLPlatform/uDCLUtils.pas @@ -399,6 +399,7 @@ procedure ExecApp(const App: String; const CurrDir: String); SI: TStartupInfo; PI: TProcessInformation; CmdLine: String; + cd:PChar; begin Assert(App <> ''); @@ -412,8 +413,11 @@ procedure ExecApp(const App: String; const CurrDir: String); SI.wShowWindow := SW_SHOWNORMAL; SetLastError(ERROR_INVALID_PARAMETER); + if CurrDir<>'' then + cd:=PChar(CurrDir); + {$WARN SYMBOL_PLATFORM OFF} - Win32Check(CreateProcess(nil, PChar(CmdLine), nil, nil, False, CREATE_DEFAULT_ERROR_MODE {$IFDEF UNICODE}or CREATE_UNICODE_ENVIRONMENT{$ENDIF}, nil, PChar(CurrDir), SI, PI)); + Win32Check(CreateProcess(nil, PChar(CmdLine), nil, nil, False, CREATE_DEFAULT_ERROR_MODE {$IFDEF UNICODE}or CREATE_UNICODE_ENVIRONMENT{$ENDIF}, nil, cd, SI, PI)); {$WARN SYMBOL_PLATFORM ON} CloseHandle(PI.hThread); CloseHandle(PI.hProcess);