I would like to know what MSI installed a given dll or exe on my system. I know that Windows fixes deleted files if they belong to an installed package. Can I query that information without actually deleting the file? Is there a tool or Win32 API to check what package a file belongs to?
Windows – How to find out which installer package a given exe/dll belongs to
windowswindows-installer
Best Answer
It appears like there might be a way after all! I recently discovered registry entries for files installed by Windows Installers under the following subtree:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData
I wrote a small Python script to lookup the installer for a file using the information stored there:
It is available here: https://github.com/Zero3/windows-installer-file-search