A few months ago I accidentally deleted C:\Windows\System32\taskmgr.exe (I don't remember how or why). I'd like to get the application back (no, I don't have a backup stored somewhere), but the only solutions I have found online so far tell me that I need to reinstall Windows 10. Is there a way to get it back without reinstalling windows?
3 Answers
It is possible to get the task manager back without reinstalling Windows by extracting it from the Windows ISO. First you have to check which version of Windows 10 you have and get the corresponding ISO file.
- Open a run windows (Windows key + R)
- enter winver and press enter
You should see a version number in my case 1909 (newest is 2004). If you have the newest version (2004) you can download the ISO file using the Media Creation Tool. You can get the Media Creation Tool here: https://www.microsoft.com/en-us/software-download/windows10
If you have a lower version number than you can get the ISO from that version number using the Windows ISO Downloader which can be downloaded from here: https://www.heidoc.net/joomla/technology-science/microsoft/67-microsoft-windows-and-office-iso-download-tool. Once you have the ISO you have to do the following to extract the task manager from it:
- Mount the ISO by double clicking (set the explorer as default for opening ISO files if this is not working) and take note of the drive letter it gets.
- Open 7-ZIP (install it first if you don't have it)
- Navigate to the drive letter of the ISO using 7-Zip
- Navigate to the folder sources and double click on install.esd
- Wait for it to mount
- Navigate to 1\Windows\System32\
- Taskmgr.exe should be in there. Extract it to some random folder and copy it to system32 or you can extract directly to system32 if you run 7-Zip as administrator.
Alternatively you can in-place upgrade to the latest version of Windows 10 by using the Media Creation Tool. Technically it's a new installation but you won't lose your files or programs. This also works when you're already on the latest version.
- 399
You can try sfc /scannow in a command prompt. It hasn't been deleted. Files in System32 are hardlinks to files in WinSXS. A file is deleted when the last hardlink is deleted. A hardlink is a name of a file. Files can have as many names as they want. Windows system files have two hard links or names.
There are three types of file links supported in the NTFS file system: hard links, junctions, and symbolic links. [Plus there is also various shell links which is a separate subject and they only work in Explorer not the command prompt]
Hard Links
A hard link is the file system representation of a file by which more than one path references a single file in the same volume.
https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions
Typing dir c:\windows\winsxs\taskmgr*.* /a /s in a command prompt will show you your file.
NB you will see both the exe and the MUI file (it goes in c:\windows\system32\en-us for English) for 64 bit and 32 bit PLUS any updated versions.
Remember you also have the 32 bit task manager at "C:\Windows\SysWOW64\Taskmgr.exe".
If you want to reestablish the link type mklink /? for help. If you need more help post the path to YOUR taskmgr in WinSxS.
- 854
Thanks everyone, but the only solution that eventually worked for me can be found here: Restore the original task manager after replacing it with the Sysinternals process explorer
- 101