[beta 7]Bitlocker drive icon is not redrawn

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
gdpr deleted 2
Junior Member
Junior Member
Posts: 15
Joined: 2016-06-26, 13:39 UTC

[beta 7]Bitlocker drive icon is not redrawn

Post by *gdpr deleted 2 »

1. Open total commander and switch to any unencrypted drive.
2. Unlock locked drive by any method.
3. TC will continue to show LOCKED drive icon on
recently unlocked drive
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

Confirmed with drive bar button. It's refreshed correctly in drive combo box.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sadly there are no user mode functions to check the status of bitlocker drives. The only public functions are in WMI, and it requires administrator privileges (elevation). There is also no notification when the bitlocker status changes.

The combobox is re-read every time you open it. There is no such trigger for the drive bar. Reloading it constantly every 5 seconds or so would eat a lot of CPU.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

You could refresh icons when TC gets focus, it might be enough. Unless there would be a way to unlock drive without leaving TC, which I'm not sure if there's some.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Sob wrote:You could refresh icons when TC gets focus
Nice idea, seems that could work in most cases.
gdpr deleted 2
Junior Member
Junior Member
Posts: 15
Joined: 2016-06-26, 13:39 UTC

Post by *gdpr deleted 2 »

ghisler(Author) wrote:Sadly there are no user mode functions to check the status of bitlocker drives. The only public functions are in WMI, and it requires administrator privileges (elevation). There is also no notification when the bitlocker status changes.

The combobox is re-read every time you open it. There is no such trigger for the drive bar. Reloading it constantly every 5 seconds or so would eat a lot of CPU.
Please check your e-mail. I send clear solution, which can check bitlocker drive status very eazy and without admin rights.
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

You can tell us too... :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You could refresh icons when TC gets focus
Hmm, re-reading both panels already causes quite a slowdown, so it may not be such a good idea.
I send clear solution, which can check bitlocker drive status very eazy and without admin rights.
Well, it only allows to detect it while the drive is NOT unlocked. Then GetLastError after the failed FindFirstFile will return a specific error code, as you reported. But there is no way to detect an unlocked Bitlocker volume. Also when I show the drive buttonbar, I don't try to access each drive with FindFirstFile, I just call GetDriveType.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 2
Junior Member
Junior Member
Posts: 15
Joined: 2016-06-26, 13:39 UTC

Post by *gdpr deleted 2 »

I dont know, how to detect unlocked drive, but you can calc hash of drive icons when tc starts and when tc gets focus compare it with current icons hash. Redraw buttons only when necessary.
Or to use another similar idea
User avatar
tuska
Power Member
Power Member
Posts: 4059
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

I don't know if this can be of any help, but

a) if a locked Bitlocker volume is shown in drive buttonbar, then the tooltip is empty (volume USB-connected)
b) if a unlocked Bitlocker volume is shown in drive buttonbar, then in the tooltip the name of volume is shown,
for example "TOSHIBA EXT" (see also properties of drive)
With right-click on drive in drive buttonbar one receives a menu window and can unlock Bitlocker-locked-drive.

OldDriveIcons=2
The icon in drive buttonbar is always the same if an USB-volume is connected and the volume is locked/unlocked with Bitlocker.

Regards
Karl
gdpr deleted 2
Junior Member
Junior Member
Posts: 15
Joined: 2016-06-26, 13:39 UTC

Post by *gdpr deleted 2 »

tuska wrote:I don't know if this can be of any help, but

a) if a locked Bitlocker volume is shown in drive buttonbar, then the tooltip is empty (volume USB-connected)
b) if a unlocked Bitlocker volume is shown in drive buttonbar, then in the tooltip the name of volume is shown,
for example "TOSHIBA EXT" (see also properties of drive)
With right-click on drive in drive buttonbar one receives a menu window and can unlock Bitlocker-locked-drive.

OldDriveIcons=2
The icon in drive buttonbar is always the same if an USB-volume is connected and the volume is locked/unlocked with Bitlocker.

Regards
Karl
How you detect ONLY bitlocker unlocked drive, but not simple not encrypted drive?
So this is useless
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

ghisler(Author) wrote:Hmm, re-reading both panels already causes quite a slowdown, so it may not be such a good idea.
You said that drive icons for combobox are re-read every time you open it, and it shows up immediately, no visible slowdown at all. So re-reading icons when TC gets focus should not make any difference either.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50550
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will try to do it in a background thread.
Author of Total Commander
https://www.ghisler.com
gdpr deleted 2
Junior Member
Junior Member
Posts: 15
Joined: 2016-06-26, 13:39 UTC

Post by *gdpr deleted 2 »

Please check email.
You check drive status a very bad way
Post Reply