I'm installing SQL Server like the code below
Process.Start("Setup.exe /q /ACTION=Install /FEATURES=SQL /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="<DomainName\UserName>" /SQLSVCPASSWORD="<StrongPassword>" /SQLSYSADMINACCOUNTS="<DomainName\UserName>" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /IACCEPTSQLSERVERLICENSETERMS");
When it fails to pass the pre-requisite check, the installer just disappears right away without showing the error message to the user.
I can check the reason why it failed by looking at program files folder for SQL Server but the person who is installing the software will not know where to look.
So I would like to let the user know what the error was. How can I achieve this?
Another problem I'm facing is that because this is running as a process, the program does not wait till the SQL Server installation to finish. Is there a way to run a process and wait for it to finish?