close
使用shellExecute 執行BAT命令
1. 第二個參數呼叫cmd.exe
2. 第三個參數要 /C 加BAT命令 ex: 'shutdown -r -t 0' or 'xcopy c:/1.txt d:/1.txt /D/K/E/Y/C/I'
3. 第四個參數執行目錄
範例
ShellExecute(handle, 'open','cmd.exe', PChar('/C ' + CmdStr), Pchar(exedirpath), SW_SHOW);
文章標籤
全站熱搜
留言列表