前几天安装了一个Spring的小软件,结果打开Office 2010就弹出过期提示,而且这两天越来越严重,直接演变到Office 2010标题栏变成红色,提示“Office 2010非商业用途(未经授权产品)”,虽然也能继续使用,但是看起来很不舒服。在网上找到了一个临时解决的方法,就是将下面蓝色文字部分保存到记事本,保存为“清除提示.cmd”文件,然与运行即可!支持64位和32位的Office 2010版本。
@echo off
ECHO 停止服务中,请稍等
net stop osppsvc 1>nul 2>nul
IF EXIST "%systemroot%\office14_reg.reg" GOTO RESTORE
ECHO 请以管理员身份运行,按确认键继续
PAUSE >nul
IF EXIST "%programfiles%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe" GOTO ORG
IF EXIST "%programfiles(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe" GOTO X86ONX64
ECHO 您尚未安装Office2010 Beta2,或已经处理过
GOTO done
:ORG
ren "%programfiles%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe" setup.exe.lock
ren "%programfiles%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL" OSPPC.DLL.lock
if exist "%programfiles(x86)%" goto backReg64
goto backReg32
:X86ONX64
ren "%programfiles(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe" setup.exe.lock
ren "%programfiles(x86)%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL" OSPPC.DLL.lock
rem 备份注册表(32位)
:backReg32
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\ED417E2A8BA189D4C8741500D3BAD4A3" "%systemroot%\office14_reg.reg" >null
ECHO Y|REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\ED417E2A8BA189D4C8741500D3BAD4A3" >null
goto done
rem 备份注册表(64位)
:backReg64
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\25515AF94F8EA9D4EA5AB9C9A6A19248" "%systemroot%\office14_reg.reg" >null
ECHO Y|REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\25515AF94F8EA9D4EA5AB9C9A6A19248" >null
GOTO done
:RESTORE
ECHO 请以管理员身份运行来恢复原有文件,按确认键继续
PAUSE >nul
IF EXIST "%programfiles%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe.lock" ren "%programfiles%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe.lock" setup.exe
IF EXIST "%programfiles%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL.lock" ren "%programfiles%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL.lock" OSPPC.DLL
IF EXIST "%programfiles(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe.lock" ren "%programfiles(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\Setup.exe.lock" setup.exe
IF EXIST "%programfiles(x86)%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL.lock" ren "%programfiles(x86)%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPC.DLL.lock" OSPPC.DLL
REG IMPORT "%systemroot%\office14_reg.reg"
DEL "%systemroot%\office14_reg.reg"
:done
ECHO Done!
pause >nul
运行完毕后,就可以去掉Word、Excel等标题上出现“非商业用途(未经授权产品)”字样。