I have an install.bat
file with scripts to install a Windows application silently. Now the .exe
file for the application has integrated .exe
for installation of SQL Server along with the application.
When I run the .bat
file, it only installs the application silently, but the SQL Server installation still needs manual intervention to install, it's not happening silently.
This is my .bat
file for silent install:
@echo off
echo Starting silent installation...
:: Define installer path
set INSTALLER_PATH="<path>\Setup.exe"
:: Run the installer silently (modify the silent switch if needed)
%INSTALLER_PATH% /s /v /ACTION=INSTALL /UIMODE=Normal /norestart /log install_log.txt
:: Check if installation was successful
if %ERRORLEVEL% NEQ 0 (
echo Installation failed! Check install_log.txt for details.
exit /b 1
) else (
echo Installation completed successfully.
)
:: Exit script
exit /b 0
I have an install.bat
file with scripts to install a Windows application silently. Now the .exe
file for the application has integrated .exe
for installation of SQL Server along with the application.
When I run the .bat
file, it only installs the application silently, but the SQL Server installation still needs manual intervention to install, it's not happening silently.
This is my .bat
file for silent install:
@echo off
echo Starting silent installation...
:: Define installer path
set INSTALLER_PATH="<path>\Setup.exe"
:: Run the installer silently (modify the silent switch if needed)
%INSTALLER_PATH% /s /v /ACTION=INSTALL /UIMODE=Normal /norestart /log install_log.txt
:: Check if installation was successful
if %ERRORLEVEL% NEQ 0 (
echo Installation failed! Check install_log.txt for details.
exit /b 1
) else (
echo Installation completed successfully.
)
:: Exit script
exit /b 0
Share
Improve this question
edited yesterday
marc_s
756k184 gold badges1.4k silver badges1.5k bronze badges
asked yesterday
Abhijit VenugopalAbhijit Venugopal
1
9
|
Show 4 more comments
1 Answer
Reset to default 2This isn't a silent install at all. This explicitly requests full dialogs with /UIMODE=Normal
. From the command prompt installation docs :
- /UIMODE=Normal is the default for non-Express editions and presents all setup dialog boxes for the selected features.
The UIMODE setting can't be used with the /Q or /QS parameters.
There are no /s
or /v
options at all in the docs.
To perform a quiet installation you have to specify several important settings anyway, including the product key, the service accounts to use, what services to install etc. The example at the top of the documentation shows how to perform a quite installation with the desired accounts :
The following example installs the SQL Server Database Engine, SQL Server Analysis Services, SQL Server and Integration Services in quiet mode:
C:\SQLMedia\SQLServer2022> setup.exe /Q /IACCEPTSQLSERVERLICENSETERMS /ACTION="install"
/PID="AAAAA-BBBBB-CCCCC-DDDDD-EEEEE" /FEATURES=SQL,AS,IS
/INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="MyDomain\MyAccount"
/SQLSVCPASSWORD="************" /SQLSYSADMINACCOUNTS="MyDomain\MyAccount "
/AGTSVCACCOUNT="MyDomain\MyAccount" /AGTSVCPASSWORD="************"
/ASSVCACCOUNT="MyDomain\MyAccount" /ASSVCPASSWORD="************"
/ISSVCACCOUNT="MyDomain\MyAccount" /ISSVCPASSWORD="************"
/ASSYSADMINACCOUNTS="MyDomain\MyAccount"
If specifying all that in a single batch is too much, you can use a configuration file with these settings and call it with :
Setup.exe /Q /ConfigurationFile=MyConfigurationFile.ini
You can even generate the config file from the setup wizard. As the docs explain, the last page before installation starts shows the path to a config file containing the options specified in the wizard.
/s
switch do? – AlwaysLearning Commented yesterdayinstall_log.txt
say? What exactly happens that you want us to assist you with? Please be aware that we're here to assist you to fix a problem with your code, and other than non-critical syntax errors on lines4
,5
,9
,10
,12
,13
, and20
your script content looks okay. If the script doesn't run at all, the problem is unrelated to its content, and would no longer be suitable as an on topic question for this particular platform. – Compo Commented yesterday/s
option according to the command prompt installation docs. Thequiet
option is/q
or/qs
.UIMODE
is incompatible with/q
– Panagiotis Kanavos Commented yesterday