|
|
|||||||
| Programming And Web Design Ask any questions relating to programming, VB, Java, C , Web Design, etc. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
|
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. |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: May 2001
Location: A Pit/Cave
Posts: 7
|
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
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
|
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. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Mar 2001
Location: Elsewhere
Posts: 1,412
|
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.
__________________
A bored admin is a very dangerous person... |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
|
Thanks, I'll check it out.
__________________
Life is 10% what happens to you and 90% how you react to it. |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Jan 1999
Location: London, Great Britain
Posts: 300
|
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.
__________________
I'd rather die peacefully in my sleep like my Grandfather, than screaming in terror like his passengers. Jim Harkins <a href="http://www.Horrible.Demon.co.uk/" target="_blank">http://www.Horrible.Demon.co.uk/</a> |
|
|
|