I'm looking for advice on how to fully remove certain files and folders from an MSI installer without affecting its functionality. Specifically, I want to take two directories that are currently embedded in my setup.msi—[ProductDir] and APPDATADIR—and have them stored externally instead.
My goal is to reference these directories during installation rather than package them within the MSI. The reason I need to do this is to easily update specific files within these directories without having to modify the MSI itself each time. I've tried using InstallShield and Advanced Installer, but they weren't successful in achieving this.
Can anyone suggest a reliable approach or tool that might help with this?
3 Answers
While it might not be exactly what you want, have you considered running the MSI as it is and then creating a sync job that automatically updates those files every few days? It could save you from having to run the installer regularly.
Have you tried using the Orca editor? It's part of the Windows SDK and allows you to view and modify the data tables in your MSI. You may be able to delete those folder references directly in your installer. Just be cautious about uninstall behavior if those files are still in the installation directory—it could lead to unexpected results! Here’s a link for more info on Orca: https://learn.microsoft.com/en-us/windows/win32/msi/orca-exe. Good luck!
Thanks! I'll give that a shot and see if it works for my case.
If you're looking to remove files from the MSI but keep it functional, `msiexec nameoffile.msi /a` can help extract them while referencing the originals. However, keep in mind that modifying the files can lead to hash mismatches. You might want to use tools like Msifiler.exe to update the hashes if you go this route.
That sounds interesting! I'll give it a try and see if it helps with my situation.

I appreciate the suggestion! However, since the updates happen variably when those files expire or break, I really need to keep them external for manual replacement.