miroir de
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synchronisé 2024-11-23 01:34:02 +01:00
Comparer les révisions
4 commits
07c4fcdc74
...
5728ba2686
Auteur | SHA1 | Date | |
---|---|---|---|
|
5728ba2686 | ||
|
ddccc4025f | ||
|
1567903b09 | ||
|
f6125eaa5b |
4 fichiers modifiés avec 14 ajouts et 10 suppressions
|
@ -1437,11 +1437,13 @@ 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"
|
||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1575,11 +1575,13 @@ 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"
|
||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1170,9 +1170,7 @@ 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%
|
||||
)
|
||||
for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul%
|
||||
|
||||
:: Remove OEM registry key
|
||||
:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
|
||||
|
@ -1887,11 +1885,13 @@ 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"
|
||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1226,9 +1226,7 @@ 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%
|
||||
)
|
||||
for /f %%# in ('reg query "%o16c2r_reg%\Configuration" /f *.DeviceBasedLicensing %nul6% ^| findstr REG_') do reg delete "%o16c2r_reg%\Configuration" /v %%# /f %nul%
|
||||
|
||||
:: Remove OEM registry key
|
||||
:: https://support.microsoft.com/office/office-repeatedly-prompts-you-to-activate-on-a-new-pc-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
|
||||
|
@ -2888,11 +2886,13 @@ 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"
|
||||
reg query "!pol!" %nul% || reg add "!pol!" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl') -or ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Deny')) {Exit 3}" %nul%
|
||||
%psc% "$acl = (Get-Acl 'Registry::!pol!' | fl | Out-String); if (-not ($acl -match 'NT AUTHORITY\\NETWORK SERVICE Allow FullControl' -or $acl -match 'NT SERVICE\\sppsvc Allow FullControl') -or ($acl -match 'Deny')) {Exit 3}" %nul%
|
||||
if !errorlevel!==3 set "permerror=Error Found In S-1-5-20 SPP"
|
||||
)
|
||||
)
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket