I have built a C# MSI installer that copies a C++ win32 dll in systems directory. It installs fine on windows 7, windows server 2008 R2 and windows server 2003 R2.
However, uninstall depicts different behaviour
– on windows 7: uninstall removed the C++ dll
– on windows server 2008 R2 : uninstall removed the C++ dll
– on windows server 2003 R2 : uninstall did not remove the C++ dll
It is expected to replace the C++ dll with newer version by installer when remove prev version is set to true. But it is not being replaced on windows server 2003 R2.
Anybody seen this before ? Please advise
Two things at play here:
First, if you are installing a DLL to the SystemFolder (System32\SysWow64) you should never uninstall. Microsoft Best Practices dictate that files installed here should be permanent.
ICE09
Second, make sure you understand the Default File Versioning rules. During installs and upgrades MSI will look at the File Version and use that to determine to overwrite the file or not. If you are rebuilding the DLL and not properly versioning the file, you won’t get the results you expect.