Jump to content

how to lock a registry entry............


abbhishek

Recommended Posts


but i'm a novice and really dont know using autoit.....................

please give me a sample script for auto it. i want that the application should check the windows registry that whether a given registry value exists or not and if it exists then just completelty delete it. and it should run in the background while xp is running and check regularly after a fixed interval of time say 5 minutes

Link to comment
Share on other sites

Since this is not a paid for service site, and your task isn't likely to be part of larger, secret, commercial program, please be more specific.

If you provide us with the registry key, value and time lapse specifics, you may be lucky enough to receive examples in one or more scripting languages.

There may also be one or more alternative methods of producing the result you require without using the method you have described. It really is more efficient when you are asking for help to give specifics.

Link to comment
Share on other sites

Since this is not a paid for service site, and your task isn't likely to be part of larger, secret, commercial program, please be more specific.

If you provide us with the registry key, value and time lapse specifics, you may be lucky enough to receive examples in one or more scripting languages.

There may also be one or more alternative methods of producing the result you require without using the method you have described. It really is more efficient when you are asking for help to give specifics.

the registry value is :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\a\DefaultIcon]

@="C:\\Program Files\\...........\\r00.ico"

the value @="C:\\Program Files\\...........\\r00.ico" can change so it would be better if any value if it exists is just deleted.

i have an app which adds this registry entry after every 5 mins.... it just checks the size of a drive and specifies an appropriate icon but just shows the hdd icon to my floppy drive but everything else is fine so i want that only this registry entry is deleted.

i want that this registry entry should be deleted as soon as it is addded.thus the app should run in the background and delete the registry entry regularly

please help...

Link to comment
Share on other sites

IcemanND, you took the words right out of my mouth...

The most efficient method of doing the task is to prevent the registry key being altered in the first place. I do not know what level the application is curently working at, but would suggest you change the registry keys to something like:

  • Everyone - Read access
  • Administrators - Full Access
  • System - Full Access

Then if the key still changes adjust the permissions to suit.

You need to be careful however not to freeze yourself out of the key completely!

Trying to schedule a script every five minutes or run one constantly on a timer looks like a waste of resources. If the registry permissions continue to give you problems you may need to see if someone could create an app specific to your task. This app would probably need to use the Windows API RegNotifyChangeKeyValue with the REG_NOTIFY_CHANGE_LAST_SET in order to 'monitor' the specific key and delete it if TRUE.

Link to comment
Share on other sites

hi :hello

i just wanted to know that is it possible to lock a single reg entry so that it could not be changed by anybody or any application.............

the registry entry is something like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\A\DefaultIcon]

@="S:\\PATH\\TO\\THE\\ICON\\FILENAME.ICO"

Link to comment
Share on other sites

IcemanND, you took the words right out of my mouth...

The most efficient method of doing the task is to prevent the registry key being altered in the first place. I do not know what level the application is curently working at, but would suggest you change the registry keys to something like:

  • Everyone - Read access
  • Administrators - Full Access
  • System - Full Access

Then if the key still changes adjust the permissions to suit.

You need to be careful however not to freeze yourself out of the key completely!

Trying to schedule a script every five minutes or run one constantly on a timer looks like a waste of resources. If the registry permissions continue to give you problems you may need to see if someone could create an app specific to your task. This app would probably need to use the Windows API RegNotifyChangeKeyValue with the REG_NOTIFY_CHANGE_LAST_SET in order to 'monitor' the specific key and delete it if TRUE.

hi 'Yzöwl' :hello

i am understandining a bit what u mean i like this idea of denying the reg key to be altered .......

but i really dont know how should i do it can u provide me a lil detailed help.as i am totally new to these things........

Link to comment
Share on other sites

The most efficient method of doing the task is to prevent the registry key being altered in the first place. I do not know what level the application is curently working at, but would suggest you change the registry keys to something like:
  • Everyone - Read access
  • Administrators - Full Access
  • System - Full Access

Since the key is in HKLM\SOFTWARE then Administrators and SYSTEM already have Full Access (or at least enough to change the key). I would start with the following permissions:

  • Everyone - Read Access
  • Administrators - Read Access
  • SYSTEM - Full Access

If the application is running at the SYSTEM level (which it probably is) then you'll need to further restrict the key to Read Only access for SYSTEM. Also be warned that this will probably cause a Failure Audit event to be written to your System Event Log every 5 minutes when this application tries to change the key. That's not really a big deal since the frequency isn't that often though.

Link to comment
Share on other sites

ok i have figured out the permissions..........

permission to a user group called :CREATOR OWNER

i denied permission for full control and read and the problem is solved.

now i wanted to know that is this denial of permission is possible thruogh a command line or a registry value.

if yes please tell me how it can be done.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...