I'm new to installer projects and was tinkering with settings to try and learn a bit. I turned on SharedLegacyFile
and the files remained after uninstalling my app. I deleted the files manually so as to get back to a blank slate (app was already uninstalled, just had left over files). I then installed an old version that I know previously removed all files on an uninstall. Uninstalled this version and files are still present.
So it seems that SharedLegacyFile
is a system setting somewhere. How do I reverse this? The only search result is this from a previous Stack Overflow question. It doesn't mention how to reverse/unset though.
Found the answer thanks to this resource:
It uses the Windows' shared file counting feature (located in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs). Each time the file is registered, the reference count for the file is incremented. When an application using the file is removed, the reference count is decremented. If the count reaches zero, the file is deleted.
For me though, my files were not found in this registry key. I did a search in the registry for the SharedDLLs key and found 3 entries:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\SharedDlls
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\SharedDlls
My files were found in the SharedDlls
key stemming from WOW6432Node
. Deleted the entries and the uninstaller works again.