AndrewRathbun / KAPE-EZToolsAncillaryUpdater

A script that updates KAPE (using Get-KAPEUpdate.ps1) as well as EZ Tools (within .\KAPE\Modules\bin) and the ancillary files that enhance the output of those tools
MIT License
53 stars 5 forks source link

Check either version or hash of any script/resource we are using #18

Open Donovoi opened 1 year ago

Donovoi commented 1 year ago

Hi Andrew,

The only possible issue I noticed was that we are running other scripts/resources with out checking if they have been updated or fixed in any way.

I'm suggesting we either hash the file and compare the existing hash with the one on the website (if it exists, if not just download and hash it), or check the version if any versioning has been done.

This could include anything that we use (exe, ps1, anything else..).

AND I'm suggesting this includes things like the dotnet version.. This is really easy to do via winget which is supported on Windows 10 1709 (build 16299) or later, and shouldn't need to be installed but can be with Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

If we have the update flag on KAPE-EZToolsAncillaryUpdater.ps1 we can just force an install/update of dotnet via winget install Microsoft.DotNet.SDK.6 --force OR winget install Microsoft.DotNet.DesktopRuntime.6 --force if you want just the desktop runtime.

Let me know what you think :)

AndrewRathbun commented 1 year ago

Great idea! I actually just got familiar with WinGet myself in the past few months so I'm all for leveraging that re: the dotnet stuff.

I like the idea of hashing things and only updating if the hashes don't match. I can work on logic for that. I think we should finalize this current version then add the dotnet/winget/hashing stuff for 3.8. Thoughts on that?

Version 3.7 would solve the current outstanding issue of just making the script work with the new Get-ZimmermanTools.ps1 script, then we can build on that for 3.8, IMHO.

Actually, I think this was enough of a refactor that we can up the version to 4.0 and build from there.

AndrewRathbun commented 1 year ago

TODO for v4.1:

Donovoi commented 1 year ago

Sounds perfect Andrew. Let's release for now. 👌 awesome work

mark-hallman commented 1 year ago

I love the winget suggestion, I have been using it for months now, and it has been a real time saver, especially with the silent installs I need to go. I still have to return to Chocolately occasionally, but the gap is closing quickly. My experience is that winget is not installed by default until the most recent version of Win10. As @Donovoi has shown above, you can get the .msixbundle from the winget GH and install it that way. The approach might be best to ensure that the most recent version of winget is on the system.