program Project1;
uses
Winapi.Windows, System.IOUtils;
{$R *.res}
procedure myCreateProcess();
var
StartupInfo: Winapi.Windows.TStartupInfo;
ProcessInfo: Winapi.Windows.TProcessInformation;
strApplicationName: string;
strCommandLine: string;
strCurrentDirectory: string;
begin
strApplicationName := System.IOUtils.TPath.GetFullPath( './GloryProject.exe' );
strCommandLine := System.IOUtils.TPath.GetFullPath(' ../../../../../client/');
strCurrentDirectory := System.IOUtils.TPath.GetFullPath(' ../../../../../client/base/src');
FillChar(ProcessInfo, sizeof(TProcessInformation), 0);
FillChar(StartupInfo, sizeof(TStartupInfo), 0);
StartupInfo.cb := sizeof(TStartupInfo);
StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow := SW_SHOW;
Winapi.Windows.CreateProcess(nil, PChar(strApplicationName + ' ' + strCommandLine), nil, nil, True, 0, nil, PChar(strCurrentDirectory), StartupInfo, ProcessInfo);
end;
begin
myCreateProcess();
end.
Delphi 启动程序
猜你喜欢
转载自blog.csdn.net/warrially/article/details/102975181
今日推荐
周排行