Solved How to delete folders under C:\Windows\WinSxS\Temp\InFlight


Have not seen that error code before, What happend if you run the command again? Even now you have emptyed the folder. However if it does work a second attempt, i might have an idea where the issue originates from.

I ran it multiple times with the same result. Even now with the InFlight folder completely empty.

1750815168162.webp

1750815478212.webp
 

My Computers

System One System Two

  • OS
    Win 11 Pro 24H2 26100.4484
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Intel® Core™ i7-14700F
    Motherboard
    ASUS TUF Z690-PLUS WIFI BIOS v4301
    Memory
    G.SKILL Ripjaws S5 Series 64GB (2 x 32GB) DDR5
    Graphics Card(s)
    MSI GeForce RTX 3060 Ventus 2X 12GB OC
    Sound Card
    Sound Blaster AE-5 Plus
    Monitor(s) Displays
    ASUS TUF Gaming 27" 2K HDR Gaming
    Screen Resolution
    2560 x 1440
    Hard Drives
    Samsung 990 Pro 1TB NVMe (Win 11 24H2)
    SK hynix P41 500GB NVMe (24H2 VHDX)
    SK hynix P41 2TB NVMe (x3)
    Crucial P3 Plus 4TB
    PSU
    Corsair RM850x Shift
    Case
    Antec Dark Phantom DP502 FLUX
    Cooling
    Noctua NH-U12A chromax.black + 7 Phantek T-30's
    Keyboard
    Logitech MK 320
    Mouse
    Razer Basilisk V3
    Internet Speed
    350Mbs
    Browser
    Firefox
    Antivirus
    Winows Security
    Other Info
    Windows 11 24H2 26100.4484 (VHDX)
    On System One (Dual Boot)
  • Operating System
    Win 11 Pro 24H2 26100.4484
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self Built
    CPU
    Intel Core i7-11700F
    Motherboard
    Asus TUF Gaming Z590 Plus WiFi
    Memory
    64 GB DDR4
    Graphics card(s)
    EVGA GeForce RTX 2060
    Sound Card
    SoundBlaster Audigy Fx V2
    Monitor(s) Displays
    Samsung F27T350
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 980 Pro 1TB
    Samsung 970 EVO Plus 2TB
    Samsung 870 EVO 500GB SSD
    PSU
    Corsair HX750
    Case
    Cougar MX330-G Window
    Cooling
    Hyper 212 EVO
    Internet Speed
    350Mbps
    Browser
    Firefox
    Antivirus
    Windows Security
On her PC there's an "admin" user so I tried that, and it still fails. So logged back on to her account and tried once more, and it worked!
Ok that somehow confirms my suspicion why it happens, but not sure of the solutions. Or why it happens. I think the handle gets invalid because process is not yet created, or already ended. And so not able to get the handle. Are the machines that failed, older machines, or really slow/heavy load?

Have done the test with Highest UAC and the removal of administrators from secpol.msc. And it still worked at my end. So people don't have to test that anymore.

edit: New script with some more debug info.
 

Attachments

Last edited:

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
Ok that somehow confirms my suspicion why it happens, but not sure of the solutions. Or why it happens. I think the handle gets invalid because process is not yet created, or already ended. And so not able to get the handle. Are the machines that failed, older machines, or really slow/heavy load?

Have done the test with Highest UAC and the removal of administrators from secpol.msc. And it still worked at my end. So people don't have to test that anymore.

edit: New script with some more debug info.

There's 4 systems in our household - mine and the wife's desktops are both Intel 10th generation based sysrtems, so fully W11-compliant (and configured as such). Other 2 are an older 8th generation desktop and a 14th generation Dell laptop. All are running Windows Home 24H2. The only failure was on the wife's desktop. Happened a couple of times with two different accounts, but then worked. The others all worked first time. The desktops deleted 190,000, 90,000 and 85,000 directories and the laptop 15,000.
 

My Computers

System One System Two

  • OS
    Windows 11 Home 24H2 RP
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self-build
    CPU
    Intel I3-10100
    Motherboard
    MSI H410M-PRO
    Memory
    16 GB
    Graphics Card(s)
    Nvidia GT 1030
    Sound Card
    Motherboard default
    Monitor(s) Displays
    Philips 27 inch
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung EVO 970 NVMe SSD 256 Gb
    Samsung QVO 870 SATA SSD 2 Tb
    PSU
    ATX 450W
    Keyboard
    Logitech
    Mouse
    Logitech Wireless
    Internet Speed
    930 Mb down / 120 Mb up
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Microsoft Office 2021 Plus
  • Operating System
    Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self-build
    CPU
    Intel i3-8100
    Motherboard
    Gigabyte Z370 D3
    Memory
    16 Gb
    Graphics card(s)
    Nvidia GT 720
    Sound Card
    Motherboard default
    Monitor(s) Displays
    Philips 27-inch
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 960 NVMe SSD 256 Gb
    Seagate 2 Tb HDD
    PSU
    ATX 450W
    Keyboard
    Microsoft
    Mouse
    Logitech Wireless
    Internet Speed
    930 Mb down / 120 Mb up
    Browser
    Edge
    Antivirus
    Windows Defender
Back
Top Bottom