Nested Write batch file?

Discussion in 'Scripting' started by timesurfer, Mar 24, 2014.

  1. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,065
    270
    #1 timesurfer, Mar 24, 2014
    Last edited by a moderator: Apr 20, 2017
    Here is the write I need:

    Code:
    @echo off
    FOR /F "tokens=2 delims==" %%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%A
    FOR /F "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%A
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" set pk=%%B
    wmic path SoftwareLicensingService where version='%ver%' call InstallProductKey ProductKey="%pk%"
    net stop sppsvc 
    net start sppsvc 
    schtasks /delete /tn "Key" /f
    del /F /Q %0
    It needs to be written to one .bat file in C:\Trial\IR7 and then to another .bat file in C:\

    Here is the stuff that is working so far in green

    Code:
    echo echo @echo off^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=2 delims==" %%%%%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%%%%A^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=3" %%%%%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%%%%A^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR %%%%%%%%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%%%%A IN ("%%%%%i") DO if "%%%%edition%%%%"=="%%%%%A" set pk=%%%%%B^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo wmic path SoftwareLicensingService where version='%%%%ver%%%%' call InstallProductKey ProductKey="%%%%pk%%%%"^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net stop sppsvc^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net start sppsvc^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo schtasks /delete /tn "Key" /f^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo del /F /Q %%%%0^>^>%systemdrive%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    Any ideas?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    14,322
    18,139
    340
    #2 s1ave77, Mar 24, 2014
    Last edited by a moderator: Apr 20, 2017
    Test this:

    Code:
    echo echo @echo off^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=2 delims==" %%%%%%%%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%%%%%%%A^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=3" %%%%%%%%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%%%%%%%A^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR %%%%%%%%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%%%%%%%A IN ("%%%%%%%%i") DO if "%%%%edition%%%%"=="%%%%%%%%A" set pk=%%%%%%%%B^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo wmic path SoftwareLicensingService where version='%%%%ver%%%%' call InstallProductKey ProductKey="%%%%pk%%%%"^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net stop sppsvc^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net start sppsvc^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo schtasks /delete /tn "Key" /f^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo del /F /Q %%%%0^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    
    :g: ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,065
    270
    #3 timesurfer, Mar 24, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Here is C:\Trial\IR7 output

    Code:
    echo @echo off>>%systemdrive%\IR7.bat 
    echo FOR /F "tokens=2 delims==" %%%%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%%%A>>%systemdrive%\IR7.bat 
    echo FOR /F "tokens=3" %%%%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%%%A>>%systemdrive%\IR7.bat 
    echo FOR %%%%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%%%A IN ("%%%%i") DO if "%%edition%%"=="%%%%A" set pk=%%%%B>>%systemdrive%\IR7.bat 
    echo wmic path SoftwareLicensingService where version='%%ver%%' call InstallProductKey ProductKey="%%pk%%">>%systemdrive%\IR7.bat 
    echo net stop sppsvc>>%systemdrive%\IR7.bat 
    echo net start sppsvc>>%systemdrive%\IR7.bat 
    echo schtasks /delete /tn "Key" /f>>%systemdrive%\IR7.bat 
    echo del /F /Q %%%%0>>%systemdrive%\IR7.bat 
    Here is C:\ output

    Code:
    @echo off 
    FOR /F "tokens=2 delims==" %%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%A 
    FOR /F "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%A 
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" set pk=%%B 
    wmic path SoftwareLicensingService where version='%ver%' call InstallProductKey ProductKey="%pk%" 
    net stop sppsvc 
    net start sppsvc 
    schtasks /delete /tn "Key" /f 
    del /F /Q %%0 
    Code:
    del /F /Q %%0
    Must end up with one % not two

    I think it's close...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    14,322
    18,139
    340
    OK, corrected my previous post :cool2:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,065
    270
    I believe we got it

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Compo

    Compo MDL Member

    Mar 29, 2011
    137
    103
    10
    #6 Compo, Mar 25, 2014
    Last edited by a moderator: Apr 20, 2017
    I know you have decided that you have a solution, but I'll just give you another idea for transferring from one script to another without having to escape loads of stuff!
    Code:
    @for /f "delims=[]" %%a in ('find /n "::StartOf"^<"%~f0"') do more +%%a "%~f0" 1>HoldingFile.cmd
    @goto :eof
    ::StartOf
    @echo off
    FOR /F "tokens=2 delims==" %%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%A
    FOR /F "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%A
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" set pk=%%B
    wmic path SoftwareLicensingService where version='%ver%' call InstallProductKey ProductKey="%pk%"
    net stop sppsvc 
    net start sppsvc 
    schtasks /delete /tn "Key" /f
    del /F /Q %0
    Run the script then look at the content of the newly created HoldingFile.cmd.

    Now you can take it one step further:
    Code:
    @for /f "delims=[]" %%a in ('find /n "::StartOne"^<"%~f0"') do more +%%a "%~f0" 1>HoldingFile.cmd
    @goto :eof
    ::StartOne
    @for /f "delims=[]" %%a in ('find /n "::StartTwo"^<"%~f0"') do more +%%a "%~f0" 1>FinalRunFile.cmd
    @del/f %0
    @goto :eof
    ::StartTwo
    @echo off
    FOR /F "tokens=2 delims==" %%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%A
    FOR /F "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%A
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" set pk=%%B
    wmic path SoftwareLicensingService where version='%ver%' call InstallProductKey ProductKey="%pk%"
    net stop sppsvc 
    net start sppsvc 
    schtasks /delete /tn "Key" /f
    del /F /Q %0
    Run the script, it will create the HoldingFile.cmd, then run HoldingFile.cmd, it will auto delete itself after creating your FinalRunFile.cmd.

    Now you can take it that little bit further, put your file paths in and tidy the code up to make it look less cryptic:
    Code:
    @for /f "delims=[]" %%a in ('find /n "::StartOne"^<"%~f0"') do (
    more +%%a "%~f0" 1>%SystemDrive%\Trial\IR7\IR7.bat)
    @goto :eof
    ::StartOne
    @for /f "delims=[]" %%a in ('find /n "::StartTwo"^<"%~f0"') do (
    more +%%a "%~f0" 1>%systemdrive%\IR7.bat)
    @goto :eof
    ::StartTwo
    @echo off & SetLocal
    Set SLS=SoftwareLicensingService
    FOR /F "tokens=2 delims==" %%A in ('wmic path %SLS% get version /format:list'
    ) do set ver=%%A
    Set KEY="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
    FOR /F "tokens=3" %%A in ('REG QUERY %KEY% /v "EditionID"') do set edition=%%A
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G
    StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B
    StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR
    HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV
    HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY
    HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2
    HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F
    HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R
    HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM
    Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487
    ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T
    ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6
    Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV
    UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8
    UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q
    Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6
    EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR
    EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO (
    FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" (
    set pk=%%B))
    wmic path %SLS% where version='%ver%' call InstallProductKey ProductKey="%pk%"
    wmic service sppsvc call StopService
    wmic service sppsvc call StartService
    schtasks /delete /tn "Key" /f
    del /F %0
     
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,065
    270
    #7 timesurfer, Mar 26, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Which one can I test in RW shown in green

    Code:
    @echo off
    cls
    mode con: cols=50 lines=12
    CLS=new ActiveXObject("Shell.Application").ShellExecute("\""+WScript.ScriptFullName+"\"","","","runas",1);/*&ECHO OFF&NET FILE>NUL 2>&1||(CSCRIPT //B //E:JSCRIPT %0&EXIT /B)
    pushd "%CD%"
    CD /D "%~dp0"
    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)
    )
    
    :mainmenu
    set userinp=
    title Rearm Wizard
    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
    
    :IR7
    REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion | FINDSTR 6.1 >NUL
    IF %ERRORLEVEL% NEQ 0 CLS & echo IR7 supports only windows 7... & ping -n 5 127.0.0.1 >nul & goto mainmenu
    
    :Start
    title IR7
    mode con: cols=45 lines=11
    cls
    echo.
    echo.
    echo.             InfiniteRearm7 (IR7)
    echo.                   
    echo.                A. Install
    echo.                B. Uninstall
    echo.                C. Status                
    echo.                D. Instructions
    echo.                E. Rearm Wizard
    echo.                F. Exit
    echo.
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto InstallIR7
    if /i "%userinp%"=="B" goto UninstallIR7
    if /i "%userinp%"=="C" goto StatusIR7
    if /i "%userinp%"=="D" goto InstructionsIR7
    if /i "%userinp%"=="E" goto MAINMENU
    if /i "%userinp%"=="F" goto Exit
    GOTO start
    
    :InstallIR7
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF ERRORLEVEL 1 (
    echo.
    ) ELSE (
    cls & echo IR7 is already installed...
    ping -n 5 127.0.0.1 >nul
    GOTO start
    )
    mode con: cols=42 lines=2
    echo Installing IR7...
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 1 /f >NUL
    echo @echo off>>%SystemDrive%\IR7.bat
    echo FOR /F "tokens=2 delims==" %%%%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%%%A>>%SystemDrive%\IR7.bat
    echo FOR /F "tokens=3" %%%%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%%%A>>%SystemDrive%\IR7.bat
    echo FOR %%%%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%%%A IN ("%%%%i") DO if "%%edition%%"=="%%%%A" set pk=%%%%B>>%SystemDrive%\IR7.bat
    echo wmic path SoftwareLicensingService where version='%%ver%%' call InstallProductKey ProductKey="%%pk%%">>%SystemDrive%\IR7.bat
    echo net stop sppsvc >>%SystemDrive%\IR7.bat
    echo net start sppsvc >>%SystemDrive%\IR7.bat
    echo schtasks /delete /tn "Key" /f>>%SystemDrive%\IR7.bat
    echo del /F /Q %%0>>%SystemDrive%\IR7.bat
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    GOTO TrialFolder
    ) ELSE (
    GOTO Check
    )
    
    :TrialFolder
    md %SystemDrive%\Trial >nul 2>&1
    GOTO Check
    
    :Check
    md %SystemDrive%\Trial\IR7 >nul 2>&1
    echo CreateObject("Wscript.Shell").Run "%systemdrive%\Trial\IR7\IR7.bat",0,True >>%SystemDrive%\Trial\IR7\IR7.vbs
    echo @echo off >%SystemDrive%\Trial\IR7\IR7.bat
    echo setlocal ENABLEDELAYEDEXPANSION >>%SystemDrive%\Trial\IR7\IR7.bat
    echo SETX IR7backup "%%SystemDrive%%\Trial\IR7" ^>nul >>%SystemDrive%\Trial\IR7\IR7.bat
    echo set KEY_NAME=HKCU\Software\Microsoft\Windows\CurrentVersion\Themes>>%SystemDrive%\Trial\IR7\IR7.bat
    echo set VALUE_NAME=CurrentTheme>>%SystemDrive%\Trial\IR7\IR7.bat
    echo set spp=SoftwareLicensingProduct>>%SystemDrive%\Trial\IR7\IR7.bat
    echo 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)>>%SystemDrive%\Trial\IR7\IR7.bat
    echo for %%%%F in ("%%themefile%%") do set theme=%%%%~nF>>%SystemDrive%\Trial\IR7\IR7.bat
    echo set wppath=%%appdata%%\Microsoft\Windows\Themes>>%SystemDrive%\Trial\IR7\IR7.bat
    echo 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 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo :loopV >>%SystemDrive%\Trial\IR7\IR7.bat
    echo if "%%ver:~-1%%"==" " set "ver=%%ver:~0,-1%%" ^& goto :loopV >>%SystemDrive%\Trial\IR7\IR7.bat
    echo wmic path %%spp%% get LicenseStatus /format:list 2^>nul ^| findstr /i 5 ^>nul 2^>^&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo if %%errorlevel%%==0 goto :Check2 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo if %%errorlevel%%==1 goto :Backup >>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :Backup>>%SystemDrive%\Trial\IR7\IR7.bat
    echo if exist "%%systemdrive%%\Trial\IR7\IR7.theme" del /s /q "%%systemdrive%%\Trial\IR7\IR7.theme" ^>nul>>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo F ^| xcopy "%%themefile%%" /s /q "%%systemdrive%%\Trial\IR7" /V /Y ^>nul >>%SystemDrive%\Trial\IR7\IR7.bat
    echo ren "%%systemdrive%%\Trial\IR7\%%theme%%.theme" "IR7.theme">>%SystemDrive%\Trial\IR7\IR7.bat
    echo goto :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :Check2>>%SystemDrive%\Trial\IR7\IR7.bat
    echo 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 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo if %%r%% == 0 goto :Messagebox >>%SystemDrive%\Trial\IR7\IR7.bat
    echo cscript.exe /b %%windir%%\system32\slmgr.vbs /rearm >>%SystemDrive%\Trial\IR7\IR7.bat
    echo net stop sppsvc ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo net start sppsvc ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /create /tn "IR7" /tr "'%%systemdrive%%\Windows\system32\cmd.exe' /c cscript.exe /b %%SystemDrive%%\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat 
    echo echo F ^| xcopy "%%systemdrive%%\Trial\IR7\IR7.theme" /s /q "%%windir%%\resources\Themes" /V /Y ^>nul >>%SystemDrive%\Trial\IR7\IR7.bat
    echo control desktop >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo Set WshShell = WScript.CreateObject("WScript.Shell") ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Run "%windir%\\resources\\themes\\IR7.theme" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo Wscript.Sleep 7000 ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.AppActivate("Desktop Properties") ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "%%%%FC" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "{F4}" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo call %temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo del %temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes" /t REG_SZ /v CurrentTheme /d "%%windir%%\resources\Themes\IR7.theme" /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo goto :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :Messagebox>>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo set args=WScript.Arguments ^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo wscript.quit MsgBox(Replace(Replace(args.item(1),"{cr}",vbNewLine,1,-1,1),"{qt}",Chr(34),1,-1,1),args.item(2),args.item(0)) ^>^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat 
    echo msgbox.vbs "IR7" "Your 180 day free trial has ended, do you wish to install IR7 again?" 4 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo IF %%ERRORLEVEL%% EQU 6 del /s /q msgbox.vbs ^&^& msgbox.vbs "IR7" "One moment please while IR7 is reinstalling..." 0 ^&^& call :ReinstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat
    echo IF %%ERRORLEVEL%% EQU 7 del /s /q msgbox.vbs ^>nul ^&^& call :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat
    echo msgbox.vbs "IR7" "IR7 has been successfully uninstalled..." 0 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo REG  ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /delete /tn "IR7" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /delete /tn "Hybrid2" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /delete /tn "Hybrid3" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /query ^| FINDSTR /I "IORRT" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo IF ERRORLEVEL 1 ( >>%SystemDrive%\Trial\IR7\IR7.bat
    echo GOTO TrialFolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat
    echo ) ELSE ( >>%SystemDrive%\Trial\IR7\IR7.bat
    echo GOTO IR7FolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat
    echo ) >>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :TrialFolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo rd /s /q %SystemDrive%\Trial ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo schtasks /delete /tn "removeTrial" /f ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo del /F /Q %SystemDrive%\removeTrial.bat ^>nul ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /create /tn "removeTrial" /tr "%SystemDrive%\removeTrial.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /run /tn "removeTrial" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    
    echo :IR7FolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo rd /s /q %SystemDrive%\Trial\IR7 ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo schtasks /delete /tn "removeIR7" /f ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo del /F /Q %SystemDrive%\removeIR7.bat ^>nul ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /create /tn "removeIR7" /tr "%SystemDrive%\removeIR7.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /run /tn "removeIR7" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    echo :ReinstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat
    echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 1 /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo @echo off^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=2 delims==" %%%%%%%%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%%%%%%%A^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR /F "tokens=3" %%%%%%%%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%%%%%%%A^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo FOR %%%%%%%%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%%%%%%%A IN ("%%%%%%%%i") DO if "%%%%edition%%%%"=="%%%%%%%%A" set pk=%%%%%%%%B^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo wmic path SoftwareLicensingService where version='%%%%ver%%%%' call InstallProductKey ProductKey="%%%%pk%%%%"^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net stop sppsvc^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo net start sppsvc^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo schtasks /delete /tn "Key" /f^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo del /F /Q %%%%0^>^>%%systemdrive%%\IR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /create /tn "Key" /tr "%SystemDrive%\IR7.bat" /sc onlogon /ru "" >nul >>%SystemDrive%\Trial\IR7\IR7.bat
    echo schtasks /create /tn "IR7" /tr "'%%SystemDrive%%\Windows\system32\cmd.exe' /c cscript.exe /b C:\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f ^>nul >>%SystemDrive%\Trial\IR7\IR7.bat 
    echo REG SAVE HKLM\SYSTEM %TEMP%\SYSTEM.HIV /y >NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo REG RESTORE HKLM\SYSTEM %TEMP%\SYSTEM.HIV >NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo del %TEMP%\SYSTEM.HIV >NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo POWERSHELL -command rename-item HKLM:\SYSTEM\WPA -NewName WPA_Delete >NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo REG DELETE HKLM\SYSTEM\WPA_Delete /f >NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat
    echo control desktop >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo Set WshShell = WScript.CreateObject("WScript.Shell") ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Run "%windir%\\resources\\themes\\IR7.theme" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo Wscript.Sleep 7000 ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.AppActivate("Desktop Properties") ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "%%%%FC" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo echo WshShell.Sendkeys "{F4}" ^>^>%temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo call %temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo del %temp%\IR7.vbs >>%SystemDrive%\Trial\IR7\IR7.bat
    echo shutdown.exe /r >>%SystemDrive%\Trial\IR7\IR7.bat
    echo ping -n 5 127.0.0.1 >nul >>%SystemDrive%\Trial\IR7\IR7.bat
    echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    echo :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
    echo ENDLOCAL >>%SystemDrive%\Trial\IR7\IR7.bat
    echo exit >>%SystemDrive%\Trial\IR7\IR7.bat
    
    attrib +h "%SystemDrive%\Trial\IR7"
    attrib +h "%SystemDrive%\Trial"
    schtasks /create /tn "IR7" /tr "'%SystemDrive%\Windows\system32\cmd.exe' /c cscript.exe /b %SystemDrive%\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f >nul
    schtasks /create /tn "Hybrid2" /tr "%SystemDrive%\Trial\IR7\IR7.vbs" /sc onlogon /rl highest /f >nul
    schtasks /create /tn "Hybrid3" /tr "taskkill /f /im slui.exe" /sc onlogon /ru "" >nul
    schtasks /create /tn "Key" /tr "%SystemDrive%\IR7.bat" /sc onlogon /ru "" >nul
    REG SAVE HKLM\SYSTEM %TEMP%\SYSTEM.HIV /y >NUL 2>&1
    REG RESTORE HKLM\SYSTEM %TEMP%\SYSTEM.HIV >NUL 2>&1
    del %TEMP%\SYSTEM.HIV >NUL 2>&1
    POWERSHELL -command rename-item HKLM:\SYSTEM\WPA -NewName WPA_Delete >NUL 2>&1
    REG DELETE HKLM\SYSTEM\WPA_Delete /f >NUL 2>&1
    CLS & echo Windows is restarting now...
    shutdown.exe /r
    ping -n 5 127.0.0.1 >nul
    GOTO :Exit
    
    :UninstallIR7
    CLS
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF %ERRORLEVEL%==0 (
    echo.
    ) ELSE ( echo IR7 is already uninstalled...
    ping -n 5 127.0.0.1 >nul
    GOTO start
    )
    cls & echo Uninstalling IR7...
    REG  ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL
    schtasks /delete /tn "IR7" /f >NUL 2>&1
    schtasks /delete /tn "Hybrid2" /f >NUL 2>&1
    schtasks /delete /tn "Hybrid3" /f >NUL 2>&1
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF ERRORLEVEL 1 (
    GOTO TrialFolderDelete
    ) ELSE (
    GOTO IR7FolderDelete
    )
    
    :TrialFolderDelete
    rd /S /Q  %SystemDrive%\Trial
    cls & echo IR7 has been successfully uninstalled...
    ping -n 5 127.0.0.1 >nul
    GOTO Start
    
    :IR7FolderDelete
    rd /S /Q  %SystemDrive%\Trial\IR7
    cls & echo IR7 has been successfully uninstalled...
    ping -n 5 127.0.0.1 >nul
    GOTO Start
    
    :StatusIR7
    mode con: cols=64 lines=8
    echo Retrieving status...
    echo.
    echo.
    echo.
    echo.
    echo.
    FOR /F "tokens=2 delims==" %%A in ('wmic path SoftwareLicensingService get version /format:list') do set ver=%%A
    FOR /F "tokens=3" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set edition=%%A
    FOR %%i IN (Starter:7Q28W-FT9PC-CMMYT-WHMY2-89M6G HomeBasic:YGFVB-QTFXQ-3H233-PTWTJ-YRYRV HomePremium:RHPQ2-RMFJH-74XYM-BH4JX-XM76F Professional:HYF8J-CVRMY-CM74G-RPHKF-PW487 Ultimate:D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV StarterE:BRQCV-K7HGQ-CKXP6-2XP7K-F233B HomeBasicE:VTKM9-74GQY-K3W94-47DHV-FTXJY HomePremiumE:76BRM-9Q4K3-QDJ48-FH4F3-9WT2R ProfessionalE:3YHKG-DVQ27-RYRBX-JMPVM-WG38T UltimateE:TWMF7-M387V-XKW4Y-PVQQD-RK7C8 StarterN:D4C3G-38HGY-HGQCV-QCWR8-97FFR HomeBasicN:MD83G-H98CG-DXPYQ-Q8GCR-HM8X2 HomePremiumN:D3PVQ-V7M4J-9Q9K3-GG4K3-F99JM ProfessionalN:BKFRB-RTCT3-9HW44-FX3X8-M48M6 UltimateN:HTJK6-DXX8T-TVCR6-KDG67-97J8Q Enterprise:H7X92-3VPBB-Q799D-Y6JJ3-86WC6 EnterpriseE:H3V6Q-JKQJG-GKVK3-FDDRF-TCKVR EnterpriseN:BQ4TH-BWRRY-424Y9-7PQX2-B4WBD) DO FOR /F "tokens=1,2 delims=:" %%A IN ("%%i") DO if "%edition%"=="%%A" set pk=%%B
    FOR /F "tokens=5 delims=-" %%A IN ("%pk%") DO set last_pk=%%A
    FOR /F "tokens=2 delims==" %%A in ('"wmic path SoftwareLicensingService where Version='%ver%' get RemainingWindowsReArmCount /format:list"') do set ReArms=%%A
    FOR /F "tokens=2 delims==" %%A in ('"wmic path SoftwareLicensingProduct where PartialProductKey='%last_pk%' get GracePeriodRemaining /format:list"') do set Remaning=%%A
    FOR /F "tokens=2 delims==" %%A in ('"wmic path SoftwareLicensingProduct where PartialProductKey='%last_pk%' get LicenseStatus /format:list"') do set LicenseStatus=%%A
    set /a Remaning=%Remaning%/60/24
    if "%LicenseStatus%"=="UNKNOWN" echo License Status: UNKNOWN
    if "%LicenseStatus%"=="0" echo License Status: Unlicensed
    if "%LicenseStatus%"=="1" echo License Status: Licensed
    if "%LicenseStatus%"=="2" echo License Status: Initial grace period
    if "%LicenseStatus%"=="3" echo License Status: Additional grace period
    if "%LicenseStatus%"=="4" echo License Status: Non-genuine grace period
    if "%LicenseStatus%"=="5" echo License Status: Notification
    if "%LicenseStatus%"=="6" echo License Status: Extended grace period 
    echo.
    echo Time Remaining: %Remaning% days
    echo Rearms Remaining: %ReArms%
    echo.
    schtasks /query /tn "IR7" 2>NUL | FINDSTR "IR7"
    IF ERRORLEVEL 1 echo IR7 is not installed...
    ping -n 5 127.0.0.1 >nul
    GOTO Start
    
    :InstructionsIR7
    title IR7 Instructions
    mode con: cols=68 lines=10
    echo.
    echo  IR7 Instructions
    echo.
    echo  1. Always install IR7 during your computers normal operating times
    echo.
    echo  2. Select Install then your computer will automatically restart
    echo.
    echo  3. Desktop watermark will disappear momentarily
    echo.
    pause
    goto start
    
    :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 )
    
    :IORRT1
    mode con: cols=45 lines=10
    CLS
    echo.
    echo.  
    echo.    InfiniteOfficeRestoreRearmTask (IORRT) 
    echo.    
    echo.               A. Install
    echo.               B. Uninstall
    echo.               C. Status
    echo.               D. Rearm Wizard
    echo.               E. Exit
    echo.
      
    :CHOOSEACTION1
    set /p userinp=    ^   Make your selection: 
    set userinp=%userinp:~0,1%
    if /i "%userinp%"=="A" goto InstallIORRT
    if /i "%userinp%"=="B" goto UninstallIORRT
    if /i "%userinp%"=="C" goto StatusIORRT
    if /i "%userinp%"=="D" goto MAINMENU
    if /i "%userinp%"=="E" goto Exit
    GOTO IORRT1
    
    :InstallIORRT
    CLS
    title IORRT
    mode con: cols=45 lines=11
    schtasks /query | FINDSTR /I "IORRT" >NUL 
    IF %ERRORLEVEL% NEQ 0 (
    echo.
    ) ELSE (
    echo IORRT is already installed...
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    )
    mode con: cols=62 lines=5
    title IORRT
    echo Installing IORRT...
    echo.
    mkdir "%SystemDrive%\Check"
    net stop osppsvc >NUL
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\Check\Backup\Files\Tokens" >NUL
    mkdir "%SystemDrive%\Check\Backup\Registry" >NUL
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv >NUL
    net start osppsvc >NUL
    IF Exist "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" (
    "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" >NUL
    ) ELSE ( "%programfiles(x86)%\Microsoft Office\Office15\OSPPREARM.exe" >NUL
    )
    if errorlevel==0 goto Pass
    net stop osppsvc >NUL
    xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >NUL
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv >NUL
    net start osppsvc >NUL
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv" 2> nul
    SET file=%SystemDrive%\Check
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    cd /d "%InstallRoot%"
    echo.
    cscript OSPP.VBS /dstatus | FINDSTR /i "Status"
    cscript OSPP.VBS /dstatus | FINDSTR /i "Remaining"
    echo.
    echo No Rearms Detected...
    set msg=No rearms detected
    call :speak "No rearms detected"
    goto :END
    :speak
    echo On Error Resume Next: CreateObject("SAPI.SpVoice").Speak %1 >"%~dp0vc.vbs"
    "%~dp0vc.vbs" & del "%~dp0vc.vbs"
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    :Pass
    net stop osppsvc >NUL
    xcopy /cheriky "%SystemDrive%\Check\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >NUL
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Check\Backup\Registry\OfficeSPPInfo.hiv >NUL
    net start osppsvc >NUL
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv" 2> nul
    SET file=%SystemDrive%\Check
    IF EXIST %file% attrib -h %file%
    RD /S /Q  %file%
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF ERRORLEVEL 1 (
    GOTO TrialFolder2
    ) ELSE (
    GOTO IR7
    )
    
    :TrialFolder2
    md %SystemDrive%\Trial >nul 2>&1
    GOTO IR7
    
    :IR7
    md %SystemDrive%\Trial\IORRT >nul 2>&1
    net stop osppsvc >NUL
    xcopy /cheriky "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" "%SystemDrive%\Trial\IORRT\Backup\Files\Tokens" >NUL
    mkdir "%SystemDrive%\Trial\IORRT\Backup\Registry"
    reg save "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Trial\IORRT\Backup\Registry\OfficeSPPInfo.hiv >NUL
    net start osppsvc >NUL
    SET file=%SystemDrive%\Trial\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\Trial\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >>%file%
    echo REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >>%file%
    echo reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Trial\IORRT\Backup\Registry\OfficeSPPInfo.hiv >>%file%
    echo net start osppsvc >>%file%
    echo IF Exist "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" ( >>%file%
    echo "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" >>%file%
    echo ) ELSE ( "%programfiles(x86)%\Microsoft Office\Office15\OSPPREARM.exe" >>%file%
    echo ) >>%file%
    echo schtasks /delete /tn "IORRT" /f >>%file%
    echo schtasks /create /tn "IORRT" /tr "%SystemDrive%\Trial\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    IF Exist "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" (
    "%ProgramFiles%\Microsoft Office\Office15\OSPPREARM.exe" >NUL
    ) ELSE ( "%programfiles(x86)%\Microsoft Office\Office15\OSPPREARM.exe" >NUL
    )
    attrib +h "%SystemDrive%\Trial\IORRT"
    attrib +h "%SystemDrive%\Trial"
    schtasks /create /tn "Hybrid" /tr "%SystemDrive%\Trial\IORRT\IORRT.bat" /sc onlogon /ru "" >NUL
    schtasks /create /tn "IORRT" /tr "%SystemDrive%\Trial\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >NUL
    echo.
    title IORRT
    cd /d "%InstallRoot%"
    echo.
    echo.
    cscript OSPP.VBS /dstatus | FINDSTR /i "Status"
    cscript OSPP.VBS /dstatus | FINDSTR /i "Remaining"
    echo.
    echo Installation Successful...
    set msg=Installation Successful
    call :speak "Installation Successful"
    goto :END
    :speak
    echo On Error Resume Next: CreateObject("SAPI.SpVoice").Speak %1 >"%~dp0vc.vbs"
    "%~dp0vc.vbs" & del "%~dp0vc.vbs"
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    
    :UninstallIORRT
    schtasks /query | FINDSTR /I "IORRT" >NUL
    IF '%ERRORLEVEL%' EQU '0' (
    echo.
    ) ELSE (
    mode con: cols=45 lines=10
    title IORRT
    echo IORRT is already uninstalled...
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    )
    mode con: cols=62 lines=5
    title IORRT
    echo Uninstalling IORRT...
    echo.
    net stop osppsvc >NUL
    xcopy /cheriky "%SystemDrive%\Trial\IORRT\Backup\Files\Tokens" "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform" >NUL
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f >NUL
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" %SystemDrive%\Trial\IORRT\Backup\Registry\OfficeSPPInfo.hiv >NUL
    net start osppsvc >NUL
    DEL "%ALLUSERSPROFILE%\Microsoft\OfficeSoftwareProtectionPlatform\Backup.hiv" 2> nul
    schtasks /query | FINDSTR /I "IR7" >NUL 
    IF ERRORLEVEL 1 (
    GOTO TrialFolderDelete2
    ) ELSE (
    GOTO IORRTFolderDelete
    )
    
    :TrialFolderDelete2
    rd /S /Q  %SystemDrive%\Trial
    goto Pass2
    
    :IORRTFolderDelete
    rd /S /Q  %SystemDrive%\Trial\IORRT
    goto Pass2
    
    :Pass2
    schtasks /delete /tn "Hybrid" /f >NUL
    schtasks /delete /tn "IORRT" /f >NUL
    cd /d "%InstallRoot%"
    echo.
    echo.
    cscript OSPP.VBS /dstatus | FINDSTR /i "Status" 
    cscript OSPP.VBS /dstatus | FINDSTR /i "Remaining"
    echo.
    echo Successfully Uninstalled...
    set msg=Successfully Uninstalled
    call :speak "Successfully Uninstalled"
    goto :END
    :speak
    echo On Error Resume Next: CreateObject("SAPI.SpVoice").Speak %1 >"%~dp0vc.vbs"
    "%~dp0vc.vbs" & del "%~dp0vc.vbs"
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    
    :StatusIORRT
    mode con: cols=64 lines=6
    title IORRT
    echo Retrieving status...
    echo.
    echo.
    echo.
    echo.
    cd /d "%InstallRoot%"
    cscript OSPP.VBS /dstatus | FINDSTR /i "Status"
    cscript OSPP.VBS /dstatus | FINDSTR /i "Remaining"
    echo.
    schtasks /query | FINDSTR /I "IORRT"
    IF ERRORLEVEL 1 echo IORRT is not installed...
    ping -n 5 127.0.0.1 >nul
    GOTO IORRT1
    endlocal
    
    :Links
    CLS
    title ISO/URL Links
    mode con: cols=26 lines=14
    echo.
    echo  ISO/URL Links
    echo.
    echo. A. Rearm Wizard Thread
    echo. B. BitTorrent Client
    echo. C. ZOTAC WinUSB Maker
    echo. D. Virtual CloneDrive
    echo. E. Windows 7 (x86) ISO
    echo. F. Windows 7 (x64) ISO
    echo. G. Office 2013 (x86) ISO
    echo. H. Office 2013 (x64) ISO
    echo. I. Rearm Wizard
    echo.
    set /p deli=    ^   Make your selection: 
    set deli=%deli:~0,1%
    if /i "%deli%"=="A" start http://forums.mydigitallife.net/threads/43861 >nul 2>&1
    if /i "%deli%"=="B" start http://www.bittorrent.com >nul 2>&1
    if /i "%deli%"=="C" start http://forums.mydigitallife.net/threads/47012 >nul 2>&1
    if /i "%deli%"=="D" start http://static.slysoft.com/SetupVirtualCloneDrive.exe >nul 2>&1
    if /i "%deli%"=="E" start magnet:?xt=urn:btih:7ad366ff54c1ed20001357bfa344bf75764424b4&dn >nul 2>&1
    if /i "%deli%"=="F" start magnet:?xt=urn:btih:bcaab2bff2b1e337864121887c2404d45726aabc&dn >nul 2>&1
    if /i "%deli%"=="G" start magnet:?xt=urn:btih:91641B6FC20521D6A5B86B1000140F03E556C175 >nul 2>&1
    if /i "%deli%"=="H" start magnet:?xt=urn:btih:FB03E471B7F46AE03C4C14F42BEFE8063A7283CB >nul 2>&1
    if /i "%deli%"=="I" goto mainmenu
    goto Links
    
    :ISO
    title ISO Installation Basics
    mode con: cols=112 lines=18
    echo.
    echo  ISO Installation Basics
    echo.
    echo  1. Install BitTorrent then download the windows 7 or Office 2013 ISO you wish to burn or mount
    echo  2. Use the ZOTAC WinUSB Maker to burn your Windows 7 ISO to a USB flash drive or SD card
    echo  3. Insert your USB flash drive or SD card into your computer then open the ZOTAC WinUSB Maker
    echo  4. Click on computer in windows and drag your USB flash drive or SD card to the flash drive icon
    echo  5. Then drag your Windows 7 ISO to the Windows icon
    echo  6. Click the "make USB bootable" button
    echo  7. Wait for Windows 7 to be burned to your USB flash drive or SD card
    echo  8. Install windows 7 with updates and internet on
    echo  9. Then you can upgrade or clean install from boot or inside Windows
    echo  10. You can upgrade from Vista, but if you have XP a clean install will be necessary
    echo  11. When installing Windows 7 just bypass entering any key then uncheck the activate online box and click next
    echo  12. Use Virtual CloneDrive to mount the Office 2013 ISO then install from the virtual drive on your computer
    echo  13. After successful office 2013 installation right click the office 2013 virtual drive and click unmount
    echo.
    pause
    goto mainmenu
    
    :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
    )
    
    :Exit
    ENDLOCAL
    exit
    
    :*/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,527
    4,065
    270
    Figured out why reinstall IR7.bat is not working here
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...