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!
Deploy Single Windows Store Application via Intune
Upload Autopilot device info menu script
7 thoughts on “SQL ODBC Driver via Intune”
[…] log on to Intune. (if you want more details about the process below, please check out this post.)1. Go to Apps and create a new Win32App2. Select the app package file. This is the […]
Hi, do you think you can use this method to create the install oracle instant client?
Sure, why not? 🙂 Do you need help?
Hi, I tried searching online but couldn’t find much.
If you can give me some pointers on how I could do it I would appreciate it 🙂
I need the oraoledb oracle 1 driver and the tnsnames.ora file to put on the pc so the client can connect; I would like to manage the deployment and updates directly from intune.
Could you please walk me through the installation sequence? After that, I’m sure I can automate it for you.
1-Install Oracle Client Runtime from the Oracle client package downloaded from the internet (I specify that I want to install it in c:\program data\oracle)
2-After the installation is complete, I copy the tnsnames.ora file to the network/admin folder (c:\program data\….)
3-Copy the link to my program on the desktop (link to \server\app\run.exe)
I will write a separate blog about this. Stay tuned 🙂