Dim strComputer, objReg, ScriptName, strKeyPath, strValueName, strValue
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
This is a piece of a larger script that I'm trying to rebuild to work. Source encoder unavailable.
I tried to research and understand the last line of code, but I cannot find any good information on the net, and I am not so good at vbs.
As far as I can tell: - objreg - an object of type SWbemObjectEx. - winmgmts: {impersonationLevel = impersonate} allows the object to use the caller's security level (on my system) - StdRegProv should point to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ WBEM \ Scripting \ Default Impersonation Level
I kind of understand what he should do, but I donβt understand how he plays the game.
If someone can explain procedurally word for word what he is doing, including things like β!β, I would really appreciate that. Thank.
source
share