Hi,
I have this method in my c# vs.net 2003 code:
================= Start Code =================
private void isOutlook()
{
Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE");
string path = (string)key.GetValue("Path");
if( path != null)
System.Diagnostics.Process.Start("OUTLOOK.EXE");
else
MessageBox.Show("There is no Outlook in this computer!","System
Error",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
================= End Code =================
I have com add-in to outlook 2003, code in c#.
I want to check if this add-in was installed in this computer.
if no --> I want to install the setup.exe of my com add-in from this method.
Is it possible to run setup file from C# code?
Thanking you in anticipation,
Yael.
Yael - 28 May 2007 10:39 GMT
private void isOutlook(){
Microsoft.Win32.RegistryKey key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\microsoft\\windows\\currentversion\\app paths\\OUTLOOK.EXE");
string path = (string)key.GetValue("Path"); if( path != null)// if have
outlook do the installing com add-in
//if this com add-in not yet installed
System.Diagnostics.Process.Start("C:\\MatarotToolbar\\MatarotToolbarSetup\\Debug\\Setup.Exe");
}
1) How to check before calling the installer if this add-in was installed in
this computer?
2) How to check the path of MatarotToolbarSetup\\Debug\\Setup.Exe???
> Hi,
> I have this method in my c# vs.net 2003 code:
[quoted text clipped - 19 lines]
> Thanking you in anticipation,
> Yael.
Ben Voigt - 29 May 2007 19:23 GMT
> private void isOutlook(){
> Microsoft.Win32.RegistryKey key =
[quoted text clipped - 10 lines]
> in
> this computer?
If it is a COM add-in, then there will certainly be entries in
HKEY_CLASSES_ROOT\Clsid that are specific to that addin.
> 2) How to check the path of MatarotToolbarSetup\\Debug\\Setup.Exe???
>
[quoted text clipped - 23 lines]
>> Thanking you in anticipation,
>> Yael.
Yael - 29 May 2007 20:00 GMT
before running the setup?
Could you set me how to code it please...I'm no't fully understand
Thank's
> > private void isOutlook(){
> > Microsoft.Win32.RegistryKey key =
[quoted text clipped - 41 lines]
> >> Thanking you in anticipation,
> >> Yael.
Ben Voigt [C++ MVP] - 30 May 2007 20:03 GMT
> before running the setup?
> Could you set me how to code it please...I'm no't fully understand
> Thank's
First use the OLE typelib viewer to find out what the UUID of the library
is. Then check whether that key is present under
HKEY_CLASSES_ROOT\TypeLib\{UUID-goes-here} to see if it is installed on the
target system.
>> > private void isOutlook(){
>> > Microsoft.Win32.RegistryKey key =
[quoted text clipped - 42 lines]
>> >> Thanking you in anticipation,
>> >> Yael.
Yael - 30 May 2007 21:53 GMT
Thank's,
Could you set me example please?
> > before running the setup?
> > Could you set me how to code it please...I'm no't fully understand
[quoted text clipped - 51 lines]
> >> >> Thanking you in anticipation,
> >> >> Yael.