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
    #1241 timesurfer, Apr 5, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  2. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1242 Humphrey, Apr 5, 2014
    Last edited by a moderator: Apr 20, 2017
    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
    #1243 timesurfer, Apr 5, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Can you make the color work this way please

    1. When opening RW for first time it goes to RW mainmenu not :color (It will always be option to goto :color not automatic)

    2. When wrong txt or bkg is entered it goes to :color (This way user has to enter correct values or it always just goes to :color

    3. When color is established then user has to go manually to RW mainmenu

    For instance, when user does not enter A-F, it just stays at mainmenu

    Code:
    :mainmenu
    set userinp=
    mode con: cols=50 lines=11
    cls
    echo.
    echo.  
    echo.              ---- Rearm Wizard ----
    echo.    
    echo.            A. IR7 (Windows 7)
    echo.            B. IORRT (Office 2013)
    echo.            C. ISO/URL Links
    echo.            D. ISO Installation Basics
    echo.            E. Color Customization
    echo.            F. Exit
    echo.
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto IR7
    if /i "%userinp%"=="B" goto IORRT
    if /i "%userinp%"=="C" goto Links
    if /i "%userinp%"=="D" goto ISO
    if /i "%userinp%"=="E" goto Color
    if /i "%userinp%"=="F" goto Exit
    GOTO :mainmenu
    Thanks :worthy:

    :shisha:
     
  4. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1244 Humphrey, Apr 5, 2014
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    1. Ok, at one time it went to color first when first opening RW
    2. I think I might know?
    3. Why does it goto :top instead of just :mainmenu :suicide:...lol
    4. VL :eek: It works on Office 2013 VL and Ent/Pro so yea :p...lol

    :worthy:
     
  6. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1246 timesurfer, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    The color is malfunctioning

    It doesn't change colors till it's back at mainmenu

    It also should be the color chosen before it leaves :color so user can fine tune colors before leaving :color

    I think you can get it to not deal with non-existant options by putting

    Code:
    goto color after the if's
    Just like the other menu's do
     
  7. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1247 Humphrey, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    1: ;)

    2: Well share with me cause the way I see it, the first if not when checking for which letter that is entered will throw it for a loop cause lets say the first IF is looking for the letter/number 0 and they entered a 1 then it would do what ever the first if said to do if it didn't find the 0.

    3: Cause its this line:
    Code:
    for /F "usebackq tokens=2 delims=x" %%A IN (`reg query "HKCU\Software\Microsoft\Command Processor" /v "DefaultColor" 2^>nul ^| find "DefaultColor"`) do (
      Color %%A)
    )
    
    That is actually setting the color here. I did this cause it wasn't updating in the color selection menu. I will try and solve that in my next code post.


    Make this below your :color code.

    Code:
    :Color
    mode con: cols=21 lines=22
    title Color Customization
    for /F "usebackq tokens=2 delims=x" %%A IN (`reg query "HKCU\Software\Microsoft\Command Processor" /v "DefaultColor" 2^>nul ^| find "DefaultColor"`) do (
      Color %%A)
    )
    ::set bkg=
    ::set txtclr=
    CLS
    echo.
    echo  Color Customization
    echo.
    echo  0 = Black
    echo  1 = Blue
    echo  2 = Green
    echo  3 = Aqua
    echo  4 = Red
    echo  5 = Purple
    echo  6 = Yellow
    echo  7 = White
    echo  8 = Gray
    echo  9 = Light Blue
    echo  A = Light Green
    echo  B = Light Aqua
    echo  C = Light Red
    echo  D = Light Purple
    echo  E = Light Yellow
    echo  F = Bright White
    echo  G = Rearm Wizard
    echo.
    set /p txtclr=    ^   Text Color:
    if /i "%txtclr%"=="G" goto :MainMenu
    set /p bkg=    ^   Background Color:
    if /i "%bkg%"=="G" goto :MainMenu
    ::set bkg=%bkg:~0,1
    ::set txtclr=%txtclr:~0,1%
    set bkg=%bkg%
    set txtclr=%txtclr%
    reg add "HKCU\Software\Microsoft\Command Processor"  /t  REG_DWORD /v DefaultColor /d 0x%bkg%%txtclr% /f >NUL
    ::@COLOR %bkg%%txtclr%
    GOTO :COLOR
    
    This color code should do exactly what you want. You just have to worry about how your going to set the TITLE of the mainmenu to rearm wizard. Either put another like to set the title again or change it around. If ::commented out some lines in color that I tested and concluded they aren't needed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1248 timesurfer, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Nice code, will go test soon

    :shisha:
     
  9. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    #1249 Compo, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    Regardless of you attempt at a fix and the fact nobody has noted my recent post regarding the flawed command, I believe you are using the wrong registry key too.
    My suggestion is:
    Code:
    @Echo Off
    SetLocal
    Mode Con: Cols=56 Lines=6
    For /f "tokens=2 delims=x" %%A In ('Reg Query HKCU\Console /v ScreenColors'
    ) Do Set _CLR=0%%A
    Set _CLR=%_CLR:~-2%
    Echo(
    Echo( Your Current Default Screen Text Color Code is %_CLR:~-1%
    Echo(
    Echo( Your Current Default Screen Background Color Code is %_CLR:~-2,1%
    Echo(
    TimeOut /t 8
     
  10. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1250 timesurfer, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Thanks Compo

    If you've used the color that is in the code on first post source code for RW, that is how i want it to look

    Code:
    :Color
    title Color Customization
    set bkg=
    set txtclr=
    mode con: cols=21 lines=22
    CLS
    echo.
    echo  Color Customization
    echo.
    echo  0 = Black
    echo  1 = Blue
    echo  2 = Green
    echo  3 = Aqua
    echo  4 = Red
    echo  5 = Purple
    echo  6 = Yellow
    echo  7 = White
    echo  8 = Gray
    echo  9 = Light Blue
    echo  A = Light Green
    echo  B = Light Aqua
    echo  C = Light Red
    echo  D = Light Purple
    echo  E = Light Yellow
    echo  F = Bright White
    echo  G = Rearm Wizard
    echo.
    set /p txtclr=    ^   Text Color: 
    if /i "%txtclr%"=="G" goto mainmenu
    set /p bkg=    ^   Background Color: 
    if /i "%bkg%"=="G" goto mainmenu
    set bkg=%bkg:~0,1%
    set txtclr=%txtclr:~0,1%
    set bkg=%bkg%
    set txtclr=%txtclr%
    @COLOR %bkg%%txtclr%
    mode con: cols=48 lines=11
    reg add "HKCU\Software\Microsoft\Command Processor"  /t  REG_DWORD /v DefaultColor /d 0x%bkg%%txtclr% /f >NUL
    IF '%ERRORLEVEL%' EQU '0' ( goto color
    ) ELSE (
    goto mainmenu
    )
    No other msg's or different layouts

    Here is stuff at top that insures past color chosen is how RW will appear

    Code:
    setlocal ENABLEEXTENSIONS
    set KEY_NAME=HKCU\Software\Microsoft\Command Processor
    set VALUE_NAME=DefaultColor
    for /F "usebackq tokens=2 delims=x" %%A IN (`reg query "%KEY_NAME%" /v "%VALUE_NAME%" 2^>nul ^| find "%VALUE_NAME%"`) do (
      IF /I %%A EQU 0x0 (Color %%A) ELSE (Color %%A)
    )
    
    We just need console to not freak out when invalid option is chosen

    Also we need RW when it first opens up to open up to RW not color

    After user is satisfied with their color combo then they should see it in the color function before they go to other menu's in RW

    Then we are done with this final build probably unless someone want's to use WMIC to make Office 2013 detection faster as IORRT menu comes up :eek:...lol

    Code:
    :IORRT
    setlocal enabledelayedexpansion
    title IORRT
    REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion | FINDSTR 6.1 >NUL
    IF ERRORLEVEL 1 cls & echo IORRT supports Office 2013 only under Windows 7 & ping -n 5 127.0.0.1 >nul & goto mainmenu
    set OfficeArchType=
    if '%processor_architecture%'=='x86' Set OfficeArchType=32 && Goto:EndArchIR7
    goto:WOWIR7
    :WOWIR7
    2>nul REG QUERY HKLM\SOFTWARE\Microsoft\Office\15.0\Common | find /i "InstallRoot" 1>nul
    IF ERRORLEVEL 1 Set OfficeArchType=WOW && Goto:EndArchIR7
    Set OfficeArchType=64
    :EndArchIR7
    if %OfficeArchType%==WOW (
    FOR /F "tokens=2* delims= " %%A IN ('"REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\InstallRoot" /v Path 2>NUL"') DO SET InstallRoot=%%B
    if not defined InstallRoot ( cls & echo Office 2013 is not installed... & ping -n 5 127.0.0.1 >nul & goto mainmenu )
    Goto:FoundPath
    )
    FOR /F "tokens=2* delims= " %%A IN ('"REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\Common\InstallRoot" /v Path 2>NUL"') DO SET InstallRoot=%%B
    if not defined InstallRoot ( cls & echo Office 2013 is not installed... & ping -n 5 127.0.0.1 >nul & goto mainmenu )
    :FoundPath
    1>nul 2>nul net start osppsvc
    cscript "%InstallRoot%"ospp.vbs /dstatus |FINDSTR /i "KMS_Client" >NUL
    if %errorlevel% EQU 1 ( cls & echo No office 2013 KMS detected... & ping -n 5 127.0.0.1 >nul & goto mainmenu )
     
  11. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1251 Humphrey, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    #1252 Compo, Apr 6, 2014
    Last edited by a moderator: Apr 20, 2017
    No you don't all you need to do is to issue the Color command with the new two digit HEX code, (the console colors will stay like that unless you specifically change it again within that script).

    As a special favor here is a complete rewrite of the :Color section, complete with checks to prevent invalid or matching foreground and background colors.
    Code:
    :Color
    Title Color Customization
    Mode Con: Cols=62 Lines=25
    For /f "tokens=2 delims=x" %%A In ('Reg Query HKCU\Console /v ScreenColors'
    ) Do Set _CLR=0%%A
    Set _CLR=%_CLR:~-2%
    For /f "tokens=1,2* delims=[:] " %%A In ('FINDSTR/ibc:"::[%_CLR:~-1%]" "%~f0"'
    ) Do Echo( Your Current Default Screen Text Color is %%C
    For /f "tokens=1,2* delims=[:] " %%A In ('FINDSTR/ibc:"::[%_CLR:~-2,1%]" "%~f0"'
    ) Do Echo( Your Current Default Screen Background Color is %%C
    Set _LST=0123456789ABCDEF
    Echo(
    Echo( Color Customization
    Echo(
    ::[0] 1 Black
    ::[1] 2 Blue
    ::[2] 3 Green
    ::[3] 4 Aqua
    ::[4] 5 Red
    ::[5] 6 Purple
    ::[6] 7 Yellow
    ::[7] 8 White
    ::[8] 9 Gray
    ::[9] 10 Light Blue
    ::[A] 11 Light Green
    :: 12 Light Aqua
    ::[C] 13 Light Red
    ::[D] 14 Light Purple
    ::[E] 15 Light Yellow
    ::[F] 16 Bright White
    For /f "tokens=1,2* delims=[:] " %%A In ('FINDSTR/bc:"::[" "%~f0"') Do (
    Echo=   %%A = %%C)
    Echo(
    Choice /c %_LST% /n /t 30 /d %_CLR:~-1% /m "Choose a Screen Text Color: "
    Set _ELV=%ErrorLevel%
    For /f "tokens=1,2* delims=[:] " %%A In ('FINDSTR/bc:"::[" "%~f0"') Do (
    If %%B Equ %_ELV% Set _FGC=%%A)
    Call Set _LST=%%_LST:%_FGC%=%%
    Choice /c %_LST% /n /m "Choose a Screen Background Color: "
    If %ErrorLevel% Geq %_ELV% (Set/a _ELV=%ErrorLevel%+1) Else (
    Set _ELV=%ErrorLevel%)
    For /f "tokens=1,2* delims=[:] " %%A In ('FINDSTR/bc:"::[" "%~f0"') Do (
    If %%B Equ %_ELV% Set _BGC=%%A)
    Set _CLR=%_BGC%%_FGC%
    (Set _BGC=)
    (Set _FGC=)
    Reg Add HKCU\Console /v ScreenColors /t REG_DWORD /d 0x%_CLR% /f >Nul
    Color %_CLR%
    GoTo :MainMenu
    It uses the variable:%_CLR% for the the two digit HEX color code.
    Please do not attempt to add to or change this code.
     
  13. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1253 timesurfer, Apr 7, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)


    Wow, great coding and functionality

    Would like it, however, to adjust color inside the color function and provide an G option to goto mainmenu

    Also a title that says Color Customization

    And no need for console to say what is already chosen

    Noticed too that when first opening the color console it said white/black when indeed I had light yellow/black but with that part unnecessary in RW that point is mute

    Basically I'd like color console to be as small as possible like before

    But love not having to press enter after option is chosen and it would be neat to see when you choose text that that text appears and then when background is choosen it also appears so that again user can see what they've chosen before chosing option G to goto mainmenu

    Honestly you should post your version in a post in scripting forum just as a landmark for batch color selection although it was my original idea that Humphrey jumped on

    Thanks you guys :hug2:
     
  14. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    #1255 Compo, Apr 7, 2014
    Last edited by a moderator: Apr 20, 2017
    That because my version was reading a registry key which was set at 0x00000007. You had already set the wrong key to 0x0000000e. I would suggest that you reset that key to its default:
    Code:
    Reg Add "HKCU\Software\Microsoft\Command Processor" /v DefaultColor /t  REG_DWORD /d 0 /f >Nul
    I see no purpose in adding a G option, if you didn't want to change the color, you shouldn't have selected the Color Customization option. If you get there by accident, then all you have to do is to select the options you already have set. The first one will be auto set for you after 30 seconds if you don't make a selection. (This is also why I've shown the end user their current settings so that they can replicate them if arriving there by accident).

    I have appended the Title you wanted, the console has been reduced to the smallest size necessary.
     
  16. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1256 timesurfer, Apr 7, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  17. Compo

    Compo MDL Member

    Mar 29, 2011
    136
    106
    10
    I'm sorry but I do not feel that it is a necessary or required function and will as a result not be incorporting it into my code.
    If someone wants to play games with their screen colors then they can do so by returning to the Color section once again from the MainMenu, there is no need to bloat the script with useless functionality.
    I've already answered this, it is necessary for the end user as part of my coding.
    I have already answered this too, the console size in my coding is no larger than is necessary for the output it returns.

    I rarely boot a Windows OS and have no need for your script but if it were my code I'd be removing all of the color and theme 'features' because they offer nothing worthwhile to the target market. People aren't downloading and using your script to change the color of their console window and mess with their theme, all they want to do is to bypass Microsoft's protections.

    Yourself and Humphrey asked for help; I have fixed some coding errors, added input verification, provided the correct registry key and posted unique and exclusive code. I do not wish to be credited in your script since morally I do not agree with its intent so if you want to continue using your code, then go ahead.

    Regards, Compo.
     
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    I understand your opinion but it's my development and it has been as perfect as it can be along it's 9 thread 4 year archival path therefore my designs have made it what it has become today in it's global usage by windows 7 and batch enthusiasts and there have been no complaints of how I designed all of RW, just thanks and me supporting it completely :eek:

    Users, especially new pc users or beginners like to experiment with aspects of W7 like it's cmd.exe console and I've been working with beginners since I was an beginner myself! In that my development of the worlds only rearm concept is meant for those who want to have fun and play with W7 and it's solutions, not take this too seriously like it's a space shuttle launch :eek:...lol

    To me it seems useless to have to go back and forth from :color to :mainmenu just to see what colors a user is attracted to, hence my G option is the best measure to deal with color customization :cool:

    Actually through my perspective one must see the difference between doing code and working with actual users and their needs or desires. What might seem correct through an intellectual coders mind, might indeed not be what the end users actually want!

    I have to digress that my console sizes and functions are original and from my personal creativity so in relation to how the rest of RW/IR7/IORRT relays it's appearance the HUGE color console that was my idea (originally coded by Humphrey) is just too big and doesn't need to tell user what in COLOR they can see themselves...

    I think you underestimate and blanket project what users want. Users want's change in software development and as software programs evolve so do coding and user interface have to merge together to suit what works best and is user friendly ;)

    I have again been the developer of this one and only rearm concept for 4+ years and have spent many 1,000 of hours coding, testing, working with rearm concept staff members and on an in depth level worked with users interested in how W7 works and how a fun program such as RW can teach beginners some introductory lessons in pc software and not just facilitate the same appearance and usage as if was activated:worthy:

    This site MDL's purpose is not to produce the best solutions or promote the most used "homemade" softwares, but to allow people to be creative, have fun and share their interests which in tern all lead to greater understandings of what ever platform they explore. Here at MDL and on the globe there survived 3 main solutions

    1. Rearm Concept
    2. KMS emulation
    3. BIOS emulation

    The Rearm Concept does not attempt to emulate anything but just to give the user free usage for 6 months at a time, then to get another 6 months all that now needs to happen to reinstall via my msgbox's at day 180 is to click yes and allow IR7 to restart the computer and on top of that during the 6 month trial user doesn't need to rearm nor reset their theme which is an accomplishment and one of many original concepts I've had that actually works very well :biggrin:

    And so to end I was the only human being that pushed for an virtually automatic solution that would bypass any need to activate or emulate activation so the few users that took interest in my creative endevour (The Rearm Concept) would have an open source utility to enjoy and learn from while they explore W7.

    This has been an fun, exciting and massive learning experience and all who actually came up with an original idea, started an Rearm Concept thread, coded my original ideas or contributed something of substantial worth to the project, not just an "improvement" to an already existing concept are in the Rearm Concept Staff and I thank them all for helping me and giving to the world an thrilling experience of how .bat/cmd files work and how they can allow free usage in Trial forever...

    @Humphrey

    I'll be giving you an pm later on to discuss the finalization of my color customization concept

    I just wanted to give my users the best they could have which is why I entertained improving the color customization

    Then we are Final and no more work to be done, just supporting which given BatonMAN's WPA inside windows delete should be next to nothing as install/reinstall works perfect and needs only restart :suicide:...lol

    :shisha:
     
  19. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1260 timesurfer, Apr 8, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)