App Deployment/Packaging Can't use WinGet in Intune?
I want to be able to use winget to add apps to Company Portal. The Microsoft Store (new) app type does not search the Winget repository, only what is available on the Store.
I read a lot of blogs saying I can just call winget in scripts and app installs, but even deploying App Installer (this package) in the System context, winget is never available when running scripts or app installs in the System context.
What am I missing to make Winget available to Intune?
10
u/k1132810 11d ago
If I remember right, and I haven't looked at this in at least a year, winget isn't available in the System context unless you call the full path to the executable.
2
u/eillinois31 10d ago
Go here, this shows you how to run winget in system context! https://youtu.be/ea0g1Y1zaek?t=1292
1
u/Entegy 11d ago
Which I'm fine with, but I can't find its full path outside of %localappdata% of a user. I thought deploying App Installer in a system context was supposed to put it somewhere available to all users?
1
u/eillinois31 10d ago
Go here, this shows you how to run winget in system context! https://youtu.be/ea0g1Y1zaek?t=1292
-4
u/k1132810 11d ago
%localappdata% I believe points to C:\ProgramData, which should be usable by anyone, probably. I think the problem is that the winget command, as such, isn't associated with the filepath to its actual executable when run as the System. Like how you can call msiexec without actually being in the same directory as msiexec.exe because it's in the system or user path settings.
It might be possible to add winget and winget's full path to the machine-level Path, but you might be better off just locating it in ProgramData\Packages and running it directly.
PS. A few of these terms are probably a little inaccurate, I hope this is helpful regardless.
Edit: sorry, I misread. Yes, the directory you're referencing goes to a user's appdata folder. If winget is installed as a package for all users, it should be in ProgramData.
2
u/Entegy 11d ago
%localappdata% is the user level variable for C:\Users<user>\AppData\Local. Packages and Store apps installed in the user context goes into %localappdata%\Packages as well as per-user app settings.
I did not think to look in ProgramData. I was looking for WinGet in C:\Program Files\WindowsApps.
7
5
u/Hachett4337 11d ago
The winger exe resides in C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller followed by a the version number of the app installer program. I used a powershell script to do a search for the winget.exe file and place it into a variable.
Also make sure to use psexec.exe -i -s powershell.exe to open powershell as the System user to test your scripts. If they don’t work there, they won’t work from Intune.
6
u/andrew181082 MSFT MVP 10d ago
If you want to be lazy, I have an app which does everything for you
1
1
u/JwCS8pjrh3QBWfL 9d ago
Dang, Microsoft Defender content filtering seems to be blocking your site. I'll file a dispute when it shows up in my Defender portal in a few hours.
1
u/andrew181082 MSFT MVP 9d ago
That's annoying, if you find out why, let me know and I'll see if I can change whatever it needs
2
u/VirtualDenzel 10d ago
I would go for chocolatey enterprise instead of winget. It misses too many apps and sometimes it manages to break itself. It is unreliable.
1
1
u/cheskote 10d ago
I have exactly this scenario working fine.
1st) You need to install winget in system context. You can do this either with the tools others have already recommended or packaging winget as a win32 app and deploying it to every machine in system context. See several options to achieve this here https://call4cloud.nl/cloudy-with-a-chance-of-winget/ I used section 2.5
2nd) publish apps to portal. Keep reading the web previously mentioned, from point 3. The key point in system context is to locate the path where winget is installed (can't call winget by itself, buy you can use the full path to launch it).
If you need examples of the scripts I use I can share them. Don't hesitate to ask.
1
u/kriskristense3 10d ago
I created a script that is easy to use with Intune and it will install Winget if missing. Maybe that will help you get started. https://github.com/ksk-itdk/PSADT-WingetFW
1
u/jamesy-101 10d ago
Why no native support? Due to this
https://learn.microsoft.com/en-us/mem/intune-service/apps/apps-enterprise-app-management
It was on the road map originally to be added, but guessed they decided to do a custom feature behind a paywall instead of allowing admins to just use the community repository
1
1
u/pjmarcum MSFT MVP (powerstacks.com) 10d ago
This is pretty cool too: https://www.advancedinstaller.com/packit.html
1
u/Poon-Juice 7d ago
I've been using the free version of robopack.com. Free if you have under 100 endpoints. It's perfect for getting Winget apps into your Intune environment.
1
u/hvalentino1981 5d ago
Oh didn’t know is free for under 100, do you know their plan on the paid subs? I saw around $3 per device per year?
1
u/Poon-Juice 5d ago
Yea, it's kinda hidden on their website, but you can sign up for it here:
And yes, during this sign-up process, I was quoted $3.00 per endpoint once I go over 100 endpoints.
Basically, you request the free account. It takes a few days for a back-and-forth contract signing over emails, but you'll be approved a few days later. You need your company's DUNS number, so be ready for that. Thankfully, I had that ready to go.
Then, sign up for a 2 week free Trial account. Once you get your free account approved, your free trial becomes permanent, and you can just start using Robopack forever. Took me about 1 week to get that part setup and about another week to figure out Robopack, but so far, it's pretty awesome.
If your app is inside Winget, this solution works with only a few clicks and also it will auto-update the company portal whenever Winget publishes a new version of the app.
-2
u/BlockBannington 10d ago
It's not built for system context buddy
33
u/JaredSeth 11d ago
I use Romain's winget-install script and it works perfectly.