Win 10 upgrade script removing license check

This commit is contained in:
silversword411
2021-07-29 00:50:17 -04:00
parent 9bb7016fa7
commit 92fc042103

View File

@@ -1,11 +1,3 @@
<#
Note on line 97 this:
if ((cscript "$($env:windir)\system32\\slmgr.vbs" /dli) -match "Licensed") { $returnVal = $true }
will fail for non-english installs of windows.
Removing the: -match "Licensed"
will allow it to run. So the line should read for non-english:
if ((cscript "$($env:windir)\system32\\slmgr.vbs" /dli)) { $returnVal = $true }
#>
Function Write-LogMessage {
param(
@@ -91,12 +83,7 @@ Function Test-FreeSpace {
}
return $true
}
Function Test-License {
#Not a big fan of Doing it this way, but it's a lot easier/faster than the alternatives
$returnVal = $false
if ((cscript "$($env:windir)\system32\\slmgr.vbs" /dli) -match "Licensed") { $returnVal = $true }
return $returnVal
}
Function New-Windows10Install {
$ErrorActionPreference = "SilentlyContinue"
$dir = "$($env:SystemDrive)\_Windows_FU\packages"