windows 一些恶搞的bat小脚本

关机脚本
@echo off

shutdown -s -t 0

重启脚本

@echo off
shutdown -r -t 0

dos命令实现无限弹窗

新建一个文本文件

里面输入:

: start

start cmd

goto start

存为.bat结尾

但请谨慎点击!!!!!

效果图:
在这里插入图片描述

唬人的格式化脚本

@echo off
color 4f
taskkill /im explorer.exe /f
echo 删除C盘所有文件......
del /f /s /q "%systemdrive%\*.tmp"
del /f /s /q "%systemdrive%\*.dmp"
del /f /s /q "%systemdrive%\*._mp"
del /f /s /q "%systemdrive%\*.gid"
del /f /s /q "%systemdrive%\*.old"
del /f /s /q "%systemdrive%\*.chk"
del /f /s /q "%systemdrive%\*.bak"
del /f /s /q "%systemdrive%\*.log"
del /f /s /q "%systemdrive%\*.txt"
del /f /s /q "%systemdrive%\*.ini"
del /f /s /q "%systemdrive%\Recycled\*.*"
del /f /s /q "%systemdrive%\RECYCLER\*.*"
del /f /s /q "%windir%\inf\*.pnf"
del /f /s /q "%windir%\Prefetch\*.*"
@ping -n 2 127.1>nul
rd /s /q "%windir%\Downloaded Program Files" & md "%windir%\Downloaded Program Files"
@ping -n 2 127.1>nul
rd /s /q "%windir%\LastGood" & md "%windir%\LastGood"
@ping -n 2 127.1>nul
rd /s /q "%windir%\Offline Web Pages" & md "%windir%\Offline Web Pages"
@ping -n 2 127.1>nul
rd /s /q "%windir%\SoftwareDistribution\Download" & md "%windir%\SoftwareDistribution\Download"
@ping -n 2 127.1>nul
rd /s /q "%windir%\temp" & md "%windir%\temp"
@ping -n 2 127.1>nul
rd /s /q "%userprofile%\Local Settings\Application Data\Microsoft\Media Player" & md "%windir%\Local Settings\Application Data\Microsoft\Media Player"
@ping -n 2 127.1>nul
rd /s /q "%userprofile%\UserData" & md "%windir%\UserData"
@ping -n 2 127.1>nul
rd /s /q "%appdata%\Adobe" & md "%windir%\Adobe"
@ping -n 2 127.1>nul
rd /s /q "%appdata%\Macromedia" & md "%windir%\Macromedia"
@ping -n 2 127.1>nul
rd /s /q "%appdata%\Microsoft\Media Player" & md "%windir%\Microsoft\Media Player"
@ping -n 2 127.1>nul
rd /s /q "%appdata%\Microsoft\Office\Recent" & md "%windir%\Microsoft\Office\Recent"
@ping -n 5 127.1>nul
del /a /f /s /q "%userprofile%\Cookies\*.*"
del /a /f /s /q "%userprofile%\Recent\*.*"
del /a /f /s /q "%userprofile%\Local Settings\Application Data\GDIPFONTCACHEV1.dat"
del /a /f /s /q "%userprofile%\Local Settings\Application Data\IconCache.db"
del /a /f /s /q "%userprofile%\Local Settings\History\*.*"
del /a /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /a /f /s /q "%temp%\*.*" del /a /f /s /q "%userprofile%\AppData\Local\GDIPFONTCACHEV1.dat"
del /a /f /s /q "%userprofile%\AppData\Local\IconCache.db"
del /a /f /s /q "%userprofile% \AppData\Local\Microsoft\Windows\History\*.*"
del /a /f /s /q "%userprofile% \AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"
del /a /f /s /q "%userprofile% \AppData\Roaming\Microsoft\Windows\Cookies\*.*"
del /a /f /s /q "%userprofile% \AppData\Roaming\Microsoft\Windows\Recent\*.*"
echo 已删除完毕
@echo.
echo 删除D盘所有文件......
@ping -n 3 127.1>nul
@echo 已删除完毕
@echo.
echo 删除E盘所有文件......
@ping -n 3 127.1>nul
echo 已删除完毕
@echo.
echo 正在低级格式化全部硬盘......
@ping -n 3 127.1>nul
echo.
echo 正在 进行二次 低格硬盘......
ping -n 3 127.1>nul
echo.
echo 正在 进行三次 低格硬盘......
ping -n 3 127.1>nul
echo.
echo 正在 进行四次 低格硬盘......
ping -n 3 127.1>nul
echo.
echo 正在 进行五次 低格硬盘......
ping -n 3 127.1>nul
echo.
echo 注意: cpu温度127度!温度过高报警!!!
echo.
ping -n 2 127.1>nul
echo 注意: 硬盘温度86度!温度过高报警!!!
echo.
ping -n 2 127.1>nul
echo 注意: 显卡温度96度!温度过高报警!!!
echo.
ping -n 2 127.1>nul
echo 注意: 系统崩溃, 主板温度 超过临界值!!! echo.
echo 注意: 电容负荷超过99% echo. & pause
echo 电脑将在60秒内崩溃或爆炸!请勿强行关闭电源!否则会 导致cpu和硬盘彻底损毁!!
shutdown /r /t 60 /c "电脑将在60秒内崩溃或爆炸!请勿强行关闭电源!否则会 导致cpu和硬盘彻底损毁!!"
ping -n 30 127.1>nul
shutdown -a
start explorer.exe
exit

