mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 05:51:30 -06:00
[Fix]: MicroWin finds but fails to use system oscdimg
This commit is contained in:
parent
3bb48564ef
commit
b740693948
@ -18,12 +18,10 @@ function Invoke-WPFGetIso {
|
||||
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
|
||||
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
||||
|
||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe)
|
||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
||||
|
||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||
$oscdImgFound = Test-Path $oscdimgPath -PathType Leaf
|
||||
|
||||
if (!$oscdImgFound)
|
||||
{
|
||||
$downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked
|
||||
@ -32,7 +30,7 @@ function Invoke-WPFGetIso {
|
||||
{
|
||||
# only show the message to people who did check the box to download from github, if you check the box
|
||||
# you consent to downloading it, no need to show extra dialogs
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco or github. This might take a long time.")
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
||||
# the step below needs choco to download oscdimg
|
||||
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
||||
Write-Host "choco on system: $chocoFound"
|
||||
@ -47,6 +45,7 @@ function Invoke-WPFGetIso {
|
||||
return
|
||||
}
|
||||
else {
|
||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it from github. This might take a long time.")
|
||||
Get-Oscdimg -oscdimgPath $oscdimgPath
|
||||
$oscdImgFound = Test-Path $oscdimgPath -PathType Leaf
|
||||
if (!$oscdImgFound) {
|
||||
|
Loading…
Reference in New Issue
Block a user