I just tested ospprun.exe to get rearm count but even if I did my check there are still problems with this. Atleast we understand the error now. I still think like you a patch or another way like unversalizing a perfect backup to restore from is a better alternative anyways I learned a lot from you and doing this so it's all good in the rearm hood ...lol
So if people are in grace with 2 rearms IORAT will work. And if pass task date just run rearm2 task and will restore, etc... so it works just not perfect based on 2 condtions...lol This thread is a good one for people to talk and develop ideas so i hope others do some work here also
Thanks I knew there was a way around the error just took me a couple weeks off to see it ...lol Ok so I need only 1 rearm to initially rearm here (see stuff in green) Code: @echo off @color 9A title IORAT :MAINMENU mode con: cols=45 lines=11 CLS echo. echo. InfiniteOfficeRearmAutoTask (IORAT) echo. echo. An Office 2010 Rearm Concept Solution echo. A. Install echo. B. Uninstall echo. C. Status echo. D. 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 Status if /i "%userinp%"=="D" goto Exit echo. Try Again.... GOTO CHOOSEACTION :Install CLS mode con: cols=64 lines=21 title IORAT schtasks /Query /TN "\Rearm2" 1>nul 2>nul IF ERRORLEVEL 1 ( echo Installing IORAT ) ELSE ( echo IORAT has already been installed! echo. echo Press any key to return to the main menu PAUSE 1>nul GOTO MAINMENU ) mkdir "%SystemDrive%\IORAT" net stop osppsvc xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\IORAT" reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORAT\Backup.hiv /y net start osppsvc SET file=%SystemDrive%\IORAT\IORAT.bat IF EXIST %file% attrib -h %file% echo @echo off >%file% echo net stop osppsvc >>%file% echo xcopy /cheriky "C:\IORAT" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file% echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file% echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file% echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORAT\Backup.hiv >>%file% echo IF Exist "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( >>%file% echo "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file% echo ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file% echo ) >>%file% echo net start osppsvc >>%file% "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE" schtasks /create /tn "Rearm2" /tr %file% /sc daily /mo 30 /RL HIGHEST /f echo. cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" IF ERRORLEVEL 1 echo IORAT is not yet Installed echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Uninstall title IORAT net stop osppsvc xcopy /cheriky "C:\IORAT" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORAT\Backup.hiv net start osppsvc SET file=%SystemDrive%\IORAT IF EXIST %file% attrib -h %file% RD /S /Q %file% schtasks /delete /tn "Rearm2" /f echo. echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Status mode con: cols=64 lines=21 title IORAT cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" IF ERRORLEVEL 1 echo IORAT is not yet Installed echo. echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Exit Then 30 days run out I restore to the (at least 1 rearm minimum necessary) then rearm and run out 30 days and repeat. When I said I could do initial rearm I meant after I clean install office or delete licence and repair it is in initial notifications and this is the time I need to rearm to get it into grace but I can't. This is my problem to have potential for this to work for more people more of the time instead of them needing to be in grace to use IORAT ...lol So just one problem/question now really How do I get into grace initially to use IORAT (Don't think I can ) And according to you after 30 day grace and if into notifications we can rearm though but it doesn't really matter since at that moment we have actual restore to a beginning of a 30 day grace so just initial notification is bugging me
Can anyone help me with this stuff in green Code: :Restore/Rearm title IORAT schtasks /Query /TN "\Rearm2" IF ERRORLEVEL 2 ( echo Installing IORAT ) ELSE ( echo IORAT has not been installed! echo. echo Press any key to return to the main menu PAUSE 1>nul GOTO MAINMENU ) net stop osppsvc xcopy /cheriky "C:\IORAT" "C:\ProgramData\Microsoft\OfficeSoftwareProtectionPlatform" REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORAT\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" ) cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus echo. echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) I need it to not do restore/rearm when IORRT has not been installed via checking for task rearm2 installed. When IORRT is installed restore/rearm can proceed. Any help please ? This is to avoid rearm error meaning restore won't obviously run but rearm still will causing possible rearm error
Ok trying new script to tell how many rearms left with OSPPRUN.exe from TP Code: @echo off @color 9A title IORRT :MAINMENU mode con: cols=45 lines=12 CLS echo. echo. echo. echo. InfiniteOfficeRestoreRearmTask (IORRT) echo. echo. An Office Restore Rearm Solution 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 "\Rearm2" 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" "C:\IORRT" reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\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 "C:\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" C:\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% 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 /create /tn "Rearm2" /tr %file% /sc daily /mo 30 /RL HIGHEST /f echo. cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" IF ERRORLEVEL 1 echo IORRT is not yet Installed echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Uninstall title IORRT schtasks /Query /TN "\Rearm2" 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 ) net stop osppsvc xcopy /cheriky "C:\IORRT" "%ALLUSERSPROFILE%\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 SET file=%SystemDrive%\IORRT IF EXIST %file% attrib -h %file% RD /S /Q %file% schtasks /delete /tn "Rearm2" /f cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus echo. echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Restore/Rearm title IORRT schtasks /Query /TN "\Rearm2" 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 ) net stop osppsvc xcopy /cheriky "C:\IORRT" "%ALLUSERSPROFILE%\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 echo.IORRT needs to be installed to restore/rearm echo.Press any key to return to the main menu pause > nul GOTO MAINMENU ) :Status mode con: cols=64 lines=21 title IORRT copy "%~dp0OSPPRUN.exe" "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform" set file="%~dp0check.vbs" echo set WshShell = WScript.CreateObject("WScript.Shell")>>%file% echo WshShell.Run """C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPRUN.exe""">>%file% echo WScript.Sleep 100>>%file% echo WshShell.SendKeys "Open{ENTER}">>%file% echo WScript.Sleep 500>>%file% echo WshShell.SendKeys "GetApplicationInformation 59a52881-a989-479d-af46-f275c6370663 RemainingRearmCount{ENTER}">>%file% echo WScript.Sleep 500>>%file% echo WshShell.SendKeys "Close{ENTER}">>%file% echo WScript.Sleep 5000>>%file% echo WshShell.SendKeys "Quit{ENTER}">>%file% %file% del %file% cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" 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 Can someone help with the condition for the uninstall. I just need to not uninstall if installed. I might have temporarily fixed the restore/rearmbut window closes after restore/rearm has taken place. I'd like it to stay open and offer return to menu text...lol
In the install function this works Code: schtasks /Query /TN "\Rearm2" 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 ) But I can't do the same for the restore/rearm and the uninstall
Well as far as just for win 7 I don't understand how these things work Code: 1>nul 2>nul IF ERRORLEVEL 1 ( echo Installing IORRT ) ELSE ( If you tested the install condition it works but I'm not good a this redirecting nul stuff The status works though if you use OSPPRUN to check how many rearms left. Kinda messy but good enough for now. I guess the only reason for me to check rearms is to just only see if there's one left in case someone is in grace and want's to try IORRT. So I got the two above conditions to finish then it's kinda done since we can't rearm in initial notifications just like we can't after repair. So I need a break