Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / May 2007

Tip: Looking for answers? Try searching our database.

Is it possible to run setup file from C# code?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yael - 28 May 2007 09:06 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.