From dd5aeafae98e0325b6bf9776766e971f33d6017e Mon Sep 17 00:00:00 2001 From: Git Sagar Date: Mon, 8 Jun 2026 12:11:51 +0530 Subject: [PATCH] restore Enterprise LTSC key after MAS activation to keep RDP server MAS HWID activation switches the edition from Enterprise LTSC to IoT Enterprise LTSC (which lacks the RDP server listener). Re-apply the Enterprise LTSC product key after activation to restore RDP capability. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/images/windows/templates/generalize.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/images/windows/templates/generalize.nix b/lib/images/windows/templates/generalize.nix index c322a0d..54740cf 100644 --- a/lib/images/windows/templates/generalize.nix +++ b/lib/images/windows/templates/generalize.nix @@ -83,6 +83,9 @@ in if exist C:\MAS_AIO.cmd ( echo. | call C:\MAS_AIO.cmd /HWID ) + :: MAS may switch edition to IoT Enterprise (which lacks RDP server). + :: Restore Enterprise LTSC key to keep full RDP functionality. + cscript //nologo C:\Windows\System32\slmgr.vbs /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D 2>nul :: Activate Office using Ohook method (if Office is installed) if exist "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" (