Direkt zum Inhalt

2011 NSB icon blinks annoyingly when drive not present -- fix via startup script

Thread needs solution

One of the many annoyances with the new UI in 2011 is that the nonstop backup notification icon will blink in and out incessantly if the target drive is unavailable -- like when I have undocked my notebook. They aren't just changing the icon, they're inserting and removing it from the notification area which makes all the other icons jump around. Very annoying.

Anyway, my backup devices are available only when my computer is docked. Back in the days of 2000/XP, I'd have set up a hardware profile or something so that ATI services would run only if I were docked. But Windows 7 doesn't have hardware profiles. So, I set the ATI services to start manually, wrote the following batch script, and selected it as a scheduled task that runs at startup with full permissions (both the devcon and net commands require admin rights):

devcon find *DOCKDEVICE* | find "(s)"
IF %errorlevel% EQU 0 (
echo "DOCKDEVICE found"
net start afcdpsrv
net start AcrSch2Svc
) ELSE (
echo "DOCKDEVICE not found"
)

The above (saved as C:\ati_if_docked.bat)  is what I needed for my computer, a Lenovo T61p running Windows 7 Pro x64. Quite possibly a Dell or HP dock would show up with a different identifying string. I found my dock with devcon listclass System, or you can try devcon find * | more to see a paged listing of everything connected.

You could also check for the presence of the specific USB drive you might use for backup. Use a command like devcon listclass DiskDrive and replace DOCKDEVICE in the first line of the script (and the optional echoed comments) with some unique string from the drive's listing. The asterisks (*...*) are required for the sliding match.

Hope this helps folks. I've been meaning to do something like this for years to save a few CPU cycles when not connected other peripherals that have services (like Wacom tablets), but had never been annoyed enough to figure out how.

If you need any steps on how to set this up clarified, please reply.

If you're wondering about the use of find, devcon always returns status 0 whether or not it finds something, meaning I can't control the script just from that command. When devcon doesn't match the string, it outputs "No matching devices found." When it does, it says "<##> matching device(s) found." So, I look to see whether the "(s)" is there. Find returns 0 if the string is found; 1 if not.

0 Users found this helpful