PDA

View Full Version : After Upgrade some files are missed



andreo19
10-27-2005, 03:10 AM
The problem:

After minor Upgrade from v1.5 into v1.6 (only "Package Code" and "Product Version" are changed), some files are missing on %InstallDir%. All those missing files came from one component.


.ism file description:

Component name: "NewComponent1"
Until version 1.5 I had these files in this component: file1.py, file2.py file3.py and file4.py - file1.py was sated as "Key" file.

In version 1.6 I have change some files in this component. Now I have file3.py, file4.py, file5.py and file6.py. As file1.py do not exists any more, also "key" file do not exist any more.


Actual results:
After Upgrade from 1.5 into 1.6 all these files file3.py, file4.py, file5.py and file6.py are missing in %InstallDir% :confused: .
Also in log file I have two records for each those files:


...
InstallFiles: File: file3.py, Directory: C:\Program Files\MyPrg\python\, Size: 13050
...
RemoveFiles: File: file3.py, Directory: C:\Program Files\MyPrg\python\
...


So, it looks like Upgrade first really install those files and in post-install procedure remove them.
Changing Component GUID do not help, also creating new component do not help.

Any hint how to improve that?

Thanks in advance.
Regards
Andrej

michael.s.white
11-01-2005, 03:05 PM
The problem comes from the key File change. If you change the keyfile of a component the GUID must be changed for that component.

I have seen this behaviour with a major upgrade where the key file changed but the component GUID stayed the same.

What is ultimately happening is that the 1.6 installer is installing the files that you need. Now the 1.5 installer is identifying the old component as removed so it uninstalls the component at the end of the upgrade leaving you with no files installed.

ISCodeMonkey
11-02-2005, 04:49 AM
Hi,

I'm also seeing the same in Installshield Developer 8 (yes, I know , this is an 11 board).

But I have changed the component GUID when my keyfiles have completely changed. During a major upgrade, doesn't the old component get completely removed, then the new one put back on?

I'm seeing some files missing until I run a repair.

michael.s.white
11-04-2005, 11:05 AM
It depends on what type of Major upgrade you do. There are two options avaliable

1.) Completely remove old package before installing new package.
2.) Install new package then remove what is left from the old package.

If you choose option 1 you should be fine. Option 2 however get a little more tricky. You have to follow microsofts component rules if you choose this option.

What may ends up happening with option 2 is as follows.

Installer 1.0 contains:

Component A
which contain files A, B, C

Installer 2.0 contains:

Component B (new guid and new keyfile)
which contain files A, B, D

Assuming in version 2.0 that you replace component A with component B (component A was deleted).

You would end up with only file D installed, and this is why.

The new installer 2.0 run installing Component B with the new files A, B, and D. Now the old installer detects that Component A is not longer installed. So it removes Component A, thereby removing files A, B, and C. Leaving the final product with only file D installed.

This same case will also happen if you change the keyfile of a component. I am assumning here that this is because the Installer sees this as a different component even though the GUID is the same.

This is why Microsoft and many other best practive manuals recomend one file per component.

FYI this is Windows Installer behaviour so it is independant of Installshield and appears in all versions. Microsoft setup the rules we are forced to follow here.

ISCodeMonkey
11-07-2005, 03:12 AM
Hi, thanks for replying.

Unfortunately, I cannot use the completely remove previous package option as we have special processing on uninstalling that removes security aspects on our software (it deactivates the software so the user can use it again on another PC).

We don't want this to happen on upgrade, and also, last time I did this, I would get usedll failures as the dll required to do the security stuff had been removed as part of the upgrade.

Would creating single components with the files in fix this? This is what I already have (single component, new guid) but this single file was in the previous installer.

michael.s.white
11-09-2005, 02:44 PM
Hi, thanks for replying.

Unfortunately, I cannot use the completely remove previous package option as we have special processing on uninstalling that removes security aspects on our software (it deactivates the software so the user can use it again on another PC).

We don't want this to happen on upgrade, and also, last time I did this, I would get usedll failures as the dll required to do the security stuff had been removed as part of the upgrade.

Would creating single components with the files in fix this? This is what I already have (single component, new guid) but this single file was in the previous installer.


I can understand. we could not do this on a upgrade because it would wipe out out web pages virtual directory when it uninstalled. So we went with a major upgrade that installed the uninstall old components.

Unfortunately this meant we where stuck with all the original files we had set as key files. we have no way of removing these as and upgrade from our 1.0 install will remove all the old files in the component.

What we ended up doing when we went from version 1.0 to 1.1 is we left all the old components in with there key files. Then we moved all the other files from these components into new components. Now any installs going from 1.1 up will follow best practices and we can remove single files without impacting upgrades.

The one catch is to remove a file that is not set as a key file, when doing an update from 1.0 to 1.x, you must explicitly add it to the remove file table via direct editor.