Solved

Registry Change ???

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 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

20 Experts available now in Live!

Get 1:1 Help Now