?
Solved

Registry Change ???

Posted on 2000-04-11
5
Medium Priority
?
520 Views
Last Modified: 2008-02-26
Hi ,

How I know if the Registry Change,If other runing program change any key of the Registry how i know the key which is Changed  ( Hook Registry Change )

Thanks
0
Comment
Question by:hatem72
5 Comments
 
LVL 9

Expert Comment

by:Ruchi
ID: 2706490
0
 
LVL 28

Expert Comment

by:Ark
ID: 2706874
Hi
Ruchi, I'm afraid that hotkeys isn't exactly what hatem72 want.
Hatem72, first question isn't very difficult, but second need a lot of coding and, IMHO, will be very slowly (you need to enum all keys and "hook" every key). Now I'm triing to do this, but it takes some time. BTW, code will work only with W98 or NT (not W95).
Here is Answer to first question:
Const HKEY_CURRENT_USER = &H80000001
Const REG_NOTIFY_CHANGE_NAME = &H1            ' Create or delete (child)
Const REG_NOTIFY_CHANGE_ATTRIBUTES = &H2
Const REG_NOTIFY_CHANGE_LAST_SET = &H4            ' time stamp
Const REG_NOTIFY_CHANGE_SECURITY = &H8
Const REG_LEGAL_CHANGE_FILTER = (REG_NOTIFY_CHANGE_NAME Or REG_NOTIFY_CHANGE_ATTRIBUTES Or REG_NOTIFY_CHANGE_LAST_SET Or REG_NOTIFY_CHANGE_SECURITY)
Private Declare Function RegNotifyChangeKeyValue Lib "advapi32" (ByVal hKey As Long, ByVal bWatchSubtree As Boolean, ByVal dwNotifyFilter As Long, ByVal hEvent As Long, ByVal fAsynchronous As Boolean) As Long

Private Sub Form_Load()
    'Create a temporary registry key
    SaveSetting "Registry Notification", "Hello", "Testing", "123"
End Sub

Private Sub Command1_Click()
  Dim cap As String
  cap = Caption
  Caption = "Monitoring registry..."
  RegNotifyChangeKeyValue HKEY_CURRENT_USER, True, REG_LEGAL_CHANGE_FILTER, 0&, False
  MsgBox "Registry changed"
  Caption = cap
End Sub

'Try to delete or modify registry settings at HKEY_CURRENT_USER
Cheers
0
 

Accepted Solution

by:
edrwebb earned 400 total points
ID: 2707597
Take a look at
http://softseek.com/Utilities/Registry_Editors_and_Utilities/Review_19894_index.html

Regmon for Windows 95/98 displays all activity taking place in the Windows System Registry.  

Regmon displays the process, the request, the result, and the
Registry path and key data. You can set "include" and "exclude" filter expressions for the process and path.

There is also a version of Regmon for Windows NT.
0
 

Expert Comment

by:BEVIS
ID: 2708163
Theres a very nice utility that come with Visual studio 6 called Windiff.
Export the whole reg file before and after and run windiff and select the two files.  Whith this utility you can see anything that change
0
 
LVL 6

Author Comment

by:hatem72
ID: 2715318
Thankx to all
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question