Will
Domain user or rent added to local group
Set objGroup = GetObject(WinNT://./Administrators)
Set objUser = GetObject(WinNT://testnet/Engineers)
()
Modify the local administrator password
Set objcnlar = GetObject(WinNT://./administrator, user)
P@ssW0rd
The YES or NO dialog box pops up, and different choices execute different codes
intAnswer = Msgbox(Do you want to delete these files?, vbYesNo, Delete Files)
If intAnswer = vbYes Then
Msgbox You answered yes.
Else Msgbox You answered no.
End If
Run CMD command line commands
set obshell=()
(ipconfig),,true
If the command to be run contains double quotes, use &chr(34)& instead
Ignore the code error and continue execution
On Error Resume Next
Place it at the beginning of the code. When the code runs an error, it does not stop jumping out but continues to execute the next item. Apply appropriately will be effective.
Modify, read, delete, create the registry
Set wso = CreateObject() 'Declaration
%Path%'Create subkey
%Path%,%Value%'Modify the default key value
%Path%, %Value%, %RegType% 'Modify the key value of a specific type
'(String value REG_SZ Extended string value REG_EXPAND_SZ DWORD value REG_DWORD Binary value REG_BINARY)
Set WSHShell= ()
(%Path%) 'Read the registry subkey or key value (usually used to determine whether a certain event is executed)
Set wso = CreateObject()
%Path%'Delete subkey or key value
'(Root key abbreviation HKEY_CLASSES_ROOT HKCR HKEY_CURRENT_USER HKCU HKEY_LOCAL_MACHINE HKLM, no other)
Quote content
eg:
Set wso = CreateObject()
HKLM\SOFTWARE\Microsft\Windows NT\#1
HKLM\SOFTWARE\Microsft\Windows NT\#1,0
HKLM\SOFTWARE\Microsft\Windows NT\#1\#2,0,REG_BINARY
HKLM\SOFTWARE\Microsft\Windows NT\#1
Copy, delete, create, and simple writing of files
Set fso = () ‘Declaration
Set f = (%PATH%) 'Create a file, where f can be arbitrarily, including abbreviation name
(VBS) 'Write file content, this command function is too simple, and it seems that it can only be used for TXT files at present
set c=(%path%) 'Copy a file
(%PATH2%) 'Copy the file to the designated location
(%PATH%) 'Delete the file
Quote content
eg.
Set fso = ()
Set f=(C:\)
WriteLine(VBS)
set e=(C:\)
(D:\)
(C:\)
Output a simple series of instructions to the application
dim program1 'Declare variable program1
program1= %Path%’ Application Path
set wshshell=createobject()’ Declare the drinking function
set oexec=(program1) 'Run the program
2000 '(This line command is unknown. It is estimated that it is setting the delay, please give me a tip)
%Windows Name%'Activate the application window
+{%KeyBoardName%} 'The first time the keyboard key command should be added +
555555' Entering this series of commands in the program input bar, you must first determine that the program can implement a series of keyboard operations, which is most suitable for QQ login, as shown in the following example.
Quote content
eg.
dim program1
program1=D:\Program Files\Tencent\
set wshshell=CreateObject()
set oexec=(program1)
2000
QQ login
+{TAB}
250481892
2000
{TAB}
****************
2000
{ENTER}
Simple operation of folders
Set fso = () ‘Declaration
Set f = (%PATH%) Create folder
Set e = getFolder(%PATH%) similar to "binding target"
(%PATH2%) Copy folder
(%PATH%) Delete folder
Quote content
eg.
Set fso = ()
Set f = (C:\sample)
(D:\sample)
(C:\sample)
'(It can be seen from the above example that many folder operations are similar to file operations, so VBS files have the unity of many commands)
Convert all read-only files in a specified folder into readable files
Const ReadOnly = 1 ‘Suppose the corresponding value of the read-only attribute is 1
Set FSO = CreateObject() 'Declaration
Set Folder = (%PATH%) 'Binding folder
Set colFiles = ‘All files in the folder
For Each objFile in colFiles 'The following statement applies to all files in the folder
If AND ReadOnly Then 'This is the key point. Here, the If judgment statement is applied to detect whether the file attribute is read-only
= XOR ReadOnly ‘Execute XOR logic operation on the judgment result is Ture (default is True)’ and change it to readable
End If ‘End judgment
Next
Save Word file as a text file
Const wdFormatText = 2 'Set the constant value
(Save as HTML document when the value is 8, and save as XML document when it is 11)
Set objWord = CreateObject() 'Declare the call function
Set objDoc = (%Path%) ‘Open a DOC file
%PATH2%, wdFormatText Save as...
Quote content
eg:
Const wdFormatText = 2
Set objWord = CreateObject()
Set objDoc = (d:\)
g:\, wdFormatText
Domain user or rent added to local group
Set objGroup = GetObject(WinNT://./Administrators)
Set objUser = GetObject(WinNT://testnet/Engineers)
()
Modify the local administrator password
Set objcnlar = GetObject(WinNT://./administrator, user)
P@ssW0rd
The YES or NO dialog box pops up, and different choices execute different codes
intAnswer = Msgbox(Do you want to delete these files?, vbYesNo, Delete Files)
If intAnswer = vbYes Then
Msgbox You answered yes.
Else Msgbox You answered no.
End If
Run CMD command line commands
set obshell=()
(ipconfig),,true
If the command to be run contains double quotes, use &chr(34)& instead
Ignore the code error and continue execution
On Error Resume Next
Place it at the beginning of the code. When the code runs an error, it does not stop jumping out but continues to execute the next item. Apply appropriately will be effective.
Modify, read, delete, create the registry
Set wso = CreateObject() 'Declaration
%Path%'Create subkey
%Path%,%Value%'Modify the default key value
%Path%, %Value%, %RegType% 'Modify the key value of a specific type
'(String value REG_SZ Extended string value REG_EXPAND_SZ DWORD value REG_DWORD Binary value REG_BINARY)
Set WSHShell= ()
(%Path%) 'Read the registry subkey or key value (usually used to determine whether a certain event is executed)
Set wso = CreateObject()
%Path%'Delete subkey or key value
'(Root key abbreviation HKEY_CLASSES_ROOT HKCR HKEY_CURRENT_USER HKCU HKEY_LOCAL_MACHINE HKLM, no other)
Quote content
eg:
Set wso = CreateObject()
HKLM\SOFTWARE\Microsft\Windows NT\#1
HKLM\SOFTWARE\Microsft\Windows NT\#1,0
HKLM\SOFTWARE\Microsft\Windows NT\#1\#2,0,REG_BINARY
HKLM\SOFTWARE\Microsft\Windows NT\#1
Copy, delete, create, and simple writing of files
Set fso = () ‘Declaration
Set f = (%PATH%) 'Create a file, where f can be arbitrarily, including abbreviation name
(VBS) 'Write file content, this command function is too simple, and it seems that it can only be used for TXT files at present
set c=(%path%) 'Copy a file
(%PATH2%) 'Copy the file to the designated location
(%PATH%) 'Delete the file
Quote content
eg.
Set fso = ()
Set f=(C:\)
WriteLine(VBS)
set e=(C:\)
(D:\)
(C:\)
Output a simple series of instructions to the application
dim program1 'Declare variable program1
program1= %Path%’ Application Path
set wshshell=createobject()’ Declare the drinking function
set oexec=(program1) 'Run the program
2000 '(This line command is unknown. It is estimated that it is setting the delay, please give me a tip)
%Windows Name%'Activate the application window
+{%KeyBoardName%} 'The first time the keyboard key command should be added +
555555' Entering this series of commands in the program input bar, you must first determine that the program can implement a series of keyboard operations, which is most suitable for QQ login, as shown in the following example.
Quote content
eg.
dim program1
program1=D:\Program Files\Tencent\
set wshshell=CreateObject()
set oexec=(program1)
2000
QQ login
+{TAB}
250481892
2000
{TAB}
****************
2000
{ENTER}
Simple operation of folders
Set fso = () ‘Declaration
Set f = (%PATH%) Create folder
Set e = getFolder(%PATH%) similar to "binding target"
(%PATH2%) Copy folder
(%PATH%) Delete folder
Quote content
eg.
Set fso = ()
Set f = (C:\sample)
(D:\sample)
(C:\sample)
'(It can be seen from the above example that many folder operations are similar to file operations, so VBS files have the unity of many commands)
Convert all read-only files in a specified folder into readable files
Const ReadOnly = 1 ‘Suppose the corresponding value of the read-only attribute is 1
Set FSO = CreateObject() 'Declaration
Set Folder = (%PATH%) 'Binding folder
Set colFiles = ‘All files in the folder
For Each objFile in colFiles 'The following statement applies to all files in the folder
If AND ReadOnly Then 'This is the key point. Here, the If judgment statement is applied to detect whether the file attribute is read-only
= XOR ReadOnly ‘Execute XOR logic operation on the judgment result is Ture (default is True)’ and change it to readable
End If ‘End judgment
Next
Save Word file as a text file
Const wdFormatText = 2 'Set the constant value
(Save as HTML document when the value is 8, and save as XML document when it is 11)
Set objWord = CreateObject() 'Declare the call function
Set objDoc = (%Path%) ‘Open a DOC file
%PATH2%, wdFormatText Save as...
Quote content
eg:
Const wdFormatText = 2
Set objWord = CreateObject()
Set objDoc = (d:\)
g:\, wdFormatText