You can prepare Windows for a new storage driver on next reboot using this command:
rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0NewDrv.inf
The following has been tested on Windows Server 2016, which was installed with SATA in AHCI mode. When I changed the SATA controller mode to RAID in BIOS Windows booted into a blue-screen: Inaccessible boot device
Chipset: Intel C232 (i believe this will work with C236 too and more)
The device ID of this SATA RAID controller is 2826
Solution:
1: Make a USB key, in my case I had GPT partition.
2: Copy drivers to the key. In my case is was:
-iastora.cat
-iaStorA.inf
-iaStorA.sys
3: I create the file install.cmd with this content:
rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 132 %~dp0iaStorA.inf
Start Windows in safe mode with a command prompt (F8 if you can make in time!).
Ran install.cmd and rebooted.
Windows now booted with this RAID driver :-)
Extra info (devcon.exe):
To find Device ID, which might be needed to find the right driver (the device ID is listed in the inf file), you can use the console util devcon.exe (a tool part of the MS Windows Driver Kit package). I have a copy here.
If your storage controller is connected to the computer, it will be located in the device class SCSIAdapter or HDC.
To list all devices in those classes use these commands:
devcon listclass SCSIAdapter
or
devcon listclass HDC
Example of result:
ePCI\VEN_8086&DEV_1E03&SUBSYS_21FB17AA&REV_04\3&21436425&0&FA: Intel(R) 7 Series Chipset Family SATA AHCI Controller
In this example the device ID is DEV_1E03 or just 1E03.
If you can find 1E03 in your inf file you know you have the right driver :-)
(Credits to IBM Thinkpad team.....IBM's SATA driver packages had this install.cmd script bundled. And to my surprise it still works on Windows 10/Srv. 2016)