XP命令shutdown定时关机如何写成批处理?

来源:百度知道 编辑:UC知道 时间:2024/05/20 14:18:33
我的电脑在宿舍放着,每晚同学都拿来玩,又不好意思不给他们玩,所以我想用批处理来关机,我想要十二点十分关机,如果他们又开那又十二点二十分在关机

如果弄计划任务 必去启动 at命令
要使用At命令调用bat必须:
运行services.msc,打开服务,确保里面的Task Scheduler服务开启

第二
at命令写为:
at 00:00 shutdown -s -t 0
at 00:20 shutdown -s -t 0

对于你的问题... 不如你这样...
@echo off
copy %0 "%userprofile%\「开始」菜单\程序\启动"
shutdown -s -t 0

这是开机自动关机的批处理... 按住shift开机 这程序将不会启动... 每次开机你都按住shift键 可以正常启动...。。。 别人开机的话就会自动关机...

@echo off
at 时间 shutdown -s

shutdown -s -f -t 0
放到计划任务里...