473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Delete registry key on uninstall

Hi,

I need to make a setup program for a project.
The project itself creates some registry values. The setup project
however should delete these values. Therefore I wrote a little
executable which I run as Custom Action on the uninstall node.

The code for this "uninstaller-exe" is the following:

<STAThread()> _
Shared Sub Main()
RemoveWeatherRegistryKeys()

End Sub

Shared Sub RemoveWeatherRegistryKeys()

Dim regKey As RegistryKey

Try

Registry.CurrentUser.DeleteSubKeyTree("Software\Ni sh")

Catch ex As Exception

MessageBox.Show("error: " & ex.Message, "Error",
MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub
However, after uninstalling, the values remain in the registry...
Am I doing something wrong here? Or is there a far better way of doing
this?
Nov 21 '05 #1
2 4536
Hi
Did you try your code outside of the installer to check if works? Here
you are a sample application with source code that deletes registry keys
sub nodes hope it helps
http://www.codeproject.com/vb/net/registry_with_vb.asp

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #2
mo************@egdsc.microsoft.com (Mohamoss) wrote in message news:<jt*************@cpmsftngxa06.phx.gbl>...
Hi
Did you try your code outside of the installer to check if works? Here
you are a sample application with source code that deletes registry keys
sub nodes hope it helps
http://www.codeproject.com/vb/net/registry_with_vb.asp

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC


Yes, I tried that. Then the code works fine :(. But when in the
installer, it doesn't seem to run.

Is there any other way I can test if the MSI installer actually
executes the code?
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: benjamin schollnick | last post by:
Folks, I am having difficulty with *reading* the registry from a remote Windows box... 1) I need to impersonate a different user name & password, then the user I am currently logged in as....
5
by: Brad Tilley | last post by:
Python 2.3 placed a registry key under: 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Python2.3' When this key was removed, Python no longer appeared in the Windows...
0
by: CS Loh | last post by:
Hi, I install a filter driver through INF file to a 3rd party audio device (with driver). The filter driver works well on the 3rd party driver. However upon uninstallation of the filter driver,...
3
by: Aryeh Katz | last post by:
I'm trying to write an uninstaller in c#. Everything works fine, except for the uninstall executable itself. In c++, one could delete such a file through MoveFileEx and...
2
by: Keith Smith | last post by:
I have noticed that when I uninstall my app it doesn't delete the Program Files / MyApp folder if there are "new" files in it that weren't there before. It deletes all files except the "new" ones....
3
by: Slimo | last post by:
Hello, I'm searching some example of code (VB) for reading remote registry subkeys and keys. Thanks
4
by: - HAL9000 | last post by:
When un-installing an application... Is it normal practice to write a special program that erases all the files and folders for all the users of an application that reads and writes to...
1
by: aj | last post by:
SQL Server 2005 I have an empty named instance on my SQL Server 2005 server. Not the default instance, but a secondary named instance. I would like to completely delete this named instance w/o...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.