Using Winget Package Manager in Windows

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone in this video I want to talk about the winget package manager that helps me install and manage applications running on Windows if we think about it today I have my computer and on my computer for it to be any use I need to install applications so all I have to do is I go to the website of the application manufacturer I go and search for download link I install it go through whatever wizard it has then I have lots of different applications installed and then periodically I go and check was there a newer version available for me and then I have to go through the install process if I ever change my machine I have to do the whole thing all at once for every application so package managers a gold around simplifying that for the end user to find applications install applications update applications uninstall applications and even apply a complete application configurations to a particular machine now these are not new Linux has had packet managers forever it's very common to use yam or ABT or whatever to manage that in stolen and update of applications there's things like chocolaty for Windows has been around for a while to again help with that idea but now we have winget which is natively of just available in Windows now my focus for this talk is about being a consumer of the applications there are functions within winget to help me create the Manifest files and actually make applications available but I'm not focused on that this is all about as the consumer simplifying my experience for application installs now if we think about winget it's it's Windows 10 so I'm thinking hey Windows 10 and above so obviously 11 as well it's Windows 10 I think 1709 which was a long long time ago and the way this works is when get gets installed on my machine as soon as I authenticate to the machine it goes and connects up to the Microsoft store so if we think about Cloud repositories of applications one of the big ones available to me is the Microsoft store we're used to going into the store application on Windows and we can see a whole list of applications and we can install them and the store app in Windows helps me update those it goes in periodically says it was there a new version available and we'll install it so this winget on my first login goes and gets pulled down from the Microsoft store so in a way that's our first exposure to using a library of applications we use the Microsoft store all the time but there are others out there as well not everything is published to the Microsoft store now one thing to focus on at the start when I use wind gear is just a command and open up command prompt and I type winget and we're going to see this now some applications will want to run with elevated privileges so that's where you'll get prompted to hey do you want to elevate up if I start my command prompt elevated then I won't see those so I might see a difference in functionality on if I launch my command prompt window as elevated if you just remember push shift key in right click on the icon and do one as administrator you're now running elevated which means you won't see those elevation prompts because you're already running with all of the full permissions so with that said it's probably good just to quickly see it so if we jump over for a second so here in my environment now you can see I am running as elevated because if you look at the title of the application we can see right here it says administrator colon so that means I'm running with elevated permissions so just in this regular window if I just type winget dash dash info then it gives me some basic information about my environment now the first thing I can see is the windows package manager version I am running is this V 1.5 and it's a preview version and it gives you a bunch of different information about the settings and the logs various statements and some administrator settings as well down the bottom so this is just a basic information about what we have with our winget and this will get updated automatically as part of those interactions actually with the Microsoft store so great that's the tool but where does it actually go and get things from so we have sources where Windgate can go and look and say well is this application available is there an update available so we already talked about one of them so if I think about the sources available for Wingate so where can it go and search for information about applications so the Microsoft store is one of them but the other one that's built in so there are two sources that are just native is a win-get specific repository that's actually hosted up on GitHub so there's an actual repo where the Manifest files are stored that describe the applications so with the Microsoft store so these behave in slightly different ways with the Microsoft store when I have an application when it's all stored within the Microsoft store what I mean by that is if I think about an app well that app has information about metadata name a bit the version tags and it contains the actual package to perform the installation so it's all stored in there whereas with winget what we get stored here is the Manifest file either description but the actual package to install it that's somewhere else it could be in another GitHub repo it could be on a Content delivery Network native to the app it's just described and linked to from GitHub so there's a slight difference in how they interact but now both of these are available by default as sources for Wingate now you can add others so these are the built-in ones but I can absolutely go ahead and add custom maybe for example I have some site within my company where I have line of business applications and I want to make those available so I can go and add those as well now if we go and quickly look so let's go back to our terminal for a second so if we go and look in here if let's clear this out if I do when get Source list it's going to tell me what is it currently configured with and as I can see from here what I currently have is that Microsoft store and winget and for Wingate is saying hey it's a Content delivery Network Dot winget.microsoft.com and it's a cache now what's actually happening here is if I was to open up a browser window for a second so firstly winget has great documentation it goes through all of those different commands that I'm going to show many of as part of this and it talks about how you winget Source list Ms store winget but also the ability you can add a new source but for when get the actual GitHub repo is here so this is the repository it's using and if we look at what is it storing I can go and look at the Manifest files they're stored alphabetically so I could go and look at something like Discord so we do D and then we'll go and find a Discord which I could hopefully find there we go Discord because it's got different versions and if we look at a specific version then we see the main manifest file that is just describing it so that's the information and then what we'll also see is the installer information where it links to where is the actual package so in this case it's stored on this dl.discordapp.net which is probably some kind of content delivery that it uses content delivery Network but this gives us the information it gives us installer modes it gives us what is it supporting and the type of installer the Manifest version and there may even be language specific Locale descriptions that we can use so it's going it's going off to this get repo to go and check these now these manifest files are maintained oh it varies it's a git repo so what's happening is either the manufacturer of the application creates a new manifest file and there are tools available to do this and submits a pull request which tells the maintainers of this repo hey check it make sure it looks valid once you commit that pull request you accept it then it will just show up it could be individuals as well there might be good-hearted individuals out there that are just trying to make more apps available for the community they submit the pull request with the metadata in it gets validated and then it's available to us so these are the sources that when I go and hey look for an application is going to find those and again I can add my own custom ones if I want to now there are various features available in winget now there's very basic things like hey I can search I can list what I have I can install I can uninstall export import there may be experimental things now I think some of this varies depending on the version you're using once again if I was to jump over here for a second if I was to run winget features I think this is more of a preview I had different features that I can go and enable if I want to so if you go and look there might be other things that interest you I do have a configuration if I do wind get settings it will open up a Json file in whatever my editor is for example maybe it's vs code what it's done is it's open that over here and there are various things I can add in as part of hey what some special configuration I want done as part of this and again the documentation does a great job of going through what these various options actually are okay that's great so those are really the basics behind it but what can I do with it well the first thing I may actually want to do is what do I have currently installed one of the really nice things here if I do win get list it's going to go and search my machine but the key part here is it doesn't have to have been installed with winget if you look in all this list of applications if we look in this far right hand column we have source and sure some of them say winget some of them might say Ms store but a whole bunch don't but this is showing me everything that it can find out about that is installed on my machine so even though I've maybe never used winget obviously I have a few times here but even if I'd never used it I still will be able to see all these various applications now I might want to find out information about a particular app that I have on my machine and this is a key part when I'm doing winget list so this list command is focused on my machine this is not searching some repository out there when I'm doing winget list what I'm looking at here is what do I have installed on my box so if I think about over time I'm getting various applications installed on my machine and they have various metadata and versions Associated when I run the list command with winget it's looking at my local machine and what is installed that's the key part about what we're doing with list is not searching the repositories is saying what do I have locally on the machine and they can give me some nice information about them so again if we jump back over here there's a whole bunch of stuff here but I could look for a particular app so show me information about OBS Studio I know I use that a lot so it's showing me okay yep this is your OBS and hey look there's a newer version available right there I could also do dash dash name I could also use tags so hey show me applications maybe I have uh let's try chat I don't know if I have anything with chat pretty teams okay no Notepad so I've got Windows notepad so you can search for different categories of applications that I may have available on my machine so I can go and see what I have right now so it's not just hey if it was installed with Winger it's not just things in the repo I can go and use it to look at what we have now the next thing I'm liable to want to do is I want to install saying I want to find an application so what we can then use is the search command so the whole point of the search command is absolutely as the name suggests when I run search what I'm doing here is I'm looking against all of those sources that have been registered so hey I'm trying to find a certain application and maybe I'm searching by part of the app name maybe I'm searching using those tags because again we have all this nice metadata that includes tagging we saw that when I looked at that GitHub we could see in the Manifest there were tags associated with it so I can use winget search to try and find some application actually on my machine so if we go back over to here okay I want to find sync um so I'll do win get search and I can just type the name or I can do Q code doing exactly the same so there's lots of apps here that have something to do with coding and we can see the various sources so I can see some of them you can see it's searching the first batch can be found in the Microsoft store all the rest of them can be found in Wingate one of the things you will notice in the Microsoft store The version always shows as unknown this is a issue right now that the Microsoft store doesn't correctly tell you a version and so it used to just say latest well the problem is saying latest is winget would interpret that as always meaning there is a newer version because latest wouldn't match what was the actual version ID on the local machine so it would always tell you there's a new version so they just change it to unknown so that will probably change in the future once the Microsoft store sends out a valid version but you'll always see unknown if the source is the Microsoft store so it's finding me all these names that have um code in them likewise I can use that same tagging so maybe I want to search for applications that have been tagged as a chat app so now I can see okay if I look up here there's some in the Microsoft store okay Zoom WhatsApp WeChat team a whole bunch of different applications available here now I might want to get more information about one of these applications so then I can do show so I could say hey show me information about maybe it's the Microsoft power toys for example and so if I think about that manifest file that is both in the Microsoft store and is in the wind GitHub repository well now it's showing it to me notice it's showing me all of the information about things like well what are its tags so if I search for any of those as an item it's going to find it for this app it's going to show me the installer so in this case hey the installer is in its own repo power toys releases etc etc so I can go and get specific information I could search for information on an app from a specific source so I could say hey winget show OBS and I only want to show me the source where it's Wingate sure enough it works I could say show me what versions are available so I do dash dash versions at the end of it down here so I'm just adding is dash dash not one dash so you'll see it's dash dash if it's a word it's a single Dash if it's just the letter and I can see all these different versions so I could if I wanted go and install a specific version of the application so I can search and then I can go and get more information and I can do show to get more detail about maybe that particular act to work out or is that the one I really really want once I have that well now it's time I want to take one of these apps and get it on my machine this is very obvious it's going to be installed so I want to install an app from one of these things and I can be as vague or as specific as I want to be so if we go and look over here and let's clear this out again so now we want to actually do the installation well it would just be when you get install and the name so it could be obs I maybe want to install a particular version so I could do version I'm just making that up and again if I could just do Dash V so it's just a single letter so it's dash dash a word or single Dash if it's just the letter for what I want to install and it would then go and pull that down automatically for me now I could also tell it a particular Source I could say well I actually want to pull it from this particular Source maybe I want to get it from the Microsoft store maybe I want to go and get it from an actual wingets or maybe it's some custom one I could add that in as part of the install and there's IDs when I did that the show and the search there's an ID as well so I could use the the dash ID if I want to go and get a specific ID instead of based on the name so I have a lot of flexibility with that so it's super super easy so now I have all these apps and new versions come out and what's great here is well is there an upgrade available now I can I use the word um upgrade you can use the word update it does the same thing I want to get new versions so I can do upgrade now our upgrade will do is it will tell me hey for these apps that are on my machine there is a newer version available so just doing upgrade on its own will not do the upgrade so if I just run this command this will just tell me then what I have to do or I can do one of two things I can upgrade a particular app or I can say dash dash o if I do this it will actually perform the upgrade either the specific app I mentioned or all of the upgrades that are available to me so I I control that I have that choice and once again remember it doesn't matter if it was installed with winget if it knows about the app through that list if I do win get upgrade it will show me every upgrade that's available for anything installed on my machine it's a really really powerful thing so I don't have to have started using it but I can start using it now so my machine if I was to run winget upgrade it's just going to tell me again it's not doing anything it's saying hey these are available to you so I might say okay let's do win get upgrade and we'll upgrade uh the graphical editor so it's downloading it from the source so in this case it's available from download.gimp.org so again with winget it's just a metadata store in the get repo the actual binaries the ones and zeros that make up the package could be anywhere so it's pulling it down for me it's gonna it has a description in the Manifest of what to do in an upgrade scenario so it might just be doing an install whatever that may be it may require some interaction there might be different things I can configure on this but essentially at this point it's going to go away and I'm just doing it of a single application but obviously what would be very common so what's interesting over here just open it up it's fired off the little GUI to go and perform that actual install for me if I was while that's running if we was to go and actually look at the Manifest for just out of pure curiosity so if we go and look for I can find it again there we go we can see the different versions are available to me find the latest one and it will tell you about the installer and it's got here upgrade Behavior so his upgrade behavior is to do an install associations for it different installers for different architectures so we can see all of that great information about that meanwhile that sap is still running but you can see how simple it was I didn't have to go and launch and go and search for it or is there a check versions button or any of that it just goes and does it for me so this is just now going to sit and run in the background but again my other option here why I could do multiple apps or I could just do that dash dash all so if I do the dash dash all then well exactly as the name suggests it will just go and upgrade them all so maybe weekly I can just open this up and I'll do hey uh we can get upgrade and I'll have a quick look and then I'll just do a winget upgrade dash dash all and go and grab myself a bowl of cereal or something while it updates every app on my machine whether I installed it with winget or not to that nice new version so that's part of the capabilities for this and that's why I think it's so powerful I don't have to have started off using this at all and that's finished so now if I ran that winget upgrade again has gone because it's upgraded it there's nothing more for it to do there so that is a a really really cool capability and to be able to do that so I think this that that's huge so that ability to really simplify all of the updates and not have to go through those manual things and notice I didn't have to click anything in that install it was essentially unattended it just goes and fired it off and it will do them in series it won't run them all in parallel and maybe cause conflicts because a lot of times he doesn't like running multiple installers at the same time so it will just go through in series and update all of the apps that have an upgrade available now again if you weren't running as administrator maybe some of them you'd get a user access control prompt to elevate up your permissions it depends how it's installing is it a per user is it a permission so that that could have some variation on the particular installer and then of course a key bit of functionality is will I get fed up with an app after a while so if I get fed up with an application eventually I want to uninstall it so it does that as well so I can obviously uninstall and exactly as the name suggests hey winget uninstall dash dash the name the name of the app I can add a version I could do it by the ID so I can do Dash ID and then the guide of the application so I would just do a winget list and then from the list it would tell me and then I could do a winget and install so I can hey I don't want this thing anymore and again I don't want to have to open up an installer or anything else to remove it I'll just use my package manager that is Wind Gap and that's really that the whole point behind it now one other thing I really like about this Wind Gap is hey over time I've installed a whole bunch of different applications and periodically we've reinstall our machines maybe we get a nice new shiny machine or maybe every six months or a year we just like to reinstall and clean slate the thing so one of the things I can do with winget is an export so here if I do a winget export what it's going to do is generate out for me a Json file and that Json file except exactly as you expect is going to list out the details on all of the applications I have installed now as part of that export I could say don't tell me the version information just tell me the applications because obviously the other thing I'm going to do with this is import so when I have my shiny new machine I can point it to that Json file and now every app I have listed in there it can import them in now if I did have version information in there it doesn't matter there is an ignore versions parameter on the import so whether there's versions exported or not if I don't export the versions hey it's just going to install the newest ones when I do an import if I do have the versions well if I import it will install that version or if I do the ignore versions join the import and it won't it would just take the latest version that is available to me and I'll just get the nice shiniest code and that's it so that is the point of Windgate this is not super complicated it's not magic it's not some brand new concept that Microsoft have created the idea of a package manager has been around for a really long time that again have been package managers for Windows for a while but this is now just natively built in to Windows hey I log on it's going to go and put it down for the Microsoft store it's going to configure these two sources by default the Microsoft store and the winget repository I can go and add my own if I want to if I have some corporate liner business store where I want to be able to integrate with winget but it really makes it easy to manage all of the applications I can see what I have on my machine whether I installed it with winget or not I can go and find apps I can see detail about them I can install them I can easily upgrade a particular app or all applications I can uninstall and I can even say hey I've had this machine now for a year or maybe just periodically let's export all the apps so that ever if I reinstall I don't have to manually go and even type in the winget or try and remember what I had I'll just import this Json file and we'll go and put all the latest versions or particular versions if that's what I want so that was it as always I hope this video was useful until next one take care
Info
Channel: John Savill's Technical Training
Views: 19,443
Rating: undefined out of 5
Keywords: microsoft, windows, winget, package manager
Id: 15fg5-I3CI4
Channel Id: undefined
Length: 30min 14sec (1814 seconds)
Published: Mon May 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.