Romanitho / WAU-MSI

MIT License
2 stars 1 forks source link

[Feature Request]: WinGet check #25

Closed KnifMelti closed 1 month ago

KnifMelti commented 2 months ago

The request

Check if WinGet is installed/current at MSI installation time

Is your feature request related to a problem?

No response

Additional information

No response

Romanitho commented 2 months ago

Yes. As well as dependencies

KnifMelti commented 1 month ago

@Romanitho You can't run another MSI installation like that from WAU.msi (VC Redist fails with 1618) because Another installation is already in progress. Maybe better to keep Install-Prerequisites.ps1 and Update-WinGet.ps1 as functions and check/install when WAU runs (the WAU.msi can save something that triggers if somtehing should be installed when WAU is run)?

EDIT: Personally I always run Update-WinGet via _WAU-mods

Romanitho commented 1 month ago

Yes, I've seen the bug with VC Redist. Not had time to roll back yet.

KnifMelti commented 1 month ago

It's not a bug, it's a MSI feature 👻

Romanitho commented 1 month ago

yes i know 😅🤣 but it's a bug in the way I changed it 😇🫣

Romanitho commented 1 month ago

EDIT: Personally I always run Update-WinGet via _WAU-mods

Is there a reason? Shouldn't it be updated from the store ?

KnifMelti commented 1 month ago

The Store is very slow to upgrade on clients, it can take days. I prefer the snappy way (coming from SCCM)😁

Romanitho commented 1 month ago

oh okay haha ;)

KnifMelti commented 1 month ago

But, of course you're right. We should trust the cloud!

KnifMelti commented 1 month ago

But, if we set our trust on Store then we don't have to check anything regarding winget on clients. Then we have to live with that fresh installed windows doesn't have it until Store has worked its magic.

Romanitho commented 1 month ago

I would let WAU install Winget only if not present (or not up to date when WAU is installed). I might just move VC redist on first run ?

KnifMelti commented 1 month ago

But, if VC redist isn't installed beforehand then the Microsoft.VCLibs.140.00.UWPDesktop/Microsoft.UI.Xaml.2.8/WinGet MSIXBundle for App Installer can't be installed anyway (in my world)... ...why then bother with VC redist when most companies deployment of a fresh Windows has it preinstalled and any old installed Windows has it installed by requirement of other installations. Better to at WAU installation time just check Microsoft.VCLibs.140.00.UWPDesktop/Microsoft.UI.Xaml.2.8/WinGet MSIXBundle for App Installer and install them if missing/not up to date. Probably the only situation where WAU will not be installed is then WSB (until you install VC redist)

Romanitho commented 1 month ago

look at the last version :)

KnifMelti commented 1 month ago

Nice! ❤️ Ah, you opted for the always-check-prereq-when-running-WAU (then I can remove my own check in _WAU-mods👌)! The check only takes 1 sec if everything is up to date, so that's completely fine!

A minor problem (guess it has to do with the ServiceUI.exe?) is the time it takes under WSB to download (no problem with my internet, tested several times) - have now tested also under a freshly installed virtual Win 11 and there the downloads take 2,5 min. In WSB it takes 11,5 min (but WSB is a minor thing):

16:00:36 - Checking prerequisites...
16:00:36 - MS Visual C++ 2015-2022 is not installed
16:00:36 - -> Downloading https://aka.ms/vs/17/release/VC_redist.x64.exe...
16:01:43 - -> Installing VC_redist.x64.exe...
16:01:51 - -> MS Visual C++ 2015-2022 installed successfully.
16:01:51 - Microsoft.VCLibs.140.00.UWPDesktop is not installed
16:01:51 - -> Downloading Microsoft.VCLibs.140.00.UWPDesktop...
16:02:07 - -> Installing Microsoft.VCLibs.140.00.UWPDesktop...
16:02:09 - -> Microsoft.VCLibs.140.00.UWPDesktop installed successfully.
16:02:09 - Microsoft.UI.Xaml.2.8 is not installed
16:02:09 - -> Downloading Microsoft.UI.Xaml.2.8...
16:02:21 - -> Installing Microsoft.UI.Xaml.2.8...
16:02:22 - -> Microsoft.UI.Xaml.2.8 installed successfully.
16:02:22 - WinGet is not installed
16:02:22 - -> Downloading WinGet MSIXBundle for App Installer...
16:11:57 - -> Installing WinGet MSIXBundle for App Installer...
16:12:02 - -> WinGet MSIXBundle (v1.8.1911) for App Installer installed successfully!
16:12:02 - -> WinGet sources reset.
KnifMelti commented 1 month ago

The long download time in my WSB isn't changed even if I move Install-Prerequisites to the top. Nothing to do about!

Romanitho commented 1 month ago

Wierd. It's pretty fast with the latest build. And yes, I opted for a winget update like you. After all, it is the goal of WAU to maintain things up to date 😅