cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gkriggs
Level 6

Files are not being upgraded

I tried using InstallShield 20009 to create a new installer that will be used to upgrade previous installations of our application. All my application's .NET executable and dll files went from version 1.1.0.3 to 11.22.9.0. After performing the upgrade, InstallShield is not installing any of the new files. It just leaves the old version 1.1.0.3 files in place on the target system. I tried going to Installation Designer -> Application Data -> Files and Folders, right click on each file, and in the properties checked "Always Overwrite". According to the Install Shield documentation that "property enables you to specify that if the file already exists on the target system, the installer should overwrite it, regardless of the file version." I have the same problem regardless if that property is checked or not. Install shield is not copying the new files to the target system. It just leaves the old files in place. I'd prefer to not have to make our customers do an uninstall and then an install to upgrade our product. Does anyone have any ideas or suggestions why this problem is occuring and how to work around it?

Thanks,
Greg
Labels (1)
0 Kudos
(8) Replies
kirann_hegde
Level 5

Hi Greg,

What type of installation project is it?
Basic msi?Installscript? Installscript msi?

Once this is known, we can then take it from there.

Regards,
Kiran Hegde
0 Kudos
gkriggs
Level 6

I think its a Basic MSI. I'm not sure what a "Installscript msi" is. I was trying to do a Minor Upgrade, but I think I may have broken some of the MSI component/feature rules when I removed some files and components that no longer should be installed. I tried doing a major upgrade by changing the product code, but it is not uninstalling the old product so that after the upgrade, the application is listed twice in the add/remove programs list, and the files are still not being upgraded in the INSTALLDIR. So I'm trying to figure out why the major upgrade is not removing the old product...
0 Kudos
gkriggs
Level 6

I changed the product code from "{23917195-E7A1-4A5B-A0AF-F034A599B11B}" to "{9F411105-32CA-46F7-9D8E-AA8754485A77}".
I changed the product version from "1.1.0.3" to "2.2.2.2".
I also changed the package code GUID.
I left the upgrade code unchanged at "{7B9FE45A-6D50-4807-BCF2-6D35A49FFD36}"

In the MSI debug log file, I see it did find the related product and later on in the log file I see it did run the RemoveExistingProducts action.

InstallShield 10:20:34: Getting records from Upgrade table
InstallShield 10:20:34: UpgradeCode: {7B9FE45A-6D50-4807-BCF2-6D35A49FFD36} MinVersion: 2.2.2.2 MaxVersion: Language: Attributes: 2
InstallShield 10:20:34: Checking related product {23917195-E7A1-4A5B-A0AF-F034A599B11B}
InstallShield 10:20:34: ******* ******* {23917195-E7A1-4A5B-A0AF-F034A599B11B} 1033 1.1.0.3 ***Related***
MSI (c) (64!C0) [10:20:34:056]: PROPERTY CHANGE: Adding IS_MAJOR_UPGRADE property. Its value is 'Yes'.
InstallShield 10:20:34: ALLUSERS of related product {23917195-E7A1-4A5B-A0AF-F034A599B11B} is = 1

...

MSI (s) (F8:E0) [10:20:51:519]: Doing action: RemoveExistingProducts
Action 10:20:51: RemoveExistingProducts. Removing applications
Action start 10:20:51: RemoveExistingProducts.
Action ended 10:20:51: RemoveExistingProducts. Return value 1.

Any ideas why the previous version didn't get uninstalled? Any suggestions of other things to look at that I might be missing?

Thanks,
Greg
0 Kudos
gkriggs
Level 6

I discovered it seems I need to add a row to the MSI Upgrade table for the major upgrade. I did this in the Install Shield UI by going to the Installation Designer tab, Media -> Upgrades, right clicked on Prepare Setup For Upgrade Scenarios -> Upgrade Windows Installer Setup, and choose "Add Major Upgrade Item". In the Common tab, in the "Major Upgrade settings", I selected "Completely uninstall old setup before installing new setup". I clicked on the new "major upgrade" item that got inserted, on that Common tab, in the Major Upgrade group, I choose "products sharing my Upgrade Code" for the target product family, and in the Product Version group, choose "Any earlier version.".

The installer now is upgrading as I expected. It is correctly upgrading the files that still exist from the previous version and removing the files from the previous version that no longer exist in the new version.

However, I've run into a new problem. When I choose to uninstall, it is not removing the files that exist in the new version and also existed in the previous version. It does remove the files that were added in the new version but didn't exist in the previous version.

In the MSI debug log from the uninstall, for the files its not removing that I would have expected it to remove I see entries that look like this:

MSI (s) (8C:7C) [15:34:35:008]: Executing op: AssemblyPublish(Feature=***************,Component={953E6F53-0CA1-4C08-81D2-21E0860A5B76}[~]2,AssemblyType=3,AppCtx=C:\Program Files\***********\*********\*************.exe,AssemblyName=**************,Version="1.1.0.3",PublicKeyToken="B2BDF9846F079B4F",Culture="neutral",FileVersion="1.1.0.3",ProcessorArchitecture="MSIL",)
MsiPublishAssemblies: Application Context:C:|Program Files|**********|************|**********.exe, Assembly Name:*************,Version="1.1.0.3",PublicKeyToken="B2BDF9846F079B4F",Culture="neutral",FileVersion="1.1.0.3",ProcessorArchitecture="MSIL"
MSI (s) (8C:7C) [15:34:35:008]: Note: 1: 1402 2: UNKNOWN\Installer\Assemblies\C:|Program Files|************|*************|**************.exe 3: 2

I noticed its refering to version "1.1.0.3", but I would have expected that version to all be gone from the "major upgrade" that I installed which brought the files to version "2.2.2.2".

Any ideas why this is happening? Or what I can do to make it such that it uninstalls all the files?

Thanks,
Greg
0 Kudos
gkriggs
Level 6

I don't have that many files; I am starting to become tempted to just create a custom action to copy or remove the files rather than let MSI manage them via components and features.
0 Kudos
gkriggs
Level 6

Looks like the VM I was testing on got corrupted from my earlier installation testing. I created a new clean VM and tested again, and the upgrade and unistall went fine as I expected using the major upgrade.
0 Kudos
gkriggs
Level 6

I've done some more testing, and it appears once I've tried to do an upgrade using an installer that broke the "minor upgrade" rule of removing a component, the machine appears to get corrupted, such that no future upgrades/installs (either minor upgrade or major upgrade) seem to work right on that machine for that application that uses the same upgrade code -- even when I completly uninstall the application, and then try installing the application again.

However, if I wipe the machine and reinstall the operating system, and then test upgrade/installs (including both testing minor upgrade and major upgrade) work fine (as long as all my installers do a major upgrade when a component is removed, otherwise do a minor upgrade if only file versions changed).

I was wondering, is there any way to clean out all the entries (component guids, product guids, etc.) related to a given upgrade code (e.g. to "uncorrupt" the machine), rather than having to reinstall the operating system to clear it out the problem? Where are those entries being stored on the machine (e.g. in the registry, in a database file somewhere)?

Thanks,
Greg
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

As a last resort for a machine, there's always the Windows Installer Cleanup Utility. This blows away the registration, but leaves files behind.
0 Kudos