What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Visual Basic - Detect Registry Changes

Visual Basic - Detect Registry Changes
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15515
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Visual Basic - Detect Registry Changes
http://msdn.microsoft.com/library/default.asp?url.../base/registry.asp
http://msdn.microsoft.com/library/default.asp?url...t_the_registry.asp

and from there you'll find

http://msdn.microsoft.com/library/en-us/sysinfo/b...changekeyvalue.asp

Note: Extremely important info can be read on all those pages, read before proceed. It is absolutely mandatory that you understand completely how the registry works (eg: That you understand that registry keys need to be openend before reading or writing, and closed if you're done with it)

A snipped of the important stuff about RegNotifyChangeKeyValue:
  • Is not supported on Windows 95
  • The key to monitor must first be opened with the KEY_NOTIFY access right.
  • The function cannot be used to detect changes to the registry that result from using the RegRestoreKey function.
  • After the function has detected a change, it stops working. You need to reinitialize it again if you want to monitor further each time.
  • Each time you call the function with the same set of parameters, it establishes another wait operation, creating a resource leak. Therefore, check that you are not calling the function with the same parameters until the previous wait operation has completed.
In other words, this is certainly not basic stuff and you should be very fluent with VB and API's to understand everything.

---------------------------------

Also remember that there are many many places where stuff can be set which will automatically start with Windows. Everybody knows the obvious two:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Microsoft\Windows\CurrentVersion\Run

But there are extremely many more registry keys which will automatically run when Windows starts. For the most complete list of all of them, see the program AutoRuns from SysInternals.

---------------------------------

In case you want to write such a program because you want something like that on your computer: there are many (free) programs available on the net which do already what you want. One example (which I use myself) is StartupMonitor.

This post was edited on 12-27-2005 at 06:52 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-27-2005 06:27 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Visual Basic - Detect Registry Changes - by DJeX on 12-27-2005 at 04:34 AM
RE: Visual Basic - Detect Registry Changes - by CookieRevised on 12-27-2005 at 06:27 AM
RE: Visual Basic - Detect Registry Changes - by DJeX on 12-27-2005 at 06:46 PM
RE: Visual Basic - Detect Registry Changes - by CookieRevised on 12-28-2005 at 06:35 AM
RE: Visual Basic - Detect Registry Changes - by Mike on 12-28-2005 at 07:10 AM
RE: RE: Visual Basic - Detect Registry Changes - by CookieRevised on 12-28-2005 at 07:18 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On