We recently developed a web app for a client that allows their users to wake up their computer without knowing the MAC address – just their machine name. The app gets the MAC address and default gateway details from the client’s Microsoft SCCM database.

All was going well, until we found some machines that wouldn’t wake up. Further investigation revealed that it was only when machines had been shutdown via Windows 7 – ie if the machine had just gone to sleep, or had been powered off using the power button then it would wake up fine.

Before and after installing the Intel NIC driverTurns out those difficult machines were those using an Intel NIC and running the standard Microsoft driver included in Windows 7 (so basically 99.99% of the machines!)

After downloading and installing the latest drivers from Intel, a new Power Management tab appeared when configuring the NIC, and lo and behold, there’s a couple of extra settings relating to Wake On Lan that were disabled. Enabling the “Wake on Magic Packet from power off state” option magically fixed the problem (we enabled the other options while we were at it too).

Now the only problem is how to roll out the driver to all machines with these options by default. It sounds like it’s a setting in the NIC’s firmware that is controlling this (if the machine is powered off then it can’t be the driver?), so it would be interesting to reimage a machine after changing the setting and then use the original driver to see if the problem comes back. I guess we’ll see what happens…

Want to stop your installations being from an unknown publisher according to Window 7’s UAC?

Well, if you’ve got a code signing certificate, you’ll want to sign your MSI files. You can of course just sign your files manually using the signtool utility as follows:

signtool.exe sign /a “path to your msi

The location of signtool varies depending on which version of Visual Studio you have installed. You can do a search for it, or you can just run it via the “Visual Studio Command Prompt” shortcut in your start menu (under Microsoft Visual Studio/Visual Studio Tools)

Obviously that gets annoying pretty quickly if you’re compiling it in Visual Studio all the time, so instead just add the call to signtool as a Post Build script within your Setup project:

“C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe” sign /a /d “My Application” “$(BuiltOuputPath)”

Make sure the path to signtool is correct. Also, change “My Application” to the name of your application – this appears as the program name in the UAC prompt that appears. If you don’t set it to a value, the default will be the name if the MSI that Windows Installer assigns (which you can assume will be some ugly hex number)

You can also add a link to additional information about your product by using the /du parameter with signtool – but I’ll leave that to you to work out…

© Copyright - DocAssist 2022