How to check if my com add-in already installed in this computer

G

Guest

in a c# project.

string guid = "HKEY_CLASSES_ROOT\MatarotToolbar.Connect"
RegistryKey key = Registry.LocalMachine.OpenSubKey(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + guid);

2) my add-in setup name is "Setup.Exe", not unique name. (coded in c#)
MatarotToolbarSetup\\Debug\\Setup.Exe
so how could I check if I have this setup in the computer?
As I checked outlook.exe (unique name).

RegistryKey key =
Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE", false);
 
N

Nicholas Paldino [.NET/C# MVP]

Yael,

Why no try and create an instance of the add in itself, or at least, get
the type. You should know the program id, or even better, the class id.
You can then pass either of those to the static GetTypeFromProgId method or
the static GetTypeFromCLSID method on the Type class. If it returns a type,
then you know you have your add in installed on the machine.

After that, you just have to see if it is set up properly in the
registry to see if outlook can detect it.
 

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