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. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Once I test tonight, I will check this bit of code to. Do you think that what you posted and slaves check.bat will work together?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    For now my Check.bat is not fully compatible, but this should be the next step.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. timesurfer

    timesurfer MDL Developer

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

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #764 timesurfer, Jun 29, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Adjusted content till we can get H2 task to run silent

    Code:
    IR6 task runs silently
     
  5. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    Don't forget my timezone is UTC+1DST.

    Will test Starter ASAP.

    Edit: Seems to be golden.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. roster

    roster MDL Novice

    Jun 29, 2013
    1
    0
    0
    When i run Install IORRT (from Duality 420), i've got error message "No rearms detected..." I've installed Office 2013 VL.
    Can you help me?
     
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Did you previously use another solution? I ask cause a clean 2013 install will have rearms present and you only need one rearm to install IORRT

    So unless you clean install W7 and reinstall 2013 you'll have to use a KMS activator to get back a rearm hence when you use KMS activator it will restore a rearm then you can use IORRT

    Unfortunately Office 2010 and 2013 both keep a memory of previous installation status so if your out of rearms and uninstall office and then reinstall it still will have no rearms

    IORRT works perfect though with no troubleshooting if you have at least one rearm available which is why I put that No Rearms detected error check!

    Hope that helps

    TS
     
  8. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    Does that mean it´s working for you? Would be nice to cross-check Home Basic and Pro/Ultimate to verify functionality.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    Both Starter and HomeBasic worked. There is always a remaining risk for failure, but I doubt we can do it in a better way.

    There's one party-pooper, however: Security Essentials. Its warning window stays on screen.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    Unfortunately the theming is buggy in certain cases without trying to backup and restore it. Too much diversity here, so the failure span should be tolerable :D.

    Never tested MSE so far, will install it and take a look what´s happening.

    BTW: In Win 8.1 Preview the output for 'wmic os get caption' is localized now :suicide:.
    For Win 8 Pro WMC i get: 'Windows 8 Pro with Media Center', even on my german system.
    For Win 8.1 Pro WMC i get: 'Windows 8.1 Pro Preview mit Media Center'...what the heck!!!!!!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    I stopped using German systems long ago.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    So far one could rely that output for wmic wasn´t localized, as this will break batch scripts when running on non-english versions. Remember the little challange to determine Notification status properly.

    So i like my german system for testing the functionality of scripts, together with an english version in VM. That way i can assure, it´s running regardless the localization.

    Makes no sense to spread scripts which are only running on determined languages in an international forum :busted_blue:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. iSkyfree

    iSkyfree MDL Novice

    Sep 20, 2012
    26
    22
    0
    thank's for share :biggrin:
     
  14. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    #775 s1ave77, Jun 30, 2013
    Last edited by a moderator: Apr 20, 2017
    Pimped the little rearm script script a slight bit for more testing convenience :D. Implemented the choice for number of attempts to run or go straight to set Date :cool2:.

    Code:
    @echo off
    CLS
    title REARM TASK For Win 7 / Server 2008 R2
    :: code by s1ave77
    mode con cols=87 lines=22
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    :UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "%~s0", "%params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /B
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    
    setlocal ENABLEDELAYEDEXPANSION
    
    
    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
    for /f "tokens=2* delims= " %%a in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "PROCESSOR_ARCHITECTURE"') do set pa1=%%b
    if "%pa1%" == "AMD64" set vera=x64
    if "%pa1%" == "x86" set vera=x86
    cls
    for /f "usebackq tokens=2 delims==" %%n in (`"%SystemRoot%\System32\wbem\WMIC.exe" /namespace:\\root\cimv2 path SoftwareLicensingService get RemainingWindowsReArmCount /format:list`) do set r=%%n 
    REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion | FINDSTR 6.1 >NUL
    IF %ERRORLEVEL%==1 ( 
        echo ======================================================================================
        echo:
        echo                          Not supported: %ver% %vera% found^!
        echo:
        echo ======================================================================================
        echo:
        echo:
        echo Feature is only supported on Windows 7 or Server 2008 R2 
        echo:
        pause 
        goto :Exit
        )
    echo ======================================================================================
    echo:
    echo                             Rearming %ver% %vera%
    echo:
    echo ======================================================================================
    echo:
    echo:
    echo Remaining Rearm Count: %r%
    echo:
    echo How many attempts to go...? To run all available simply hit enter.
    echo:
    SET /p r=Enter Number here:    ^>
    echo:
    CHOICE /C CSE /N /M "[C]ontinue et Date or [E]xit ?:"
    if %errorlevel%==1 goto :furtherR
    if %errorlevel%==2 goto :Date
    if %errorlevel%==3 goto :Exit
    :furtherR
    echo:
    FOR /L %%i IN (1,1,%r%) DO (
        cls
        echo ======================================================================================
        echo:
        echo                             Rearming %ver% %vera%
        echo:
        echo ======================================================================================
        echo:
        echo:
        SET /A COUNT+=1
        echo ...Rearm Attempt !COUNT! of %r%
        cscript.exe /b %windir%\system32\slmgr.vbs /rearm
        net stop sppsvc >NUL
        net start sppsvc >NUL
        )
    :Date
    date
    
    slmgr /dlv
    
    :EXIT
    ENDLOCAL
    exit
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Now we just need it to automatically forward the date at least 32 days.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    Not that easy when using 'wmic os get localdatetime', which afaik would be the best way :D.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #778 timesurfer, Jun 30, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  18. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    #779 s1ave77, Jun 30, 2013
    Last edited by a moderator: Apr 20, 2017
    Here is a Rearm script solution with simple Date input via wmic, so it should work regardless any localisation.

    Rearm.and.Set.Date.Task.cmd


    Code:
    ======================================================================================
    
                                         Set Date
    
    ======================================================================================
    Actual date: 06/30/2013 and time: 22:09:59.
    
    Actual Day: 30
    Enter Day here:
    Actual Month: 06
    Enter Month here:
    Actual Year: 2013
    Enter Year here:
    
    
    New date: 06/30/2013 and time: 22:09:59.
    
    [A]gain or [C]ontinue ?:
    Code:
    @echo off
    CLS
    title REARM TASK For Win 7 / Server 2008 R2
    :: code by s1ave77
    mode con cols=87 lines=22
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
    ) else ( goto gotAdmin )
    :UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "%~s0", "%params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /B
    :gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    
    setlocal ENABLEDELAYEDEXPANSION
    
    
    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
    for /f "tokens=2* delims= " %%a in ('reg query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "PROCESSOR_ARCHITECTURE"') do set pa1=%%b
    if "%pa1%" == "AMD64" set vera=x64
    if "%pa1%" == "x86" set vera=x86
    cls
    for /f "usebackq tokens=2 delims==" %%n in (`"%SystemRoot%\System32\wbem\WMIC.exe" /namespace:\\root\cimv2 path SoftwareLicensingService get RemainingWindowsReArmCount /format:list`) do set r=%%n 
    REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion | FINDSTR 6.1 >NUL
    IF %ERRORLEVEL%==1 ( 
        echo ======================================================================================
        echo:
        echo                          Not supported: %ver% %vera% found^!
        echo:
        echo ======================================================================================
        echo:
        echo:
        echo Feature is only supported on Windows 7 or Server 2008 R2 
        echo:
        CHOICE /C SB /N /M "et Date or ack ?:"
        if %errorlevel%==1 goto :Date
        if %errorlevel%==2 goto :Exit
        )
    echo ======================================================================================
    echo:
    echo                             Rearming %ver% %vera%
    echo:
    echo ======================================================================================
    echo:
    echo:
    echo Remaining Rearm Count: %r%
    echo:
    CHOICE /C CSE /N /M "[C]ontinue et Date or [E]xit ?:"
    if %errorlevel%==1 goto :furtherR
    if %errorlevel%==2 goto :Date
    if %errorlevel%==3 goto :Exit
    echo:
    echo How many attempts to go...? To run all available simply hit enter.
    echo:
    SET /p r=Enter Number here:    ^>
    :furtherR
    echo:
    FOR /L %%i IN (1,1,%r%) DO (
        cls
        echo ======================================================================================
        echo:
        echo                             Rearming %ver% %vera%
        echo:
        echo ======================================================================================
        echo:
        echo:
        SET /A COUNT+=1
        echo ...Rearm Attempt !COUNT! of %r%
        cscript.exe /b %windir%\system32\slmgr.vbs /rearm
        net stop sppsvc >NUL
        net start sppsvc >NUL
        )
    :Date
    set X=
    for /f "skip=1 delims=" %%x in ('wmic os get localdatetime') do if not defined X set X=%%x
    set D.YEAR=%X:~0,4%
    set D.MONTH=%X:~4,2%
    set D.DAY=%X:~6,2%
    set D.HOUR=%X:~8,2%
    set D.MINUTE=%X:~10,2%
    set D.SECOND=%X:~12,2%
    set D.FRACTIONS=%X:~15,6%
    set D.OFFSET=%X:~21,4%
    echo:
    :Back
    cls
    echo ======================================================================================
    echo:
    echo                                      Set Date
    echo:
    echo ======================================================================================
    echo Actual date: %D.MONTH%/%D.DAY%/%D.YEAR% and time: %D.HOUR%:%D.MINUTE%:%D.SECOND%.
    echo:
    ::echo Sytemvalue old: %D.YEAR%%D.MONTH%%D.DAY%%D.HOUR%%D.MINUTE%%D.SECOND%.%D.FRACTIONS%%D.OFFSET% 
    ::echo:
    echo Actual Day: %D.DAY%
    SET /p D.DAY=Enter Day here:
    echo Actual Month: %D.MONTH%
    SET /p D.MONTH=Enter Month here:
    echo Actual Year: %D.YEAR%    
    SET /p D.YEAR=Enter Year here:
    echo:
    ::echo Sytemvalue new: %D.YEAR%%D.MONTH%%D.DAY%%D.HOUR%%D.MINUTE%%D.SECOND%.%D.FRACTIONS%%D.OFFSET%
    ::echo:
    wmic os where( primary=1) call setdatetime %D.YEAR%%D.MONTH%%D.DAY%%D.HOUR%%D.MINUTE%%D.SECOND%.%D.FRACTIONS%%D.OFFSET% >nul
    echo New date: %D.MONTH%/%D.DAY%/%D.YEAR% and time: %D.HOUR%:%D.MINUTE%:%D.SECOND%.
    echo:
    CHOICE /C ASE /N /M "[A]gain or [E]xit ?:"
    if %errorlevel%==1 goto :Back
    if %errorlevel%==2 goto :DateManual
    if %errorlevel%==3 goto :Exit
    
    pause
    slmgr /dlv
    
    :EXIT
    ENDLOCAL
    exit
    
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    I like the old rearm force notifications better..

    anyways, where did the newest check.bat go? ver 4 i think..

    I have that version i also think cause the HB test are successful. Haven't tested starter.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...