How to programmatically create WinRE/WinPE ISO and/or media without ADK installed

AZBruno 116 Reputation points
2022-03-15T21:39:29.51+00:00

I’m working on an application (VB.NET) of which a part is to build a bootable rescue media. I think I understand how I could build it using the ADK (I’ve looked into MakeWinPEMedia.cmd) with a process call to run oscdimg.exe app.

I want this app to work on a system which does not have the ADK installed, it may be Windows 10 or Windows 11 and could be either legacy BIOS or UEFI boot. I know it can be done since products like MiniTool, Macrium, etc. do that. I am OK in grabbing the WinRE wim and modifying it (using Dism API). I want the option to create a bootable USB media and/or an .iso file.

It looks like the files needed are in C:\Windows\Boot, but how do I put it all together reliably? Would bcdboot.exe, or perhaps bootsect.exe be the right app to use for the media? Should oscdimg.exe be included with my application?

I’ve spent days searching for a good answer and haven’t found one yet as most everything I read is based on doing things manually and using the ADK.

Thanks.

Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,922 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,511 Reputation points
    2022-03-21T11:31:49.847+00:00

    Hi @AZBruno

    It seems you cannot create a WinPE ISO without installing the ADK according to the below Microsoft article. To create Windows PE media, you'll have to install the ADK with the Deployment tools option and then install the Windows PE add-on.

    Download Windows PE (WinPE)
    https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/download-winpe--windows-pe?view=windows-11

    As you have said that this is possible through some third-party apps like MiniTool, Macrium, these tools might have certain other background processes which might replicate the usage of ADK. You might need to look into this perspective to get an idea of this.

    Hope this resolves your Query!!

    --
    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  2. AZBruno 116 Reputation points
    2022-03-21T15:15:43.36+00:00

    @Limitless Technology ,

    I have the ADK and I've been through these Microsoft documents. My query is to figure out how to 1) hopefully get the correct files from C:\Windows\Boot to replicate what is in the \Media folder in the ADK, and 2) create an ISO from that result, doing what oscding.exe does.

    My reasoning for this is that the app I'm doing may be used by others who may or may not have the ADK or wish to install it.

    0 comments No comments