Package Zoom (specific version) with winget as an Win32 App in Intune (1/2)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign friends in today's video we're gonna install a zoom a video conferencing tool and we're gonna do that with a super cool tool called winget and you're gonna love it it exists already for example in if you couldn't know Linux it exists in Ubuntu they have apt in the Fedora they have Jam in Mac OS for example they have Homebrew and in Windows it exists a few others but winget is built in on later version of Windows I'm running Windows 11 there it's definitely on later version of Windows 10 there is also this winget so it's a command line tool where you can install software so we don't have to download the MSI file and package it we can just run a sort of a one-liner so let's speak a bit about win get first and then we're gonna create one of these script and package it with the win32 at and deploy to company portal it's probably going to be two videos and the same software Zoom one we're gonna set the specific specific version and on the other one we're just going to get the latest all the time so let's start what is winget so I'm gonna start just the normal CMD I'm gonna run it as administrator and since I'm running Windows 11 I already have this so let me just bump up the size font size let's do 24. and let's type winget and then it's going to show us some commands here so install it's going to install something sure it's just gonna show information about the package search you can search on the package but I'm going to show how we can do that through the Bible so list to see what's already installed on our device and then we can uninstall those are the most common one here so let's um run some of this commands I'm going to do it on the virtual machine so the same here let's do CMD here run as admin and if we run winget if we run for example list we can see what's already installed on my device and also which one can be managed by winget so if we scroll up here a bit we have seven zip that can be installed by winget Edge and further down we have office teams VLC and actually Adobe Acrobat can be installed we wouldn't get but apparently not the version I have here so let's see what can we do then so we get if we just want to search for software we could search and then put VLC for example winget search VLC and then it's gonna find uh five five different here who seems to be related to VLC if you wanted to have a more if we know that we wanted the for example this one from video land we could have put the search and do Dash e that means exact so it has to be exactly that and the ID and then the ID here is called video Lan dot VLC now we should get only one entry here and it's this one so it's pretty nice to be able to do that on the command line but if you want to do it the browser way let me show one page see if I open a browser here on my other machine then there is this site winget.run and I'm gonna put that link in the description here you can search on software so if we for example search on zooms and stats what we're gonna search uh gonna install then you see it give us six different so Zoom Outlook plugin that's pretty good to have if you're running Zoom but I strongly recommend to install that through Office 365 add-ins instead of package it but if you don't have that you can definitely package that we're going to focus on Zoom the actual software that start the video conference and everything so I click on this one and then we actually get a command to install so if we run this command it's going to install so it's winget install again e is for the exact version of the ID and zoom zoom get this one and it's going to show some previous version here also the latest one at today's recording is 5.12 so we can take this one here and if we click 511 the latest and let's say that's the version we actually want to install then we can copy this one and let me just open a notepad paste in the command it's going to be similar to the other command it's just adding a that's not what I wanted uh well we can keep notepad open let's remove this one it should add a dash V for version Let me it says copied let's see if it get it now for some reason it maybe think it's the latest that's why it doesn't give me the V it's not the latest let me copy this one and paste yes here we get the version that's what I wanted so we're still gonna package that one so we will have 84 V 8425 so if I copy this line here Ctrl C and go back to my CMD and paste here then it's gonna download and install Zoom with this version and that's actually what our package gonna do so we can test that on our virtual machine that doesn't have a zoom yet and I'll do a CLS yes to clear here so type the text from the clipboard here since it's a virtual machine so if you run winget install the exact ID of zoom zoom and we want this version if we hit enter it's going to start to install um there could we're going to add some more switches but let's keep it simple for now and it's not silent if we added Dash silent data Dash silent I believe it is we would not see the installation so now it's downloading and you see it is 5.11 it actually available twice there but 8 4 25. it's gonna download and install so you see it's pretty sweet this wouldn't get oh see if it finished and this part here it's not totally silent but if we added the dash dash silent it would be okay so done so now I should have zoom on my system and I do here is zoom installed and we can also uninstall it so let's um do that as well so we can run the same command we don't have to specify the version though when we uninstall and instead of install we do uninstall so here we already got our install and uninstall command well we will add the dash dash silent so if we just look at winget install we have to see some more switches so here's the one I mentioned the silent we will want to add that it's always good to add these also accept package agreements because we want it totally silent we can also add this in worst case they do nothing if the package doesn't require it but that's a good way to keep it silent I mean you could add architecture which is x64 if you want but I haven't needed to do that I always get x64 but if you want 32-bit then specify this or if for some reason you get 32-bit and you want 64-bit but usually I haven't needed that you see I specify by ID I prefer that but you can also do it by name I have actually no idea what the moniker means but you can filter by that too I would just so what we would think now you probably think great we just add this to Powershell script and package as a win32 app and deploy it and we're good I would agree that sounds like a good idea the problem is that winget isn't found by the system account so if I do a who am I is I'm using my account here as your ad John brins this account nowhere winget is but the system account doesn't I'm gonna I'm gonna show that by going to a temp folder where I have downloaded CD temp where I have downloaded a psxa so if I run PSX that's a tool from system internal I do interactive Dash system and start a new CMD but now I'm gonna start this one as a system so if I know the uh who am I I'm running as in the authority system that's what the um InTune ROM packages well you can check user then that doesn't happen but we want to run a system then we know we have admin permission and this one if I type winget here it will actually not know where that is so we will have to do some code just to help system to find and I have pre-coded that code so we can go let's start to look at that because we want to package this part now we we're going to look a bit more at winget but now we have seen how to search how to install how to uninstall those three are the most important okay so now we want to package this so I'm going to start Powershell I see as administrator excellent and we know we want Wingate then it was installed let me do this a bit bigger I'll assuming twice or three times a bit bigger win stock win get installed Dash e for the exact ID and Double Dash for ID and it was Zoom dot Zoom then we wanted the version Dash V or we could do dash dash version and we wanted this version here I'll copy that that's only when you want this specific version if not you just remove and you get the latest the problem there is that it's more difficult to know for your detection method but we'll come into that and we're going to fix that with the script we want this totally silent and then we wanted the two extra switches so let me go here get installed we want to accept dash dash accept package agreement just so it doesn't get stuck on that since it's totally silent I'm gonna paste that here and all this that you see here I'm gonna Post in the description of the video and we want this accept Source agreement also I hope I got that copied yes okay perfect so this looks to be a winner again if we just run this now this will work on this machine but when we run it a system it won't find Wingate so that's what we're gonna do now how can we find the path to the winget so I already have a script for that let's open a tab I'm on the latest Windows 11 we have that and then go to my directory where I have all my packages I have them underscore GBM engine packages so here I have a script that finds the winget exe let's uh let's open that in notepad plus plus for example just to take this code so I'm going to take this code and I'm going to explain it we can test run it a bit I'm not going to explain it so much in detail but you're going to be able to copy that from the description of this video I'm going to explain it a bit here so this variable here gbn win get resolved it's going to try to find where is the wind get with this asterisks so if we run only this one I'll show you the output actually I'm just gonna run the output of this one since the variable gonna hide it if not so I click on this one here it's just going to run the selection I could run f8 also you see it's give the path to the wind get but this variable now hold path and this Dash Dash and everything and we want only the last line so on line two we actually take the whole output of this one but -1 it means start from the end and take only the first line so that means we copy we get this value that's perfect so now we have this value but we actually just want we don't want win get so we have to get rid of Wingate so what do we do then well we run this command who split and take the parent that means it's gonna take the parent of this one which will be this and after that in this line we set the location to this place here and when we're in this location we can say dot backslash and say run winget let's put wingate.exe it's not needed because when we have set location we are here and then we can run this command so I'm gonna run only this part and you're gonna see that it's gonna do set location here perfect and from here if we do LS we have a lot of files but one of these should be a winget uh I was probably yeah the bottom one of course sorting on W so perfect this script should work even if running as system so unfortunately we have to add all these when we run as system in InTune I like to add some comments and let's add a comment here um search that comment up let's add a comment here and just say find path to win winget Dot dxc and then down here on winget.exe and up here uh install zoom and we can put the version I have that in Windows V I hope oh I have copied a lot here we got the version um using winget and author I put myself and date today is 20 December 2022 I like this so let's save this one and I need a new folder here so I have a full course a lot of videos how to do this so I'm going to do it pretty quick if you want to follow subscribe to my channel and I explain a lot more in detail how to create all these folders so let's create one and we call it the zoom client I'm gonna paste the version number again and x64 in here you follow my videos you know I create always two folders one called output and one called source and we are currently creating the source right now source so if we go into Source here we can save our Powershell script oh I was a bit faster so the name is not all what I wanted we can go back there some client source and let's F2 to rename it I want it to be called install Dash Zoom client let's paste the version number again X 64. um I'll close this one let's edit this one we don't have to edit this one this one is fine the only reason why I want to edit it is because I want to create an uninstall also so this one is good but we can do an uninstaller very easy also uninstall actually I'll save this one first because I seem to have slippery fingers right now so I don't overwrite our install uninstall and it's not going to be any version it's going to work for all of so I removed the version uninstall good so here's our uninstall so our uninstall is going to be pretty much the same just that instead of install it's uninstalled and we don't need to specify any version I don't think we need to accept no let's remove those I'm afraid they might not even have those switches and then fail so uninstall Zoom Asylum so that's going to be good um run winget lots of a good explanation and should to uninstall that one should be installed probably okay so this is good now we have the uninstall and install script so I think we are good with Powershell ISE so for the package so the source is good now we need to create an InTune win file and for that we need another utility and I'm gonna give that path um in the description of this video it's on GitHub so it's this tool here hasn't been updated since 10th of May I'm gonna download this one see I've already downloaded it before and I'm gonna cut this one out so let's be sure cut this one open a new one and I want to go to our package it's under C gpn engine packages some client and paste it here we have everything except for the logo the logo is for or image is for company portal so let's put the zoom icon pnd transparent perfect and take the first one seems to be transparent perfect we can do save image as and it remember an old package so let's go to zoom client and let's call this one boom perfect now we have everything that we need Yep this looks good so now we will run InTune Win app utility it's going to go so fast I'm gonna run it from CMD you don't have to you can double click on it also uh so I have to go underscore dbn oops that's not unscore that's unscore TBN um is it in Tune packages yes is it Zoom yes if we do I clear the screen it start to be messy here if I do a deer here we have in tune uh app utility let's run that so it wants four parameter the first one is the source folder so I have that here I'm gonna right click and take copy as path on the Windows 10 you might need shift right click so we paste that here next it needs the setup file it actually just need the file name but I'll go here and yeah let's take the install one right click copy as path and then the output it's where it's going to copy the InTune win file and hopefully ours is empty it is I'm just gonna take this output here and the last question always know unless you're running Windows s version which I never seen anyone done done it seems to have been a success let's see if we see the file here yes this is the file we're gonna upload hey we got our InTune win file let's go to the console and here we go under apps you don't have you can go directly tabs I like to go to Windows then you get less options here are previous packages we have done in previous videos let's click add and we're gonna take the one at the very bottom which is Win app 32 just select then we're going to select our package file which is going to be extremely little in size small in size uh just for verify that's the good path that's the good file perfect you see it's not even one kilobyte Let's uh shape this up a bit Zoom client x64 description is going to be visible in company portal some client for uh video conference meetings we could uh double Asterix this one is that bold yes it is hit okay publisher Zoom app version I'm gonna copy this one and remove the spaces so that I got removed space category I guess it's collaboration social it's a good one for this and notes I'll put myself and the 20 December 2022 we can get installed oh I can lowercase and our image the one we just downloaded not long time ago here yep that one looks nice go next so install command it's gonna be Powershell dot dxc let's add the execution policy bypass then it's going to be Dash file and which file are we going to run let's go to our source folder and take this name I don't have to control a control C and paste and I do Ctrl a control C and paste here because it's going to be similar just going to see no typo execution policy bypass file looks good and the uninstall of course I need to take down install name F2 Ctrl a Ctrl C and we change this one perfect we definitely wanted to run a system and there comes the problem which because system don't find the Wingate but we fix that in our script restart no specific action we don't want any restart go next here we have operating 64-bit here let's go um nice 20 H2 that's still pretty old this those are the only two required I usually specify how many megabytes it takes but I skipped that for this one you can add it later detection rule is going to be an interesting one let's do a manual configuration we don't have well we have an MSI code but anyway that's not my preferred method it's to do file so the path it's gonna be I'm gonna steal that from my own system so I open a new tab and it's gonna be C colon backslash program files backslash Zoom is it backslash bin and backslash Zoom yep let's check what version is zoom.exe so copy that one so I paste that as path but as you know zoom.xa is not part of the path I do Ctrl X and paste that here so before it install we check if this one is here and have the good version then we don't need to install if it's not the good version we want to run it and after we want to see that it's the good version so I do string version here operator greater than or equal you can take only equal but if someone update to a later version I don't want I want this one still to be a success so the value here do I have that if I do windows yes we want this one and I have a space in the beginning that's why it doesn't like it so it has to be the one we deploy or greater for it to be success it's not under program files x86 I will not click yes here so I click OK the detection rule that's the most common part where you mess up and but this one is good next we have no dependency no supersedance let's assign this available to all user go next and create this is going to go fast to create even on my slow connection because you saw it was less than a kilobyte so it should upload fairly quick it's finished so if we go back to all our apps we now have let's open company portal usually go pretty quick it's probably already there it is there let's install it as you remember it's just gonna download two very small files Powershell and it's gonna run one of them and that one's gonna run winget and download it from repository the latest not the latest 5.11 here in the next video we're gonna install the latest it's going to be similar to what we have done now the the whole thing is going to be the detection method is going to be a bit more difficult foreign but you see it sort of still said it failed surprised me let's see my detection method if I did something wrong uh Zoom been Zoom what is exactly the version here properties um oh it seems file version is 5.11.118442 I think I did not put that okay so that's my bad um I need to add an extra okay let's so we have to check the detection method action rule here oh yeah that's my bad so I need another 11. if we hit okay here review save so the installation work it's me you messed up with the detection rule which have now been fixed so it's possible that it's just a sink away from actually say that it's installed now I don't find the machine so if I go here so it still say oh it needs to install a version uh let me do a sync and see if that fixes it it's giving this error well I can fix that by just clicking on sign in again but let's see if we can just do a sink and have that fixed so this file okay interesting that's not what the web page said or did it nope this said this is the version but the file version is a bit different okay fine okay sync is done let's see if this thinks this one is installed now yes now it understands so we don't have twins it actually worked first time it was me who did a mistake in the detection method so we are good here hey I think we stopped here for this video in the next video we will package exactly the same thing but always with the latest version and it's going to be a bit different especially around the detection method so thank you very much see you in the next video
Info
Channel: Intune & Vita Doctrina
Views: 5,436
Rating: undefined out of 5
Keywords: Intune, winget, Zoom, Powershell
Id: 0Ov4AcRM4jI
Channel Id: undefined
Length: 31min 27sec (1887 seconds)
Published: Sun Jan 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.