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. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #121 timesurfer, Dec 5, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    No it is a validation that the bug others are having regarding path and cmds is not working but we are very close mind you ;)

    Ideally it should say 30 day 43200 day

    Thank you
     
  2. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    Anyone can make this execute and work with ERRORLEVEL without it outputting to the cmd window?

    schtasks /query | FINDSTR /I "IORRT"

    Its just an annoying output and all.
     
  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Note: task is usually check if IORRT is installed only with XP did we test using IORRT folder as check if installed/uninstalled/restore-rearm
     
  4. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    I think I know why. It was screwing up the actual execution of OSPPREARM. I changed the string alot but I think it was a second \ that broke it.
     
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #125 timesurfer, Dec 5, 2010
    Last edited: Dec 5, 2010
    (OP)
    I think your right as that in testing when it didn't work hence after install it should say 43200 min hence rearm is not finding path

    Should I jsut use %SystemDrive% instead of commonprogram files?

    Notice in my IORRT.bat that get's in %commonprogram% that in other part of install function it gets sytemdrive?
     
  6. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    Well that works universally and cleanly and it was in the code in 99% of the checks already, but it shows a line when executed. It works but its annoying.

    I think I'm close to getting it all smooth. I'm using my toolkit + my own backup to do more testing. If it works you can be assured x86-on-x64 OS people are in the clear as I'm one of them and they are the ones with the most issues.
     
  7. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    It was saying a can't find path right around when that was supposed to execute. Plus it was restoring but I check my rearm count with toolkit. It should be one less then when preinstall state, but always be that (EX: I start with 4, it should be 3 after IORRT restores+rearms, not 4 as we use one to give fresh grace period)
     
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Note I edited my post
     
  9. unit731

    unit731 MDL Novice

    Feb 12, 2010
    13
    0
    0
    ok..so do i uninstall IORRT?

    i'm going to try CODYQX4's toolkit..

    do i just click 'EZ-Activator'?
     
  10. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    When did you ever give any input/troubleshooting about IORRT? Best to ask in cody's thread to activate
     
  11. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    Yeah it was a \\ in path that screwed it.

    I made the variable use more efficient in it though, use one for commonprogramfiles vs systemdrive and working down there.
     
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #132 timesurfer, Dec 5, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    so I changed that with mine but I'm 32 on 32

    Code:
    @echo off
    @color 0C
    title IORRT
    :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
    schtasks /Query /TN "IORRT" 1>nul 2>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"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\IORRT\Backup.hiv /y
    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" "%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.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 /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" /f >>%file%
    IF Exist "%SystemDrive%\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%SystemDrive%\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%SystemDrive%\Program Files(x86)\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" /f
    echo.
    IF Exist cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus (
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    ) ELSE ( cscript "%PROGRAMFILES(X86)%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus 
    )
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not yet Installed
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Uninstall
    mode con: cols=64 lines=21
    title IORRT
    schtasks /Query /TN "IORRT" 0>nul 1>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" "%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.hiv
    net start osppsvc
    SET file=%SystemDrive%\IORRT
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    DEL %SystemDrive%\ProgramData\Microsoft\OfficeSoftwareProtectionPlatform\IORRT.bat
    schtasks /delete /tn "IORRT" /f
    IF Exist cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus (
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    ) ELSE ( cscript "%PROGRAMFILES(X86)%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus 
    )
    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
    schtasks /Query /TN "IORRT" 0>nul 1>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" "%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.hiv
    net start osppsvc
    IF Exist "%SystemDrive%\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( 
    "%SystemDrive%\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    ) ELSE ( "%SystemDrive%\Program Files(x86)\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" 
    )
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" /f
    IF Exist cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus (
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    ) ELSE ( cscript "%PROGRAMFILES(X86)%\Microsoft Office\OFFICE14\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
    IF Exist cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus (
    cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus
    ) ELSE ( cscript "%PROGRAMFILES(X86)%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus 
    )
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRTT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Exit
     
  13. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
  14. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    Any reason you rearm upon initial install? Just to insure things are good?

    Only problem is you don't make sure things are in good state on install (as in do the rearm check like I do with a count). Also you could check if Office 2010 is installed somehow but that's not as necessary given the tool would have no use in that case.

    The uninstall restores the backup though so I guess you do save them from reinstalling and cutting down the rearms.

    Other than the fact that task thing outputs, the code appears good.
     
  15. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #135 timesurfer, Dec 5, 2010
    Last edited: Dec 5, 2010
    (OP)
    Well after backup at any state I want users to have fresh 30 days 43200 min to give fullest possivbel time to get restore/rearmed/re-create task every 1 day actually so I use 1 out of 5 rearms to do that but it gets backed up to 5 then rearm by task or use of C option

    I did initially cuase my task 30 day then 7 then I'm like wtf lets do it everyday to make sure...lol
     
  16. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    #136 CODYQX4, Dec 5, 2010
    Last edited by a moderator: Apr 20, 2017
  17. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    Sorry, I guess I mistook what you needed. I don't remember seeing the output when I ran it. I'll have to check again.
     
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #138 timesurfer, Dec 5, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Dude that code worked for 32/32

    I think it advisable to change my 1st post to this bat and see what happens but please 32/64 and 64/64 users test as to validate cody's coding
     
  19. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,776
    150
    Looks sorta like this:
    IORRT 12/8/2010 10:56:00 AM

    Well I'm going to bed, everyone can test the new IORRT.bat that I left, some XP testing would be recommended to ensure the fixes me and tomah put into it work.
     
  20. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    355
    10
    #140 tomah, Dec 5, 2010
    Last edited: Dec 5, 2010
    Now I know what you are refering to.

    You should be able to just put a ">NUL" to the end of the schtasks /query | findstr /i "iorrt". I'll give it a go on XP. Funny thing is that I thought it was there intentionally and was using it to determine if IORRT was installed.:biggrin:

    To clarify: SCHTASKS /QUERY | FINDSTR /I "IORRT" >NUL