Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Registry Subkeys

Status
Not open for further replies.

irkey

MIS
Sep 23, 2002
14
0
0
CA
I have seen the posts of deleting registry subkeys by enumerating them and checking with a loop. Does anyone know if you can manually delete the subkeys using this method. I am deleting the last subkey first then working my way up.

Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.RegDelete = "HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_VMODEM\0000\Control\"
WshShell.RegDelete = "HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_VMODEM\0000\"
WshShell.RegDelete = "HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_VMODEM\"

Also, is there a way to delete reg keys that have permissions on them (i.e Everyone - Read, SYSTEM - Full). Is there some way to "impersonate" SYSTEM priveleges when deleting reg keys? Or is there a way to set permissions through VBS??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top