Is not the following batch commands enough to do backup, restore and rearm? What kind of error checking is required for such a simple set of commands? Code: :backup xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\Backup" reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\Backup.hiv /y exit /b :restore xcopy /cheriky "C:\Backup" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\Backup.hiv exit /b :rearm IF Exist "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ( "%COMMONPROGRAMFILES%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe ) exit /b
Is this correct placement of your code MasterDisaster Code: @echo off @color 9A mode con: cols=64 lines=21 title OfficeRearm4 :MAINMENU CLS echo. echo. oOOOOOo OOOOOO OO OOO oO oOOOOOo echo. OO OO OO OOo OO OOO OOO OO OO echo. OO OO OO OOo OO OOO OOOO OO OO echo. OO OO OO OOo OO OO OO OO OO echo. OO OO OO OOo OO OO OO OO OO echo. OO OO OOOOOOOo OOOOOOOO OO OO OO echo. OO OO OO oo OO OO OO OO echo. OO OO OO Oo OO OO OO OO echo. OO OO OO OO OO OO OO OO OO echo. ... oOOOOOo OO Oo OO OOOO OO oOOOOOo ... echo. echo. by timesurfer echo. echo. An alternative Office 2010 Rearm Concept Solution echo. echo. A. Install OR4 echo. B. Uninstall OR4 echo. C. OR4 Status echo. :CHOOSEACTION set /p userinp= ^ Make your selection: set userinp=%userinp:~0,1% if /i "%userinp%"=="A" goto InstallOR4 if /i "%userinp%"=="B" goto UninstallOR4 if /i "%userinp%"=="C" goto OR4Status echo. echo. Try Again Dude... echo. GOTO CHOOSEACTION :InstallOR4 CLS @color 9A mode con: cols=64 lines=21 title OfficeRearm4 echo. ----------------------------------------------- echo. echo. Installing OR4!!!!! echo. ----------------------------------------------- echo. echo. Please Wait... echo. echo. @color 9A mode con: cols=64 lines=21 title OfficeRearm4 mkdir "%SystemDrive%Backup" net stop osppsvc xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\Backup" reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\Backup.hiv /y net start osppsvc SET file=%SystemDrive%\OR4.bat IF EXIST %file% attrib -h %file% echo @echo off >>%file% echo cls >>%file% echo net stop osppsvc >>%file% echo xcopy /cheriky "C:\Backup" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file% echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\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% echo pause >>%file% echo cls >>%file% echo "C:\Program Files\Common Files\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.EXE" >>%file% schtasks /create /tn "Rearm2" /tr %file% /sc daily /mo 30 /RL HIGHEST /f start C:\OR4.bat pause echo. echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU ) :UninstallOR4 CLS @color 9A mode con: cols=64 lines=21 title OfficeRearm4 echo. ----------------------------------------------- echo. echo. Uninstalling OR4!!!!! echo. ----------------------------------------------- echo. echo. Please Wait... echo. echo. SET file=%SystemDrive%\OR4.bat IF EXIST %file% attrib -h %file% del %file% del c:\OR4 schtasks /delete /tn "Rearm2" /f echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU ) :OR4Status @color 9A mode con: cols=64 lines=21 title OfficeRearm4 cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU )
The following line needs to be removed echo XCOPY /Y /S /I "%SystemDrive%Office Backup" "%ALLUSERSPROFILE%/Microsoft\OfficeSoftwareProtectionPlatform" >>%file% A double-quote is missing at the end echo ) ELSE ( "%COMMONPROGRAMFILES(X86)%\microsoft shared\OfficeSoftwareProtectionPlatform\OSPPREARM.exe" >>%file%
man your so negative, what's not to understand?, simply in 07 there is a patched dll (1 dll that worked with every retail edition) that dll allowed the phone activation code to be all 000000 no mater what edition of 07 was installed or what product key was used , nothing complicated there so the same thing could be done with the phone activation in 2010. @timesurfer, there is a download here by smorgan that lists all the editions of office available and in that are many oem variants, I can get Oem SLP key for pro + (assuming 32 and 64bit will be the same key) what can be done with it?
Ok I ran the rearm2 task like 12 times each time it successfully rearmed so it must be restoring which means this method is working. Yea!!!!! Thank you Masterdisaster When I run task cmd window comes up does it's thing but then asks for confirmation before it rearms then it closes. So it'd be nice to skip confirmation if possible. Also a backup folder is created in same place the console is sitting in my case desktop. I noticed that the files in c:\ aren't all in the back up folder which would be nice. And to have all the stuff in c: be hidden is ideal if it could be done. Besides that works as expected
Ok so this is working ok but it's putting twice the code in the OR4.bat file and I can't see why? But all backup's and OR4.bat gets put into the OR4 folder which is good Task works and restore rearm works Code: @echo off @color 9A mode con: cols=64 lines=21 title OfficeRearm4 :MAINMENU CLS echo. echo. oOOOOOo OOOOOO OO OOO oO oOOOOOo echo. OO OO OO OOo OO OOO OOO OO OO echo. OO OO OO OOo OO OOO OOOO OO OO echo. OO OO OO OOo OO OO OO OO OO echo. OO OO OO OOo OO OO OO OO OO echo. OO OO OOOOOOOo OOOOOOOO OO OO OO echo. OO OO OO oo OO OO OO OO echo. OO OO OO Oo OO OO OO OO echo. OO OO OO OO OO OO OO OO OO echo. ... oOOOOOo OO Oo OO OOOO OO oOOOOOo ... echo. echo. by timesurfer echo. echo. An alternative Office 2010 Rearm Concept Solution echo. echo. A. Install OR4 echo. B. Uninstall OR4 echo. C. OR4 Status echo. :CHOOSEACTION set /p userinp= ^ Make your selection: set userinp=%userinp:~0,1% if /i "%userinp%"=="A" goto InstallOR4 if /i "%userinp%"=="B" goto UninstallOR4 if /i "%userinp%"=="C" goto OR4Status echo. echo. Try Again Dude... echo. GOTO CHOOSEACTION :InstallOR4 CLS @color 9A mode con: cols=64 lines=21 title OfficeRearm4 echo. ----------------------------------------------- echo. echo. Installing OR4!!!!! echo. ----------------------------------------------- echo. echo. Please Wait... echo. echo. @color 9A mode con: cols=64 lines=21 title OfficeRearm4 mkdir "C:\OR4" net stop osppsvc xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "C:\OR4" reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\Backup.hiv /y net start osppsvc SET file=%SystemDrive%\OR4\OR4.bat IF EXIST %file% attrib -h %file% echo @echo off >>%file% echo net stop osppsvc >>%file% echo xcopy /cheriky "C:\OR4" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file% echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\OR4\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. echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU ) :UninstallOR4 CLS @color 9A mode con: cols=64 lines=21 title OfficeRearm4 echo. ----------------------------------------------- echo. echo. Uninstalling OR4!!!!! echo. ----------------------------------------------- echo. echo. Please Wait... echo. echo. SET file=%SystemDrive%\OR4 IF EXIST %file% attrib -h %file% del %file% schtasks /delete /tn "Rearm2" /f echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU ) :OR4Status @color 9A mode con: cols=64 lines=21 title OfficeRearm4 cscript "%PROGRAMFILES%\Microsoft Office\OFFICE14\OSPP.VBS" /dstatus schtasks /query | FINDSTR /I "Rearm2" IF ERRORLEVEL 1 echo Rearm2 Task is not yet Installed echo. Press any key to return to the main menu. pause > nul GOTO MAINMENU )
lol...Well I don't wanna to force you to learn a high level language Also I edited my last post check it out...lol
Still getting error 0x2 0xc4f025 and it do not rearm.... NOTE: Run the old script and this one did rearm.... (let me see the new script to check it out)