Friday, March 10, 2017

Installing Windows from a running Windows without booting into setup

A while back, I needed to set up a dual-boot configuration between two different Windows versions, but for whatever reason, the WinPE setup environment refused to continue no matter what physical installation medium I used. So, I decided to do my own setup with dism.

First, I created an NTFS partition on the drive with the normal Disk Management snap-in. Then, using the install.wim file off the installation media for the new OS, I ran this command:

dism /Apply-Image /ImageFile:install.wim /ApplyDir:F:\

Once that command completed, all the files were in place for the new OS, but it had no entry in the boot configuration. It's probably possible to manually fiddle it into existence with bcdedit, but fortunately Windows comes with another helpful tool:

bcdboot f:\windows /addlast

To update the default boot option, you can use the /default switch of bcdedit. After I did all that, the new OS was successfully bootable and continued its installation experience as if I had used the normal setup.

Caution: The final system did seem to be light on drivers; it didn't recognize my network card. Then again, maybe a standard install would have done the same? I was able to grab some drivers off of the previously existing system's partition, fortunately.

No comments:

Post a Comment