OSDeploy / OSD

OSD Shared Functions
MIT License
144 stars 59 forks source link

Minor bug fixing #46

Open andre-sicking opened 1 year ago

andre-sicking commented 1 year ago

When 'curl.exe' is not available, $WebClient cannot be assigned a new object [System.Net.WebClient] as it is already defined as [System.Management.Automation.SwitchParameter] in the param section. So for downloading updates successfully without 'curl.exe' I just renamed the variable to make sure the object can be created.

The If-Statement in Update-MyWindowsImage delivers the wrong registry field when reporting the found version.

Simsi1986 commented 1 year ago

Please be aware, that some values for GetRegCurrentVersion should be used with caution for Windows 11.

Just check Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion on a Windows 11 client. I recommend CurrentBuild(Number) and UBR to recognize the correct OS.