3

Im using this post to get a list of my installed Programs in C#

I have an application installed via Click once on my computer, and would now like to uninstall in without the user knowing.(Silently)

But My program isn't appearing on the list I generate. (it is in the Add and remove programs menu under control panel though)

I've even tried this post and this post to see if I can find it in the registry, to maybe use a batch script to uninstall it, but no luck finding it.

How would i find an application not showing up using the c# code to generate a list of programs installed on my computer to uninstall it?

EDIT - Results

I don't know if this might be why this is happening, but by using the code from the first link, i output my results to a textbox, and i get this, (Note the spaces, Maybe that's why?)

Code I have :

textBox1.Text += subkey.GetValue("DisplayName") + "\r\n";

RESULTS I GET

Windows Driver Package - Lenovo (ACPIVPC) System (12/15/2011 7.1.0.1)

HP LaserJet Professional M1130-M1210 MFP Series




Microsoft SQL Server 2008 R2 (64-bit)
Microsoft SQL Server 2008 R2 (64-bit)
Microsoft Visual J# 2.0 Redistributable Package - SE (x64)
Microsoft Visual Studio 2008 Remote Debugger - ENU
Microsoft Visual Studio 2010 Tools for Office Runtime (x64)


Intel PROSet Wireless

Synaptics Pointing Device Driver

Exception Hunter 2
Community
  • 1
  • 1
Ruan
  • 3,969
  • 10
  • 60
  • 87
  • You probably should add the relevant operating system tag; with *mono* on Debian/Linux you could "popen" some `dpkg -l` command but that is probably not what you ask. – Basile Starynkevitch Feb 04 '13 at 07:29
  • @BasileStarynkevitch: I haven't checked out Debian for a while, but I always thought that "control panel" and "registry" are easily recognizable peculiarities of Windows. – dtb Feb 04 '13 at 07:34
  • Is this on a 64-bit OS? You need to check both the 32-bit and 64-bit keys on a 64-bit OS. – Mike Zboray Feb 04 '13 at 07:47
  • Also it is generally easier and more maintainable to use WMI to do the uninstall over reading the values from the registry. Although, queries of all installed programs are generally faster when done through the registry. – Mike Zboray Feb 04 '13 at 07:48
  • Do you know about Windows Installer API? It allows CORRECTLY enumerate all products installed in your system. – Brian Cannard Feb 05 '13 at 11:52
  • No Actually I've never worked with it before? Why do you say this is the correct way? http://msdn.microsoft.com/en-us/library/windows/desktop/aa369426(v=vs.85).aspx – Ruan Feb 05 '13 at 12:18

1 Answers1

1

You should also check HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall on 64-bit systems since applications can also put their install information there and it is not a registry path that does any kind of synchronization or redirection.

Mike Zboray
  • 39,828
  • 3
  • 90
  • 122
  • 1
    Strange it was in "HKEY_USERS\S-1-5-21-2632269440-3034877388-763067593-1000\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Thanks – Ruan Feb 05 '13 at 10:05