I've picked up this from another developer, and I don't have much liberty to make too many major alterations to the installer.

The application, which is really just some stand alone EXE files and desktop shortcuts, was being deployed using robocopy, and a registry key was written to HKLM\software\org\app, with a pair of subkeys, and those subkeys have some values.

As part of the new MSI they developed, it needs to clean up the registry key.

So far, I have tried the following (running the MSI from an elevated command prompt)
1. Using the Registry tool, and on the Destination Computer, creating the path to the key and selecting "Uninstall entire key (-)" option. This did nothing.

2. Adding a row to the RemoveRegistry table. I set the Root value to 2, the key is software\org\app, and the name is cleanupreg1. I didn't know what to put for the component_, so I selected ISRegistryComponent from the dropdown. Unfortunately, it tried finding the key in the 32-bit registry, which of course, it isn't in. Trying to make it a 64-bit install (by setting the TemplateSummary to Intel64 ended up creating a package I couldn't even run.

3. Using a VBScript custom action - looping through all the subkeys and trying to delete them recursively using DeleteKey. This gave me a 1402 error, which I think equals "Access Denied".

4. Using a VBScript custom action to call a batch file I installed with the rest of the application files, that runs "reg delete hklm\software\org\app /F". It appears to run, but I can't figure out how to capture the output to see why it isn't deleting the files either.

So I am out of ideas. Any help would be greatly appreciated.