OSD
OSD copied to clipboard
Minor bug fixing
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.
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.