CheckUsbHdd

English support forum

Moderators: white, Hacker, petermad, Stefan2

KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

CheckUsbHdd

Post by *KozakMak »

CheckUsbHdd=1 Check whether a harddisk is connected via USB (uses removable disk icon)
If default value is 1 - why i don't see any "removable disk icon" ?

https://i119.fastpic.org/big/2022/0519/a4/fd74f15b7abb3b533710ba7da83f68a4.png
OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

There's two possible reasons:
  • TC has added CheckUsbHdd=0 to the wincmd.ini, which it does automatically if and when USB devices take longer than expected to react. This setting stays in the wincmd.ini until removed manually, and is added again when the next drive reacts slowly.
  • Your USB device is not recognized as removable by the system. That is the case for one of my flash drives (JetFlash 920, 128 GB). You can check whether or not the drive's context menu lists an "Eject" item - if it doesn't, then it's not a removable drive to the system (and thus TC doesn't list it with the removable disk icon).
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

1) there is no string CheckUsbHdd in my wincmd.ini
2) i have in sys.tray safety eject menu when my usb-drive used
OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

The "Safely Remove Hardware" icon in systray is irrelevant. I really meant the drive's context menu.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

yes, i have "Eject" item and its work
OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

Does TC show the icon with a fresh wincmd.ini?

Code: Select all

totalcmd.exe /i="%TEMP%\fresh.ini"
If not, I have no idea why that is.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

OS: Win10 | TC: latest x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: CheckUsbHdd

Post by *ghisler(Author) »

It may be due to restricted user rights. To determine whether a drive is connected via USB, Total Commander opens the drive with name
\\.\d:
and then calls DeviceIoControl with option IOCTL_STORAGE_QUERY_PROPERTY.
When the BusType option is set to BusTypeUsb)or to BusType1394 (firewire) it shows the overlay.

This works when logged in as a normal Windows 10 user, but may not work when logged in as a restricted user.
Author of Total Commander
https://www.ghisler.com
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

I have full administrator rights and even more - UAC is completely disabled:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLUA"=dword:00000000
OS: Win10 | TC: latest x64
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: CheckUsbHdd

Post by *Usher »

2KozakMak
Disabling UAC may be the reason.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

2Usher
I highly doubt that. All USB flash drives (except the one drive I mentioned) show as removable on my systems, and none of them has UAC enabled.

2KozakMak
Does Explorer (or any other filemanager) show the drive as removable?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

2KozakMak
So the answer's no. It has the same icon as the other internal drives. It's just like one of my drives I mentioned above: it doesn't get the removable icon (neither in TC nor Explorer), despite having the "Eject" context menu item. Why? I have no idea.

For now I know there are three different kind of drives:
  • Regular removable, showing the "Eject" context menu item and the removable icon
  • Other removable, showing the "Eject" context menu item, but not the removable icon
  • Non-removable (mostly internal) drives which have neither the "Eject" context menu item nor the removable icon
Try a different drive, it might show the removable icon.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
KozakMak
Senior Member
Senior Member
Posts: 364
Joined: 2021-05-24, 12:39 UTC
Location: UA

Re: CheckUsbHdd

Post by *KozakMak »

https://i117.fastpic.org/big/2022/0520/9e/40b151604635782f02bc8a29c8e2c29e.png

...but when i use Drives.dll then everything is displayed correctly.
So maybe worth adding the same verification\check for the key CheckUsbHdd ?
OS: Win10 | TC: latest x64
User avatar
Dalai
Power Member
Power Member
Posts: 9387
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: CheckUsbHdd

Post by *Dalai »

Ghisler might be able to comment on this detail/difference.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply