I've tried these commands
(bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON
but it didn't work.
My problem is with "Allow Device Drivers and Information to be Installed Automatically", it always took more than 5 minutes to try to get driver from windows update before I can install my driver manually when device is presented and it's too slow to accept, so I select "Never install driver software from Windows Update" to skip that and it worked.
Now I just need a way to do exactly the same thing but only by programmatically.
Does anyone know how to do that?