I have an application which is deployed with an msi installer. It's version 2. When installing this latest version of this installation, the installer copies everything into the program folder (dlls,exe,resourcefiles).
But when upgrading this application from Version 1 to 2, some strange things happen. The upgrade is good, and it removes the previous files and copies the DLLs into the folder and completes the installation wizard.
When I now look in the installation folder ONLY the DLLs are present. When I run the application from the start menu for the first time, it fires a MSI shortcut and the installer shows up again to do some configuration. Now it copies the executable and the resource files and starts the application.
Why doesn't the installer copy everything on the upgrade? I want to this to be the behaviour because the users who will start this app for the first time may not have sufficient access rights for this kind of operation
During an upgrade Windows Installer uses the file versioning rules to determine if a file is installed or not. To install all files during an upgrade you can make sure that:
Windows Installer evaluates if a component will be installed or not based on it's key member. So if the key member file has a higher version than what's on the machine, that component is installed.
Another solution is to set the Version column in File table to a high value, for example 65535.65535.65535.65535. This way Windows Installer will always consider the file in your MSI newer than what's installed on the target machine.