ADK Tools - USB Installer for Windows

Discussion in 'MDL Projects and Applications' started by YukinoAi, May 22, 2016.

  1. YukinoAi

    YukinoAi MDL Novice

    Sep 5, 2015
    27
    22
    0
    #1 YukinoAi, May 22, 2016
    Last edited: Jul 7, 2016
  2. YukinoAi

    YukinoAi MDL Novice

    Sep 5, 2015
    27
    22
    0
    #2 YukinoAi, Jun 2, 2016
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Was asked this via PM. Responding here for everyone's benefit.can be aware.

    Yey my first user! ;-;

    Alright so like, this an area where I need to update ADKTools (v0.1.0) to make this process more transparent. I will be adding these instructions to the documentation (on Github) under: "To add additional DaRT/WinRE/WinPE.wim images to the USB boot menu:"

    Background:
    • There are two boot configuration database (BCD) stores used when booting, one for BIOS style booting and one for UEFI booting.
    • For our purposes, they should be configured the same so you will need to modify both of these BCD stores.
    • These BCD stores are located at:
      Code:
      BIOS: WININSTALLER\Boot\BCD
      UEFI: WININSTALLER\EFI\Microsoft\Boot\BCD
    More background:
    • Vista and 7 boot stores and tools are considered legacy and should not be used. bcdedit.exe from these versions of Windows can damage a Windows 8+ bcdstore. Do not use Windows 7's bcdedit.exe tool. It will damage the store. An updated version of bcdedit.exe can be found natively installed in Windows 8 or above and is installed with the ADKs. ADKTools v0.1.0 does not use the version installed by the ADKs but I'll be updating this later.
    • bcdAddPE.bat is a CLI frontend to bcdedit.exe and is included in ADKTools at ADKTools\resources\scripts\wimMgmt\resources\bcdAddPE.bat.

    bcdAddPE.bat
    Code:
    bcdAddPE.bat USB/ISO booting (addPE) Syntax:
    bcdAddPE /addPE [boot.wim] [bcdstorepath] {description}
    
    Examples:
    bcdAddPE /addPE \sources\WinPEv3_x64.wim c:\boot\bcd
    bcdAddPE /addPE \sources\PEv5x64.wim d:\iso\efi\microsoft\boot\bcd WinPEv5x64
    bcdAddPE /addPE \sources\WinPEv5x86.wim c:\iso\boot\bcd "Win PEv5 x86"
    Step-by-Step Guide:
    With an existing ADKTools install on Win 8 or above:
    1. Copy DaRT.wim and the related WinPE.wim images to the directories specified in the ADKTools documentation under "For a system boot menu with DaRT/WinRE […]."
    2. Using a CLI, navigate to ADKTools\resources\scripts\wimMgmt\resources
    3. set BIOSstore=C:\Users\User\Desktop\ADKTools\WININSTALLER\Boot\BCD
    4. set UEFIstore=C:\Users\User\Desktop\ADKTools\WININSTALLER\EFI\Microsoft\Boot\BCD
    Note: Adjust your paths accordingly.

    5. To add a single entry:
    Code:
    bcdAddPE.bat /addPE \sources\Win81\winPETools\DaRT81_x86.wim "%BIOSstore%"
    bcdAddPE.bat /addPE \sources\Win81\winPETools\DaRT81_x86.wim "%UEFIstore%"
    6. To add both x86 and x64 versions:
    Code:
    bcdAddPE.bat /addPE \sources\Win7\winPETools\DaRT7_x86.wim "%BIOSstore%"
    bcdAddPE.bat /addPE \sources\Win7\winPETools\DaRT7_x86.wim "%UEFIstore%"
    bcdAddPE.bat /addPE \sources\Win7\winPETools\DaRT7_x64.wim "%BIOSstore%"
    bcdAddPE.bat /addPE \sources\Win7\winPETools\DaRT7_x64.wim "%UEFIstore%"
    With no existing ADKTools install or one on Win 7 or below:
    1. Start a Windows 8+ VM
    2. download/copy and extract ADKTools.zip to that VM
    3. Extract ADKTools\resources\archives\WININSTALLER.7z to ADKTools\
    4. Go to step 2 above, and then return here after step 6.

    • Note that the “updated” boot configuration database stores can be copy/pasted from the Win8+ VM to an ADKTools installation's WININSTALLER directory on Win7 or below.
    • To “undo” the above commands, replace the bcdstores with the “original” ones found in WININSTALLER.zip e.g.
      Code:
      copy: ADKTools\resources\archives\WININSTALLER.7z\WININSTALLER\boot\BCD
      to: ADKTools\WININSTALLER\boot\BCD
      and
      copy: ADKTools\resources\archives\WININSTALLER.7z\WININSTALLER\EFI\Microsoft\Boot\BCD
      to: ADKTools\WININSTALLER\EFI\Microsoft\Boot\BCD
    For Acronis:
    When I used Symantec Ghost with Windows XP, Ghost was actually just a small program ghost.exe that ran inside of DOS or WinPE (ghost32.exe/ghost64.exe). Standalone programs can be copied to the PE image and then executed within the PE environment. Does Acronis work like that? If so, just copy the Acronis.exe program (both 32 or 64-bit variants ideally) to "ADKTools\winPEWorkspace\Updates\tools\x86" and \x64 respectively. Then just reset the images using massupdate.bat scripts (updating the scripts also updates the tools).

    Or if it is just a generic winPE image, then it can be added similarly to DaRT.wim, and WinRE.wim as described above.

    The alternative is to use gImagex (included at tools\gimagex while inside of WinPE) or the "image.bat /capture" script to capture an existing .WIM formatted image of the system. This is what I do and what ADKTools was essentially designed to do. I'm not sure what format Acronis uses (byte-per-byte, standard WIM, third-party proprietary file-by-file based) but it might be worth switching to standard WIM formatted images, depending upon the use case, since they are so easy to work with.
     
  3. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. kronflux

    kronflux MDL Member

    May 11, 2011
    114
    23
    10
    Haven't tested this yet, but in theory it looks amazing!
    Can't wait to try.

    One thing to note, however, your readme should really specify all the filenames, preferably an example folder structure. The reason I say this is, with windows 8.1 for example, I had to think quite hard about whether the WIM file should be named "win81x64.wim" or "win8.1x64.wim"

    It's easy to think that someone, myself included, might get this wrong.

    Also, you should specify the WinRE images source (I assume you get it from boot.wim from the install ISOs?)


    Anyway! Thanks for the awesome project! I definitely look forward to testing!
     
  5. ofernandofilo

    ofernandofilo MDL Member

    Sep 26, 2015
    237
    140
    10
    I believe that very soon I will use this tool, it seems to be exactly what I need.

    Thank you very much!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. YukinoAi

    YukinoAi MDL Novice

    Sep 5, 2015
    27
    22
    0
    I am glad people have found the project useful.

    After I finish my current project, I'll go back to working on this one as I prefer to devote my full attention to one project at a time.

    Here is the planned feature list for v0.2.0:

    • Dramatically improved documentation for project description + scripts/WinRE/DaRT/ (via Google doc)
    • Fully supporting Murphy's imaging script (add related dependency packages)
    • Native support for bcdAddPE in Win7 with ADK8.1+
    • Add support for PE5.0 (currently only 5.1 is supported)
    • Fully support gimagex
    • Random bug fixes
    • And maybe finish writing addDrivers.bat (maybe)
    I'll also figure out some way to update existing v0.1.0 ADK installations to v0.2.0.
     
  7. mhussain

    mhussain MDL Senior Member

    Oct 1, 2012
    352
    139
    10
    hi there,
    I am blind I use a screen reader i windows,
    do you know if narrator can be launched on your win pe enviroment like it can on windows setup?
    if not could you add narrator and the relevent audio drivers so it would function?
    I am really interested in your project if there is no speech I would not be able to use this.
    thanks for your help/understanding!
    thanks for all of the hard work you've done on this :)
     
  8. YukinoAi

    YukinoAi MDL Novice

    Sep 5, 2015
    27
    22
    0
    Windows Preinstallation Enviornment is a slim version of Windows designed purely to install Windows from. The RTM Windows installer might have it but I do not know of a way to add it and adding audio drivers is really beyond the scope of this project anyway.

    I know there are other attempts to turn WinPE into a more full-fledges OS, although I do not have any links on hand, feel free to check those projects instead.
     
  9. Tiger-1

    Tiger-1 MDL Guru

    Oct 18, 2014
    7,897
    10,733
    240
    @ YukinoAi very good tool downloading now so in next time that I need make fresh install I can use ok thanks a lot :):worthy:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. YukinoAi

    YukinoAi MDL Novice

    Sep 5, 2015
    27
    22
    0
    This is near the bottom of my to-do list but it is still on it.

    Note: Last time I tried the auto-build aspect of the project, a month ago, it did not work well on Win 8.1.

    I will eventually get around to fixing this myself, but of course this is a Github project. Anyone can contribute at any time. Anyone is free to submit pull requests for bugs/improvements or fork it and continue development in a different direction.