I recently did some work on my MikroElektronika ARM development
board. This was the first time I fired up the board on my
Windows 8 system. Everything in the IDE worked fine until I tried
to do some deploying and debugging on the board itself. It was then
that I realized the board's driver wasn't correctly installed. I
looked in the device manager and, sure enough, the board had the
little exclamation point next to it. It was recognized, just not
available.
The first thing I did was reinstall the driver using the
Mikroelektronika installer. Everything appeared to
work, but the driver never actually installed. In fact, the
directly the installer created was empty.
I install a lot of really strange hardware the average user will
never see. Because of that, I've noticed a number of device driver
installers not handling failure at all - they simply complete and
return "success" regardless of what happens. People, fix
your installers!
So, I unpacked the driver installer and tried to manually
install it. Windows then told me it couldn't install the driver
because it's unsigned. Aha!
With Windows 7, we started requiring all 64 bit drivers to be
signed. Before that, it was a recommendation. With Windows 7,
however, it was relatively easy for a power user to bypass this
requirement and install unsigned drivers. With Windows 8, we've
raised the bar to help make sure manufacturers only give you
trusted, verified code. This helps prevent malicious folks from
offering you drivers. (How many times have you searched for a
driver and found 300 shady-looking sites that purport to have the
driver? Yeah, like I'd install that.)
Now, that said, there are still some manufacturers who haven't
yet signed their drivers. For those, this post will describe how to
install anyway. Again, this is a workaround for the OEM not
properly signing stuff. You should only run into this when
testing beta stuff for them. If you run into it with production
drivers, let the OEM know.
Rebooting in Advanced Mode
With previous versions of Windows, the advanced startup options
required you to press a function key as the computer is booting.
With Windows 8 and UFE boot, the boot (especially on a machine with
a fast SSD), boot time is just too short to be able to press that
key. Instead, Windows 8 handles the advanced boot from within
Windows. One of the advanced boot options is the one to let you
install unsigned drivers.
For me, the easiest way to get to the advanced boot menu is to
shut down from the command prompt. Using Windows + X (or
right-click the bottom left of the screen), get the power user
menu. From that menu, choose "Command Prompt (Admin)" as shown
here:
Then, at the administrator command prompt, type shutdown /r /o.
The /r is for reboot, the /o is for the advanced boot options.
Now, I can't screenshot the advanced boot menu on this PC
without a remote desktop session or something. Windows + Print
Screen doesn't work there. So, here's the progression.
First, Windows will prompt you asking for what kind of action
you want to take. Select the following:
- Troubleshoot
- Then Advanced Options
- Then Startup Settings
Then press the restart button. Your PC will then reboot. Once it
reboots, you'll get the Advanced Startup Options menu. From that,
you want to pick the "Disable driver signature enforcement" option.
On my desktop machine, that is #7.
Windows will then boot normally, but with the option in
place.
Installing the unsigned driver
Once you pick the option to allow unsigned drivers, then you can
perform the installation as usual (using the installer or the
.inf). Don't worry, it'll stick around after another reboot - it's
not a safe mode, just a lifting of a restriction.
You'll still receive a warning, but this time, you get the
option to perform the install anyway.
As long as you are sure the driver is from a trusted
publisher, and that you're using the latest driver, go ahead and
install it. If you are unsure at this point, then unsigned driver
installs are not for you.
Once I did this, my STLink programmer (that's what the
MikroElektronika programmer shows up as) showed up just fine, and
began working:
That's all there is to it.
If you run into this, I highly encourage you to inform the OEM
about the unsigned driver issue, and encourage them to sign their
driver. If they then release a properly signed version, be sure to
update directly to that so you no longer have any exceptions to the
driver policy on your machine. This will certainly make future
updates smoother for you.
Also, there are "tips" out there to permanently enable the
advanced boot options. I discourage you from using this on a
day-to-day machine as it will both promote bad practices and also
make your boot time that much longer.