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
    lol...Order pizza make an favorite beverage and use the IORRT code to put the echo and >>%file% in front and behind of Check.bat code

    Forgot why MasterDisaster used two echo in front of create %SystemDrive%\IR5.bat code but both place .bat file into Rearm folder or create .bat to put into Rearm folder

    So .bat creates .bat and places in certain place for task to run or .bat places reg/token codes to backup and restore
     
  2. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    I took a shot at it, have no idea what I am doing wrong. OFF to google.
     
    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
    #263 timesurfer, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    It's an easy code to test cause it will manifest in location then you look at code in .bat file and check if it got there

    Note: Code will put actual drive like C:\ instead of %systemdrive% code inside the (echo >>%file% stuff

    Example:

    IORRT.bat creation

    Code:
    SET file=%SystemDrive%\IORRT\IORRT.bat
    IF EXIST %file% attrib -h %file% 
    echo @echo off >%file%
    echo net stop osppsvc >>%file%
    echo xcopy /cheriky "%SystemDrive%\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%\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%\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" >>%file%
    creates in %SystemDrive%

    Code:
    @echo off 
    net stop osppsvc 
    xcopy /cheriky "C:\IORRT\Backup\Files\Tokens" "C:\ProgramData\Microsoft\OfficeSoftwareProtectionPlatform" 
    REG DELETE HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f 
    REG ADD HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform /f 
    reg restore "HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" C:\IORRT\Backup\Registry\OfficeSPPInfo.hiv 
    net start osppsvc 
    IF Exist "C:\Program Files\Microsoft Office\Office15\OSPPREARM.exe" ( 
    "C:\Program Files\Microsoft Office\Office15\OSPPREARM.exe" 
    ) ELSE ( "\Microsoft Office\Office15\OSPPREARM.exe" 
    ) 
    schtasks /delete /tn "IORRT" /f 
    schtasks /create /tn "IORRT" /tr "C:\IORRT\IORRT.bat" /sc daily /mo 1 /ru "" 
     
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #264 timesurfer, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Or

    Code:
    SET file=%sd%\IR6.bat
    echo @echo off>>%file% 
    echo echo Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") ^>^>drive.vbs>>%file% 
    echo echo Set colItems = objWMIService.ExecQuery( "SELECT * FROM Win32_Volume",,48) ^>^>drive.vbs>>%file% 
    echo echo For Each objItem in colItems ^>^>drive.vbs>>%file% 
    echo echo If Hex(%sn%) = Hex(objItem.SerialNumber) then ^>^>drive.vbs>>%file% 
    echo echo Wscript.Echo objItem.DriveLetter ^>^>drive.vbs>>%file% 
    echo echo End If ^>^>drive.vbs>>%file% 
    echo echo Next ^>^>drive.vbs>>%file% 
    echo for /f %%%%A IN ('"cscript /nologo drive.vbs"') do set dl=%%%%A>>%file% 
    echo set dl=%%dl:~0,-1%%>>%file%
    echo del drive.vbs>>%file% 
    echo reg load HKLM\MY_SYSTEM "%%dl%%\Windows\System32\config\system" ^>NUL >>%file% 
    echo reg delete HKLM\MY_SYSTEM\WPA /f ^>NUL >>%file% 
    echo reg unload HKLM\MY_SYSTEM ^>NUL >>%file%
    echo echo cscript /b slmgr.vbs /ipk %PIDKEY% ^>%%dl%%\installkey.bat >>%file%
    echo echo slmgr.vbs /dlv ^>^>%%dl%%\installkey.bat >>%file%
    echo echo del "C:\installkey.bat" ^>^>%%dl%%\installkey.bat >>%file%
    echo echo CreateObject("WScript.Shell").Run """C:\installkey.bat""", 0, False ^>%%dl%%\key.vbs >>%file%
    echo echo @echo off ^>%%dl%%\launch.bat >>%file%
    echo echo wscript.exe "C:\key.vbs" ^>^>%%dl%%\launch.bat >>%file%
    echo echo del "%sd%\IR6.bat" ^>^>%%dl%%\launch.bat >>%file%
    echo echo del "C:\key.vbs" ^>^>%%dl%%\launch.bat >>%file%
    echo echo del "C:\launch.bat" ^>^>%%dl%%\launch.bat >>%file%
    echo reg load HKLM\MY_SOFTWARE "%%dl%%\Windows\System32\config\software" ^>NUL >>%file% 
    echo  reg add HKLM\MY_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce  /v  InstallKey /t REG_SZ /d C:\launch.bat ^>NUL >>%file%
    echo reg unload HKLM\MY_SOFTWARE >>%file%
    echo wpeutil reboot >>%file%
    creates %sd%\IR6.bat

    %sd%=%SystemDrive% :eek:

    Code:
    @echo off 
    echo Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") >>drive.vbs 
    echo Set colItems = objWMIService.ExecQuery( "SELECT * FROM Win32_Volume",,48) >>drive.vbs 
    echo For Each objItem in colItems >>drive.vbs 
    echo If Hex() = Hex(objItem.SerialNumber) then >>drive.vbs 
    echo Wscript.Echo objItem.DriveLetter >>drive.vbs 
    echo End If >>drive.vbs 
    echo Next >>drive.vbs 
    for /f %%A IN ('"cscript /nologo drive.vbs"') do set dl=%%A 
    set dl=%dl:~0,-1%
    del drive.vbs 
    reg load HKLM\MY_SYSTEM "%dl%\Windows\System32\config\system" >NUL  
    reg delete HKLM\MY_SYSTEM\WPA /f >NUL  
    reg unload HKLM\MY_SYSTEM >NUL 
    echo cscript /b slmgr.vbs /ipk  >%dl%\installkey.bat 
    echo slmgr.vbs /dlv >>%dl%\installkey.bat 
    echo del "C:\installkey.bat" >>%dl%\installkey.bat 
    echo CreateObject("WScript.Shell").Run """C:\installkey.bat""", 0, False >%dl%\key.vbs 
    echo @echo off >%dl%\launch.bat 
    echo wscript.exe "C:\key.vbs" >>%dl%\launch.bat 
    echo del "\IR6.bat" >>%dl%\launch.bat 
    echo del "C:\key.vbs" >>%dl%\launch.bat 
    echo del "C:\launch.bat" >>%dl%\launch.bat 
    reg load HKLM\MY_SOFTWARE "%dl%\Windows\System32\config\software" >NUL  
     reg add HKLM\MY_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce  /v  InstallKey /t REG_SZ /d C:\launch.bat >NUL 
    reg unload HKLM\MY_SOFTWARE 
    wpeutil reboot 
    in %SystemDrive%

    I remember MD left extra echo to ensure echo was left in manifested code

    :shisha:
     
  5. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    This is funny, the easy stuff your like :eek: but the hard stuff your like take it down :giljotiini:

    We're like opposites from an alternative universe :roflmao:...lol

    As been the whole development rearm concept cycle for me :D

    By the way will be going through all rearm concept archives tomorrow to place correct blame for who helped the most and tested to put in Rearm concept archives which you easily made it into although we're not friends yet :suicide:...lol
     
  6. Humphrey

    Humphrey MDL Expert

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

    timesurfer MDL Developer

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

    Humphrey MDL Expert

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

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #269 timesurfer, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  10. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    18,867
    19,161
    340
    #270 Tito, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
  11. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #271 timesurfer, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
  12. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    WELLLL, we could put in a bit of code that downloads a file for a user and once its found by the batch it could grab the magnet/torrent.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. qewlpal

    qewlpal MDL Addicted

    Jun 25, 2010
    575
    2,014
    30
    You mean like uTorrent ?
    If all these things helps in the learning process, then fine, but why is it too many things are being added and making way too complex.. I thought D420 is supposed to do just infinite re-arming of Win7 and Off2013 only ?
    Finding ISOs and downloading is user's responsibility if they want it, why do we need to spoon feed everything ?
    Just curious..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    That is true. But no not utorrent. aria2c is one, others I know but do not remember.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    I think that would be too complex and if someone is not informed and gets error we'll explain they need torrent client like Bit Torrent which I recommend

    I like ideas, ideas are what created D420 but I think your right, we have done as nice an automated D420 as possible

    We'll just leave the possible error for now

    What we could do it this, instead of user getting error we could simply give message they have to install Bit Torrent and try again

    The message can stay for a few seconds then disappear with ping like the other ping code
     
  16. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60


    Maybe another msgbox.vbs
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    Was playing around with writing Check.bat to disc...but it´s really annoying, as you cannot use variables and sometimes escapes don´t seem to work properly.
    So maybe you should opt for shipping Duality with a Check.bat, which is copied to the proper folder if needed.

    (Btw, my inbox is empty now :D)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,455
    989
    60
    Need to figure out if its possible to do something that will echo out an entire section with one output line, don't know if its possible.
    Not sure if it will be a work around escaping or if even possible

    echo (
    line 1
    line 2
    line 3
    ) >>file.txt
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    #279 s1ave77, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    Should look like:

    Code:
    >Check.bat (
    echo line 1
    echo line 2
    ...
    echo line n
    )
    This will still need to use static values instead of variables.

    EDIT: and for "|" and ">" you´ll still need escapes to prevent direct processing.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #280 timesurfer, Apr 21, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Actually we just needed the msgbox to give yes or no at end of 180 day trial

    I think we should use just console message and ping to close concole

    We could do that but I'm sure it can be put in D420, just have to let the idea surface

    Sent pm

    :shisha:

    Thanks you guys