Is there a way to restart or refresh the installer? I don't know what my underlying issue is. I'm trying to get my installer to install SQL Server (if not installed) and build a database. As long as SQL Server is there when the installer starts, the database is built as expected. It won't build the database on a single run if it needs to install SQL Server first. However, if I run it once to install SQL Server, and then a second time to build the database, everything works fine.
I've tried using Sleep after installing SQL Server, but that doesn't help. I even made a console app that waits for a few seconds and opens the installer. I have my installer execute (using Exec) this app and then Quit. As expected, the installer installs SQL server, opens the console app, and closes the installer (the dialog disappears). After a few seconds, the app starts up the installer again. The installer recognizes that the new SQL Server instance exists (it runs a repair without issues), but it still won't use the instance to build my database unless I manually close and restart the installer.
Here's the error text I get when I cannot build the database:
SQLCMD.EXE - Application Error
The application was unable to start correctly (0xc000007b)
I can easily generate this error buy trying to open sqlcmd after uninstalling all instances of SQL Server.
What is happening when I manually close and restart that is not happening when I programmatically close and restart? How can I make sure that SQL Server is ready to be used after installing it?
I'm guessing that the system doesn't know my installer has installed SQL Server until the installer COMPLETELY closes, but I don't know what to do about it.
I've tried using Sleep after installing SQL Server, but that doesn't help. I even made a console app that waits for a few seconds and opens the installer. I have my installer execute (using Exec) this app and then Quit. As expected, the installer installs SQL server, opens the console app, and closes the installer (the dialog disappears). After a few seconds, the app starts up the installer again. The installer recognizes that the new SQL Server instance exists (it runs a repair without issues), but it still won't use the instance to build my database unless I manually close and restart the installer.
Here's the error text I get when I cannot build the database:
SQLCMD.EXE - Application Error
The application was unable to start correctly (0xc000007b)
I can easily generate this error buy trying to open sqlcmd after uninstalling all instances of SQL Server.
What is happening when I manually close and restart that is not happening when I programmatically close and restart? How can I make sure that SQL Server is ready to be used after installing it?
I'm guessing that the system doesn't know my installer has installed SQL Server until the installer COMPLETELY closes, but I don't know what to do about it.
Comment