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 Try objProcess = New System.Diagnostics.Process() objProcess.StartInfo.FileName = ProcessPath objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal objProcess.Start() 'Wait until the process passes back an exit code objProcess.WaitForExit() 'Free resources associated with this process objProcess.Close() Catch MessageBox.Show("Could not start process " & ProcessPath, "Error") End Try End Sub '//////////////////////// '////RUN THE INSTALLER/// '//////////////////////// 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.
Test Commands.zip (97.55K)
Number of downloads: 11