• What’s the use of SetLocale function in VBS?


    Description of SetLocale function in VBS document: Set up the global regional settings and return to the previous regional settings.A locale is a set of user reference information related to the user’s language, country/region and cultural traditions. The locale determines the keyboard layout, alphabetical order and date, time, number and currency format.Simply put, the return […]

  • Introduction of the Difference between CreateObject and WScript.CreateObject in VBS


    The difference between CreateObject and WScript.CreateObject is one:CreateObject is a built-in function of VBS and part of the language, while WScript. CreateObject is a method of WScript object provided by Windows script host (wscript. exe and cscript. exe). Similar to the relationship between internal and external commands in batch processing. In VBS, CreateObject is always […]

  • Caesar cryptographic algorithm implemented by VBS


    In cryptography, Caesar cryptography (or Caesar cryptography, Caesar transformation) is the simplest and most widely known encryption technology. It is a replacement encryption technique, in which all letters in plaintext are shifted backward (or forward) on the alphabet according to a fixed number and replaced with ciphertext. For example, when the offset is 3, all […]

  • Implementing Code of Modifying Directory Name and Shortcut Name by Vbs


    Copy codeThe code is as follows: set fso=wscript.createobject(“scripting.filesystemobject”) OldFolderName1=”263 Enterprise Messenger”newFolderName1=”Peacemap Messenger”OldFileName1 = “263 Enterprise Messenger.lnk”newFileName1 = “Peacemap Messenger.lnk”OldFileName2 = Unload 263 Enterprise Messenger. lnkNewFileName2 = Unload Peacemap Messenger. lnk Original path= “C: Documents and Settings All Users Start menu Program”New path= “C: Documents and Settings All Users Start menu Program Peacemap Messenger”Deskpath= “C: Documents […]

  • Making script code of QQ automatic login with VBScript


    The Madman version of QQ has been used for a long time, but the latest version of Madman QQ somehow canceled the automatic login component. Fortunately, QQ2009 has been able to remember multiple numbers of passwords at the same time, although it needs a few clicks, but still can achieve password-free login. Who knows what’s […]

  • Generate SDDL function of VBSCript (permission setting)


    Copy codeThe code is as follows: Function GenerateSDDL(AccountName, AccessFlag, AccessType, AccessMask) Dim Accounts, ObjWMI, ObjSID, ObjTru, ObjACE Const SET_DACL_PRESENT = &H8004  Set ObjWMI = GetObject(“winmgmts:” & “{impersonationLevel=impersonate, (Security)}!\\.\root\cimv2”)  Set Accounts = ObjWMI.ExecQuery(“SELECT * FROM Win32_Account WHERE Name=’” & AccountName & “‘”) For Each Account In Accounts  StrSID = Account.SID Next Set ObjSID = ObjWMI.Get(“Win32_SID.SID=’”& StrSID &”‘”)  Set ObjTru = ObjWMI.Get(“Win32_Trustee”).SpawnInstance_() ObjTru.Domain  = ObjSID.ReferencedDomainName ObjTru.Name   = […]

  • Remove the VBS code of RAR right-click decompression menu


    Principle: Copy codeThe code is as follows: Public ReadBinaryReadBinaryDat(“.\1.exe”)BinaryDat = Replace(Replace(ReadBinary, “526172211a07”, “522172211a07”), “807a0161”, “807a0121”)WriteBinaryDat “new.exe”, BinaryDatFunction ReadBinaryDat(FileName) Const adTypeBinary = 1 Dim stream, xmldom, node Set xmldom = CreateObject(“Microsoft.XMLDOM”) Set node = xmldom.CreateElement(“binary”) node.DataType = “bin.hex” Set stream = CreateObject(“ADODB.Stream”) stream.Type = adTypeBinary stream.Open stream.LoadFromFile FileName node.NodeTypedValue = stream.Read stream.Close Set stream = Nothing ReadBinary = node.Text Set node = Nothing Set xmldom = NothingEnd Function Sub WriteBinaryDat(FileName, […]

  • Using VBS to Modify HEX Data of Binary File


    There are still some available places, such as hiding the location of the target file in the shortcut, breaking the TCP/IP connection limit in XP, removing the RAR right-click decompression menu, and so on. Copy codeThe code is as follows: Public BinaryData If (lcase(right(wscript.fullname,11))=”wscript.exe”) Then WScript.Quit(0)End If If wscript.arguments.count<4 Then Wscript.Echo “Change File Hex. By: lxzzr  [email protected]” Wscript.Echo […]

  • Using VBS script to modify code sharing of BIOS password in Lenovo notebook


    It’s not scientific!Some inadvertently found information: VBS code: Copy codeThe code is as follows: strComputer = “.” Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\WMI”) ‘ Obtain an instance of the the class ‘ using a key property value. Set objShare = objWMIService.Get(“Lenovo_SetBiosPassword.InstanceName=’ACPI\PNP0C14\1_0′”) ‘ Obtain an InParameters object specific ‘ to the method. Set objInParam […]

  • VBScript Finds Device Name Code Based on Disk Character


    Copy codeThe code is as follows: On Error Resume NextstrComputer = “.” Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2”) Set colItems = objWMIService.ExecQuery( _    “associators of {win32_logicaldisk.deviceid=’G:’} WHERE ResultClass=Win32_DiskPartition”)For Each objItem in colItems TargetIndex = objItem.DiskIndex Set Items = objWMIService.ExecQuery( _  “SELECT * FROM Win32_DiskDrive Where DeviceID Like ‘%” & objItem.DiskIndex & “‘”,,48) For Each Item in Items  Wscript.Echo […]

  • Right-click Enhancement Implementation Code for VHD Files under Win7 (vbs + Registry)


    1. Save the following code to: c: windows system 32 vdm. vbs Copy codeThe code is as follows: Dim ArgsSet Args = WScript.ArgumentsTranArgs = ” “For i = 0 To Args.Count – 1 TranArgs = TranArgs & “””” & Args(i) & “””” & ” ” Next If Args(0) <> “-hFlag” Then  If Args(0) <> “-hWind” Then […]

  • Vbs script error: solution to file name or class name not found in operation


    Yesterday afternoon, I had nothing to do, so I turned over the previous script and tried to run it, but there was an error as shown in the figure. So: Regsvr32 vbscript.dll. Rerun the script, but I didn’t expect it to be the same. It’s normal to put it on another computer. Oddly, I haven’t […]