OK, nOOb here, go easy...
I've written a few launchers by modifying the 7-Zip code (as suggested for programs that just use the registry) and everything works great but I've run into a problem with local installs and portables from the same company existing together.
An example...
HKCU\Software\Company\Program1 (local install)
HKCU\Software\Company\Program2 (portable)
When Program2Portable is launched it renames "Company" to "Company-BackupByProgram2Portable", thereby temporarily removing the entries for locally installed Program1.
The solution I used is to target the "Program" key instead. So far, no problem. But if there was originally no "Company" key (no locally installed Program1) then, when Program2Portable exits, I'm left with a redundant registry key - HKCU\Software\Company.
When the launcher closes is there a way for it to (after it's dealt with the Program key) check the "Company" key and remove it if it's empty?
Is there a launcher I could look at that does this?
You can use a simple command
DeleteRegKey /ifempty HKCU "Software\Company"
Thanks very much, straight to the point. And all working