Script to get AppsAndFeaturesEntries! #38882
Unanswered
jedieaston
asked this question in
Show and tell
Replies: 3 comments 11 replies
-
Developers have best gifts to give 😂 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Soooo, what if i don't use Hyper-V? 🤔 edit:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Well, my first test went south 🤔
|
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Happy holidays all! 🎅
I made a little present for everybody: a script that will fill AppsAndFeaturesEntries for all of the installer entries in a manifest. I haven't tested it a bunch yet, but I figured it was important to get something out there now that there's functionality in the client depending on it (microsoft/winget-cli#1796 among others).
The script executes each installer entry in a Sandbox, using
winget install
's newish command line arguments to force the matching algorithm down a certain path. This means you need a build of winget that is newer than the one in releases to make this work. Fear not, I thought of that (I built it locally, and VS includes a handy PowerShell script to trust the certificate. Works great in a sandbox.)This script has a lot more work that needs to be done to it to make it work in 99% of cases instead of 80% or so, but it will get us started.
I've attached a zip file with the script and wingetdev build. To use it, run
.\Add-ARPEntries.ps1 <path to manifest you want to add values to>
(and make sure you have Windows Sandbox enabled). I'll probably make a repo (or at least a gist) for this eventually.generatearp.zip
Edit (1/3): Fixed incompatibility with PowerShell 7.
Edit (1/10): Fixed a path whoopsie.
Beta Was this translation helpful? Give feedback.
All reactions