[TC8.0ß8]: VistaDelete=1 Prevents Elevated Delete Operation

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

[TC8.0ß8]: VistaDelete=1 Prevents Elevated Delete Operation

Post by *karlchen »

Hello, Christian.

I am afraid there is another downside of VistaDelete=1:
VistaDelete=1 can prevent you from deleting files and folders to recycle bin in elevated mode.
If this happens exiting T.C. will close the window, but its processes will never die.

How to reproduce:
  1. You are logged on to Windows 7 64-bit as User1
  2. UAC is switched on
  3. Windows Recycle Bin switched on
  4. T.C. VistaDelete=1
  5. T.C. UseTrash=1
  6. You enter a folder owned by User2
  7. You confirm the UAC dialogue
  8. TCMADMIN or TCMADM64 is launched
  9. You select a file owned by User2
  10. You press DEL => Confirmation dialogue briefly pops up and vanishes (might be an error message too, impossible to see any details)
  11. You cannot delete the file to recycle bin
    (Note: shift DEL works as expected and 13 does not happen)
  12. You exit Total Commander (this is what you think)
  13. Process Hacker reveals:
    + TCMADMIN /TCMADM64 does not exit
    + TOTALCMD / TOTALCMD64 does not exit and eats up 1 CPU completely
    + Only the T.C. window is gone
    + You kill both using Process Hacker
Testing environment:

Windows 7 Home Premium SP1, 64-bit
Total Commander 8.0ß8 32-bit + 64-bit
Total Commander 8.0ß7 32-bit + 64-bit

I assume that this problem is older than T.C. 8 and that it is unrelated to 32-bit or 64-bit.

Kind regards,
Karl
--
<Added>
Added that Totalcmd.exe/totalcmd64.exe uses 100% of 1 CPU when it does not exit. Had forgotten this details when first writing my post.
</Added>
Last edited by karlchen on 2011-11-04, 22:35 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I can fully confirm this although using task manager to verify that TCMADMIN /TCMADM64 and TOTALCMD / TOTALCMD64 does not exit.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

[offtopic]

Post by *karlchen »

Hello, petermad.

<offtopic>
I just mentioned Process Hacker, because I like to promote my current favourite freeware task manager replacement. - Using task manager or Process Explorer is acceptable in this case, too.
</offtopic>


<ontopic>
  1. Added a detail in the initial report: when T.C. refuses to exit totalcmd.exe/toalcmd64.exe uses 100% of one CPU kernel.
  2. The box which pops up quickly and vanishes in no time at all is not a confirmation dialogue, but the Total Commander delete progress box.
  3. The problem can be reproduced using Total Commander 7.56a. So it is in fact older than T.C. 8.0. Might even have been reported a long time ago already in some long forgotten thread.
</ontopic>

Cheers,
Karl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I can confirm the problem - please delete the file with Shift+Del instead. It seems that VistaDelete fails to work altogether in folders it cannot see.
Author of Total Commander
https://www.ghisler.com
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Christian.

Just noticed this in the history.txt:
08.11.11 Fixed: Don't use VistaDelete method if file cannot be found, e.g. because it's in a directory belonging to a different user (32/64)
I assume this is the fix for the reported problem: do not use VistaDelete in situations where the delete operation is launched by TCMADMIN /TCMADM64.

First tests on Windows 7 Enterprise SP1, 32-bit, using T.C. 8.0ß9 32-bit with VistaDelete=1 suggest that this prevents the problem from occurring.
The same applies for Windows 7 Home Premium SP1, 64-bit, using T.C. 8.0ß9 64-bit with VistaDelete=1.

Deleting my co-worker's files and folders - after consenting to elevate my privileges - temporarily ignores the VistaDelete=1 parameter and uses the T.C. delete method. (1)
Deleting my own files and folders uses the VistaDelete method. (2)

So the fix works.

Testing environment:
Windows 7 Enterprise SP1, 32-bit + Total Commander 8.0ß9 32-bit
Windows 7 Home Premium SP1, 64-bit + Total Commander 8.0ß9 64-bit

Thanks and kind regards,
Karl
--
(1) Nobody's gonna tell him his data had to be sacrificed for scientific reasons?!
(2) Anybody happens to have seen my backups anywhere?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed fixed in TC 8.0b9 32 and 64bit :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, that's the fix to this problem - thanks for confirming!
Author of Total Commander
https://www.ghisler.com
Post Reply