DKroll76
Pilgrim

Installing SQL Hangs

I have a basic msi project. I'm trying to install SQL Server 2012 Express from a custom action. I am calling the SQL setup and passing a bunch of command line parameters. During the install, it hangs at:

Invoking QueryServiceStatus Win32 API
Sco: Attempting to open SC Manager

I can run this manually from a command prompt and it works fine, but calling it from the custom action always gives this problem.

Any suggestions?
Labels (1)
0 Kudos
16 Replies
PlinyElder
Flexera beginner

What version of SQL are you installing?

Is it SQL Express?

I have successfully installed SQL Express 2008 r2 and SQL Express 2012 via installscript by using LaunchApplication()
0 Kudos
DKroll76
Pilgrim

Yes, SQL Express 2012. My project is a basic MSI project and I'm seeing that the problem is trying to launch SQL's MSI installer from an MSI installer and that's not supported. Have you installed SQL from within an MSI?
0 Kudos
PlinyElder
Flexera beginner

Hmm, actually i am seeing this exact problem that you are with 2012. I forgot that when i had it working before it was as a prereq for SQL 2012.

Wonder why its breaking, works perfectly with 2008. More testing i guess
0 Kudos
DKroll76
Pilgrim

I read that starting with either 2008 or 2008 R2, MS changed the install to MSI based, that's why it doesn't work anymore. Thanks for your help!
0 Kudos
PlinyElder
Flexera beginner

Any luck so far?
0 Kudos
DKroll76
Pilgrim

No. I'm thinking of just trying to use an Installscript project, that would allow me to run the SQL installer without having the MSI conflicts.
0 Kudos
PlinyElder
Flexera beginner

Ive read it works fine with the Suite/Advanced UI project. If you are available to use that
0 Kudos
DKroll76
Pilgrim

If this doesn't work, I may have to check that out.
0 Kudos
DLee65
Pilgrim

You are correct about SQL Server 2012 Express. However if you can distribute SQL Server 2012 SP2, it should solve the problem but you have to add an extra command line parameter to skip checking install conditions.
The other solution, which I used, will be to use a Suite/Advanced UI installer to manage installing SQL Server 2012.

See my post here https://community.flexerasoftware.com/showthread.php?218500-SQL-Server-2012-prerequisite-fix
0 Kudos
DKroll76
Pilgrim

Thanks for the info DLee65. While you're here, maybe you can answer another question I had... I was wanting to filter the IS_SQLSERVER_LIST, but couldn't figure it out from an Installscript project. From an MSI project, I could do it with this Installscript code


hDB = MsiGetActiveDatabase(hInstall);

// open view into ListBox table
MsiDatabaseOpenView(hDB,
"SELECT * FROM `ListBox` WHERE `Property`='IS_SQLSERVER_LIST'",
hViewlist);
MsiViewExecute(hViewlist, NULL);



It's giving a compile error on MsiGetActiveDatabase when trying to use in Installscript. I assume because it's not an MSI project. Any way to filter the IS_SQL_SERVER_LIST in a plain Installscript project?

Thanks,

David
0 Kudos
PlinyElder
Flexera beginner

DLee65 wrote:
You are correct about SQL Server 2012 Express. However if you can distribute SQL Server 2012 SP2, it should solve the problem but you have to add an extra command line parameter to skip checking install conditions.
The other solution, which I used, will be to use a Suite/Advanced UI installer to manage installing SQL Server 2012.

See my post here https://community.flexerasoftware.com/showthread.php?218500-SQL-Server-2012-prerequisite-fix


So i have tried this with 2012 SP2 with the /SkipInstallerRunCheck parameter and its still not working for the Basic MSI project. I have created a custom action to run the SQL Installer with the command line parameters, but the sql install still hangs. Stuck at
InstallPackage: MsiInstallProduct returned the result code 1618.
Retry-able MSI return code detected: 1618
Sleep 120 seconds before retry attempt....


It retries this 3 times then fails the install which fails the Installshield installer. :mad:
0 Kudos
DLee65
Pilgrim

What version of Windows installer does your setup target? That will make a difference. It has to be 4.5 at least to support running multiple MSI packages simultaneously. The default is 200 or 301.

As to the MSI code I think you are correct. When you have a basic MSI or InstallScript MSI project I suspect that MSI.h is included. What happens if you include this .h file in your Installscript project?
0 Kudos
DKroll76
Pilgrim

DLee65, How to I tell with version of Windows Installer I'm targeting?

If I try to include MSI.h, I get a fatal error "can't open include file"
0 Kudos
PlinyElder
Flexera beginner

DKroll76 wrote:
DLee65, How to I tell with version of Windows Installer I'm targeting?

If I try to include MSI.h, I get a fatal error "can't open include file"


Run
msiexec -?
through cmd.exe
0 Kudos
PlinyElder
Flexera beginner

DLee65 wrote:
What version of Windows installer does your setup target? That will make a difference. It has to be 4.5 at least to support running multiple MSI packages simultaneously. The default is 200 or 301.

As to the MSI code I think you are correct. When you have a basic MSI or InstallScript MSI project I suspect that MSI.h is included. What happens if you include this .h file in your Installscript project?


I am running windows installer 5.0 (Windows Server 2008 r2 x64) while getting the error message i stated.
0 Kudos
DKroll76
Pilgrim

Mine is Windows Installer 5 as well.
0 Kudos