Rearm Wizard - The Premier Rearm Solution for Windows 7 and Office 2013

Discussion in 'MDL Projects and Applications' started by timesurfer, Mar 27, 2013.

  1. timesurfer

    timesurfer MDL Developer

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

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #962 timesurfer, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #963 timesurfer, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #964 timesurfer, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #965 timesurfer, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  6. Dos_Probie

    Dos_Probie MDL Member

    Jul 18, 2012
    249
    86
    10
    #966 Dos_Probie, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    @timesurfer, looks like you figured out your Personalization window problem, and you could also just write the .vbs to the temp then delete when finished setting up the theme like so..
    Code:
    echo Set WshShell = WScript.CreateObject("WScript.Shell") > %tmp%\set_theme.vbs
    echo WshShell.Run "%windir%\\resources\\themes\\IR7Bkup.theme" >> %tmp%\set_theme.vbs
    echo Wscript.Sleep 1000  >> %tmp%\set_theme.vbs
    echo WshShell.AppActivate("Desktop Properties")>> %tmp%\set_theme.vbs
    echo WshShell.Sendkeys "%%FC" >> %tmp%\set_theme.vbs
    echo WshShell.Sendkeys "{F4}" >> %tmp%\set_theme.vbs
    wscript.exe %tmp%\set_theme.vbs
    del %tmp%\set_theme.vbs
    Or a more direct approach, instead of dealing with a .vbs just run the theme change directly from your batch
    with a goto :themeset
    Note: Used timeout instead of the old xp carry over ping command, just test and adjust seconds needed for the timeout..DP

    Code:
    :themeset
    :: Set path to theme directory..
     set TargetDir="%windir%\resources\themes"
     pushD "%~dp0" & cd /d "%~dp0"
    :: Activate specified theme..
     cd /d %TargetDir% 
     start "" IR7Bkup.theme
     timeout /t 1 /nobreak>nul
    :: Kill Personalization..
     taskkill /f /im explorer.exe>nul 
     start explorer.exe>nul
     popD
    
     
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #967 timesurfer, Oct 24, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #968 timesurfer, Oct 25, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Hey, here is my thoughts on the themeinstallpersonlizationwindowclose.vbs (tipwc.vbs) concept :eek:...lol

    1. I like the idea of the %tmp% but not sure it's faster as mine just runs the .vbs in the working directory

    2. set cmd and doing function also sounds great but I think it's faster to just put code directly into IR72.bat

    3 Also below in red where is detection for enterprise although enterprise is a big pain in the butt...

    IR7.bat

    Code:
    title IR7 
    setlocal ENABLEDELAYEDEXPANSION 
    SETX IR7backup "%SystemDrive%\Trial\IR7" >nul 
    set KEY_NAME=HKCU\Software\Microsoft\Windows\CurrentVersion\Themes
    set VALUE_NAME=CurrentTheme
    set spp=SoftwareLicensingProduct
    for /F "usebackq tokens=3*" %%A IN (`reg query "%KEY_NAME%" /v "%VALUE_NAME%" 2^>nul ^| find "%VALUE_NAME%"`) do IF ~%%B==~ (SET themefile=%%A) ELSE (SET themefile=%%A %%B)
    for %%F in ("%themefile%") do set theme=%%~nF
    set wppath=%appdata%\Microsoft\Windows\Themes
    for /f "tokens=2,3,4,5,6,7 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d %%e %%f 
    :loopV 
    if "%ver:~-1%"==" " set "ver=%ver:~0,-1%" & goto :loopV 
    wmic path %spp% get LicenseStatus /format:list 2>nul | findstr /i 5 >nul 2>&1 
    if %errorlevel%==0 call IR72.bat & goto :Exit 
    if %errorlevel%==1 goto :Backup 
    :Backup
    if "%ver%" == "Windows 7 Starter" ( goto :Exit ) 
    if "%ver%" == "Windows 7 Home Basic" ( goto :BackupHB ) 
    if exist "%systemdrive%\Trial\IR7\IR7Bkup.theme" del /s /q "%systemdrive%\Trial\IR7\IR7Bkup.theme" >nul
    echo F | xcopy "%themefile%" /s /q "%systemdrive%\Trial\IR7" /V /Y >nul 
    ren "%systemdrive%\Trial\IR7\%theme%.theme" "IR7Bkup.theme"
    goto :Exit 
    :BackupHB 
    xcopy "%wppath%\TranscodedWallpaper.jpg" /s /q "%systemdrive%\Trial\IR7" /Y >nul 
    goto :Exit 
    :Exit 
    ENDLOCAL 
    exit
    Is it %%a %%b %%c %%d %%e %%f

    This is also where my still existing "server" question will also need detection about version and theme/wallpaper backup if they have them?

    Thanks :worthy:
     
  9. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #969 timesurfer, Oct 26, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  10. Tr3bg0D

    Tr3bg0D MDL Junior Member

    May 8, 2011
    94
    3
    0
    @timesurfer - I just checked your code above on my 2 W7 Enterprise systems and the ADMIN CHECK code still loops at the start.
     
  11. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #972 timesurfer, Oct 27, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Just installed Enterprise on vb and I experienced no loop to open up RW and Admin check worked as usual

    See attachment below:

    @MDL

    If anyone can turn these .bat codes into a .vbs let me know :eek:...lol

    Code:
    @echo off 
    mode con: cols=42 lines=2 
    title IR7 
    setlocal ENABLEDELAYEDEXPANSION
    SETX IR7backup "%SystemDrive%\Trial\IR7" >nul 
    set KEY_NAME=HKCU\Software\Microsoft\Windows\CurrentVersion\Themes
    set VALUE_NAME=CurrentTheme
    set spp=SoftwareLicensingProduct
    for /F "usebackq tokens=3*" %%A IN (`reg query "%KEY_NAME%" /v "%VALUE_NAME%" 2^>nul ^| find "%VALUE_NAME%"`) do IF ~%%B==~ (SET themefile=%%A) ELSE (SET themefile=%%A %%B)
    for %%F in ("%themefile%") do set theme=%%~nF
    set wppath=%appdata%\Microsoft\Windows\Themes
    for /f "tokens=2,3,4,5,6,7 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d %%e %%f 
    :loopV 
    if "%ver:~-1%"==" " set "ver=%ver:~0,-1%" & goto :loopV 
    wmic path %spp% get LicenseStatus /format:list 2>nul | findstr /i 5 >nul 2>&1 
    if %errorlevel%==0 call IR72.bat & goto :Exit 
    if %errorlevel%==1 goto :Backup 
    :Backup
    if "%ver%" == "Windows 7 Starter" ( goto :Exit ) 
    if "%ver%" == "Windows 7 Home Basic" ( goto :BackupHB ) 
    if exist "%systemdrive%\Trial\IR7\IR7Bkup.theme" del /s /q "%systemdrive%\Trial\IR7\IR7Bkup.theme" >nul
    echo F | xcopy "%themefile%" /s /q "%systemdrive%\Trial\IR7" /V /Y >nul 
    ren "%systemdrive%\Trial\IR7\%theme%.theme" "IR7Bkup.theme"
    goto :Exit 
    :BackupHB 
    copy "%wppath%\TranscodedWallpaper.jpg" /s /q "%systemdrive%\Trial\IR7" /Y >nul 
    goto :Exit 
    :Exit 
    ENDLOCAL 
    exit 
    Thanks
     
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #974 timesurfer, Oct 29, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Regarding the personalization window closing:

    Code:
    echo echo Set WshShell = WScript.CreateObject("WScript.Shell") ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Run "%windir%\\resources\\themes\\IR7Bkup.theme" ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo Wscript.Sleep 13000 ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.AppActivate("Desktop Properties") ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "%%%%FC" ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "{F4}" ^>^>twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo call twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo del twrpwc.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    The way it works is it restores theme then it waits for the "time" in green before closing the personalization window

    I did some testing with my extremely slow computer and changed the duration before closing personalization window from 10000 to 13000

    You can adjust this if you like and you'll find it in two places in RW

    New build to reflect these changes has been uploaded to first post

    I also changed IORRT's Hybrid task from onstart to onlogon

    :shisha:
     
  13. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Was testing some stuff and found a bug in the regular uninstall...

    Everyone that has DL'd this RW Phase 1.5 please junk it and await a new working one :suicide:...lol

    Going the extra mile for the rearmists...

    And I'm the only tester :p...lol

    Be right back :eek:...lol
     
  14. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Ok it's up and everything seems to be working properly now :worthy:...lol
     
  15. sanjay0864

    sanjay0864 MDL Novice

    Oct 30, 2013
    3
    0
    0
    Does this work under Windows 8.1 to rearm Office 2013?
     
  16. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,818
    19,024
    340
    Noop; because under Windows 8.x, Office 2013's activation system is binded with Windows activation.
     
  17. sanjay0864

    sanjay0864 MDL Novice

    Oct 30, 2013
    3
    0
    0
    Pardon my ignorance. But can you elaborate a bit and explain what that means. Also, I have a genuine, activated Windows 8.1. What are my options for being able to use this version of Office 2013 beyond the 30 day trial?

    Also, it might be a good idea to post a disclaimer in the 'opening post' that this does not work with Windows 8.1.

    Thanks.