Uninstall Custom Action doesn't remove old versions from registry

R

Rich Freeman

I am in desperate need of some help from someone who knows more about
creating installers than I do. Here is my situation:

- using VS 2002 and VB.NET
- created a setup file with RemovePreviousVersions set to true
- When updating my app I increment the setup file version # and allow the
Product Code and Package code to be updated as well
- i created a custom Uninstall action set to Primary Output of my app with
InstallerClass set to true
- my app contains a Public Installer class

When I install an update on a client PC, the new version overwrites the old
in the Application folder, but the old version (and all previous versions)
still appear in both the registry and in Add / Remove programs. It looks to
me like the app exe itself gets updated, but the old versions are never
actually uninstalled. Users still get the new version when loading the
program, but I don't want every version to be stockpiled on the machines;
they should be completely removed whenever an update is installed.

I'd be happy to provide more info if anyone would be willing to help me solve
the problem. An alternative I've considered is putting the updated .exe and .
config files on a virtual directory on the LAN server and writing an ASP page
to copy the files to the user's application folder (I gave up with the
Updater Block), but to do this I need my initial install to enable write
permissions on the application directoy on first install. Any ideas as to
where I could find how to do this would also be appreciated. Thanks very
much in advance.
 
B

Bob Powell [MVP]

You could write an uninstall method for your custom installer that removed
the registry keys you didn't like.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top