update office logic
This commit is contained in:
22
kms.ps1
22
kms.ps1
@@ -97,16 +97,20 @@ c:\Windows\System32\cscript.exe /nologo c:\Windows\System32\slmgr.vbs /ato
|
||||
# lets check for an office install
|
||||
|
||||
if (test-path "C:\Program Files\Microsoft Office\Office16\ospp.vbs") {
|
||||
# Office 2019
|
||||
c:\Windows\System32\cscript.exe /nologo "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
|
||||
#c:\Windows\System32\cscript.exe /nologo "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
|
||||
$officePath = "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) {
|
||||
# Office 2021 LTSC
|
||||
c:\Windows\System32\cscript.exe /nologo "$officePath" /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
|
||||
# Set KMS Host
|
||||
c:\Windows\System32\cscript.exe /nologo "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /sethst:gauntkms.home.johnhgaunt.com
|
||||
#c:\Windows\System32\cscript.exe /nologo "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /sethst:gauntkms.home.johnhgaunt.com
|
||||
c:\Windows\System32\cscript.exe /nologo "$officePath" /sethst:gauntkms.home.johnhgaunt.com
|
||||
# Activate it
|
||||
c:\Windows\System32\cscript.exe /nologo "C:\Program Files\Microsoft Office\Office16\ospp.vbs" /act
|
||||
#c:\Windows\System32\cscript.exe /nologo "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /act
|
||||
c:\Windows\System32\cscript.exe /nologo "$officePath" /act
|
||||
}
|
||||
|
||||
#office 2013: YC7DK-G2NP3-2QQC3-J6H88-GVGXT
|
||||
# Office 2021: FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
|
||||
# Office 2013: YC7DK-G2NP3-2QQC3-J6H88-GVGXT
|
||||
# Office 2016:
|
||||
# Office 2019: NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
|
||||
# Office 2021 LTSC: FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
|
||||
Reference in New Issue
Block a user