Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我打电话时:
Process.Start("shutdown", "/s /t 60");
将出现一个警告消息框,其中包含“您的计算机将在 1 分钟内关闭”之类的消息。如何防止它出现?还有其他方法可以关闭窗口吗?
你可以写:
Process.Start("shutdown", "/p");
尝试:
Process.Start("shutdown", "-f -t 0");