From: BitBucket <fil...@gm...> - 2010-04-19 19:48:43
|
Christian: Thanks. Your comment suggests putting some code into the .bat file itself -- the context menu hooks in the registry only invoke the .bat with args. Perhaps a WMI snippet in the .bat would resolve this. --Roy ----- Original Message ----- From: "Christian Franke" <Chr...@t-...> To: "BitBucket" <fil...@gm...> Cc: <sma...@li...> Sent: Monday, April 19, 2010 0:17 Subject: Re: [smartmontools-support] How check USB drive from context menu? BitBucket wrote: > Hi: > I've installed the latest Windows exe > (smartmontools-5.39.1-1.win32-setup.exe) with the context menu > options. They work as expected for ATA drives, but not for USB drives. > The required smartctl commands are different depending on ATA or USB > in my case: > 1) ATA smartctl -a /dev/hda > 2) USB smartctl -a -d sat,12 /dev/sdc > But when invoked to read USB drive on K:, here is the output. It's > obviously not adding the '-d sat,12' string to the command, causing > the drive to be undetected. > Output error > -------------------------------------------------- > smartctl -A K:\ > smartctl 5.39.1 2010-01-28 r3054 [i686-pc-mingw32-xp-sp3] > (sf-win32-5.39.1-1) > Copyright (C) 2002-10 by Bruce Allen, > http://smartmontools.sourceforge.net > K:\: Unable to read USB device ID > Smartctl: please specify device type with the -d option. > Use smartctl -h to get a usage summary > Press any key to continue . . . > -------------------------------------------------- > How or where do I modify the code to make this adapt to a USB drive? USB ID detection uses WMI and requires a physical drive name. Windows drive context menu does not support physical drive names. I didn't find an easy way to map logical drive letters to physical drive names yet. Thanks, Christian |