winutil/functions/private/Get-Oscdimg.ps1

28 lines
949 B
PowerShell
Raw Normal View History

Test 2023 12 19 (#1294) * Compile Winutil * Issue #1283, #1280 fixes, more (#1288) * Explorer Fix * Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme * White theme * Fix for clashing microwin directories if process fails, now new directory will be generated * * Tested latest Windows 10 (22H2) images work fine * Made dialog box more clear for issue #1283 * Added better logic for handling takeown /D flag for different locals issue #1280 * Refreshed the UI to more modern look * Improved white theme * Regrouped Tweak tab to make more sense * Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both * All instant action buttons were moved to Customize preferences column * Explorer lockup Fix * Wifi, Explorer Crash, WinUtil Icon fixes. * Fix for clashing microwin directories if process fails, now new directory will be generated * Merge all * Theme improvement, adding icon to the shortcut * Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens) * Fixing release branch to WinUtil * Adding double click to fullscreen * Update Get-Oscdimg.ps1 --------- Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update winutil.ps1 * remove merc and thorium * Ashlyn Programs * Also inject drivers into boot.wim * copy #1291 new branch --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com> Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
function Get-Oscdimg {
<#
.DESCRIPTION
This function will get oscdimg file for from github Release foldersand put it into env:temp
.EXAMPLE
Get-Oscdimg
#>
param( [Parameter(Mandatory=$true)]
$oscdimgPath = "$env:TEMP\oscdimg.exe"
)
2023-12-19 14:21:23 -06:00
$downloadUrl = "https://github.com/ChrisTitusTech/winutil/raw/main/releases/oscdimg.exe"
Test 2023 12 19 (#1294) * Compile Winutil * Issue #1283, #1280 fixes, more (#1288) * Explorer Fix * Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme * White theme * Fix for clashing microwin directories if process fails, now new directory will be generated * * Tested latest Windows 10 (22H2) images work fine * Made dialog box more clear for issue #1283 * Added better logic for handling takeown /D flag for different locals issue #1280 * Refreshed the UI to more modern look * Improved white theme * Regrouped Tweak tab to make more sense * Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both * All instant action buttons were moved to Customize preferences column * Explorer lockup Fix * Wifi, Explorer Crash, WinUtil Icon fixes. * Fix for clashing microwin directories if process fails, now new directory will be generated * Merge all * Theme improvement, adding icon to the shortcut * Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens) * Fixing release branch to WinUtil * Adding double click to fullscreen * Update Get-Oscdimg.ps1 --------- Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update winutil.ps1 * remove merc and thorium * Ashlyn Programs * Also inject drivers into boot.wim * copy #1291 new branch --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com> Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
Invoke-RestMethod -Uri $downloadUrl -OutFile $oscdimgPath
$hashResult = Get-FileHash -Path $oscdimgPath -Algorithm SHA256
$sha256Hash = $hashResult.Hash
Write-Host "[INFO] oscdimg.exe SHA-256 Hash: $sha256Hash"
Test 2023 12 20 (#1337) * Update winutil.ps1 * [Fix]: MicroWin finds but fails to use system oscdimg (#1298) * Update winutil.ps1 (#1295) * [Fix]: MicroWin finds but fails to use system oscdimg * Compiled change b740693 --------- Co-authored-by: Chris Titus <contact@christitus.com> * Fix wrong hash verification for oscdimg (#1301) * Update winutil.ps1 (#1295) * Fixed wrong hash verification for oscdimg --------- Co-authored-by: Chris Titus <contact@christitus.com> * Fix Winget package for Chromium and add Ungoogled-Chromium (#1306) * Fix Chocolatey package for Chromium, add Ungoogled-Chromium The Chocolatey package for Chromium was previously the one for Ungoogled-Chromium instead, I fixed it and added Ungoogled-Chromium as a separate package instead. * Add ungoogled-chromium to inputXML * Making Install section fully data driven (#1326) Co-authored-by: KonTy <KonTy@github.com> * Update README for India blocking (#1336) * Fixed a couple of MicroWin issues (#1313) * Update winutil.ps1 (#1295) * Update MicroWin-Helper.ps1 Fix AppX package issue * Update winutil.ps1 Fixed AppX package removal issue * Added error detection to AppX removal Adds error detection to the AppX package removal function in case the process of getting applications fails This change might fix issue #1324 * Force DISM commands to be in English Fixes an issue where MicroWin processing would fail on hosts with languages other than English. This is because, by default, DISM uses the system language. By passing the /English flag, we're forcing DISM to be in English --------- Co-authored-by: Chris Titus <contact@christitus.com> * fix app display to be alphabetical --------- Co-authored-by: kian yamamoto <kianjyamamoto@gmail.com> Co-authored-by: Júlio C. Oliveira <braxkan@gmail.com> Co-authored-by: AlbydS <119180144+AlbydST@users.noreply.github.com> Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com> Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
2024-01-02 15:45:06 -06:00
$expectedHash = "AB9E161049D293B544961BFDF2D61244ADE79376D6423DF4F60BF9B147D3C78D" # Replace with the actual expected hash
Test 2023 12 19 (#1294) * Compile Winutil * Issue #1283, #1280 fixes, more (#1288) * Explorer Fix * Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme * White theme * Fix for clashing microwin directories if process fails, now new directory will be generated * * Tested latest Windows 10 (22H2) images work fine * Made dialog box more clear for issue #1283 * Added better logic for handling takeown /D flag for different locals issue #1280 * Refreshed the UI to more modern look * Improved white theme * Regrouped Tweak tab to make more sense * Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both * All instant action buttons were moved to Customize preferences column * Explorer lockup Fix * Wifi, Explorer Crash, WinUtil Icon fixes. * Fix for clashing microwin directories if process fails, now new directory will be generated * Merge all * Theme improvement, adding icon to the shortcut * Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens) * Fixing release branch to WinUtil * Adding double click to fullscreen * Update Get-Oscdimg.ps1 --------- Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Update winutil.ps1 * remove merc and thorium * Ashlyn Programs * Also inject drivers into boot.wim * copy #1291 new branch --------- Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com> Co-authored-by: KonTy <KonTy@github.com> Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
if ($sha256Hash -eq $expectedHash) {
Write-Host "Hashes match. File is verified."
} else {
Write-Host "Hashes do not match. File may be corrupted or tampered with."
}
}