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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry basics 1

Status
Not open for further replies.

krinid

Programmer
Jun 10, 2003
356
CA
What are the basics of manipulating registry entries?

1) How to make news entries
2) How to modify existing entries
a) one's I've made myself
b) one's made by other apps
3) Deleting existing entries
4) Protecting entries from being manipulated by others

If there's anything else worth knowing that I've forgotten, I'd be grateful to hear it.

(I'm not trying to do anything in particular; but I imagine I will in the future and want to learn about it beforehand).
 
Hi krinid,

This is not for the faint hearted! You need to use Windows API calls (advapi32) and although I think I could do it, I am not prepared to post code which might cause problems for many people. I, too, would like to learn more about it and am not entirely sure of the best place.

As far as I know there is no distinction between keys you make yourself and keys made by others and no key-level security. If someone can update the registry they can update the registry and that’s it – it’s one of the factors that makes it so dangerous for people to mess with.

Not a lot of help to you probably. Maybe someone with more knowledge than me will post but I don't think here is the best place for this sort of information. Sorry.

Enjoy,
Tony
 
Hi krinid,

By one of those odd coincidences …

I was looking for something completely unrelated but the organisation of the Help system is such that I stumbled upon this.

There are some VBA functions to use the Registry which seem to be common to all Applications which support VBA (I checked Word, Excel, Access, Project, PowerPoint, Outlook and FrontPage). See the Help for
Code:
SaveSetting
and related functions (see See Also for the rest). They Read and Write keys under HKCU\Software\VB & VBA Program Settings. If you’re familiar with the registry I’m sure you can work it all out from there.

As I said in another post, I try and learn something every day and this looks like a good day from that perspective.

Enjoy,
Tony
 
Tony,
Thanks for the info. As for this not being the correct spot for it, I guess I left out the part in my original message saying that I want to do this from VBA code. But perhaps you're right, first getting the info on registry keys might be 99% of the solution.
 
Tony,
Sorry to trouble you for information I can get from the help file! I just realized that typing in 'registry' in the help file gave me all the information I need. I should hit F1 before taking up other people's time. Sorry!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top