Backup and Restore Office 2010 Activation Settings

Discussion in 'Microsoft Office' started by USB 3, Sep 8, 2010.

  1. calpo

    calpo MDL Member

    Apr 23, 2010
    203
    57
    10
    #2 calpo, Sep 8, 2010
    Last edited: Sep 8, 2010
    Do you mind if I can have your command line ( Script ), Bro ?

    Thanks.
     
  2. USB 3

    USB 3 MDL Novice

    Sep 8, 2010
    2
    14
    0
    #3 USB 3, Sep 8, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Code:
    @echo off
    set ScriptPath=%~dp0
    set Check1=%programfiles%\Microsoft Office\Office14\ospp.vbs
    set Check2=%programfiles(x86)%\Microsoft Office\Office14\ospp.vbs
    color A
    title Backup/Restore Office 2010 Activation 1.0 By USB 3
    :Menu 
    echo 1. Backup
    echo 2. Restore
    echo 3. Check Activation Status
    echo 4. Exit 
    echo.
    set /p choice= Choose:
    if '%choice%'=='1' goto :Backup
    if '%choice%'=='2' goto :Restore
    if '%choice%'=='3' goto :ActCheck
    if '%choice%'=='4' Exit
    
    :Backup
    cls
    net stop osppsvc
    mkdir "%ScriptPath%Activation Backup\Activation Files"
    mkdir "%ScriptPath%Activation Backup\Registry"
    XCOPY /Y /S /I "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%ScriptPath%Activation Backup\Activation Files"
    REG EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office "%ScriptPath%Activation Backup\Registry/Office1.reg" 
    REG EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform "%ScriptPath%Activation Backup\Registry/OfficeSoftwareProtectionPlatform1.reg" 
    REG EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office "%ScriptPath%Activation Backup\Registry/Office2.reg" > nul 2>&1
    REG EXPORT HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\OfficeSoftwareProtectionPlatform "%ScriptPath%Activation Backup\Registry/OfficeSoftwareProtectionPlatform2.reg" > nul 2>&1
    net start osppsvc
    pause
    cls
    goto :menu
    
    :Restore
    cls
    net stop osppsvc
    XCOPY /Y /S /I "%ScriptPath%Activation Backup/Activation Files" "%ALLUSERSPROFILE%/Microsoft\OfficeSoftwareProtectionPlatform"
    REG IMPORT "%ScriptPath%Activation Backup\Registry\Office1.reg"  
    REG IMPORT "%ScriptPath%Activation Backup\Registry\Office2.reg" > nul 2>&1
    REG IMPORT "%ScriptPath%Activation Backup\Registry\OfficeSoftwareProtectionPlatform1.reg"   
    REG IMPORT "%ScriptPath%Activation Backup\Registry\OfficeSoftwareProtectionPlatform2.reg" > nul 2>&1
    net start osppsvc
    pause
    cls
    goto menu
    
    
    :ActCheck
    cls
    if exist "%Check1%" cscript "%Check1%"  /dstatus
    if not exist "%Check1%" cscript "%Check2%" /dstatus 
    pause
    cls
    goto menu
    
     
  3. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,803
    45,240
    150
    Other than this backing up a bunch of settings keys, how is it different from office tookit?

    I mean that you backup a lot of keys, more than I do but this seems to be extra, so I think this will have the same issues my and everyone else who made a backup tool.

    It is nice to have those settings saved if you tweak the hell out of office though.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. calpo

    calpo MDL Member

    Apr 23, 2010
    203
    57
    10
    @USB 3

    Thanks a lot for your script. Just one more question.

    Do you know how to do If I only add the restore part in Office CD in order that it automatically activates off-line in case of re-installing ?
     
  5. bojazz

    bojazz MDL Novice

    Nov 15, 2009
    3
    0
    0
    Thanks USB3, the script works fine =D
     
  6. acyuta

    acyuta MDL Expert

    Mar 8, 2010
    1,629
    367
    60
    How does this or CODY.. tool work on the retail (exe) version. In that one has to input the key before it can install.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. ampm

    ampm MDL Novice

    Dec 16, 2010
    1
    0
    0
    can't see it
     
  8. phu_dj

    phu_dj MDL Member

    Sep 9, 2010
    102
    8
    10
    yeah, works fine
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. rasbastas

    rasbastas MDL Novice

    Jan 20, 2011
    1
    0
    0
    I need some help understanding how to use this script. I have a basic knowledge of simple bat and cmd files. Can this be run as a .bat file or a .cmd file. If it can be run as either or both, then I know what to do. My other question is about where the files will be after the backup. I looked at the code and am assuming that they will be in a new folder created in the folder that the script was ran from but I'm not sure. Thanks in advance. A novice.
     
  10. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    Use the office toolkit by cody http://forums.mydigitallife.net/threads/18746-Office-2010-Toolkit-and-EZ-Activator
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. letsgoawayhell

    letsgoawayhell MDL Senior Member

    Apr 16, 2010
    316
    154
    10
    I was away for quite a long time, so I am rusty in the subject. When I first saw the title of your post, I got exited coz we wanted to find a way to do this back then when Office 2010 was released but we didn't get around it.
    Looking at your script, I see that you export registry keys and then import them back. What do you want to do about installation ID changes? did you plan sth to counter it?
     
  12. joj

    joj MDL Novice

    Mar 16, 2010
    2
    0
    0
    It works.:)
    I've created a new WIN7 SP1 partition without overwriting my old WIN7 partition. It help me activating office 2010 in the new SP1 partition without going through the online activation process. Though I still have to enter the serial again.
     
  13. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,895
    1,783
    180
  14. ailef

    ailef MDL Senior Member

    Nov 30, 2007
    297
    14
    10
    #16 ailef, Mar 19, 2011
    Last edited: Mar 19, 2011
    hello,
    I reinstalled windows 7 64-bit SP1 on the same laptop where office 2010 pro plus was installed.
    Before reinstalling the machine, I used this script to backup my activation files and I used also the office toolkit,
    then on my fresh install of win 7 SP1, i reinstalled office 2010 pro plus.
    with my install of office 2010, i got some .MSP file that adds a volume key, but the key is no more usable to activate office anymore,
    too many people used it.
    I didnt try to activate office with the key as i knew it wouldnt work.
    so i used my backup licence files with the script,
    then I opened outlook and office directly reconfigurated my install and at the end, outlook became red on top of the window with no licence installed message in the red case.
    So when do we have to restore the activation files ? before the office install ? or after ?
    anyway, with this red message, I went to the office help section and i added the key i used when office 2010 was activated.
    I unchecked the online activation after i entered my key and office restarted to configure itself,
    at the end, it asked me to close and open again an office app.
    and when i reopened outlook, it was activated directly, no problem.
    except that, randomly, when i open some office app, it becomes unactivated again,
    so i enter my key again, then office configures itself again and when i close and open an office app, it's activated again.
    i got a VL install of office 2010,
    where's the problem ? people seem to say that the backup activation files work to reinstall office on the same machine,
    but in my case, office unactivates randomly, then i enter my key that i used to activate office without online checking,
    and all is fine again.
    If i uninstall office 2010 and that i reinstall it without this .MSP file that adds the key, (anyway, when i restore my activation files, office reconfig itself and becomes red with no licence installed message).
    anyone had troubles with the backup-restore activation files ?
    anyway if i uninstall office to reinstall without the .MSP, there are files that stay on the machine no ? and i'll get the same problem ?

    so what's the good way to restore activation files ?
    i install office 2010 before without key then i close all and restore my backup activation files ?
    or I restore my activation files before i install office 2010 ?

    update : I tried to uninstall office 2010 and it doesnt work ! the uninstall is not possible !
    that's very strange, the machine works like it's uninstalling and at the end, the message says, the uninstall failed. :confused:

    update 2 : I tried the repair option, it fixed my uninstall problem. maybe it fixed my random unactivation but i uninstalled all.
    i'm going to try some reinstall without the .MSP, should i restore my activation files before or after office 2010 reinstall ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,895
    1,783
    180
    #17 sebus, Mar 19, 2011
    Last edited: Mar 19, 2011
    All I had to do was to (Office 2010 x64 on Win 7 x64):

    - backup was created with script from post #3 (in my case from Ghost backup file) - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\OfficeSoftwareProtectionPlatform did not exist
    - install Office 2010 (same version as originally installed) with NO key input (new install on same machine!)
    - delete registry keys that were backed up in first step (from the new install on the new system)
    - restore backup (files & registry entries) - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform (as it was deleted & recreated it needed to have permissions corrected)
    - run office (red bar shows)
    - install SAME key as original install with cscript %PROGRAMFILES%\Microsoft Office\Office14\ospp.vbs /inpkey:
    - the red bar went away

    sebus
     
  16. ailef

    ailef MDL Senior Member

    Nov 30, 2007
    297
    14
    10
    ok, thanks a lot sebus for your help.
    after i repaired office 2010 and uninstalled it, I used office toolkit to clean my machine.
    after reboot, i reinstalled office 2010 without any key.
    at the end of install, i didnt open any office app and i restored my activation files with office toolkit as I rewrote my backup i made with the script.
    then i opened some office app and it worked immediately.
    not like the first time when office reconfigured itself and became red.
    hope it will stay activated.
    VAMT 2.0 is telling me it's a MAK key and i'm genuine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. ailef

    ailef MDL Senior Member

    Nov 30, 2007
    297
    14
    10
    #19 ailef, Mar 19, 2011
    Last edited: Mar 19, 2011
    I got some question about OSPP.VBS
    there's a command to get the office 2010 installation ID, cscript OSPP.VBS /dinstid
    it gives a long ID number of my activated office 2010 for the machine.
    If i save this ID,
    then reinstall my system on the same machine then reinstall office 2010,
    can I activate office 2010 with the command /actcid:value ? value that I saved from the old install with /dinstid ?
    the office ID stays the same with a fresh same OS install on the same machine ?
    so is it possible to activate that way ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. zetitres

    zetitres MDL Member

    Oct 20, 2009
    229
    49
    10
    link

    Doanload link does not work, can anyone share again this tool?. Please.