链接:https://pan.baidu.com/s/1ezA9CLENAFLQ1SHwApm0BA
提取码:ccz2
先安装 对应的dpk包
右键Build和Install安装该包
然后 打开 自带Demo
C:\Users\PC\Downloads\DOSCommand-20231121\Demo
begin
DosCommand1.CommandLine := 'cmd /c '+ edit1.Text;
// DosCommand1.CommandLine := 'cmd /c "dir"';
// DosCommand1.CurrentDir := 'c:\windows';
Memo1.Lines.Clear;
Memo2.Lines.Clear;
DosCommand1.OutputLines := Memo1.Lines;
Button1.Enabled := False;
DosCommand1.Execute;
Memo1.Lines := DosCommand1.Lines;
end;