office 2010密钥自动备份与还原

电脑安装的Microsoft Office Professional Plus 2010简体中文版,采用的是电话激活。但现在要重装系统,到时候又得给微软打电话激活office多麻烦(并且再次打电话时候不移动可以激活,因为上次激活的时候微软已经记录了电脑的硬件信息)。所以现在找了个备份与还原Microsoft Office Professional Plus 2010 简体中文版激活信息的批处理。

代码如下:文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

@ECHO OFF文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

title  Install Office 2010 Activation Info Backup Tools-www.oblue.net文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

color fc文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

cls文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

echo.文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

echo.文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

echo (c) www.oblue.net文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

echo.文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

echo.文章源自堕落的鱼-https://www.duoluodeyu.com/823.html

ECHO C.Backup Office 2010

ECHO D.Restore Office 2010

echo.

SET Choice=

SET /P Choice=         Please Select Option[Enter 'C' or 'D']:

ECHO.

IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%

IF /I '%Choice%'=='C' Goto BackupOffice

IF /I '%Choice%'=='D' Goto RestoreOffice

:BackupOffice

Copy  "%PROGRAMFILES%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"  /-Y

Copy  "%PROGRAMFILES(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"  /-Y

Copy  %ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\tokens.dat  /-Y

echo.

echo Activation Info Backup completed.

Goto End

:RestoreOffice

net stop osppsvc

takeown /f "%PROGRAMFILES%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

icacls "%PROGRAMFILES%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms" /grant administrators:F /t

del /F /Q "%PROGRAMFILES%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

copy "%~dp0pkeyconfig-office.xrm-ms" "%PROGRAMFILES%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

takeown /f "%PROGRAMFILES(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

icacls "%PROGRAMFILES(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms" /grant administrators:F /t

del /F /Q "%PROGRAMFILES(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

copy "%~dp0pkeyconfig-office.xrm-ms" "%PROGRAMFILES(x86)%\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\pkeyconfig-office.xrm-ms"

takeown /f "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\tokens.dat"

icacls "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\tokens.dat" /grant administrators:F /t

del /F /Q "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\tokens.dat"

copy "%~dp0tokens.dat" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\tokens.dat"

takeown /f "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Cache" /r

icacls "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Cache" /grant administrators:F /t

rd /s /Q "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Cache"

net start osppsvc

cscript "%ProgramFiles%\Microsoft Office\Office14\ospp.vbs" /dstatus

cscript "%ProgramFiles(x86)%\Microsoft Office\Office14\ospp.vbs" /dstatus

echo.

echo Activation Info Restore completed.

:End

Pause>nul

喜欢的朋友也可以研究一下每句话的意思,批处理的下载地址:猛击我

推荐阅读:手动备份、还原office 2010 密钥

 最后更新:2015-7-1
评论  2  访客  1  作者  1
    • hostgator
      hostgator 0

      好有深度的文章,不是太懂,学习学习

      • happywanglu
        happywanglu

        不需要懂得,留着使用的时候直接用就可以了。

      匿名

      发表评论

      匿名网友
      :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
      确定

      拖动滑块以完成验证