kms-website: self-host the ODT bootstrapper (fix 404 on Office reinstall)
Microsoft's download.microsoft.com ODT URL is build-numbered and rotates every release; the hardcoded officedeploymenttool_19127-20198.exe now 404s, so the "install latest VL Office" path failed right after the consent prompt. Serve a known-good ODT bootstrapper from our own /scripts/odt-setup.exe (carved out of Anubis already) and point Reinstall-OfficeVL at it. $env:KMS_ODT_URL overrides. The bootstrapper self-updates the Office payload, so it rarely needs refreshing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
06009dae30
commit
b51dc9894c
2 changed files with 4 additions and 1 deletions
|
|
@ -216,7 +216,10 @@ function Get-LatestOfficeProduct([string]$label) {
|
||||||
|
|
||||||
# Reinstall Office as a Volume License product via the Office Deployment Tool.
|
# Reinstall Office as a Volume License product via the Office Deployment Tool.
|
||||||
# Heavy (multi-GB download, closes Office). Only invoked after explicit consent.
|
# Heavy (multi-GB download, closes Office). Only invoked after explicit consent.
|
||||||
$script:ODT_URL = 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_19127-20198.exe'
|
# Self-hosted ODT bootstrapper (Microsoft's download.microsoft.com URL rotates
|
||||||
|
# its build-numbered path every release and 404s; we serve a known-good copy
|
||||||
|
# from our own /scripts). Override with $env:KMS_ODT_URL if ever needed.
|
||||||
|
$script:ODT_URL = $(if ($env:KMS_ODT_URL) { $env:KMS_ODT_URL } else { 'https://kms.viktorbarzin.me/scripts/odt-setup.exe' })
|
||||||
function Reinstall-OfficeVL([string]$product, [string]$channel) {
|
function Reinstall-OfficeVL([string]$product, [string]$channel) {
|
||||||
$tmp = Join-Path $env:TEMP "kms-odt-$(Get-Random)"
|
$tmp = Join-Path $env:TEMP "kms-odt-$(Get-Random)"
|
||||||
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
|
New-Item -ItemType Directory -Force -Path $tmp | Out-Null
|
||||||
|
|
|
||||||
BIN
static/scripts/odt-setup.exe
Normal file
BIN
static/scripts/odt-setup.exe
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue