cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Install SQL Server Express Silently via a Prerequisite.

Install SQL Server Express Silently via a Prerequisite.

Summary

Install SQL Server Express Silently via a Prerequisite.

Synopsis

Attempting to install SQL Server Express Silently via a setup Prerequisite may cause the SQL install to throw an error in a compressed setup.exe installer.
Viewing the SQL install log may reveal an error pertaining to a path location being too long.

This is because the setup prerequisite extracts files to a long temp path location. Then the SQL installer extracts to another long path as a subfolder of the first location.

This can be avoided by creating a .bat file that extracts the sql files to a shorter location and runs the SQL installer from there.

Discussion

Create .bat file containing code like:

SQLEXPR_x86_ENU.exe /q /x:"C:\temp\SQLTEMP"
c:\temp\SQLTEMP\setup.exe /Q /ACTION=Install /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL /INSTANCENAME="SQLEXPRESS" /SECURITYMODE=SQL /SAPWD="abcd"

You can specify your own directory for the /x: parameter, but it must be short enough so the error doesn't occur again, and it must also be an empty directory.
Then add the .bat file to the files to include for the prerequisite and run the .bat with the prerequisite.
It should then extract to the shorter location specified and run the setup.exe with the parameters from there.

The only caveat is that it will show a window for the .bat file, so it's not as silent as it could be.

But this should let you compress the entire installer into a single .exe
Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jun 08, 2018 02:06 AM
Updated by: