Jump to content

Search registry for a value, then delete it's parent key


AiRDawG
 Share

Recommended Posts

Alrighty. I've searched and searched, and it doesn't look like anything of this sort has come up before, and I'm unsure of how to go about proceeding myself, so here's the situation.

The script I'm trying to come up with will be able to search the registry for a specific value in the following key:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook Profile Name\13dbb0c8aa05101a9bb000aa002fc45a

This key is where Exchange server information is housed, so after finding a value which will exist here, I need the script to delete the directory for the Outlook Profile, which is 1 directory level up. The issue is that obviously, outlook profiles are named differently on different machines, especially if the profile has been renamed to a username or whatnot, meaning that the "Outlook Profile Name" directory in the path above is not constant. Is there a way to search for values in the keys only in the "Profiles" directory and it's subdirectories? And after doing so, would it be possible to delete not only the key where the value is found, but also the key that contains said key?

It seems like searching the registry is a problem for AutoIt, so is AutoIt even the right tool for the job? Any help, guidance, or "right direction pointing" would be much appreciated!

Thanks in advance

Link to comment
Share on other sites

I didn't know that searching the reg was a problem for AutoIt, it has always worked for me....

If you have the full path:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook Profile Name\13dbb0c8aa05101a9bb000aa002fc45a

You can just do a string split by "\"

Then put all of the split peices back together minus the last "13dbb0c8aa05101a9bb000aa002fc45a"

If you don't understand I can post an example, but please try the help file first :)

Welcome to the forums

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
 Share

  • Recently Browsing   0 members

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