To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

WinDrivers Computer Tech Support Forums  

Go Back   WinDrivers Computer Tech Support Forums > For Techs Only > Programming And Web Design

Programming And Web Design Ask any questions relating to programming, VB, Java, C , Web Design, etc.

Reply
 
Thread Tools Search this Thread Display Modes
Old May 4th, 2001, 12:13 PM   #1
Melmac
Registered User
 
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
Post 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.
Melmac is offline   Reply With Quote
Old May 5th, 2001, 12:10 PM   #2
NM2x
Junior Member
 
Join Date: May 2001
Location: A Pit/Cave
Posts: 7
Post

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
NM2x is offline   Reply With Quote
Old May 7th, 2001, 06:55 AM   #3
Melmac
Registered User
 
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
Post

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.
Melmac is offline   Reply With Quote
Old May 7th, 2001, 03:04 PM   #4
Deity
Registered User
 
Deity's Avatar
 
Join Date: Mar 2001
Location: Elsewhere
Posts: 1,412
Post

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...
Deity is offline   Reply With Quote
Old May 7th, 2001, 03:23 PM   #5
Melmac
Registered User
 
Join Date: Jul 2000
Location: Brandon, FL U.S.A.
Posts: 300
Post

Thanks, I'll check it out.
__________________
Life is 10% what happens to you and 90% how you react to it.
Melmac is offline   Reply With Quote
Old May 8th, 2001, 05:37 AM   #6
antonye
Registered User
 
Join Date: Jan 1999
Location: London, Great Britain
Posts: 300
Post

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>
antonye is offline   Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:26 PM.



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.