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. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    #681 Carlos Detweiller, Jun 26, 2013
    Last edited by a moderator: Apr 20, 2017
    Code:
    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
    Something's wrong with this. It should set a variable "ver", but in my test I got "_er" or even "__r" (_ indicating a blank). Reducing to

    Code:
    for /f "tokens=2,3,4,5 delims= " %%a in ('wmic os get caption') do set ver=%%a %%b %%c %%d
    seems to work, but does it work everywhere?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    Looks OK. However, there's still the same problem (theming) in the installkey.bat that's created.
     
    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
    First post Co-Developers section updated

    Thank you Carlos for all your hard work

    TS
     
  4. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    #684 s1ave77, Jun 26, 2013
    Last edited by a moderator: Apr 20, 2017
    Hmm, first version is working for me, tested on new Home Basic install. Theming in installkey.bat was only a test, not part of Duality so far.

    Second try: View attachment 22430
     
    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
    Co-Developers section first post updated

    chnix gets Co-Developers status

    Adjusted order in reflection of discovery, original ideas, code development, thread starting and testing...
     
  6. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340

    Better immediately stop that post count spamming :mad:!


    :D
     
    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
    #688 timesurfer, Jun 26, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  9. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    What was changed?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    Time to get that VMs rolling again.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    Tested on Pro again, script is backing up the theme and restoring it while rearming. On Home Basic it is backing up the wallpaper and restores it properly after rearm + log off.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    If you execute the command from #698 in a command line, it succeeds. But why does it mess up the list you get with 'set'? Could it be you captured a few non-printables?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    No one listens to me :suicide:...lol

    Rearm Folder Concept :eek: hence one rearm folder

    Been posting Rearm folder stuff for like 10 posts...

    No one responds? Why?

    How bout before we do something we describe what we're doing like I wanted one rearm folder and described it like many times :suicide:....lol

    Then we don't have to play catchup or ask what changed

    Better communication = better batch file

    :shisha:
     
  14. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    No clue to what you referring...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    ATM i´m only working on Check.bat, to get it properly working on various versions. In case it will, i only need to implement the changes in latest Duality from dropbox, so all changes should come together. That way i do not need to touch other stuff.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Sorry man, been doing other things. I just peek in here and there to see whats happening.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,771
    7,713
    210
    #698 Carlos Detweiller, Jun 27, 2013
    Last edited by a moderator: Apr 20, 2017
    Code:
    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
    If you type that in a command line, and use 'set' afterwards to view it, the list is messed up. It doesn't show 'ver=blah' but
    ' er=blah' or even ' r=blah'.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,397
    340
    #699 s1ave77, Jun 27, 2013
    Last edited by a moderator: Apr 20, 2017
    Using it together with the little loop:
    Code:
    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
    
    
    That way any spaces at the end are cutted.

    EDIT: Not shure what 'set' command line you mean. Better show me :D.
     
    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
    #700 Humphrey, Jun 27, 2013
    Last edited by a moderator: Apr 20, 2017
    Try this instead, No loop required and it only puts out Ultimate as the editions instead of Windows 7 Ultimate. Removed extra ,5,6,7 and the a% etc

    Code:
     for /f "tokens=2,3,4 delims= " %a in ('wmic os get caption') do set ver=%c
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...