Problem with deleting C:\Windows\servicing\LCU\ folder

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

Environment:
Windows 10 21H1 Pro (32-bit) with TC10 (32-bit)
Windows 10 21H1 Pro (64-bit) with TC10 (64-bit)

When I delete files and folders (more than 100,000 items) in the C:\Windows\servicing\LCU\ folder, TC stops after about 80,000 files.
I get the message "Please remove the write protection!"
After I select "All as Administrator", the Delete operation will stop at "81,732 / 107,044".
I can successfully delete all files and folders only after a few "Cancel" and "User Abort" operations, and run "Delete" again.
User avatar
Dalai
Power Member
Power Member
Posts: 9352
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *Dalai »

Does it work when you delete the files directly with Shift+Del, i.e. without moving them to the recycle bin?

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
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *petermad »

2misvin
Is there any difference if you start TC as administrator?
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
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

1. I always use Shift + Del when deleting all items in the C:\Windows\servicing\LCU\ folder.
2. I didn't try to run TC as administrator to delete all items in the C:\Windows\servicing\LCU\ folder.
3. Can anyone reproduce my problem?
4. More information about the LCU folder cleaning.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *ghisler(Author) »

You shouldn't mess with these Windows folders, better use a Windows command to clean them, as suggested in that thread:
Dism.exe /online /Cleanup-Image /StartComponentCleanup

Maybe some files were locked because they were scanned by a virus scanner (or Windows Defender).
Author of Total Commander
https://www.ghisler.com
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

2Christian,

1. Windows built-in tools (including Dism.exe) don't delete the LCU folder.
2. Please reproduce my issue. You will see some strange TC behavior. For example, after "Please remove the write protection!" message and select "All as Administrator", the names of the deleted items change, but the number of deleted files does not change. I always see "81,732 / 107,044".
After a few "Cancel" and "User Abort" operations, and run "Shift + Delete" again, I can successfully delete all files and folders.
Last edited by misvin on 2021-07-11, 10:49 UTC, edited 1 time in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *Horst.Epp »

misvin wrote: 2021-07-11, 10:31 UTC 2Christian,

1. Windows built-in tools (including Dism.exe) don't delete the LCU folder.
They do !
I tested the DISM command suggested by Christan and it works perfect in my environment.
Of course running the command line as Administrator
Dism.exe /online /Cleanup-Image /StartComponentCleanup
It cleans all entries and let alone the latest version.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

I want to remove ALL subfolders and files from LCU folder.

Dism.exe /online /Cleanup-Image /StartComponentCleanup
or
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

don't remove all items.

Verified today with Deployment Image Servicing and Management tool (Version: 10.0.19041.844)
Image Version: 10.0.19043.1083
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

Another strange behavior:
If LCU deleting process (Shift+Del) is interrupted by the Cancel dialog and restarted, the number of all files has not changed.
The Deleting dialog box displays 104,272 items.
I click the Cancel button after about 10,000 items.
When I start the delete process again, I still see 104,272 items (instead of 94,272).
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *Horst.Epp »

misvin wrote: 2021-07-11, 15:07 UTC I want to remove ALL subfolders and files from LCU folder.

Dism.exe /online /Cleanup-Image /StartComponentCleanup
or
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

don't remove all items.

Verified today with Deployment Image Servicing and Management tool (Version: 10.0.19041.844)
Image Version: 10.0.19043.1083
The latest version isn't removed and thats by design.
This files are not just a waste of disk space.
You shouln't try to know it better than Microsoft.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
misvin
Member
Member
Posts: 112
Joined: 2010-08-14, 11:25 UTC

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *misvin »

2Horst.Epp,

Microsoft leaves a lot of unnecessary files on the system drive.
Reminder: This thread was opened to discuss TC behavior when deleting files.
User avatar
AntonyD
Power Member
Power Member
Posts: 1217
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *AntonyD »

I agree with @misvin. In this discussion, we should solve only the problems of the TC, and not give any recommendations on how to do it better or not to do it with third-party programs, especially from M$. There is a file system, there are objects in it, there is a user's desire to delete/move/copy them. The TC must either do this, or provide an EXHAUSTIVE explanation of why it cannot do this. And now we see a mixture of actions and inaction(and maybe even bugs?) on the TC's part. And at the same time, there is no clear explanation for this on its part.
For a long time now, I have noticed that the TC does not even try to improve its behavior when encountering an error copying/moving/deleting a file/directory. It is always necessary to install / run third-party applications that provide more comprehensive information about whether this element of the file system is blocked, by what process, when, etc ... Is it possible to delete this file, remove the process lock on this element. But in theory, ALL of these actions should be provided by the TC-as a full-fledged file manager!!! But no, the maximum that I will see is texts like "the file is blocked", "it is impossible to perform the operation"....
It is too brief, not clear, and there is no toolkit that could help me solve this problem anyway.
Last edited by AntonyD on 2021-07-25, 14:29 UTC, edited 1 time in total.
#146217 personal license
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Problem with deleting C:\Windows\servicing\LCU\ folder

Post by *Hacker »

A LockHunter type functionality would indeed be nice in TC.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply