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

    BetonMAN MDL Novice

    Nov 17, 2013
    12
    27
    0
    #1081 BetonMAN, Mar 17, 2014
    Last edited by a moderator: Apr 20, 2017
  2. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1082 Humphrey, Mar 17, 2014
    Last edited by a moderator: Apr 20, 2017
    Before:
    Code:
    :InstallIR7
    cls
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF ERRORLEVEL 1 (
    echo.
    ) ELSE (
    echo IR7 is already installed...
    ping -n 5 127.0.0.1 >nul
    GOTO start
    )
    mode con: cols=42 lines=2
    After:
    Code:
    :InstallIR7
    cls
    cscript.exe %windir%\system32\slmgr.vbs /dlv | FINDSTR /I "Licensed" >NUL
    if %errorlevel% equ 0 Echo.Already Licensed.... exiting.
    ping -n 5 127.0.0.1 >nul & GOTO :Exit
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF ERRORLEVEL 1 (
    echo.
    ) ELSE (
    echo IR7 is already installed...
    ping -n 5 127.0.0.1 >nul
    GOTO start
    )
    mode con: cols=42 lines=2
    Keeps a already Licensed machine from going through the install process.
     
    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
    #1083 timesurfer, Mar 17, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  4. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1084 Humphrey, Mar 17, 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
    #1085 timesurfer, Mar 17, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Edited my last post to show other drive stuff that is not needed

    Code:
    for /f "tokens=2 delims==" %%A in ('"wmic volume where DriveLetter="%SystemDrive%" get SerialNumber /format:list"') do set sn=%%A
    for /f "tokens=2 delims==" %%A in ('"wmic volume where SystemVolume="true" get DeviceId /format:list"') do set sd=%%A
    Or maybe we do need some of what's in red to determine where the Key.bat/Key.vbs should go

    MasterDisaster wrote this so I haven't really gone through it yet to see how to keep it and adapt it to our needs without using RE
     
  6. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    Good question:

    It ran inside windows and placed IR7.bat in %systemdrive% or hidden partition

    Then from RE user would enter C:IR7 to make that IR7.bat file run

    Then upon restart version key would run and watermark would appear and disappear and thus installation was successful

    And key would install silent which is ideal

    :biggrin:
     
  7. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,768
    7,710
    210
    What an outrage in this very topic. :biggrin:

    I guess that would mean a few test VMs are in order, again? :cool:
     
    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
    #1088 timesurfer, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  9. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    When I place the Key.bat into %systemdrive% and restart it works fine via run by Key task

    Am having problems writing it to %systemdrive% from IR7

    Any help?

    :shisha:
     
  10. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Can you post me the code you are working with and then color code the areas where you've got code that isn't working when it comes to writing the file to systemdrive.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #1091 timesurfer, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  12. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1092 Humphrey, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    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
    #1093 timesurfer, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  14. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,769
    1,106
    60
    my hypothesis is you had extra parentheses.

    This part

     
  15. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1095 Humphrey, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    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
    When I have troubles with writing batch I will try to screen capture the force closing cmd prompt which will usually have a error that will assist with diagnosing why a script isn't working.
     
    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
    I do the same sometimes...

    Task is running but Key.bat is not working
    Ran Key.bat directly and also not working

    Something has changed

    So

    1. Key not installing
    2. Task not deleting
    3. Key.bat not deleting

    @MrJinje

    Did you notice how BatonMAN deleted WPA key inside windows :suicide:...lol

    He just moved to %temp% then renamed with powershell then deleted :doh:...lol

    4 years and it was so simple :eek:...lol
     
  18. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    #1098 Humphrey, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,769
    1,106
    60
    #1099 Mr Jinje, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    Those two lines might actually be a one liner. Guess we need the ")" back.

    Code:
    echo FOR /F "TOKENS=2*" %%A IN ('FINDSTR/B :: "%~f0"') DO (REG QUERY %K% /V %V% | FINDSTR /IE "%%A" >NUL && (%L% %%B)) >>%SystemDrive%\Key.bat
     
  20. timesurfer

    timesurfer MDL Developer

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