Solved

Registry Change ???

Posted on 2000-04-11
5
509 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 27

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 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

896 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now