Compare commits

...

2 Commits

Author SHA1 Message Date
WindowsAddict 1567903b09 Improve device-based-licensing cleaning 2024-07-19 20:21:27 +05:30
WindowsAddict f6125eaa5b Add comment about S-1-5-20 SPP registry issue 2024-07-19 20:06:52 +05:30
4 changed files with 16 additions and 4 deletions

View File

@ -1437,6 +1437,8 @@ for %%# in (
if !errorlevel!==2 set permerror=Error_Found
)
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
if not defined permerror (
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"

View File

@ -1575,6 +1575,8 @@ for %%# in (
if !errorlevel!==2 set permerror=Error_Found
)
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
if not defined permerror (
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"

View File

@ -1170,8 +1170,10 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share
:: Clear device-based-licensing
:: https://learn.microsoft.com/deployoffice/device-based-licensing
for %%# in (%_o16c2rIds%) do (
reg delete %o16c2r_reg%\Configuration /v %%#.DeviceBasedLicensing /f %nul%
if defined _o16c2rIds (
for /f "tokens=1 delims= " %%A in ('reg query "%o16c2r_reg%\Configuration" %nul6%') do (
echo %%A | find /i ".DeviceBasedLicensing" %nul% && reg delete "%o16c2r_reg%\Configuration" /v "%%A" /f %nul%
)
)
:: Remove OEM registry key
@ -1887,6 +1889,8 @@ for %%# in (
if !errorlevel!==2 set permerror=Error_Found
)
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
if not defined permerror (
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"

View File

@ -1226,8 +1226,10 @@ reg delete HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\Configuration /v Share
:: Clear device-based-licensing
:: https://learn.microsoft.com/deployoffice/device-based-licensing
for %%# in (%_o16c2rIds%) do (
reg delete %o16c2r_reg%\Configuration /v %%#.DeviceBasedLicensing /f %nul%
if defined _o16c2rIds (
for /f "tokens=1 delims= " %%A in ('reg query "%o16c2r_reg%\Configuration" %nul6%') do (
echo %%A | find /i ".DeviceBasedLicensing" %nul% && reg delete "%o16c2r_reg%\Configuration" /v "%%A" /f %nul%
)
)
:: Remove OEM registry key
@ -2888,6 +2890,8 @@ for %%# in (
if !errorlevel!==2 set permerror=Error_Found
)
REM https://learn.microsoft.com/office/troubleshoot/activation/license-issue-when-start-office-application
if not defined permerror (
reg query "HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion" %nul% && (
set "pol=HKU\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Policies"