Criar chave do Registro (e subchaves)?
Estou tentando criar uma chave e subchave do Registro para ativar o modo corporativo do IE 11 para todos os usuários em uma máquina. É isso que estou usando para o meu VBScript atualmente e está falhando horrivelmente (não adiciona a chave). Eu poderia usar alguma ajuda para corrigir isso.
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