提问阿 关于EXEC的用法
pascal吧
全部回复
仅看楼主
level 5
怎样让EXEC调用CMD.EXE后让CMD执行预定语句?
2010年03月13日 05点03分 1
level 0
exec('cmd.exe','shutdown -s -t 0');
2010年03月13日 12点03分 2
exec(gotenv('systemroot')+'\system32\shutdown.exe','-s -t 0');
2016年08月01日 12点08分
level 11
exec(程序名,参数);
exec('cmd.exe','echo aaaaa');
2010年03月13日 12点03分 3
level 5
用了 不行
2010年03月13日 17点03分 4
level 5
exec来自单元dos
用法:Exec(程序,参数);
如果想要调用dos命令,貌似是
exec('cmd.exe','/c xxxxx');
后面的xxxxx是要执行的dos命令
2010年03月14日 00点03分 5
level 5

2010年03月14日 03点03分 6
level 2
uses dos;
begin
swapvectors;
exec(gotenv('systemroot')+'\system32\shutdown.exe','-s -t 9999999');
exec(gotenv(systemroot')+'\system32\shutdown.exe','-f');
swapvectors;
end.
2016年08月01日 12点08分 7
1