Windows 10: System Cleanup & Component Based Servicing

Discus and support System Cleanup & Component Based Servicing in Windows 10 Performance & Maintenance to solve the problem; Just a couple of observations and input is welcome *Smile 1. System Cleanup - Is this normal ? There are 3 folders located under... Discussion in 'Windows 10 Performance & Maintenance' started by Eagle51, Jan 30, 2018.

  1. Eagle51 Win User

    System Cleanup & Component Based Servicing


    Just a couple of observations and input is welcome *Smile

    1. System Cleanup - Is this normal ?
    There are 3 folders located under C:\Windows\WinSxS\Temp (InFlight,PendingDeletes,PendingRenames) . After a CU there are folders/files that can/do get put in these 3 folders. Like today's CU, there are 9 RandomNumber Folders in \InFlight and 88 files in \PendingDeletes. It's my understanding that Disk Cleanup > System Files (Modules Installer \ Modules Installer Worker) are suppose to clean these up, but for whatever reason it never does and never has. I've even waited a couple of weeks to see if the System \ TrustedInstaller would clean them up, but it never does and never has.

    Note: I've tried running the extended version of Disk Cleanup and rebooting.

    Note: Running sfc /scannow puts files in the \PendingDeletes and/or \PendingRenames. These never seem to get cleanup either and can grow to a large number of files.

    Note: I'm NOT recommending this, but the only way I've found to clean these up is to boot into Cmd Prompt and manually clean them up.

    Example:
    \InFlight\SomeRandomNumberFolder
    Note: These random number folders may or may not be empty and the number of folders can grow after each CU.

    \PendingDeletes\$$.DeleteMe.SomeFileName)
    Note: Sometimes after running Disk Cleanup > System Files the $$ will get removed, but not the files themselves and the number of files can grow after each CU.


    2. Component Based Servicing - Is this normal ?
    After a CU there are RandomNumber.xml files that get created in C:\Windows\servicing\Sessions and in the Registry. If you do a ... Run Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase ... the randomnumber.xml files get deleted from C:\Windows\servicing\Sessions ... but they never get removed from the Registry.

    Note: I'm NOT recommending this, but I have manually removed the entries from the registry, just to see what would happen and everything works like it should *Smile

    Example:
    In Windows ...
    C:\Windows\servicing\Sessions\30644937_2357965173.xml and 30644937_2357965173.back.xml

    In the Registry
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending\30644937_2357965173

    :)
     
    Eagle51, Jan 30, 2018
    #1
  2. NorthPew Win User

    [SOLVED]Microsoft store, xbox, feedback and login with microsoft account instead of local account isn't working.

    Hi again, I have tested DISM but It found noting, I have closed my antivirus.

    So what other solutions are there? I really want to fix this without reinstalling the computer.

    Log: (tried two times)

    C:\WINDOWS\system32>sfc /scannow

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.

    Verification 100% complete.

    Windows Resource Protection did not find any integrity violations.

    C:\WINDOWS\system32>DISM.exe /Online /Cleanup-image /Scanhealth && DISM.exe /Online /Cleanup-image /Restorehealth

    Deployment Image Servicing and Management tool

    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    [==========================100.0%==========================] No component store corruption detected.

    The operation completed successfully.

    Deployment Image Servicing and Management tool

    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    [==========================100.0%==========================] The restore operation completed successfully.

    The operation completed successfully.

    C:\WINDOWS\system32>sfc /scannow

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.

    Verification 100% complete.

    Windows Resource Protection did not find any integrity violations.

    C:\WINDOWS\system32>DISM.exe /Online /Cleanup-image /Scanhealth && DISM.exe /Online /Cleanup-image /Restorehealth

    Deployment Image Servicing and Management tool

    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    [==========================100.0%==========================] No component store corruption detected.

    The operation completed successfully.

    Deployment Image Servicing and Management tool

    Version: 10.0.14393.0

    Image Version: 10.0.14393.0

    [==========================100.0%==========================] The restore operation completed successfully.

    The operation completed successfully.

    C:\WINDOWS\system32>

    See, it found nothing so it could be something else? Like the registry is heavily destroyed or changed and needs help to need fixed?
     
    NorthPew, Jan 30, 2018
    #2
  3. DavidF01 Win User
    Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB3194496) - Error 0x800f081f

    These two commands were completed successfully.

    DISM.exe /Online /Cleanup-image /Scanhealth

    DISM.exe /Online /Cleanup-image /Restorehealth

    The windows update trouble shooter said it fixed :

    security settings fixed

    Reset Service registration

    Repair windows Update database

    Repair windows update components

    Edit:

    I just tried to do the latest windows update again and I'm still getting this error.

    CumulativeUpdate for Windows 10 Version 1607 for x64-based Systems (KB3206632) - Error 0x800f081f

    I also tried resetting the PC option and it sayd "There was a problem resetting this PC nothing has been changed"

    Thanks for the help
     
    DavidF01, Jan 30, 2018
    #3
  4. System Cleanup & Component Based Servicing

    Hi @Eagle51

    Those folders was full for me too after i executed my batch script which deletes temporary files and folders, i have checked and one of the folders was completely empty and the second folder still had few files left but almost empty as well.

    If you want you can use my batch script delete all temporary files well almost all, any how.
     
    FreeBooter, Jan 31, 2018
    #4
  5. Eagle51 Win User
    Hey @FreeBooter
    Thanks, I have a similar .bat file (not quite as extensive as yours). The folders/files that don't get cleaned up are usually in use by the system and are controlled by TrustedInstaller, which (I'm guessing) is the reason Windows can't/won't remove them and booting to Cmd Prompt works. It just seems strange that Windows itself can't/won't cleanup after itself in this situation.

    FYI ... Those random number folders in the \InFlight Folder are a PITA to remove manually with rmdir /s /q randomnumber. If their are a lot of them it can take awhile to copy/paste the folder name. I use the following when booted to Cmd Prompt to make quick work of them and I'm sure you can make a .bat if so desired *Smile

    Make sure your in the C:\Windows\WinSxS\Temp\InFlight folder and use for /d %a in (*) do rmdir /s /q %a

    Note: I'm NOT recommending anyone do this !
     
    Eagle51, Jan 31, 2018
    #5
  6. I have many empty folders in C:\Windows\WinSxS\Temp\InFlight folder i forget to check this folder content before running the batch script.

    I don't delete any folder from Windows directory and its subdirectories but Temp folder is little different should not cause any harm to Windows OS so thanks i will use your For command.

    The files who were not deleted are use by Windows they are DLL files and there is even files use by Cortana.

    Thanks!
     
    FreeBooter, Jan 31, 2018
    #6
  7. I got it one of the folder is in use and contains those extra subfolders.
     
    FreeBooter, Jan 31, 2018
    #7
  8. Eagle51 Win User

    System Cleanup & Component Based Servicing

    K, are you booted to Command Prompt or trying to do from within Windows ?
    I've found it will only work if you boot to Command Prompt. If you're trying to do it from within Windows with Command Prompt as Administrator ... you can't, because those files are owned by TrustedInstaller and/or in use. If you're like me, you don''t want to go messing with those folder permissions, etc., as you're just asking for trouble.

    Yep, on those folders in the \InFlight Folder, they may or may not be empty, hence the rmdir /s which is recursive. You can do dir /s to show all folders.

    Note: I've even tried using PowerRun, which is suppose to run with the highest privileges and can't do it from within Windows.
     
    Eagle51, Jan 31, 2018
    #8
  9. Man you wont believe it after running the For command i cannot access Screen Saver Settings i was able access it yesterday i thing we should leave a long \InFlight folder.

    Yes i have executed from booted Windows 10 i was going to add the For command to my batch script i just needed to test it in Command Prompt. Below are the commands i have executed:


    Code: Cd C:\WINDOWS\WinSxS\Temp\InFlight For /d %a in (*) do rmdir /s /q %a[/quote]
     
    FreeBooter, Jan 31, 2018
    #9
  10. sfc /scannow

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.
    Verification 100% complete.

    Windows Resource Protection found corrupt files and successfully repaired
    them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
    example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
    supported in offline servicing scenarios.
     
    FreeBooter, Jan 31, 2018
    #10
  11. Eagle51 Win User
    Hmm, I haven't had any issues cleaning up the \InFlight Folder using that command, but it's also why I said ... I don't recommend anyone doing it.
     
    Eagle51, Jan 31, 2018
    #11
  12. Yes it should not have affected how Windows works but looks like it does i still cannot open Screen Saver Settings trying to repair the issue.
     
    FreeBooter, Jan 31, 2018
    #12
  13. Eagle51 Win User

    System Cleanup & Component Based Servicing

    Sorry, you're having an issue *Sad

    I cleaned up this laptop earlier today after the CU and haven't had any issues, that I've noticed. Sfc /scannow shows no issues, but now I've got to go cleanup the 4000+ files it leaves in \PendingRenames .... lol

    Microsoft Windows [Version 10.0.16299.214]
    (c) 2017 Microsoft Corporation. All rights reserved.

    C:\WINDOWS\system32>sfc /scannow

    Beginning system scan. This process will take some time.

    Beginning verification phase of system scan.
    Verification 100% complete.

    Windows Resource Protection did not find any integrity violations.

    C:\WINDOWS\system32>
     
    Eagle51, Jan 31, 2018
    #13
  14. Thanks @Eagle51, no worries its was my fault i should have executed command from VM but tell you the true i thing this issue may not cause by deleting folders/files in InFlight folder i have compared the output of Dir command to Rmdir command and all the folders in InFlight folder are not deleted looks like something else cause the issue.
     
    FreeBooter, Jan 31, 2018
    #14
  15. lx07 Win User
    Supposedly installing a trivial Windows Feature like Telnet and not touching the PC for 20 minutes works but it never does for me.

    The idea is adding a feature (or installing something I guess) triggers the TiWorker job which tidies up the pending rename/delete. It will stop if PC is busy though thus the no touching it for 20 minutes bit. I read it somewhere but honestly can't remember where or when I'm afraid and while you could try it it never works for me.

    What does work for me is Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase and reboot. The reboot is required - Dism without reboot doesn't seem to remove them.

    Worth a try perhaps.
     
