Newbie (again) - Registry folder removal - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

AndrewNott
Posts: 11
Joined: Wed Aug 30, 2006 7:47 pm

Newbie (again) - Registry folder removal

Version 1 of my product used to be installed with a different package. Version 2 is installed with AI.

When somebody upgrades, I need to remove the V1 uninstall information or else there would be 2 entries in "Add and remove programs" in the control panel.

So I want to delete HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\V1Name

But when I try to add a "Remove Value", AI asks me for a component name, not a folder name.

Help!
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

There is a similar discussion about this on the forum. Please see:
http://www.advancedinstaller.com/forums ... php?t=1451

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
AndrewNott
Posts: 11
Joined: Wed Aug 30, 2006 7:47 pm

Thanks, but I don't think that helps.

The prior installation was not using msi either - it was SetupFactory 5.0 and there isn't a package code anywhere (that I can see).

Manually getting rid of the Uninstall registry entry works fine but I need to get AI to do it automatically.

Andrew.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Your old package is a non msi package. To uninstall it before installing the new version of your package (created with AI) you need to execute this registry value:
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\V1Name

Here is how you can do this:

1. Switch to "Search" page and create a "New Search->Add Location->Registry". Browse for the "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\V1Name" key.
2. Switch to "Custom Actions" page and add a "Exe with Working Dir" custom action under the "InstallUISequence->CostFinalize". Use following options for the custom action:
2.1 Full Path: [RESULT_PROPERTY]
2.2 Execution Condition: (Not Installed) AND RESULT_PROPERTY
Were RESULT_PROPERTY is the property defined in the "Search" page. This property keeps the result of the registry search.

Hope this helps. Please let me know if I don't understand correctly what you want to achieve.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
AndrewNott
Posts: 11
Joined: Wed Aug 30, 2006 7:47 pm

Thanks Gigi.

That still doesn't help, though. If I uninstall the old package, several user-customized files will be deleted.

I really need to just remove the uninstall option for V1. Installing v2 over v1 works fine but if anyone ever clicks "uninstall v1" in "Add and Remove Programs", after installing v2, the world falls apart.

The only way I know to solve this is to delete HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\V1Name.

It doesn't seem like it should be that hard; it's just not obvious to me how to do it.
AndrewNott
Posts: 11
Joined: Wed Aug 30, 2006 7:47 pm

After searching around a bit, I discovered that the component is only a trigger, which makes sense. It seems that the Registry Key Removal Dialog is what I need, but I can't find it!
AndrewNott
Posts: 11
Joined: Wed Aug 30, 2006 7:47 pm

I found it.

I need to add a new key and then change its type to "Remove".

Problem solved.

Return to “Common Problems”