1,594
社区成员




(* 给你弄个比较简单的方案吧。使用没问题。 至于如何杀进程,网上代码多如牛毛,只是你懒得搜而已 *)
{程序A:}
if True then begin {如果检测到可用更新}
ShellApi.ShellExecute(0, PChar('Open'), PChar('B.exe'), nil, PChar('c:\Test\'), SW_SHOWNORMAL);
Application.Terminate;
end;
{程序B:}
if True then begin {如果更新下载完毕}
ShellApi.ShellExecute(0, PChar('Open'), PChar('A.exe'), nil, PChar('c:\Test\'), SW_SHOWNORMAL);
Application.Terminate;
end;
{注意,A、B两个程序放在C:\Test目录下使用。}