1
0
Fork 0
mirror of https://github.com/massgravel/Microsoft-Activation-Scripts.git synced 2024-11-16 20:14:37 -05:00

Improve device-based-licensing cleaning

This commit is contained in:
WindowsAddict 2024-07-19 20:21:27 +05:30
parent f6125eaa5b
commit 1567903b09
2 changed files with 8 additions and 4 deletions

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

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