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,527
    4,068
    270
    #1 timesurfer, Dec 1, 2010
    Last edited by a moderator: Apr 21, 2013
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. flare4000

    flare4000 MDL Senior Member

    Apr 23, 2010
    414
    111
    10
    Seems to be working well will test later this week
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    #3 tomah, Dec 1, 2010
    Last edited: Dec 1, 2010
    Here's some test results using Windows XP:

    The C:\IORRT directory contains 2 files ("tokens.dat" and "iorrt.bat") and 1 directory ("cache").
    The cache directory contains the file "cache.dat".
    The "backup.hiv" file is missing. It appears that the "/y" parameter in XP makes this line invalid. Without the "/y", the "backup.hiv" file is created.
    The "iorrt.bat" files contains the following lines:
    ---
    @echo off
    net stop osppsvc
    xcopy /cheriky "C:\IORRT" "C:\Documents and Settings\All Users\Microsoft\OfficeSoftwareProtectionPlatform"
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORRT\Backup.hiv
    net start osppsvc
    IF Exist "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" (
    "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
    ) ELSE ( "\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe"
    )
    schtasks /delete /tn "IORRT" /f
    schtasks /create /tn "IORRT" /tr '"C:\IORRT\IORRT.bat"' /sc daily /mo 7 /ru ""
    ---
    The "IORRT" task IS created within task scheduler (starting today and running every 7 days).
    As mentioned previously (and elaborated on by CODYQX4) the "/tn" parameter within the "schtasks /query" line does not work on XP and will require outputting to a file and searching for the string. As a result, IORRT cannot be uninstalled due to the invalid query.

    I'll see what else I can find out during the next few days.
     
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    #4 timesurfer, Dec 1, 2010
    Last edited: Dec 1, 2010
    (OP)
    Thanks dude maybe their is hope for the XP guys after all...lol

    1. So no Backup.hiv backup
    2. Query part of task will not run but task will run IORRT.bat which has correct stuff in it ;)

    So I can do query by the IORRT directory in %SytemDrive% instead of task and that will eliminate any problems for that but does task run IORRT.bat in %SytemDrive%\IORRT?

    @flare4000

    Can you specify what office you run and what OS please and was 32 bit or 64 bit on both office an OS

    Thank you :eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    #5 timesurfer, Dec 1, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I decided to just have it run task every day to have best chance of staying in perpetual trial

    We can do this because we restore from original backup every time ;)

    Here is new code to test:

    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 /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" >>%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 ""
    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 /delete /tn "IORRT" /f
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    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
    Anyone know how to query a folder. I need to use as check for install, uninstall, and restore/rearm

    Is it

    Code:
    DIR %SystemDrive%\IORRT *.* | FIND "/"
    Thank you
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. woebetide

    woebetide MDL Member

    May 28, 2007
    240
    78
    10
    Hi,
    the command 'schtasks /Query /TN ' gives an error.
    /TN does not exist in xp /query
     
  7. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    Answers to your questions:
    1. In order for the Backup.hiv backup to be created, the "/y" parameter must be removed. The "/y" parameter causes an error.
    2. Haven't tried running this so I'm not sure if there are any errors when IORRT.bat is run.

    It's a good thing you mentioned the IORRT.bat in %SystemDrive%\IORRT. It appears that with the single quotes after your "schtasks /create .... /tr", the task is created to run in the wrong directory. Without the single quotes, it appears to work.

    For the record, I'm using Windows XP SP3 and Office 2010 Pro Plus VL.
     
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    #8 timesurfer, Dec 1, 2010
    Last edited: Dec 1, 2010
    (OP)
    Thanks I think it might have been said also here

    This is why I am going to detect in script the folder IORRT as a check if IORRT is already installed ;) instead of the task...

    Just so everyone knows 2010 bricks easily so I had to do checks to stop cmd running when they shoudn't ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    I'm not sure about querying a folder, but to query a file:

    if exist "C:\IORRT\IORRT.BAT" echo OK

    This will echo OK if the file exists.
     
  10. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    Can you show me what's it suppose to look like when it works please :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    In answer to above post #10

    You currently have:
    echo schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" >>%file%

    It works when I change it to:
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
     
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    Just tried the second one and it still works on win 7
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    #13 timesurfer, Dec 1, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Now comes the hard part. For me to do this

    if exist "C:\IORRT\IORRT.BAT" echo OK

    so that the lines in green can run correctly

    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 /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru "" >>%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 ""
    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 /delete /tn "IORRT" /f
    schtasks /create /tn "IORRT" /tr '"%SystemDrive%\IORRT\IORRT.bat"' /sc daily /mo 1 /ru ""
    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 IORRT is not yet Installed
    echo.
    echo.Press any key to return to the main menu
    pause > nul
    GOTO MAINMENU
    )
    
    :Exit
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    That's good news. I guess if we can't get something that works on everything, we can always just have 2 separate files. That won't be the end of the world.
     
  15. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    #15 timesurfer, Dec 1, 2010
    Last edited: Dec 1, 2010
    (OP)
    I have to yet to exclude the /y switch for the Backup.hiv

    Also where the query was to check for task as method to execute code that is where is incorrectly done it bricks office so be careful cause you'll have to repair and then your office will end up in notificaitons and only activation is possible...lol This is why only I was testing mostly and why I thought this concept could only work if previously activation because of the notificaitons state initially and after repaired. Even if you re-install office you still get notifications. Office 2010 is a little baby with a cop " The protection services" to protect it and why office 2010 is so hard to hack. Any way test in vm and thanks

    So I tried edting the /y and it didn't work. I think we'll just stick to Vista and Win 7. People just should use cody's, Phazors, or MD's tool to activate office if they got XP

    Edit: If only we could find a way to go from notificaitions to grace :help2:...lol

    Later
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    #16 tomah, Dec 1, 2010
    Last edited by a moderator: Apr 20, 2017
    Just tested the following which should be able to be easily modified into your code (of course the schtasks /query line, above the green lines, would no longer be required). Unfortunately, it's after 1AM my time, so any further testing (like incorporating it into your code) will need to wait. Feel free to try it yourself though.

    @echo off
    if exist "C:\IORRT\IORRT.BAT" (
    echo Installing IORRT
    ) ELSE (
    echo IORRT has already been installed!
    echo.
    echo Press any key to return to the main menu
    PAUSE 1>nul
    )
     
  17. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    The logic is backwards...lol We want it to not install if it's already there. And to install if it's not

    Thank you I think we have to adjust what we have now...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,068
    270
    Good news I got lucky cause in testing for XP I bricked office testing the logic to install or not based on the existence of the IORRT folder anyhow I had a system repair point and it put back in grace so I'm back in the show...lol
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Yen

    Yen Admin
    Staff Member

    May 6, 2007
    11,171
    10,931
    340
    #19 Yen, Dec 1, 2010
    Last edited by a moderator: Apr 20, 2017
    Can't you just determine the OS version (useful for further use?)

    Code:
    @echo off
    
    
    ver | find "XP" > nul
    if %ERRORLEVEL% == 0 goto ver_xp
    
    
    
    :no_XP
    Run your commands here.
    goto exit
    
    :ver_xp
    Run Windows XP specific commands here.
    
    
    :exit
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. woebetide

    woebetide MDL Member

    May 28, 2007
    240
    78
    10
    Or by just reading
    HKLM\SOFTWARE\Microsoft\WIndowsNT/CurrentBuildNumber
    Xp=2600 Windows7=7600
    Something like if > 3000 then Windows 7 Vista else XP