"Office 2010 Retail/Volume Project to bypass activation without KMS/keygen?"

Discussion in 'Microsoft Office' started by timesurfer, Sep 19, 2010.

  1. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    lol...The code is on my last post

    @CODYQX4

    Thanks I'll try to put that to work and let you know.

    Note: I was able to reproduce error 0xc004d307 by installing over present install so maybe I make it to check if installed and if then msg to uninstall before reinstall...lol

    But if I uninstall then install it will work forever both task ran and actual install of OR4

    Thanks guys for your input and testing
     
  2. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #142 CODYQX4, Sep 23, 2010
    Last edited: Apr 15, 2019
    .
     
  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #143 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Now I gotta figure out how to insert your back up and maybe some part of your installer code into my console :eek:

    Here is that code


    Code:
    @echo off
    REM Goto Batch File Directory
    cd /D %~dp0
    ECHO Press any key to install AutoRearm?
    pause > nul
    
    mkdir "%SystemDrive%\OR4"
    COPY /Y "%~dp0AutoRearm.exe" "%SystemDrive%\OR4\AutoRearm.exe"
    COPY /Y "%~dp0AutoRearmTask.cmd" "%SystemDrive%\OR4\AutoRearmTask.cmd"
    
    cd /D "%SystemDrive%\OR4\"
    AutoRearm.exe /backup
    pause
    exit
    and this for the task:
    Code:
    @echo off
    REM Goto Batch File Directory
    cd /D %~dp0
    
    del /f /q AutoRearm.log
    
    AutoRearm.exe
    FOR /F "delims=: tokens=2" %%i IN (AutoRearm.log) DO set status=%%i
    echo %status% | find "Rearm Succeeded" > nul
    if %ERRORLEVEL% == 0 (
    echo Rearm Succeeded!
    pause
    exit
    ) ELSE (
    del /f /q AutoRearm.log
    AutoRearm.exe /restore
    FOR /F "delims=: tokens=2" %%i IN (AutoRearm.log) DO set status=%%i
    echo %status% | find "Restore Successful" > nul
    if %ERRORLEVEL% == 0 (
    echo Restore Succeeded!
    AutoRearm.exe
    pause
    exit
    ) ELSE (
    Echo Restore Failed!
    pause
    exit
    )
    )
    pause
     
  4. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #144 CODYQX4, Sep 23, 2010
    Last edited: Apr 15, 2019
    .
     
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #145 timesurfer, Sep 23, 2010
    Last edited: Sep 23, 2010
    (OP)
    I wasn't meaning a pre-made...lol I meant if you back up something I'm not at the moment I have to figure how to put that in there and restore

    Edit: Now this is all you back up?

    "REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPl atform /f"
    "REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPl atform /f"
    "REG RESTORE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPl atform Backup.hiv"


    I will try to amend my backup/restore

    then

    I'll see if I can figure out how to check if OR4 is installed which I guess I can just check OR4 in c:\ or if task is installed.

    So this is my backup

    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\OR4"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv /y

    and my restore

    echo xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
    echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv >>%file%

    So you before restore do second backup.
    Then you attempt restore of first backup
    If fail restore second backup
    Attempt restore of first backup
    If succeed rearm
    If not what then?


    And your also checking if rearm yes/no but when?
     
  6. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #146 MasterDisaster, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    This is actually used in the restore part
    Code:
    xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #147 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Are you saying there's no difference?

    or I need to add something?

    What's up with the delete. We don't have that and we use save instead of add?
     
  8. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    I hope the following will clear your doubts

    Before restoring the backup
    Delete the OfficeSoftwareProtectionPlatform key
    Add an empty OfficeSoftwareProtectionPlatform key
    Restore the backup of OfficeSoftwareProtectionPlatform key
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #149 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I'm confused am I changing something or leaving it.

    I simply don't understand what we're doing?

    Is this to improve what I already have?

    Here is what I have so far

    Code:
    @echo off
    @color 9A 
    title OfficeRearm4
    :MAINMENU
    mode con: cols=64 lines=11
    CLS
    echo. 
    echo.
    echo.                   OfficeRearm4 by timesurfer
    echo.      
    echo.       An alternative Office 2010 Rearm Concept Solution     
    echo.
    echo.        A. Install OR4
    echo.        B. Uninstall OR4
    echo.       C. OR4 Status
    echo.                       D. Exit
    echo.   
    
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto InstallOR4
    if /i "%userinp%"=="B" goto UninstallOR4
    if /i "%userinp%"=="C" goto OR4Status
    if /i "%userinp%"=="D" goto Exit
    echo.
    echo. Try Again...
    echo.
    GOTO CHOOSEACTION
    
    :InstallOR4
    CLS
    mode con: cols=64 lines=21
    title OfficeRearm4
    mkdir "C:\OR4"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\OR4"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv /y
    net start osppsvc
    SET file=%SystemDrive%\OR4\OR4.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
    echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv >>%file%
    echo IF Exist "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( >>%file%
    echo "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
    echo ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
    echo ) >>%file%
    echo net start osppsvc >>%file%
    "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE"
    schtasks /create /tn "Rearm2" /tr %file% /sc daily /mo 30 /RL HIGHEST /f
    echo.
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    schtasks /query | FINDSTR /I "Rearm2"
    IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :UninstallOR4
    CLS
    mode con: cols=64 lines=10
    title OfficeRearm4
    echo.Please Wait...
    echo.
    SET file=%SystemDrive%\OR4
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Rearm2" /f
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :OR4Status
    mode con: cols=64 lines=21
    title OfficeRearm4
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    schtasks /query | FINDSTR /I "Rearm2"
    IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :Exit
    
    Thank you
     
  10. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #150 MasterDisaster, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    Just add the following lines after echo xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
    Code:
    echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    
    You had asked Cody what he does to make his restore work and he gave you the answer.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #151 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Thanks for your help MD. I thought your comment was in realation to his advice but i wasn't certain nor what to do

    I change my last post to reflect the changes

    :)
     
  12. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #152 DARKOR04, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    After you make changes suggested by MD, you can make this changes to the script:

    Code:
    @echo off
    @color 9A 
    title OfficeRearm4
    :MAINMENU
    mode con: cols=64 lines=11
    CLS
    echo. 
    echo.
    echo.                   OfficeRearm4 by timesurfer
    echo.      
    echo.       An alternative Office 2010 Rearm Concept Solution     
    echo.
    echo.        A. Install OR4
    echo.        B. Uninstall OR4
    echo.       C. OR4 Status
    echo.                  D. Exit
    echo.   
    
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto InstallOR4
    if /i "%userinp%"=="B" goto UninstallOR4
    if /i "%userinp%"=="C" goto OR4Status
    if /i "%userinp%"=="D" goto Exit
    echo.
    echo. Try Again...
    echo.
    GOTO CHOOSEACTION
    )
    and you can delete the @Color code from the rest of script, no need to put it everywhere, the color will remain, as for the change above its for when you go back to Main the size will change to original size. If you put the code before :Mainmenu the script will no read the size again when go back..

    You can use
    Code:
    D:Exit   
    
    blah blah blah
    blah blah blah goto End
    
    :End 
    exit /b
     
  13. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #153 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
  14. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #154 DARKOR04, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
  15. win_seven

    win_seven MDL Member

    Aug 26, 2009
    209
    47
    10
    /cheriky

    Please can you explain the term "/cheriky" in the line above.
    Is it an option of the XCOPY command?
    and what it does?

    excuse my english

    thank in advance
     
  16. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    Yeah those are options of XCOPY but clubbed together.

    /C Continues copying even if errors occur.
    /H Copies hidden and system files also.
    /E Copies directories and subdirectories, including empty ones.
    /R Overwrites read-only files.
    /I If destination does not exist and copying more than one file, assumes that destination must be a directory.
    /K Copies attributes. Normal Xcopy will reset read-only attributes.
    /Y Suppresses prompting to confirm you want to overwrite an existing destination file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #157 timesurfer, Sep 23, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I still get the error 0xc004d307 that doesn't allow restore/rearm then I have to use TOOLKIT to do full restore so what's the deal. Why does mine fail even when I uninstall first then install. Would be nice for the toolkit restore to work in place of mine but aren't they the same now so I'm confused what my next step is? I know the error means outta rearms but when you restore rearms are suppose to be there.

    :eek:

    Code:
    @echo off
    @color 9A 
    title OfficeRearm4
    :MAINMENU
    mode con: cols=64 lines=11
    CLS
    echo. 
    echo.
    echo.                   OfficeRearm4 by timesurfer
    echo.      
    echo.       An alternative Office 2010 Rearm Concept Solution     
    echo.
    echo.        A. Install OR4
    echo.        B. Uninstall OR4
    echo.       C. OR4 Status
    echo.                       D. Exit
    echo.   
    
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto InstallOR4
    if /i "%userinp%"=="B" goto UninstallOR4
    if /i "%userinp%"=="C" goto OR4Status
    if /i "%userinp%"=="D" goto Exit
    echo.
    echo. Try Again...
    echo.
    GOTO CHOOSEACTION
    
    :InstallOR4
    CLS
    mode con: cols=64 lines=21
    title OfficeRearm4
    mkdir "%SystemDrive%\OR4"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\OR4"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv /y
    net start osppsvc
    SET file=%SystemDrive%\OR4\OR4.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
    echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv >>%file%
    echo IF Exist "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( >>%file%
    echo "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
    echo ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
    echo ) >>%file%
    echo net start osppsvc >>%file%
    "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE"
    schtasks /create /tn "Rearm2" /tr %file% /sc daily /mo 30 /RL HIGHEST /f
    echo.
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    schtasks /query | FINDSTR /I "Rearm2"
    IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :UninstallOR4
    CLS
    mode con: cols=64 lines=10
    title OfficeRearm4
    echo.Please Wait...
    echo.
    SET file=%SystemDrive%\OR4
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Rearm2" /f
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :OR4Status
    mode con: cols=64 lines=21
    title OfficeRearm4
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    schtasks /query | FINDSTR /I "Rearm2"
    IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed
    echo. Press any key to return to the main menu.
    pause > nul
    GOTO MAINMENU
    )
    
    :Exit
    
     
  18. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #158 CODYQX4, Sep 23, 2010
    Last edited: Apr 15, 2019
    .
     
  19. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    What is the counter going to achieve? If people have different current rearms how will it help? How did you overcome any errors for this concept to work?
     
  20. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #160 CODYQX4, Sep 23, 2010
    Last edited: Apr 15, 2019
    .