Lots of users received the “The action can't be completed because the file is open in Shell Infrastructure Host” error when deleting a file. How to delete a file open in Shell Infrastructure Host? Let’s dive into the answer together with Partition Magic.

What Is Shell Infrastructure Host

Shell Infrastructure Host, also known as sihost.exe, is a process in Windows to create and maintain the graphics user interface. It also manages the outlook of desktop backgrounds, pop-up notifications, and taskbar.

However, a great many users receive the “The action can’t be completed because the file is open in Shell Infrastructure Host” when deleting a video file on Windows 10/11, like the one from the answers.microsoft.com forum:

I have used the Photos app to quickly edit video clips for some time. Since Windows 10, I randomly encounter this error “The action can't be completed because the file is open in Shell Infrastructure Host”. Any suggestions?https://answers.microsoft.com/

If you are also troubled by the Shell Infrastructure Host not deleting files error, pay attention to the following content.

Why Can’t Delete a File Open in Shell Infrastructure Host

According to a survey, the main reason why you can’t delete a file open in Shell Infrastructure Host is that the file is occupied by certain apps or progresses. Besides, a Windows update bug, default file opening app, conflicting software, and temporary glitches are also responsible for the problem.

How to Delete a File Open in Shell Infrastructure Host Windows 10/11

This part will show you how to delete a file open in Shell Infrastructure Host in 7 feasible ways. You can try them in order or directly choose one that works best for you.

Way 1. Restart Your PC

A temporary solution for the Shell Infrastructure Host not deleting files error is to completely restart your computer, which will end all running programs and apps. After that, you should be able to delete the video files successfully.

Way 2. End the Shell Infrastructure Host and All Relevant Tasks

Well, if you don’t want to restart your computer, you can end the Shell Infrastructure Host progress and other related apps like Photo in Task Manager.

Step 1. Press the Ctrl + Shift + Esc keys at the same time to open Task Manager.

Step 2. Go to the Details tab, scroll down to sihost.exe progress, right-click it, and select End task. Then this will end the Shell Infrastructure Host progress.

end sihost.exe task

Step 3. Since the above steps will also close File Explorer, you can start a new Shell Infrastructure Host and try deleting the file. To do that, go to File in Task Manager, select Run new task, then past the %WinDir%\System32\sihost.exe path into the box, and click on OK.

create a new task in Task Manager

Way 3. Change the Default App Used by the Video File

Some users from the Reddit forum reported that the file open in Shell Infrastructure Host can be deleted by changing the default app to another video editing tool. If the Shell Infrastructure Host not deleting files error occurs after editing with Photo, this method might help you.

Step 1. Open the Settings window by pressing the Win + I keys and click Apps.

Step 2. Select Default apps from the left pane and click Choose default apps by file type.

click Choose default apps by file type

Step 3. Scroll down the right sidebar to your video file types (WMV, MP4, AVI, etc.) and click Choose a default, then switch to a different player like VLC media player or MiniTool MovieMaker.

Now, open File Explorer again and see if you can delete a file open in a Shell Infrastructure Host.

Way 4. Force Delete the File in Safe Mode

If the “The action can’t be completed because the file is open in Shell Infrastructure Host” error persists, you can force delete the file in Safe Mode. Here are the detailed steps:

Step 1. Boot your Windows computer into Safe Mode.

Step 2. Type cmd in the Search box, and then right-click the Command Prompt app and select Run as administrator. Then click Yes in the UAC window to further confirm the access.

Step 3. In the pop-up window, type del command followed by the file path of the video file and press Enter, like del C:\Users\bj\Documents\MiniTool Video Converter\Screen Record\tested.mp4. Here you can replace it with your file path.

Way 5. Use MiniTool Partition Wizard

If you still can’t delete a file open in Shell Infrastructure Host, I highly recommend you use a powerful file deleter – MiniTool Partition Wizard. The tool can search for specific files and delete them according to their file extension or file name after analyzing your hard disk.

MiniTool Partition Wizard FreeClick to Download100%Clean & Safe

Step 1. Launch the MiniTool software to get its main interface and click Space Analyzer from the top toolbar.

Step 2. Select the drive where you want to delete video files from the drop-down menu and click on Scan.

Step 3. Wait for the scanning process to complete. Go to the File View tab, type the file name or file typein the search box, and click Apply. Then right-click the needed one and select Delete (permanently).

delete video files using Partition Wizard

Way 6. Drag the File into a New Folder and Delete It

Some users from the Microsoft forum reported that they can delete a file open in a Shell Infrastructure Host by moving it to a new folder and deleting it. If possible, you can create a new folder, drag the file into it, and delete it from there.

Way 7. Uninstall the Latest Windows Updates

If the “Shell Infrastructure Host not deleting files error” occurs after installing certain Windows updates like KB5050094, you can try to uninstall it or perform a system restore. Here’s how to uninstall Windows updates.

Step 1. Open the Settings window and select Update & Security.

Step 2. Click the View update history option and click Uninstall updates.

click Uninstall updates

Step 3. Right-click the recently installed updateand select Uninstall. Then follow the on-screen instructions to complete the uninstallation.

In Conclusion

How to delete a file open in a Shell Infrastructure Host Windows 10/11? This post has introduced 7 feasible methods to remove files open in Shell Infrastructure Host. If you enjoy this post, share it with your companions.

  • linkedin
  • reddit