This commit is contained in:
2024-12-09 11:28:31 -05:00
3 changed files with 5 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ else
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
fi
if [ "${VM}" == "vmware" ]; then
if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then
VM="true"
else
VM="false"

View File

@@ -56,10 +56,10 @@ $osType = Get-WmiObject -Class Win32_OperatingSystem
$osInfo = Get-ComputerInfo
if ($osType.ProductType -eq 1) {
if ($osInfo.WindowsProductName -match "Windows 10 Enterprise LTSC 20[19|21|24]") {
if ($osInfo.WindowsProductName -match "Windows 10 Enterprise LTSC 20(19|21|24)") {
# Windows 10/11 2019/2021/2024 LTSC
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D
}elseif ($osInfo.WindowsProductName -match "Windows 10 IoT Enterprise LTSB 20[19|21|24]") {
}elseif ($osInfo.WindowsProductName -match "Windows 10 IoT Enterprise LTSC 20(19|21|24)") {
# Windows 10/11 IoT 2019/2021/2024 LTSC
c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ipk KBN8V-HFGQ4-MGXVD-347P6-PDQGT
} elseif ($osInfo.WindowsProductName -eq "Windows 10 Enterprise LTSB 2016") {
@@ -102,7 +102,7 @@ if (test-path "C:\Program Files\Microsoft Office\Office16\ospp.vbs") {
} elseif (test-path "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs") {
$officePath = "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs"
}
if ($officePath -ne $null) {
if ($null -ne $officePath) {
# Office 2024 LTSC
c:\Windows\System32\cscript.exe /nologo "$officePath" /inpkey:XJ2XN-FW8RK-P4HMP-DKDBV-GCVGB
# Project Pro 2024 LTSC

View File

@@ -23,7 +23,7 @@ else
OS_VERSION=$(hostnamectl | awk '/Operating System/ {print $5}')
fi
if [ "${VM}" == "vmware" ]; then
if [ "${VM}" == "vmware" ] || [ "${VM}" == "kvm" ] ; then
VM="true"
else
VM="false"