Home > Archive > Visual Studio > March 2004 > Deleting registry entries during uninstall
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Deleting registry entries during uninstall
|
|
|
| Apologies if I'm not in the right NGs - there seem to be about a dozen
possibilities for where to post this Q.
In Visual Studio.Net I want to delete a registry entry that the app will
have added at runtime (i.e. not by the installer). How do I get VS to
uninstall this entry? (They are in the HKCU/.../Run key, so I can't delete
the whole key, only the value I'm interested in.) I've spend hours looking
at documentation and am none the wiser other than it should be very easy!
One thing I did try without success was to use the reg editor in visual
studio to "add" the key during installation but specify the condition as
REMOVE="ALL". I.e. I was trying to tell it not to create the key at
installation time, but to delete the key at uninstall. Suffice it to say
that it didn't work. :-(
TIA
Mark
| |
|
| Fixed! See below...
"Mark" <mark@ReMoVeThIsBiTmossywell.com> wrote in message
news:405f37fc$0$22994$cc9e4d1f@news.dial.pipex.com...
> Apologies if I'm not in the right NGs - there seem to be about a dozen
> possibilities for where to post this Q.
>
> In Visual Studio.Net I want to delete a registry entry that the app will
> have added at runtime (i.e. not by the installer). How do I get VS to
> uninstall this entry? (They are in the HKCU/.../Run key, so I can't delete
> the whole key, only the value I'm interested in.) I've spend hours looking
> at documentation and am none the wiser other than it should be very easy!
>
> One thing I did try without success was to use the reg editor in visual
> studio to "add" the key during installation but specify the condition as
> REMOVE="ALL". I.e. I was trying to tell it not to create the key at
> installation time, but to delete the key at uninstall. Suffice it to say
> that it didn't work. :-(
The solution that I used is to create a new simple project in the solution,
and then point to this project's primary output as a custom uninstall
action. (The trick was to set the InstallerClass to False and to exclude the
output from the setup. This way, the tidy up project still runs but isn't
installed.) All the tidy up code then goes in the new project. Easy!
>
> TIA
> Mark
>
>
|
|
|
|
|