Question : SQL 2008 Express Silent Install

I am trying to do a silent install of sql 2008 express from my application. I am using the below code. The code below runs and installs the application. What I need to do is capture any errors returned or output programmatically from the silent install.

Any help is appreciated
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
Dim psInfo As New  _
     System.Diagnostics.ProcessStartInfo(exepath, createparms)
        psInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
        Dim myProcess As Process
        myProcess = System.Diagnostics.Process.Start(psInfo)
        myProcess.WaitForExit()
        MsgBox("Done")

Answer : SQL 2008 Express Silent Install

Annoyingly i don't still have the code. My script was .bat anyway, so probably not of great use to you.

I found an msi installation log and the string i searched for was:

"Installation operation completed successfully"

So i'm sure you could search for that using whichever language your application is coded in really easily. I've shown an example in vb.net.

L
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
 Imports System
 Imports System.Collections.Generic
 Imports System.Text
 Imports System.Text.RegularExpressions
 Imports System.IO

    Dim fName As String = "c:\sql2008inst.log" 
    Dim testTxt As New StreamReader(fName)
    Dim allRead As String = testTxt.ReadToEnd()
    testTxt.Close()          
    Dim regMatch As String = "Installation operation completed successfully"
            
             If Regex.IsMatch(allRead, regMatch) Then
                 MessageBox.Show("Found")
             Else
                 MessageBox.Show("Not Found")
             End If
Random Solutions  
 
programming4us programming4us