清理客户端RMS
公司内部的RMS文档加密服务如果作出更改,可能在客户端中会出现无法给Office文档机密授权,或者打不开别人的加密授权文档。
此时清理客户端原有的RMS缓存,然后重新获取RMS模版即可,可以将以下内容写进一个cmd或者bat后缀的文件中,运行即可。
echo Delete identities reg key.
reg delete HKCU\Software\Microsoft\Office\16.0\Common\Identity /f
reg delete HKCU\Software\Microsoft\Office\15.0\Common\Identity /f
echo Clear Office service discovery cache
reg delete HKCU\Software\Microsoft\Office\12.0\Common\DRM /v CachedCorpLicenseServer /f
reg delete HKCU\Software\Microsoft\Office\14.0\Common\DRM /v CachedCorpLicenseServer /f
reg delete HKCU\Software\Microsoft\Office\14.0\Common\DRM\ServiceLocations /f
reg delete HKCU\Software\Microsoft\Office\14.0\Common\DRM /v DefaultServer /f
reg delete HKCU\Software\Microsoft\Office\14.0\Common\DRM /v DefaultServerUrl /f
reg delete HKCU\Software\Microsoft\Office\15.0\Common\DRM /f
reg delete HKCU\Software\Microsoft\Office\16.0\Common\DRM /f
echo Clear MSIPC service disco cache and sharing app shell context menu cache
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\MSIPC" /f
reg delete "HKCU\Software\Classes\Microsoft.IPViewerChildMenu\shell" /f
echo Remove preexisting redirections
reg delete HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\DRM\LicenseServerRedirection /f
echo Force a template update for Office 2010
reg delete HKCU\Software\Microsoft\MSDRM\TemplateManagement /v lastUpdatedTime /f
echo Deleting certs from MSDRM cert store
if exist "%localappdata%\Microsoft\DRM\*.drm" (
echo - Removing "%localappdata%\Microsoft\DRM\*.drm"
del "%localappdata%\Microsoft\DRM\*.drm" /f /q
)
echo Deleting certs from MSIPC cert store
if exist "%localappdata%\Microsoft\MSIPC\*.drm" (
echo - Removing "%localappdata%\Microsoft\MSIPC\*.drm"
rd /s /q %localappdata%\Microsoft\MSIPC
)
echo Add NoDomainUser as to sign out the current office account to let Office 2013/2016 get ADRMS Templates
reg add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity /t REG_DWORD /v "NoDomainUser" /d 1 /F
reg add HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Identity /t REG_DWORD /v "NoDomainUser" /d 1 /F
echo deleteing MSIPC
reg delete "HKEY_LOCAL_MACHINE\Software\Microsoft\MSIPC" /F
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSIPC" /F