Thema:

System Cleanup & Component Based Servicing

Loading...
  1. System Cleanup & Component Based Servicing - Similar Threads - System Cleanup Component

  2. system components does not work

    in Windows 10 Gaming
    system components does not work: Hi, my system components are not working, including Windows Defenders, Painting, Xbox app, calculator, snip tool, and Microsoft Store, etc. This happened after a recent system update. I tried rebooting, rolling back to a previous system update, and restoring and repairing,...
  3. system components does not work

    in Windows 10 Software and Apps
    system components does not work: Hi, my system components are not working, including Windows Defenders, Painting, Xbox app, calculator, snip tool, and Microsoft Store, etc. This happened after a recent system update. I tried rebooting, rolling back to a previous system update, and restoring and repairing,...
  4. All system components not working

    in Windows 10 Gaming
    All system components not working: All of my system components are not opening and dont even show up in systems help me tried to update already and still not work microsoft store also cant be installed for some reason and when i try to open it normally it does not work...
  5. Dism component cleanup error 267!

    in Windows 10 Software and Apps
    Dism component cleanup error 267!: When i rundism /online /cleanup-image /startcomponentcleanup i get the following error:Error: 267 The directory name is invalid. I tried running chkdsk, sfc /scannow, and other dism health troubleshooting commands still the error persists....
  6. Dism component cleanup error 267!

    in Windows 10 Gaming
    Dism component cleanup error 267!: When i rundism /online /cleanup-image /startcomponentcleanup i get the following error:Error: 267 The directory name is invalid. I tried running chkdsk, sfc /scannow, and other dism health troubleshooting commands still the error persists....
  7. Base Filtering Engine service is present in the system

    in Windows 10 Gaming
    Base Filtering Engine service is present in the system: Base Filtering Engine service is present in the systemError “Could not enable some protection components” Latest update: July 12, 2023 ID: 13409 Issue Your Kaspersky application shows the error message “Could not enable some protection components”.Kaspersky removed two...
  8. Base Filtering Engine service is present in the system

    in Windows 10 Software and Apps
    Base Filtering Engine service is present in the system: Base Filtering Engine service is present in the systemError “Could not enable some protection components” Latest update: July 12, 2023 ID: 13409 Issue Your Kaspersky application shows the error message “Could not enable some protection components”.Kaspersky removed two...
  9. Start Component Cleanup - Access Denied - Error Code 5

    in Windows 10 Performance & Maintenance
    Start Component Cleanup - Access Denied - Error Code 5: Running Windows 10 Pro. V21H1 Build 19043.1110 When I run dism /online /cleanup-Image /StartComponentCleanup it ends at 23% Access denied - Error Code 5 I ran an Inplace Repair which processed successfully. I quit MalwareBytes (just in case it was protecting something) Ran...
  10. Component services

    in Windows 10 Customization
    Component services: The component services has stopped what can i do to solve this issue ? [ATTACH] https://answers.microsoft.com/en-us/windows/forum/all/component-services/d0f1f63d-25ac-4169-88f8-d8b0c7d22c93