How to read the registry by VBS
Editor to share with you VBS how to read the registry, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The first is through the regread of the wshshell object
The copy code is as follows:
RegValue = CreateObject ("Wscript.Shell") .RegRead ("\ XXXX_XXXXXXXX_XXX\ XXX\ XXXX")
Msgbox (RegValue)
For more operations, please refer to this article https://www.jb51.net/article/18125.htm
The second method: through wmi
The copy code is as follows:
Const HKLM = & H80000002
StrPath = "SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Explorer\ Desktop\ NameSpace"
Set oReg = GetObject ("Winmgmts:\ root\ default:StdRegProv")
OReg.EnumKey HKLM,strPath,arr
For Each x In arr
WScript.Echo x
Next
The above is all the contents of the article "how to read the Registry by VBS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!