IORRT - The Official Office 2010 VL Rearm Solution

Discussion in 'MDL Projects and Applications' started by timesurfer, Dec 1, 2010.

Thread Status:
Not open for further replies.
  1. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #441 DARKOR04, Dec 20, 2010
    Last edited: Jan 22, 2011
    Deleted by darkor, inappropriate content...
     
  2. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #442 DARKOR04, Dec 20, 2010
    Last edited: Jan 22, 2011
    Deleted by darkor, inappropriate content...
     
  3. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    That is your interpretation of competition and your description you gave of what competition must be. But that isn't what I was saying in my last post if you read it carefully. This comment of yours

    is incorrect and not cool and it's reeks of disrespect and competition as does the need to put what are largely my concepts and ideas in your collection console since they already exist in their original and separate working builds.The only reason is to be able to say your console is all you need since it has all of everything. Remember you asked me for the code originally and I said you wouldn't be able to read it in it's .ahk code. Then I guess I felt obligated or something so I said perhaps MD would let you see his console code since if you'd known about his batch file you wouldn't had asked me right? Why have my tools in your combo console is what needs asking? Why? It makes no sense :confused:

    IR4 wasn't a product of Windows 7 Rearm Forever 2.0 but the other way around indeed!
     
  5. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #445 DARKOR04, Dec 20, 2010
    Last edited: Jan 22, 2011
    Deleted by darkor, inappropriate content...
     
  6. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #446 timesurfer, Dec 20, 2010
    Last edited: Dec 20, 2010
    (OP)
    Now your changing around what happened

    I said exactly what I said in my last post and this further shows why I'd wish you not copy what are largely my efforts in your W.O.A.T

    I have had a change in heart regarding these matters and my solutions
     
  7. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #447 DARKOR04, Dec 20, 2010
    Last edited by a moderator: Apr 20, 2017
    DELETED BY DARKOR, INAPPROPRIATE CONTENT...

    Code:
    @echo off
    @color 0C
    title IORRT 1.9
    REM Variables
    set InstallRoot=
    set OfficeArchType=
    REM Check Office Architecture Type
    if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchCheck
    goto:WOWCheck
    :WOWCheck
    2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\14.0\Common | find /i "InstallRoot" 1>nul
    IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchCheck
    Set OfficeArchType=64
    :EndArchCheck
    REM Get Office Installed Path
    if %OfficeArchType%==WOW (
    FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B 
    Goto:FoundPath
    )
    FOR /F "tokens=2* delims=  " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B
    :FoundPath
    REM Start OSPPSVC (To make sure it is started to prevent strange cases where it doesn't start automatically from failing (XP))
    1>nul 2>nul net start osppsvc
    :MAINMENU
    mode con: cols=45 lines=10
    CLS
    echo.
    echo.
    echo.  
    echo.    InfiniteOfficeRestoreRearmTask (IORRT) 
    echo.    
    echo.               A. Install
    echo.               B. Uninstall
    echo.               C. Restore/Rearm
    echo.               D. Status
    echo.               E. Exit
    echo.
     
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto RearmCheck
    if /i "%userinp%"=="B" goto Uninstall
    if /i "%userinp%"=="C" goto Restore/Rearm
    if /i "%userinp%"=="D" goto Status
    if /i "%userinp%"=="E" goto Exit
    echo.Try Again...
    GOTO CHOOSEACTION
     
    :Rearmcheck
    echo. Performing Security Check... Wait...
    echo.
    mkdir "%SystemDrive%"\RearmCheckTemp"
    net stop osppsvc >nul
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\RearmCheckTemp\Backup\Files\Tokens" >nul
    mkdir "%SystemDrive%\RearmCheckTemp\Backup\Registry" >nul
    REG SAVE "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\RearmCheckTemp\Backup\Registry\OfficeSPPInfo.hiv >nul
    REG EXPORT "HKLM\SOFTWARE\Microsoft\Office\14.0\Registration" %SystemDrive%\RearmCheckTemp\Backup\Registry\Registration.reg >nul
    net start osppsvc >nul
    set r=0
    :RearmLoop
    IF EXIST "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" (
    goto:StartCheck86
    ) ELSE ( 
    "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" | FIND /i "Microsoft Office rearm successful." >nul
    IF '%ERRORLEVEL%' EQU '0' ( 
    goto:ADD1
    ) ELSE (
    goto:RestoreDisplay
    )
    :StartCheck86
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" | FIND /i "Microsoft Office rearm successful." >nul
    IF '%ERRORLEVEL%' EQU '0' (
    goto:ADD1
    ) ELSE ( 
    goto:RestoreDisplay
    )
    :ADD1
    set /A r=r+1
    goto:RearmLoop
    )
    :RestoreDisplay
    net stop osppsvc >nul
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\RearmCheckTemp\Backup\Files\Tokens" >nul
    REG DELETE "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" /f >nul
    REG DELETE "HKLM\SOFTWARE\Microsoft\Office\14.0\Registration" /f >nul 
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >nul
    REG ADD HKLM\SOFTWARE\Microsoft\Office\14.0\Registration /f >nul
    REG RESTORE "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\RearmCheckTemp\Backup\Registry\OfficeSPPInfo.hiv >nul
    REG IMPORT %SystemDrive%\RearmCheckTemp\Backup\Registry\Registration.reg >nul 
    net start osppsvc >nul
    SET file=%SystemDrive%\RearmCheckTemp
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    :RearmAvailable
    IF %r% GEQ 1 (
    goto:Install
    ) ELSE (
    echo. You have %r% available rearms.
    echo. You need at least 1 rearm available to install IORRT.
    pause >nul
    goto:MAINMENU
    )
    :Install
    CLS
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    echo Installing IORRT
    ) ELSE (
    echo IORRT has already been installed!
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    mkdir "%SystemDrive%\IORRT"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\IORRT\Backup\Files\Tokens"
    mkdir "%SystemDrive%\IORRT\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    SET file=%SystemDrive%\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%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" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
    echo net start osppsvc >>%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 schtasks /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru ""
    schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru ""
    echo.
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    :Uninstall
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo Uninstalling IORRT
    ) ELSE (
    echo IORRT is already uninstalled
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Hybrid" /f
    schtasks /delete /tn "IORRT" /f
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    :Restore/Rearm
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF '%ERRORLEVEL%' EQU '0' (
    echo Restoring/Rearming IORRT
    ) ELSE (
    echo Install IORRT before you Restore/Rearm
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /delete /tn "IORRT" /f 
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    :Status
    mode con: cols=64 lines=21
    title IORRT 1.9
    cd /D "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    :Exit
    DELETED BY DARKOR, INAPPROPRIATE CONTENT...
     
  8. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #448 DARKOR04, Dec 20, 2010
    Last edited: Jan 22, 2011
    Deleted by darkor, inappropriate content...
     
  9. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Your going past the point's I was trying to make again. My position is that I ask you to remove my stuff from your tool. I'll be leaving my IORRT the way it is.

    Few people will have bricked Office and if they care to comment or read past comments then they will know that their office is to be repaired via toolkit by Cody

    There is nothing more to discuss!
     
  10. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    Yes I understand, I said to you I WILL REMOVE IORRT, that I have no problem with that because I understand....

    AND THANK GOD FOR CODY'S TOOL lol
     
  11. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #451 DARKOR04, Dec 20, 2010
    Last edited: Jan 22, 2011
    Deleted by darkor, inappropriate content...
     
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
  13. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #453 DARKOR04, Dec 20, 2010
    Last edited by a moderator: Apr 20, 2017
    deleted by darkor, inappropriate content...
     
  14. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #454 DARKOR04, Dec 20, 2010
    Last edited by a moderator: Apr 20, 2017
    @timesurfer

    DELETED BY DARKOR, INAPPROPRIATE CONTENT...

    Code:
    @echo off
    @color 0C
    title IORRT 1.9
    
    REM Variables
    set InstallRoot=
    set OfficeArchType=
    
    REM Check Office Architecture Type
    if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchCheck
    goto:WOWCheck
    
    :WOWCheck
    2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\14.0\Common | find /i "InstallRoot" 1>nul
    IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchCheck
    Set OfficeArchType=64
    
    :EndArchCheck
    
    REM Get Office Installed Path
    if %OfficeArchType%==WOW (
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B 
    Goto:FoundPath
    )
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B
    
    :FoundPath
    
    REM Start OSPPSVC (To make sure it is started to prevent strange cases where it doesn't start automatically from failing (XP))
    1>nul 2>nul net start osppsvc
    
    :MAINMENU
    mode con: cols=45 lines=10
    CLS
    echo.
    echo.
    echo.  
    echo.    InfiniteOfficeRestoreRearmTask (IORRT) 
    echo.    
    echo.               A. Install
    echo.               B. Uninstall
    echo.               C. Restore/Rearm
    echo.               D. Status
    echo.               E. Exit
    echo.
      
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto Install
    if /i "%userinp%"=="B" goto Uninstall
    if /i "%userinp%"=="C" goto Restore/Rearm
    if /i "%userinp%"=="D" goto Status
    if /i "%userinp%"=="E" goto Exit
    echo.Try Again...
    GOTO CHOOSEACTION
    
    
    :Install
    CLS
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    echo Installing IORRT
    ) ELSE (
    echo IORRT has already been installed!
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    mkdir "%SystemDrive%\IORRT"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\IORRT\Backup\Files\Tokens"
    mkdir "%SystemDrive%\IORRT\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    SET file=%SystemDrive%\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%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" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
    echo net start osppsvc >>%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 schtasks /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" || goto :fail
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" || goto :fail
    )
    schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru ""
    schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru ""
    echo.
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :fail
    echo. operation can not be completed.
    echo. Reason: NO rearms left.
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    pause >nul
    goto :MAINMENU
    )
    
    :Uninstall
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo Uninstalling IORRT
    ) ELSE (
    echo IORRT is already uninstalled
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Hybrid" /f
    schtasks /delete /tn "IORRT" /f
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Restore/Rearm
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF '%ERRORLEVEL%' EQU '0' (
    echo Restoring/Rearming IORRT
    ) ELSE (
    echo Install IORRT before you Restore/Rearm
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /delete /tn "IORRT" /f 
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Status
    mode con: cols=64 lines=21
    title IORRT 1.9
    cd /D "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    why to write to much code when the best solution is add this || goto :fail (highlighted in red in code section above)

    Code:
    || goto :fail
    it means (Command2 executes only if command1 does not complete successfully.) well that is the real and clean solution for you.. DELETED BY DARKOR, INAPPROPRIATE CONTENT...

    DELETED BY DARKOR, INAPPROPRIATE CONTENT...
     
  15. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    13,114
    14,091
    340
    @Timesurfer and Darkor04

    I would be very happy if you both could find a way to become friends again. You have worked together and helped each other before.
    If everbody of you will come off your own high horse a bit and speak about terms which are satisfying both of you I guess that would be possible.
    The fact that darkor wants to have both apps integrated into woat means that these apps are good ones. Just name all who have participated. Stop discussing about who has originally done what. Count all the names as credits.

    I want you both to start communication again! It's not worth to cancel a good friendship and teamwork for such a little disput.

    Your turn! :);)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    Yen you are totally right, I want to do teamwork with ts, also told him to stop this and keep our friendship, so i am positive and still help him.
    @timesurfer I am not mad with you also would like to end this and be friends again... think about it, I already made my decision would like to teamwork with you again... the ball is in you court... ;)
     
  17. DARKOR04

    DARKOR04 MDL Tester/Developer

    Jul 5, 2010
    497
    909
    10
    #457 DARKOR04, Dec 20, 2010
    Last edited by a moderator: Apr 20, 2017
    Just test IORRT 2.0 beta it works!

    (DELETED BY DARKOR, INAPPROPRIATE CONTENT)... (red highlight)
    Code:
    @echo off
    @color 0C
    title IORRT 2.0
    
    REM Variables
    set InstallRoot=
    set OfficeArchType=
    
    REM Check Office Architecture Type
    if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchCheck
    goto:WOWCheck
    
    :WOWCheck
    2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\14.0\Common | find /i "InstallRoot" 1>nul
    IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchCheck
    Set OfficeArchType=64
    
    :EndArchCheck
    
    REM Get Office Installed Path
    if %OfficeArchType%==WOW (
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B 
    Goto:FoundPath
    )
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B
    
    :FoundPath
    
    REM Start OSPPSVC (To make sure it is started to prevent strange cases where it doesn't start automatically from failing (XP))
    1>nul 2>nul net start osppsvc
    
    :MAINMENU
    mode con: cols=45 lines=10
    CLS
    echo.
    echo.
    echo.  
    echo.    InfiniteOfficeRestoreRearmTask (IORRT) 
    echo.    
    echo.               A. Install
    echo.               B. Uninstall
    echo.               C. Restore/Rearm
    echo.               D. Status
    echo.               E. Exit
    echo.
      
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto Install
    if /i "%userinp%"=="B" goto Uninstall
    if /i "%userinp%"=="C" goto Restore/Rearm
    if /i "%userinp%"=="D" goto Status
    if /i "%userinp%"=="E" goto Exit
    echo.Try Again...
    GOTO CHOOSEACTION
    
    :Install
    CLS
    mode con: cols=64 lines=21
    title IORRT 2.0
    mkdir "%SystemDrive%\Check"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\Check\Backup\Files\Tokens"
    mkdir "%SystemDrive%\Check\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    if errorlevel==0 goto Pass
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\Check
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    echo.IORRT detects you have no rearms and cannot install...
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    :Pass
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\Check
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    echo Installing IORRT
    ) ELSE (
    echo IORRT has already been installed!
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    mkdir "%SystemDrive%\IORRT"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\IORRT\Backup\Files\Tokens"
    mkdir "%SystemDrive%\IORRT\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    SET file=%SystemDrive%\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%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" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
    echo net start osppsvc >>%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 schtasks /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru ""
    schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru ""
    echo.
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Uninstall
    mode con: cols=64 lines=21
    title IORRT 2.0
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo Uninstalling IORRT
    ) ELSE (
    echo IORRT is already uninstalled
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Hybrid" /f
    schtasks /delete /tn "IORRT" /f
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Restore/Rearm
    mode con: cols=64 lines=21
    title IORRT 2.0
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF '%ERRORLEVEL%' EQU '0' (
    echo Restoring/Rearming IORRT
    ) ELSE (
    echo Install IORRT before you Restore/Rearm
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /delete /tn "IORRT" /f 
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Status
    mode con: cols=64 lines=21
    title IORRT 2.0
    cd /D "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Exit
    When this is simple and clean (red highlight)
    Code:
    @echo off
    @color 0C
    title IORRT 1.9
    
    REM Variables
    set InstallRoot=
    set OfficeArchType=
    
    REM Check Office Architecture Type
    if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchCheck
    goto:WOWCheck
    
    :WOWCheck
    2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\14.0\Common | find /i "InstallRoot" 1>nul
    IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchCheck
    Set OfficeArchType=64
    
    :EndArchCheck
    
    REM Get Office Installed Path
    if %OfficeArchType%==WOW (
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B 
    Goto:FoundPath
    )
    FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" /v Path') DO SET InstallRoot=%%B
    
    :FoundPath
    
    REM Start OSPPSVC (To make sure it is started to prevent strange cases where it doesn't start automatically from failing (XP))
    1>nul 2>nul net start osppsvc
    
    :MAINMENU
    mode con: cols=45 lines=10
    CLS
    echo.
    echo.
    echo.  
    echo.    InfiniteOfficeRestoreRearmTask (IORRT) 
    echo.    
    echo.               A. Install
    echo.               B. Uninstall
    echo.               C. Restore/Rearm
    echo.               D. Status
    echo.               E. Exit
    echo.
      
    :CHOOSEACTION
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto Install
    if /i "%userinp%"=="B" goto Uninstall
    if /i "%userinp%"=="C" goto Restore/Rearm
    if /i "%userinp%"=="D" goto Status
    if /i "%userinp%"=="E" goto Exit
    echo.Try Again...
    GOTO CHOOSEACTION
    
    
    :Install
    CLS
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    echo Installing IORRT
    ) ELSE (
    echo IORRT has already been installed!
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    mkdir "%SystemDrive%\IORRT"
    net stop osppsvc
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\IORRT\Backup\Files\Tokens"
    mkdir "%SystemDrive%\IORRT\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    SET file=%SystemDrive%\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%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" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
    echo net start osppsvc >>%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 schtasks /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" || goto :fail
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" || goto :fail
    )
    schtasks /create /tn "Hybrid" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc onstart /ru ""
    schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru ""
    echo.
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :fail
    echo. operation can not be completed.
    echo. Reason: NO rearms left.
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    pause >nul
    goto :MAINMENU
    )
    
    :Uninstall
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo Uninstalling IORRT
    ) ELSE (
    echo IORRT is already uninstalled
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv"
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /delete /tn "Hybrid" /f
    schtasks /delete /tn "IORRT" /f
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Restore/Rearm
    mode con: cols=64 lines=21
    title IORRT 1.9
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF '%ERRORLEVEL%' EQU '0' (
    echo Restoring/Rearming IORRT
    ) ELSE (
    echo Install IORRT before you Restore/Rearm
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    GOTO MAINMENU
    )
    net stop osppsvc
    xcopy /cheriky "%SystemDrive%\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup\Registry\OfficeSPPInfo.hiv
    net start osppsvc
    IF Exist "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%CommonProgramFiles%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%commonprogramfiles(x86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /delete /tn "IORRT" /f 
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Status
    mode con: cols=64 lines=21
    title IORRT 1.9
    cd /D "%InstallRoot%"
    cscript OSPP.VBS /dstatus
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    DELETED BY DARKOR, INAPPROPRIATE CONTENT...
     
  18. Netrunner

    Netrunner MDL Novice

    Dec 20, 2010
    7
    0
    0
    I was searching on the web for the following proces/feature but I could not find anything close to it, I hope you can help me finding this special feature I was looking for.


    I am deploying Office 2010 PP from a Server 2008 to Windows 7 workstation.

    with setup.exe /admin you can customize your office file, you can also add additional software to the deployment. You can add parameters to this additional software.

    I want to add a tool that runs after successfull installation of Office 2010 PP, that tool must automatically run and apply the needed activations of the installed Office 2010 PP.

    Is there anyone who can help me with this problem.



    Kind regards,

    Netrunner
     
  19. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
  20. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #460 timesurfer, Dec 20, 2010
    Last edited: Dec 20, 2010
    (OP)