> That spawns another question… Now that my driver is registered as
Start=0, can I still “bypass” it by booting into Safe Mode?
No. Those drivers are required to boot. But there is quite a nice trick I
found out by playing around a bit.
Of course you know F8 and you know it is really useless if you’re not
plugging in new Hardware. You can utilize F8 to boot Windows with any
HKLM\System\ControlSet you like, so also with a ControlSet that doesn’t
start your driver. Here is how to do so:
-
Boot your Windows without F8, so that your drivers registry entries are
set as usual. -
Open regedit, go to: HKEY_LOCAL_MACHINE\SYSTEM\Select
-
The “LastKnownGood”-Value is the number of the LKG-ControlSet. When
starting using F8 it will be assigned as CurrentControlSet, loading a
reduced set of drivers. Don’t change it, just notice. -
Since you didn’t boot into LKG, the CurrentControlSet now is ControlSet001
(see “Current” value in “Select” key). -
Set the “Start” value of your drivers key in
ControlSet003\Services\YourDriver to “Start = 4” (=disabled)
F8 would start your computer without starting your driver now. But only for
the next boot, since the LKG always is replaced by the ControlSet of each
successful boot (at least by default).
- To keep the LKG you’ve just configured persistent, go to…
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
…set the value “ReportBootOK” value to 0. This makes the windows logon not
to overwrite your special LKG settings.
After this changes, if your see your debug environment doesn’t start, just
press F8 and chose “Last Known Good” …your driver will not be started.
Unfortunately you will have to reactivate your driver this time, since now
(after F8) the LKG has replaced the default ControlSet. So each time you
started your computer using F8, go to CurrentControlSet\Services\YourDriver
and set the “Start = 0” again. That’s all. F8 will still work.
This was quite a bunch of instructions, sorry for that. But it is a thing
worth doing, and once you got used to it, it’ll be the first thing to
configure on each of your debuggees. If there is any confusion about it,
just ask. And excuse my bad english, please.
Regards,
Tobias