PDA

View Full Version : Reg Search, If found, do this, or, if not found, do this!



noveltech
12-31-2002, 02:47 PM
I have posted an image of reg here: http://noveltech.com/reg.jpg

I would like to search registry for:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr ent Version\Uninstall\ST6UNST #1\ApplicationName\NovelTechPopup.exe

if the value {NovelTechPopup.exe} is found; I would like to delete:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr ent Version\Uninstall\ST6UNST #1

Thanks for all feedback, NT

Darryl
01-03-2003, 03:30 PM
To accomplish that you could do have some actions that look like the following:

First action:
Read From Registry() to read your registry location. In the "Value" field, you will have "ApplicationName". Let's say it stores the data in "%RegistryVar%.

Then have something like:

IF (%RegistryVar% = "NovalTechPopup.exe")
Modify Registry() with the "Registry action" set as "Delete Key". Then have "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr ent Version\Uninstall\ST6UNST #1 " as the key you would like to delete.
END IF

That should do it.