|
-
May 4th, 2001, 11:13 AM
#1
VB Script deleting Registry Keys
I am writing a VB Script that makes all of the registry tweaks for my network upon login. I am attempting to delete a REG_SZ key. It is not named by default though. How do I delete an un named key? I tried the <No Name> that is displayed, doesn't work. I am sure this is real easy, can someone push me along?
I am using the following syntax:
msettings = "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\"
' Delete old String Value
old = msettings & "<No Name>"
wshshell.RegDelete old
' Write new string value
icon = msettings & ""
user = "%USERNAME% on %COMPUTERNAME%"
wshshell.RegWrite icon, user, "REG_EXPAND_SZ"
Life is 10% what happens to you and 90% how you react to it.
-
May 5th, 2001, 11:10 AM
#2
Whew, okay, been awaile since ive been down and dirty with the registry in VB, much less vb script... hmm. i have a great idea... check the web. www.altavista.com search for "+ vbscript + registry + delete" it should get you started. (if you really mean vb just remove the script part and add some more specifics
-
May 7th, 2001, 05:55 AM
#3
My problem is not due to lack of reading and searching. I have looked all over, and have yet to come across anything that deals with deleting an un-named key. Not saying its not out there, but I haven't found it yet. And I am kinda in a time crunch now, that's why I posted it. I know that it can be done, and I know that there is someone on Windrivers that knows how to do it. I am still looking, but some help from my brothers/sisters would be very much appreciated. Where are you Sorry_I_Win?? You are one of the registry Gurus, hook me up.
Life is 10% what happens to you and 90% how you react to it.
-
May 7th, 2001, 02:04 PM
#4
Registered User
http://planet-source-code.com/xq/ASP/lngWId.1/qx/vb/
This web site has a link to a list of registry programs. There are over 150 different listings there, I'm sure one of them has an answer to your question. I wish I could help you myself, but that's an area of VB I haven't touched on yet.
-
May 7th, 2001, 02:23 PM
#5
Thanks, I'll check it out.
-
May 8th, 2001, 04:37 AM
#6
You may also want to check out the Microsoft RegObj DLL as this exposes the registry as a class.
You could set the key to the point you require, then you are given all the child objects as a collection. This would enable you to loop through all of these keys, deleting the ones you wanted to.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks