abbhishek Posted August 1, 2007 Posted August 1, 2007 can anybody write a small code or make an application for me which could check a value in xp registry and then delete it if it exists regularly after a fixed interval of time.........
damian666 Posted August 1, 2007 Posted August 1, 2007 well, have you tried autoit script? it should be easy to do with that...what do you need specifficly?damian666
IcemanND Posted August 1, 2007 Posted August 1, 2007 That's about 8 lines of code in vbscript or auto it.What registry key?
abbhishek Posted August 1, 2007 Author Posted August 1, 2007 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
Yzöwl Posted August 1, 2007 Posted August 1, 2007 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.
abbhishek Posted August 2, 2007 Author Posted August 2, 2007 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 regularlyplease help...
IcemanND Posted August 2, 2007 Posted August 2, 2007 why not just deny all permissions to the registry value so that it can't be changed?
Yzöwl Posted August 2, 2007 Posted August 2, 2007 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 accessAdministrators - Full AccessSystem - Full AccessThen 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.
abbhishek Posted August 7, 2007 Author Posted August 7, 2007 hi :helloi 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"
abbhishek Posted August 7, 2007 Author Posted August 7, 2007 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 accessAdministrators - Full AccessSystem - Full AccessThen 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' :helloi 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........
jaclaz Posted August 7, 2007 Posted August 7, 2007 However, no need to post a new thread:http://www.msfn.org/board/index.php?showtopic=102383&hl=jaclaz
nmX.Memnoch Posted August 8, 2007 Posted August 8, 2007 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 accessAdministrators - Full AccessSystem - Full AccessSince 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 AccessAdministrators - Read AccessSYSTEM - Full AccessIf 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.
abbhishek Posted August 9, 2007 Author Posted August 9, 2007 ok i have figured out the permissions..........permission to a user group called :CREATOR OWNERi 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.
jaclaz Posted August 9, 2007 Posted August 9, 2007 What you need to do is connected to "ACL".This is a freeware tool to modify ACL's, but there are others:http://setacl.sourceforge.net/jaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now