0 Replies - 882 Views - Last Post: 02 July 2013 - 06:44 PM Rate Topic: -----

#1 ARMaclaren   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-July 13

shell and wait does not work with silent software installation

Posted 02 July 2013 - 06:44 PM

hey guys,

I have been designing software for work that automates the installation process of computer software. Basically, its a big list box that installs software 1 at a time using the ShellandWait command.

    Public Sub ShellandWait(ByVal ProcessPath As String)
        Dim objProcess As System.Diagnostics.Process
            objProcess = New System.Diagnostics.Process()
            objProcess.StartInfo.FileName = ProcessPath
            objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal

            'Wait until the process passes back an exit code 

            'Free resources associated with this process
            MessageBox.Show("Could not start process " & ProcessPath, "Error")
        End Try
    End Sub

Call ShellandWait(lvi.SubItems(2).Text)

The above code works PERFECTLY for normal software installs where the installer launches and you have to click on each option however, when I use a silent install switch. For example: "c:\app\firefox.exe /s"

I get the error "could not start process c:\app\firefox.exe /s"

whats even more strange is if I was to put:

call shell ("c:\app\firefox.exe /s")

The installation process works perfectly. Firefox installs silently without any issues. But then, as my software goes through the list, it doesn't stop and wait for the other installer to finish. I have tried searching on Google but I was not able to find anyone trying to silently install antivirus software or web browsers.

Attached File(s)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1