recursively search the registry and delete text found.
-
I would like some help. I need source code that will recursively search the registry and delete text found. It would need to work on 95/98/NT/XP/2000. Any ideas? Any help is appreciated. Thank You, Derek
-
I would like some help. I need source code that will recursively search the registry and delete text found. It would need to work on 95/98/NT/XP/2000. Any ideas? Any help is appreciated. Thank You, Derek
I am not sure anyone is willing to share any code like that. Have you figured out that if you don't use safely and properly such code, you could break the entire operating system of end-users ?
Back to real work : D-17.
-
I am not sure anyone is willing to share any code like that. Have you figured out that if you don't use safely and properly such code, you could break the entire operating system of end-users ?
Back to real work : D-17.
Yes, but in my partular case the people that willo be using this are not end users, and are Microsoft Certified individuals, so That is not an issue. Any idea where such code could be found?
-
Yes, but in my partular case the people that willo be using this are not end users, and are Microsoft Certified individuals, so That is not an issue. Any idea where such code could be found?
Derek Smigelski wrote: are Microsoft Certified individuals, so That is not an issue. Are you sure about that? :laugh: The ten finger virus can infect anyone, but being MCP's they should be comfortable with the registry editor already! :) "I dont have a life, I have a program."
-
I would like some help. I need source code that will recursively search the registry and delete text found. It would need to work on 95/98/NT/XP/2000. Any ideas? Any help is appreciated. Thank You, Derek
-
Im sure it should be easy with the Registry and RegistryKey classes...and a bit of recursion. I wont test it though... :) "I dont have a life, I have a program."
I'm new. Can you provide anyhelp or code? I will test it.
-
I'm new. Can you provide anyhelp or code? I will test it.
OK, I suggest you register and get all the benefits of being a CP'ian :) but here you go. The FindKey method will print the location of a specified key name (not value, but thats easy too).
private static void FindKey(RegistryKey key, string keyname)
{
string[] values = key.GetValueNames();
for (int j = 0; j < key.ValueCount; j++)
{
if (values[j] == keyname) Console.WriteLine(key.Name);
}
string[] subkeys = key.GetSubKeyNames();
for (int i = 0; i < key.SubKeyCount; i++)
{
try
{
FindKey(key.OpenSubKey(subkeys[i]), keyvalue);
}
catch (System.Security.SecurityException){}
}
}public static void Main(string[] args)
{
FindKey(Registry.CurrentUser, "LeppieRules");
}It shouldnt be a problem to go from there. Remeber USE AT OWN RISK, I TAKE NO RESPONSIBILITY AT ALL. "I dont have a life, I have a program."
-
Im sure it should be easy with the Registry and RegistryKey classes...and a bit of recursion. I wont test it though... :) "I dont have a life, I have a program."
Will the code you provided find all text that I hardcode? From the top of the registry through the bottom, Dwords, text, values.. any text I find, I want to do an action.
-
Will the code you provided find all text that I hardcode? From the top of the registry through the bottom, Dwords, text, values.. any text I find, I want to do an action.
I'm looking to return a list (perhaps in a list box) of all keys (ALL TEXT) that were found. If that Text appears anywhere in registry I want it added to my list. Then I can select/deselect what I wish and then delete the selected items. Allow someone to highlight and delete specific ones.