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
    #581 timesurfer, Jan 23, 2011
    Last edited: Jan 23, 2011
    (OP)
    There's one way to find out! First hide it. Check you have less than 43200 min then go into task and run IORRT task. Then open IORRT and use option D. If it has 43200 min it worked :p...lol

    Not sure why I couldn't hide it to begin with. Maybe it had to do with XP I forgot. I wanted to hide it initially

    But I think it's best that it's not hidden as user can see what gets installed ;)
     
  2. CRA2YHAVOK

    CRA2YHAVOK MDL Senior Member

    Oct 23, 2009
    458
    155
    10
    I'll give it another go, the last time I tried, it didn't seem to work but maybe I did something else to make it not work.

    I'll report back soon ;)
     
  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #583 timesurfer, Jan 23, 2011
    Last edited: Jan 23, 2011
    (OP)
    Actually just click C instead of going into the task scheduler

    And yea it works with it hidden I just checked

    Maybe if I can't hide the folder when it gets created maybe I can hide it after it's made...lol

    Doesn't really matter as it's just purely aesthetic
     
  4. CRA2YHAVOK

    CRA2YHAVOK MDL Senior Member

    Oct 23, 2009
    458
    155
    10
    Cool :)

    You were saying that you initially were going to hide it by default, would I be able to alter the batch file my end to hide it on future installs & what line/code etc. would I have to input?

    If its going to be pain to do then no worries as I don't really mind manually hiding it but if it were to automatically do it that would be better obviously.

    Thanks again ;)
     
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Well yea it's nice for user to both not see it so they don't delete it...lol As well to see it so they don't feel they have any thing on their comp due to IORRT they don't know about which is why first post is as it is. I will see if it can be done and how I feel about hiding it but I thinks it's better to see it so it's more honest about how IORRT works. Remember a lot of students will never look in C:\ or in task scheduler...lol It's a toss up as to what's better :busted_cop:

    And you don't need to have code changed you just hid it now your good :p...lol
     
  6. CRA2YHAVOK

    CRA2YHAVOK MDL Senior Member

    Oct 23, 2009
    458
    155
    10
    OK, yeah no problem, thinking about it more now I guess it is probably best to just leave as is, then those like me who want to hide it can just Right Click the folder, Properties and select the Hide Folder option etc. ;)

    Well at least I know it works when hidden now, I love this alternate method :)

    Catch you around ts ;)
     
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #587 timesurfer, Jan 23, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I have this to hide but again not sure how it works in XP

    Code:
    attrib +h "%SystemDrive%\IORRT"
    I will test then give you it to you to test. What OS you got and what office
     
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
  9. CRA2YHAVOK

    CRA2YHAVOK MDL Senior Member

    Oct 23, 2009
    458
    155
    10
    #589 CRA2YHAVOK, Jan 23, 2011
    Last edited by a moderator: Apr 20, 2017
    OS Version: Windows 7 x86

    Office Version: Microsoft Office 2010 Pro Plus

    EDIT: Just seen above that its confirmed working on x86, I was too mesmerized by the TRON theme lol :)
     
  10. timesurfer

    timesurfer MDL Developer

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

    timesurfer MDL Developer

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

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #592 timesurfer, Jan 23, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    [IORRT] XP test needed...lol

    Hi can someone with XP please test this for me

    Test:

    1. First create folder named "IORRT" in C:\ drive

    2. Run this cmd in cmd prompt as admin
    Code:
    attrib +h "%SystemDrive%\IORRT"
    3. Report if the folder becomes hidden

    Thank you

    Edit: We know that IORRT installs on XP and only with 32 bit 2010 but just want to see if this code works to make IORRT folder hidden then I'll release IORRT 2.1
     
  13. letsgoawayhell

    letsgoawayhell MDL Senior Member

    Apr 16, 2010
    316
    157
    10
    I have not been around for quite some time.
    It's good to see you got around bringing everyone another great tool timesurfer. :):):)

    two thumbs up pal
     
  14. letsgoawayhell

    letsgoawayhell MDL Senior Member

    Apr 16, 2010
    316
    157
    10
  15. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
  16. letsgoawayhell

    letsgoawayhell MDL Senior Member

    Apr 16, 2010
    316
    157
    10
    I'd love to but sorry VHDD is dynmically expanding and HDD is already full so can't install Oficce 2010.
     
  17. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #597 timesurfer, Jan 23, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    No problem

    I'm pretty sure this code will work. I tried to get folder installed hidden initially but for some reason it won't work so I just change properties after it's created and the contents are already there

    Code:
    @echo off
    @color 0C
    title IORRT 2.1
    
    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.1
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    echo Checking rearm status...
    echo.
    ) 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%\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.
    echo.No rearms detected... 
    echo.
    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%
    echo.
    echo Installing IORRT...
    echo.
    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" 
    )
    attrib +h "%SystemDrive%\IORRT"
    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.1
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo Uninstalling IORRT...
    echo.
    ) 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.1
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF '%ERRORLEVEL%' EQU '0' (
    echo Restoring/Rearming...
    echo.
    ) 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.1
    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
     
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #598 timesurfer, Jan 24, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
  19. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #599 timesurfer, Jan 24, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    XP guys please test this bat file

    Code:
    @echo off
    set msg=What's up dude
    call :speak "What's up dude"
    :speak
    echo CreateObject("SAPI.SpVoice").Speak %1 >"%~dp0vc.vbs"
    "%~dp0vc.vbs" & del "%~dp0vc.vbs"
    pause
    This is to see if these voice cmds work on XP
     
  20. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #600 timesurfer, Jan 24, 2011
    Last edited: Jan 26, 2011
    (OP)