以下命令有什么区别:
start %comspec% /c script.cmd start cmd /C script.cmd
我需要script.cmd的cmd窗口在script.cmd完成时自动关闭。
%comspec%只指向cmd.exe,因此两个命令都会执行相同的操作。除了/C是正确的,这将在执行后关闭命令提示符
%comspec%
/C
对于WindowsXP-SP2上的非管理员用户。