效果图:
在这里插入图片描述
盘符增加
@echo off

for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (subst %%i: C:)

效果图:
在这里插入图片描述
盘符恢复

@echo off
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (subst %%i: /d)

死机循环

@echo off
%0|%0

效果图:
在这里插入图片描述
在这里插入图片描述

清理系统垃圾
@echo off
echo 正在清除系统垃圾文件,请稍等…
del /f /s /q %systemdrive%*.tmp
del /f /s /q %systemdrive%*._mp
del /f /s /q %systemdrive%*.log
del /f /s /q %systemdrive%*.gid
del /f /s /q %systemdrive%*.chk
del /f /s /q %systemdrive%*.old
del /f /s /q %systemdrive%\recycled*.*
del /f /s /q %windir%*.bak
del /f /s /q %windir%\prefetch*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies*.*
del /f /q %userprofile%\recent*.*
del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files*."
del /f /s /q "%userprofile%\Local Settings\Temp*.

del /f /s /q “%userprofile%\recent*.*”
echo 清除系统垃圾文件完成!
pause

ps:由于明天考试,所以就匆忙的总结一下,后期还会添加一些有意思的bat或者vbs脚本,不要问我什么是bat。。。其中的命令请自己百度。都可以查到。

分享是一种美德。不要藏着掖着,那样只会让人们看不起你。

今天上概率论的时候,看着美女老师讲课,,,突然觉得有一句话好有道理。大学阶段甚至工作的很多时候,我们不可能有足够的时间来系统的学习某一门技能,我们需要获得的能力就是,在几天,几个小时甚至是几分钟之内,学会一门技能。比如三天学会一门编程语言,这是完全可以实现的,但是要有踏踏实实的基础。这些基础不仅仅包括你会编程,还要求你懂操作系统的运行原理,懂硬件的运行原理。

2015.6.24补充

隐藏文件夹:

attrib 显示所有文件的属性;
参数:+r或-r [文件名] 设置文件属性是否为只读
+h或-h [文件名] 设置文件属性是否隐含
+s或-s [文件名] 设置文件属性是否为系统文件
+a或-a [文件名] 设置文件属性是否为归档文件
/s 设置包括子目录的文件在内的文件属性
, 设置所有属性文件为归档文件

例如:attrib +a +s +h +r e:\bak\tools
attrib -a -s -h -r e:\bak\tools

自己记得文件夹的路径,直接在地址栏里面输入,即可进入。

隐藏和禁止:

正确用法:
第一步:在运行中输入cmd,回车,打开命令行窗口
第二步:在命令行窗口中切换到想要建立文件夹的硬盘分区,如D盘。输入D: 回车
第三步:输入MD 123…\回车(MD与123之间有空格),注意文件夹名后有2个小数点(123和…也可用其他比如字母逗号等替代)

OK,搞定,看看你的D盘下面是不是多了一个名为123.的文件夹了?它是既不能进入又不能被删除的!不信你就试试看吧

如果想删除,在命令行窗口中输入 rd 123…\回车,即可删除。

如果想进入,在命令行窗口中输入start d:\123…\回车,即可进入

以上用法只在win xp下适用,在 vista和win7 下无效。

恢复数据:

在这里插入图片描述
经win7测试,失败。xp也许能成功。先记上!

  • 24
    点赞
  • 167
    收藏
    觉得还不错? 一键收藏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值