This post is relevant for Intune engineers who want to install SQL Server 2022 Dev Edition to Windows workstations silently.
This solution will most likely work with SQL Server 2022 Express and SQL 2019 versions.
The basic idea is to create a custom path (folder) on the remote system drive where we can download compressed SQL Server 2022 Dev Edition setup files to, extract them, copy the configuration.ini file to the extraction folder, then run the setup.exe from the extraction folder which references the configuration that will install SQL Server 2022 Dev Edition silently via Intune…
Breathe.
Easy, right?
Let’s break it down below ↓
Part 1
How to Obtain the Configuration.ini file
The following is to be performed on your local machine:
1. Download Microsoft’s SQL Server 2022 Developer installer here
2. Run the installer called SQL2022-SSEI-Dev.exe, select custom, then click install


3. In the installation center click Installation, then SQL Server standalone installation

4. Now we are presented with SQL Server setup window. This setup can vary depending on the requirements of your SQL Server instance. After completing the configuration you need, the location of the configuration file is displayed at the Ready to Install section.

5. Allow Microsoft updates

6. Confirm setup rules pass. Resolve any issues that prevent moving forward.

7. Specify Developer Edition

8. Specify Azure Extension for SQL Server. I have disabled it since it was not necessary for my configuration.

9. Choose the Features you need. The minimum is Database Engine Services. You can also customize the installation directory here.

10. Choose the default instance ID or create a custom one.

11. Specify service accounts. I used the default settings and clicked next.

12. Choose how you want to authenticate access to the SQL server instance. Again, this may vary depending on your needs. I chose to use the builtin Windows administrators account. This will give access to any user account that is in the remote workstation’s local Windows administrators user group.




13. Finally, we are given the location of the configuration.ini file. Navigate to the configuration file’s location to copy and save it. Hold on to this, we will need it later.

The next phase is to create the package that will be imported into your organization’s Microsoft Intune Endpoint Management system. To read more about Intune, click What is Microsoft Intune?
Part 2
Create the SQL Server 2022 Dev Edition Intune package
14. Create a .bat script installer with the following commands:
mkdir %systemdrive%\SQ L2022_Setup copy /Y "%~dp0ConfigurationFile.ini" "%systemdrive%\SQL2022_Setup" "%~dp0SQL2022-SSEI-Dev.exe" /ACTION=Download MEDIAPATH=%systemdrive%\SQL2022_Setup /MEDIATYPE=Cab /QUIET cd %systemdrive%\SQL2022_Setup SQLServer2022-DEV-x64-ENU.exe /q /x %systemdrive%\SQL2022_Setup copy /Y "%systemdrive%\SQL2022_Setup\ConfigurationFile.ini" "%systemdrive%\SQL2022_Setup\SQLServer2022-DEV-x64-ENU" cd "%systemdrive%\SQL2022_Setup\SQLServer2022-DEV-x64-ENU" setup.exe /IAcceptSQLServerLicenseTerms /ConfigurationFile=ConfigurationFile.ini
Translation:
make folder SQL2022_Setup where the operating system is installed, i.e., c:\SQL2022_Setup, d:\SQL2022_Setup, etc... copy configuration file from current folder where this script is running to SQL2022_Setup folder, i.e., if Intune is running this .bat file from the c:\windows\IMECache folder, then %~dp0 expands the copy from location to c:\windows\IMECache\ConfigurationFile.ini run the installer and silently download the compressed SQL 2022 program into a CAB file and executable into the SQL2022_Setup folder. The compressed program file is called SQLServer2022-DEV-x64-ENU.box and the program executable is SQLServer2022-DEV-x64-ENU.exe change the current directory we are working in to the SQL2022_Setup folder run program installer silently and extract the SQLServer2022-DEV-x64-ENU.box files into current directory. This will create a folder named SQLServer2022-DEV-x64-ENU inside the SQL2022_Setup folder copy ConfigurationFile.ini into the folder SQLServer2022-DEV-x64-ENU change the current directory to the SQLServer2022-DEV-x64-ENU folder run the setup.exe program in the SQLServer2022-DEV-x64-ENU folder using the specifications contained in the ConfigurationFile.ini file and accept the SQL license terms
15. Create a .bat uninstaller script with the following commands:
cd "%SYSTEMDRIVE%\Program Files\Microsoft SQL Server\160\Setup Bootstrap\SQL2022" setup.exe /QUIET /SUPPRESSPAIDEDITIONNOTICE /SUPPRESSPRIVACYSTATEMENTNOTICE /Action=UNINSTALL /INSTANCENAME=MSSQLSERVER /FEATURES=SQL,Tools
Note the uninstaller assumes a default install path, instance name, and installed features. Adjust as necessary.
16. Move all the files we need into your Intune package folder. There should be four files total.
install.bat, uninstall.bat, SQL2022-SSEI-Dev.exe, and ConfigurationFile.ini

17. Package the folder with the four files by using IntuneWinAppUtil.exe and upload the output .intunewin file into your organization’s Intune application management console.
The .intunewin file that IntuneWinAppUtil.exe created contains the components necessary for Intune to deploy SQL Server 2022 Dev Edition to your Windows workstations silently.
Visit Create .intunewin Files Using IntuneWinAppUtil for a tutorial on how to use the IntuneWinAppUtil.exe to create Windows application packages that Intune can deploy to remote workstations.
Visit How to Upload a .intunewin file into Intune to learn how to get Intune to deploy .intunewin packages to remote workstations.
.intunewin 2022 admin administration app asia bangkok beaches bukit bintang engineer engineering gardens by the bay install intune intune groups intunewinapputil islands jalan alor johor bahru karon kata kathu kuala lumpur malaysia marina bay sands microsoft ocean phang nga bay phuket silent singapore sql sqlserver thailand travel vacation windows


Leave a Reply