Now that the Microsoft Store for Business has been retired and the new integration between Intune and the Microsoft Store, we have seen that the specific application you are looking for might not yet be available, but is available on the winget repository. In this blog I will show you how to create such applications and deploy them via Intune as a Win32 App.
What is Winget?
The winget command line tool enables users to discover, install, upgrade, remove and configure applications on Windows 10 and Windows 11 computers. This tool is the client interface to the Windows Package Manager service.
What do I need to start using Winget?
Windows Package Manager winget command-line tool is available on Windows 11 and modern versions of Windows 10 as a part of the App Installer.
You can get App Installer from the Microsoft Store. If it’s already installed, make sure it is updated with the latest version.
Confirm if the App is available
- Log into the Intune admin center.
- Navigate to Apps – Windows.
- Click +Add and select Microsoft Store app (new)
- Click Search the Microsoft Store app (new).
- Search for the app that you would like to add.
The below example shows that Adobe Acrobat Reader DC is available and it a Win32 application type.
In this blog I will use Notepad++ as an example application that is NOT available in the new store. Searching for Notepad you will find that it is not available in the new store and therefore we will use winget to deploy Notepad++.
Using Windows Package Manager
First, we will confirm whether Notepad++ is available in the winget repository and test the installation.
- Open Command Prompt or Windows Terminal.
- Search for the app and app repositories with winget search notepad++ –accept-source-agreements.
We use the –accept-source-agreements to automatically accept the Terms of Transaction.
We see that Notepad++ is available in the winget repository.
- We will now test the installation by triggering the installation from the winget repository with “winget install notepad++ –source winget –accept-source-agreements”
- The installer tries to elevate and is showing the User Account Control prompt. Click No to cancel the process.
- Now we know the installers behaviour and will prepare the package.
- Using the Microsoft Win32 Content Prep Tool, use an empty txt file to create a .intunewin file.
Now we will Create a new Win32 app with the Microsoft Intune admin center
- Log into the Intune admin center.
- Navigate to Apps > Windows > Windows Apps.
- In the toolbar, select +Add
- Select Windows app (Win32).
- Click Select to continue.
- Click on Select app package file and add the previously created intunewin file and enter the app information and click Next.
- In the Program tab enter the commands and click Next:
- Install command: cmd /c winget install notepad++ –source winget –accept-source-agreements
- Uninstall command: cmd /c winget uninstall notepad++
NB! Ensure the Install behaviour is set to User.
- Configure the requirements and click Next.
- Create a Detection Rule as follow and click Next.
- Assign the application as required.
User Experience
Now that you have created and deployed Notepad++ the users can go to the Company Portal and install Notepad++.
The user will see the winget command window during installation. We are not currently able to hide this window.
Conclusion
We have seen how we can use the winget command line to install an application on devices via Intune. In the example we created a Win32 app and you might ask “Why can’t I use a Script?” and this is a valid question, and you can most definitely use a script, but then this would be listed under Scripts and not Apps and for reporting purposes I would recommend the use of Win32 apps.
You must log in to post a comment.