AiRDawG Posted October 16, 2007 Share Posted October 16, 2007 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 More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 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 AutoIt3 Online Help Link to comment Share on other sites More sharing options...
LarryDalooza Posted October 16, 2007 Share Posted October 16, 2007 Use StringInStr with a -1 instance to find the last "\". Then Pass the string left of that position to RegDelete. LAr. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
DW1 Posted October 16, 2007 Share Posted October 16, 2007 Even easier with Larry's suggestion AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now