winutil icon indicating copy to clipboard operation
winutil copied to clipboard

winutil can't detect oscdimg present on the system

Open ghost opened this issue 2 years ago • 4 comments

Describe the bug a paradox

To Reproduce Steps to reproduce the behavior:

  1. Download oscdimg from official microsoft source: https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install
  2. Go to MicroWin
  3. Click on Select Windows ISO
  4. See error

Expected behavior

if (!$oscdImgFound) 
    {
        $downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked

        if (!$downloadFromGitHub) 
        {
            # 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.")
            # the step below needs choco to download oscdimg
            $chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
            Write-Host "choco on system: $chocoFound"
            if (!$chocoFound) 
            {
                [System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe")
                return
            }

            Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install windows-adk-oscdimg"
            [System.Windows.MessageBox]::Show("oscdimg is installed, now close, reopen PowerShell terminal and re-launch winutil.ps1")
            return
        }

to not be triggered

Screenshots

why

Additional context I'm on windows 10 x64, wanted to update to a debloated windows 11, saw this utility and desided to give it a try, my guess is that this error caused by having 2 drives???

ghost avatar Dec 31 '23 12:12 ghost

Out of curiosity, can you move oscdimg.exe into TEMP and try once more?

munkk01 avatar Dec 31 '23 13:12 munkk01

it worket after multiple fails, thanks

ghost avatar Dec 31 '23 13:12 ghost

it worket after multiple fails, thanks

Could you shed light? I can't get it to work.....

Galamooth avatar Dec 31 '23 18:12 Galamooth

Closed due to inactivity

github-actions[bot] avatar Feb 20 '24 03:02 github-actions[bot]