locked
Developing a Setup application (Service + Web Service Setup) RRS feed

  • Question

  • Hello everyone,

    Is it possible to develop a single setup application to install both a windows service and a web service?

    I'm currently using two distinct setups but i really need to make it easier for the users.

    I've initially developed a GUI wrapper to call both the setups (first the windows service and then the web service setup) but when i started to compile the setup applications (windows service and web service) in win2k8 (with visual studio 2008), my wrapper won't WaitForExit() between setups.

    Here is the code i'm using:
    1        private void startButton_Click(object sender, EventArgs e) 
    2        { 
    3            ProcessStartInfo psi = new ProcessStartInfo("windowsServiceSetup.exe"); 
    4            //psi.UseShellExecute = false
    5            Process myProcess = Process.Start(psi); 
    6            myProcess.WaitForExit(); 
    7            psi = new ProcessStartInfo("webServiceSetup.exe"); 
    8            psi.UseShellExecute = false
    9            myProcess = Process.Start(psi); 
    10            myProcess.WaitForExit(0); 
    11            MessageBox.Show("Setup finished", "Thank you for using this wrapper!", MessageBoxButtons.OK, MessageBoxIcon.Information); 
    12            Environment.Exit(0); 
    13        } 
    14 

    I've tried passing 0 and System.Threading.Timeout.Infinite as arguments for the WaitForExit() calls but that only changes the value returned by the method:
    0 returns false
    System.Threading.Timeout.Infinite returns true

    Also, myProcess.HasExited returns true immediately after i ProcessStart();

    Any thoughts?

    Thanks in advance,
    Luís Silva
    • Moved by nobugz Tuesday, January 13, 2009 11:22 AM not a clr q (Moved from Common Language Runtime to Where is the Forum For…?)
    Tuesday, January 13, 2009 11:17 AM

Answers

All replies