C++实用关机代码:dos命令之shutdown

C++实用关机代码:dos命令之shutdown,第1张

shutdown就是关机。



出了关机,还有什么?
使用方法:

  • -s
    • 关机。


    • shutdown -s
  • -r
    • 重启。


    • shutdown -r
  • -t
    • 指定 *** 作时间。


      以秒计,默认30。


    • shutdown -s -t xx
    • shutdown -r -t xx
    • 但不要shutdown -t xx


  • -a
    • 取消 *** 作。


      只能在倒计时时用。


    • shutdown -a
  • -?
    • 显示帮助。


上面几个选项只是shutdown用法中很小的一部分,全部用法如下:

可以写在*.bat文件里:

shutdown -s -t 60

也可以用在C++里:

#include//system函数
using namespace std;
int main()
{
	system("shutdown -s -t 60");
	return 0;
}

That’s all~

f ( x ) = c t g ( l g ( x 3 ) ) f(x)=ctg(lg(x^3)) f(x)=ctg(lg(x3))

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/578644.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-11
下一篇 2022-04-11

发表评论

登录后才能评论

评论列表(0条)

保存