@echo off

echo Intel社製RAID・AHCIドライバをインストール中です。

cd /d %~dp0
SetupRST -noIRSTGUI -s

REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy0ANEnable /t REG_DWORD /d 0 /f
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy1ANEnable /t REG_DWORD /d 0 /f
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy2ANEnable /t REG_DWORD /d 0 /f
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy3ANEnable /t REG_DWORD /d 0 /f
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy4ANEnable /t REG_DWORD /d 0 /f
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\iaStorA\Parameters\Device /v Controller0Phy5ANEnable /t REG_DWORD /d 0 /f

REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\iaStorA\Parameters\Device /v OddZeroPowerEnable /t REG_DWORD /d 0 /f

DISM /Online /Add-ProvisionedAppxPackage /PackagePath:".\HSA\RstHsaBridge_17.0.1010.0_x64.appxbundle" /LicensePath:".\HSA\59f36b15200d4464a6c48f5ef04eb950_License1.xml"  /DependencyPackagePath:".\HSA\Microsoft.VCLibs.140.00.UWPDesktop_14.0.26905.0_x64__8wekyb3d8bbwe.appx"