Including winget in NTLite image for Post-Setup installs

I'm familiar with the GamerOS preset, there's nothing that removes any required components for winget. All the solutions presented here will download winget and install its dependencies even if you removed them.

winget is an UWP app, and therefore cannot execute until your first logon session creates an user environment. While winget is command line, it belongs to its parent App Installer desktop package.

How are you trying to install, or call winget? If you do nothing on a new system and wait about 15 min. then Windows Update will silently install App Installer in the background. These scripts try to install winget on-demand instead of waiting around.
 
Not officially. There are two major problems to know:

1. The default (or "inbox") version of App Installer on the ISO is very outdated. winget is non-existent because it was released after the deadline for including Windows Apps. Most likely on 23H2, they'll finally push up the version.

Windows Update is assumed to be running, and 15-20 min. after install it's automatically updated your Windows Apps and Edge browser. Some users have a reg key to disable updates for Store apps, or disable WU entirely. This will prevent winget from updating.

2. This updated version of App Installer includes a functional winget. It can only be provisioned for a logon user, but since you're already logged on it's not a real problem.

3. GitHub hosts the even better version of App Installer. This one is newer, smarter and doesn't require a MS Account to talk to the Store. Other winget sources will work, but most users want to manage Store apps at some point. You need a separate script to install the GitHub version, which is numbered on a different release track.

4. You can only have one App Installer build at any time. The ancient version that comes on the ISO, WU's updated version, or the GitHub brand. The last two can both handle 3rd-party winget repo sources, the differences is with Store handling.

5. There are many ways to skin a cat. Most of these scripts are variations of downloading the packages and dependencies, and bringing winget online. A lot of them assume you have networking, which may not be true for some user cases.
 
So I do not have Microsoft store enable/installed and my computer seem to have no way to read msix files and thus I am stuck on how to install winget
 
You don't need Store to install winget, it's only required for browsing Store Apps. What you need is App Installer package.

If you want, try rellek's last solution (on the previous page). Copy the script to InstallWinget.ps1, and add this file to Post-Setup (User).
 
- Explore the image directory
- copy the file to Users\Default\AppData\Local\Temp\scriptname.ps1 (make the Temp folder)
- add the script to the user section and it worked great!


Screenshot 2023-08-14 102114.png

Screenshot 2023-08-14 101825.png
 
I have the 2 script widget setup to install. But when I install the custom ISO. the SetupWinget folder is not showing up in the C Drive for the second script to run. I did add the folder to the $$ folder. My other custom folder shows up but event that folder is missing some of the files. I built a custom IOS before with my presents with no issue. Now having an issue. Even started with a fresh Windows ISO and rebuilt it all. Still not working. any ideas?
 

Attachments

  • BasicOS Win10 (Final) v23.02.09.xml
    49 KB
Every time you start with a new ISO folder, you need to recreate the sources\$OEM$ folder structure. If you add Post-Setup commands, NTLite will make some of the folders for its own work, but not anything else.

You can create the $OEM$ folders any time, and NTLite won't mind as long as you stay away from $$\Setup\Files and $$\Setup\FilesU -- since it wants to keep track of anything added there.
 
The way I do it is I apply the presents. Once it creates the files and then add the files and folders in the sources\$OEM$ then I go back into NTlite and click on create ISO
 
Back
Top