Bonjour tout le monde
j'ai un problème avec ce script, il me sort l'erreur "800A01C3 object not a
collection" et j'arrive pas du tout à trouver si quelqu'un à une idée.
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath =
"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
WScript.Echo "Subkeys under " _
&
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters"
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Jacques93
Bonjour Guiona,
Bonjour tout le monde j'ai un problème avec ce script, il me sort l'erreur "800A01C3 object not a collection" et j'arrive pas du tout à trouver si quelqu'un à une idée.
const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"&_ strComputer & "rootdefault:StdRegProv") strKeyPath = "SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys WScript.Echo "Subkeys under " _ & "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" For Each subkey In arrSubKeys WScript.Echo subkey Next
Es tu sur qu'il y ait des sous-clés, essaie :
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"& _ strComputer & "rootdefault:StdRegProv") strKeyPath = "SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys WScript.Echo "Subkeys under " & "HKEY_LOCAL_MACHINE" & strKeyPath If Not IsNull(arrSubKeys) Then For Each subkey In arrSubKeys WScript.Echo subkey Next Else WScript.Echo "Aucune sous-clé" End If
-- Cordialement,
Jacques.
Bonjour Guiona,
Bonjour tout le monde
j'ai un problème avec ce script, il me sort l'erreur "800A01C3 object not a
collection" et j'arrive pas du tout à trouver si quelqu'un à une idée.
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_
strComputer & "rootdefault:StdRegProv")
strKeyPath =
"SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
WScript.Echo "Subkeys under " _
&
"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters"
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
Es tu sur qu'il y ait des sous-clés, essaie :
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"& _
strComputer & "rootdefault:StdRegProv")
strKeyPath =
"SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
WScript.Echo "Subkeys under " & "HKEY_LOCAL_MACHINE" & strKeyPath
If Not IsNull(arrSubKeys) Then
For Each subkey In arrSubKeys
WScript.Echo subkey
Next
Else
WScript.Echo "Aucune sous-clé"
End If
Bonjour tout le monde j'ai un problème avec ce script, il me sort l'erreur "800A01C3 object not a collection" et j'arrive pas du tout à trouver si quelqu'un à une idée.
const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"&_ strComputer & "rootdefault:StdRegProv") strKeyPath = "SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys WScript.Echo "Subkeys under " _ & "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" For Each subkey In arrSubKeys WScript.Echo subkey Next
Es tu sur qu'il y ait des sous-clés, essaie :
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!"& _ strComputer & "rootdefault:StdRegProv") strKeyPath = "SYSTEMCurrentControlSetServicesTcpipParametersDNSRegisteredAdapters" objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys WScript.Echo "Subkeys under " & "HKEY_LOCAL_MACHINE" & strKeyPath If Not IsNull(arrSubKeys) Then For Each subkey In arrSubKeys WScript.Echo subkey Next Else WScript.Echo "Aucune sous-clé" End If