I am making a fast installer script for Microsoft Windows OS's It basically replicates what Windows Setup does but in a fraction of the time, which is useful if you do a lot of virtual machines/testing. It also has extra options for configuring storage devices which are simply not present in the Windows Setup.

What I need is a some kind of software that is on the CD along with my script which kind of acts like windows PE but only includes the command prompt, which my script will automatically be loaded into as soon as the computer boots from the CD. When the script is finished installing Windows, it will restart the computer and Windows will start.

A simple way to think of it is as if you are booting a batch script that installs Windows, except obviously there needs to be an tiny OS for to interpret the script.

I have considered the following options:

a DOS startup disk - not feasible because it cannot run certain windows programs such as Diskpart which my script uses.

Windows Recovery console - this also does not have the full command set as a command prompt session running as admin.

Windows PE/BartPE - this is a small graphical OS only from what I recall.

  • Can I suggest taking a look at Vagrant (vagrantup.com) which allows you to store, in a text file, all of the configuration details needed to provision & set up a VM and then performs the necessary steps. It is not what you are asking for but it may be what you need instead. Dec 9, 2018 at 5:25

1 Answer 1


I have decided to use windows PE 1.5, which already has the main shell as the command prompt instead of windows explorer. Some GUI apps or dialog boxes such as task manager can still be opened however I can just delete such apps within PE (because I have not found a PE builder tool that can do this yet, the closest tool would be Bart's PE builder).

Within PE also means I can edit the following:

  • Add or remove official/3rd party programs
  • Add or remove official/3rd party drivers
  • Unneeded windows files such as extra cursors, icons, sounds, etc. ACLs / ACEs -
  • Registry Permissions/Data
  • Boot Configuration
  • Windows Services
  • User settings/permissions/security/policies Windows
  • Windows Dialogs/Msgboxes/Windows using a resource editor (including text strings/message tables)

The practical reasons for needing such an OS are:

  • Platform limitations
  • Hardware Capabilities (i.e why the PE's footprint matters)
  • Embedded System Security
  • User Permissions
  • User/System Security
  • System/User Policies
  • Software/Scripting Specific needs

The hard part about this is finding a way to install my PE 1.5 (i.e 2004) image onto a read-only storage medium such as a USB stick or HDD as opposed to a .ISO file or a CD/DVD. I have tried a few tools such as PEtoUSB (won't detect any USB devices on win10 / winXP), pe2usb.bat, and powerISO but I cant get it to boot on real hardware, So being able to edit PE within PE is currently out of bounds. I know its possible however because Windows AIK (WAIK) can do this with vista (or above) based PE images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.