Registry Keys löschen
From: Christoph Fricke (anonymous_at_discussions.microsoft.com)
Date: 06/23/04
- Next message: Metin Ayyildiz: "Dateiendung ersetzen"
- Previous message: Michael Müller: "Registry Keys löschen"
- In reply to: Michael Müller: "Registry Keys löschen"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 00:41:01 -0700
Hi there,
>-----Originalnachricht-----
>Hallo zusammmen,
>
>ich brauche einmal Eure Hilfe im Bereich VBS und
Registry.
>Kann mir jemand sagen, wie man einen ganzen Tree in der
>Registry löscht, also Key + Unterkeys.
>Da ich noch nicht viel bzw kaum Ahnung von VBS habe,
habe
>ich es mit CBS aus dem Scripting Center von MS probiert,
>hat aber auf den Remote PCs nicht funktioniert.
>
ungefähr so:
Const HKLM = &H80000002
strKey = "Software\Microsoft\Outlook Express\5.0"
Set objWMIRegistry = GetObject("WinMgmts:
{impersonationLevel=impersonate}!//./root/default:StdRegPr
ov")
DeleteRegistryKey HKLM, strKey
Sub DeleteRegistryKey(ByVal strHive, ByVal strKey)
Dim aSubKeys, strSubKey, iRC
On Error Resume Next
iRC = objWMIRegistry.EnumKey(strHive, strKey, aSubKeys)
If iRC = 0 Then
For Each strSubKey In aSubKeys
If Err.Number <> 0 Then
Err.Clear
Exit Sub
End If
DeleteRegistryKey strHive, strKey & "\" & strSubKey
Next
End If
objWMIRegistry.DeleteKey strHive, strKey
End Sub
Gruß
Christoph
- Next message: Metin Ayyildiz: "Dateiendung ersetzen"
- Previous message: Michael Müller: "Registry Keys löschen"
- In reply to: Michael Müller: "Registry Keys löschen"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|