Crear clave de registro (y subclaves)?
Estoy tratando de crear una clave de registro y una subclave para habilitar el modo empresarial IE 11 para todos los usuarios en una máquina. Esto es lo que estoy usando para mi VBScript actualmente y está fallando horriblemente (no agrega la clave). Podría usar algo de ayuda para corregir esto.
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set ObjRegistry = _
GetObject("winmgmts:{impersonationLevel = impersonate}! \\" & _
strComputer & "\root\default:StdRegProv")
strPath = strKeyPath & "\" & strSubPath
strKeyPath = "Software\Policies\Microsoft"
strSubPath = "Internet Explorer\Main\EnterpriseMode"
strName = "Enabled"
ObjRegistry.CreateKey (HKEY_LOCAL_MACHINE, strPath)
ObjRegistry.SetStringValue HKEY_LOCAL_MACHINE, strPath, strName, strValue
MsgBox "Successfully enabled Internet Explorer Enterprise Mode."
End Function