This post is about deploying the SQL ODBC Driver via Intune with the required runtimes. It took myself a while to get this working. So, I thought let’s share this with the world.
Firstly, I have created a package which contains the ‘VC_Redist.x64.exe’ and the ‘msodbcsql.msi’, installs them silently, creates a log file and has a custom detection method. After that, you can directly configure a SQL ODBC connection.
This are the prerequisites for using this configuration:
- Intune/Microsoft Endpoint Manager enrolled device
- Proper licensing
- Win32App packaging tool. Downloadlink
Creating the package
This part guides you through creating the package. This process uses the Win32App tool. Make sure you downloaded this application in the prerequisites.
Firstly, create a folder where all the package files will reside. All the files in this folder will be captured in the package. Make sure no unnecessary files are in this folder.
I called this folder SQLODBC and it contains these files:
The custom scripts are available in my github and I added the links for the installer files:
Next up, open a Powershell window and browse to the Win32App Tool:
In addition, I downloaded and extracted the Win32App tool to the C:\temp folder.
After that, run the Win32App Tool and specify the folders accordingly:
As a result, this is package is created:
Add the package to Intune
Next up, adding the package to Intune.
Firstly, log on to Microsoft Intune.
After that, go to “Apps” and “Windows”:
Next, click on “Add”:
Select the proper App type:
Follow these steps to configure the app properly.
Firstly, select the .intunewin file on your local machine:
Fill out the App Information:
After that, fill out these install commands and restart behavior:
In addition, the install commands in text for easier copy and paste actions:
After that, configure this detection rule. Use the “Use custom detection script” option and upload the SQLODBCDetection.ps1:
I have not configured the dependencies and supersedence. So, I skip these parts. After that, assign this application:
I am using this for test purposes. So, I have assigned it to all users.
Lastly, at “Review and Create” click on create!
Package Deployment and testing
When the application is assigned and the deployment has started, this toast notification will appear:
After that, these files are created:
In the InstallationLog.Log file these lines will appear:
In addition, this log will also report when the installation has failed. For example:
These are applications installed:
And that is how you deploy the SQL ODBC Driver via Intune!