I am upgrading about 200 machines in my lab from Windows 7 to Windows 10, and as part of the upgrade, I am also converting the file system on the machines to GPT.
I am doing this as an automated process with WinPE images that are loaded from my PXE server. In the image, there is a script that formats the hard drive with Diskpart, creates EFI boot partition and the OS partition, deploys the image like this:
dism /Apply-Image /ImageFile:M:\Images[image file name].wim /Index:1 /ApplyDir:W:
And after deployment, it runs bcdboot W:\Windows command so the PC will boot into Win10, then reboots the PC from hard drive with freshly deployed OS image.
Now it works fine, except for one problem:
For our needs (this is a testing lab), we use a proprietary driver, that is unsigned, and thus needs to run Windows in Test Mode.
With Win7 and MBR, I didn't have this problem, because I used Ghost to take the whole HDD image and just dump it on the HDD, without needing to overwrite the boot script.
Now, the bcdboot W:\Windows disables the test mode, and I am getting a BSOD when loading the said driver, because of it.
How can I enable Test Mode when deploying with DISM, before booting into OS, using command line? Is there a way to do it with bcdboot command somehow?
I have to automate it, because I need to do it on 200 machines.
The OS is Windows 10 RS4 x64 Enterprise.
Thanks in advance for the answer.