Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Files in RemoveFile table don't get removed during


11 replies to this topic

jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 29 September 2010 - 22:53

Hi,

I am releasing a new version of my product (minor upgrade), which I'm planning to package as a patch. This is a Basic MSI project in InstallShield 2009.

The installer creates some shortcuts on the desktop and in the All Program menu, this shortcuts make a reference to the version number, e. gr. "My Product 7.3", "My Product 7.3.2".

The change in the name of the shortcut is causing that after the upgrade is finished, the system ends up with duplicated shortcuts, one for version 7.3 and a second for version 7.3.2.

I made some research on this and started using the RemoveFile table, this worked fine when I created my patch 7.3.1, but now in patch 7.3.2 it isn't working in some cases. Let me clarify this.

This scenario DOES work:
  • I install my product version 7.3 (full installer)
  • Run patch 7.3.1 (windows installer patch). Shortcut for 7.3 is deleted fine.
  • Run patch 7.3.2 (windows installer patch). Shortcut for 7.3.1 is deleted fine.

This scenario does NOT work:
  • I install my product version 7.3 (full installer)
  • Run patch 7.3.2 (windows installer patch). Shortcut for 7.3 is NOT deleted.

Note: I have tested my 7.3.2 version by running the full installer instead of the patch, and it works fine. It performs the minor upgrade and removes the old shortcut.

In my 7.3.2 patch I've added both 7.3 and 7.3.1 as previous setups.

A verbose log doesn't seem to provide much information (or probably I'm not doing the right search).

The component associated to the records in the RemoveFile table is updated correctly which I can verify in the log:

CODE

MSI (s) (58:EC) [15:51:44:846]: Component: ProgramFiles; Installed: Local;   Request: Local;   Action: Local


I will appreciate any help that you may provide.

Thanks,
Juan Carlos


MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 01 October 2010 - 08:06

Please go through the RemoveFiles Action in the Log file. This action takes place at the beginnig of the installation. Look for this ("RemoveFiles") in the top of the Log file.

This will have entries that will make it clear why the installation is not updating the files.

RemoveFiles action runs during an update cleaning up the files installed with the previous setup. There are conditions where this action may not delete files existing on the system. That is an upgrade may be left with some old files. These problems occur only for unversioned files, though.

Also check for validation errors during patch creation. The one to look for the most is Val0010:

"Val0010 The data in component [1] differs from the previous setup. However, this component will not reinstall in an upgrade scenario. Therefore, the changes will not be applied to the target system during the upgrade. Table: 'RemoveFile' Record: [3]"

If you find Val0010 error, refer to:
http://kb.flexerasof...ernalID=Q108855

Also the entries you have authored into the RemoveFile table and the log file entries for RemoveFiles action can reveal more. So, if you can, post them too.

Edited by MSIYER, 01 October 2010 - 11:48.


jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 02 October 2010 - 00:38

MSIYER,

Thanks a lot for your response.

I have verified and I don't have the VAL0010 warning. But there is a warning though, which reads:

ISDEV : warning Val0015: The Class table contains new content. Therefore, if you are packaging this upgrade as a patch, you will not be able to make it an uninstallable patch.

But I understood that this warning is normal because of the note at the bottom in this MSDN link

The RemoveFile table is populated as follows:

FileKey: DesktopShortcut
Component: ProgramFiles
FileName: My Product 7.*.lnk
DirProperty: DesktopFolder
InstallMode: 3

The idea is that the files get removed either at intallation or uninstallation of the ProgramFiles component.

As I mentioned before, the InstallValidate section in the log indicates that the ProgramFiles component will be installed locally.

When applying the patch, this is what I get in the log:

CODE

MSI (s) (EC:30) [19:11:11:380]: Doing action: RemoveFiles
Action ended 19:11:11: RemoveDuplicateFiles. Return value 1.
MSI (s) (EC:30) [19:11:11:380]: Note: 1: 2205 2:  3: RemoveFile
MSI (s) (EC:30) [19:11:11:380]: Note: 1: 2205 2:  3: RemoveFile
Action start 19:11:11: RemoveFiles.
MSI (s) (EC:30) [19:11:11:380]: Doing action: RemoveFolders
Action ended 19:11:11: RemoveFiles. Return value 0.


And I also get this some lines below:

CODE

Action start 19:11:12: RemoveDuplicateFiles.
MSI (s) (EC:A0) [19:11:12:567]: Doing action: RemoveFiles
Action ended 19:11:12: RemoveDuplicateFiles. Return value 1.
MSI (s) (EC:A0) [19:11:12:567]: Note: 1: 2205 2:  3: RemoveFile
MSI (s) (EC:A0) [19:11:12:567]: Note: 1: 2205 2:  3: RemoveFile
Action start 19:11:12: RemoveFiles.
MSI (s) (EC:A0) [19:11:12:567]: Doing action: RemoveFolders
Action ended 19:11:12: RemoveFiles. Return value 0.


As I said before, If I run the full installer instead of generating the patch, the files are removed correctly and this is what I get in the log:

CODE

MSI (s) (4C:50) [18:36:45:274]: Executing op: ActionStart(Name=RemoveFiles,Description=Removing files,Template=File: [1], Directory: [9])
MSI (s) (4C:50) [18:36:45:290]: Executing op: ProgressTotal(Total=2,Type=1,ByteEquivalent=175000)
MSI (s) (4C:50) [18:36:45:290]: Executing op: SetTargetFolder(Folder=C:\Documents and Settings\All Users\Desktop\)
MSI (s) (4C:50) [18:36:45:290]: Executing op: FileRemove(,FileName=My Product 7.3.1.lnk,,)
MSI (s) (4C:50) [18:36:45:290]: Verifying accessibility of file: My Product 7.3.1.lnk
MSI (s) (4C:50) [18:36:45:290]: Executing op: SetTargetFolder(Folder=C:\Documents and Settings\All Users\Start Menu\Programs\My Product\)
MSI (s) (4C:50) [18:36:45:290]: Executing op: FileRemove(,FileName=My Product 7.3.1.lnk,,)
MSI (s) (4C:50) [18:36:45:290]: Verifying accessibility of file: My Product 7.3.1.lnk


Please let me know if you need to see more information from the log.

Thanks for your help,
Juan Carlos

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 02 October 2010 - 10:28

Please note:
MSI (s) (EC:30) [19:11:11:380]: Note: 1: 2205 2: 3: RemoveFile


This line refers to Windows Installer Error number 2205:
Database: [2]. Table does not exist: [3].

For more details on the same refer to:
http://msdn.microsof...835(VS.85).aspx

If you are creating a patch with an Update.exe wrapper:
open the Installshield IDE. Choose option "Open Existing Project". Open this Update.exe(or whatever name you may have for the exe) i.e., the package on which the patch will be applied. Further dialogs will ask you to enter the name of the Base package. Enter the name of the package file you intend to update(the old package). Now go to the Direct Editor and look for the RemoveFile table. If you do not find it, create the table and add the entries or import it from your main project. Save the proojet and test it.

If you do not have an exe wrapper, open your .msp file and follow the above steps.

It would also be good if you could open your patch file(.msp) in ORCA.

Edited by MSIYER, 04 October 2010 - 12:08.


MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 03 October 2010 - 05:01

Did you solve the issue?

jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 04 October 2010 - 22:22

Thanks a lot for your response.

I have done what you suggested (opening update.exe), but I have two previous setups, so I did it for the oldest first (7.3) and I see the RemoveFile table with a little green plus-sign icon. The contents of the table is what I originally included.

I repeated the process with my other version (7.3.1) and this time the RemoveFile table shows a little blue pen icon and I see the rows as I wrote them but the Component and FileName columns show a little red mark in the top-right corner.

After that I extracted the msp from update.exe and opened it in orca, and the only tables I see are the MsiPatchMetadata and MsiPatchSequence. There are no other tables on it.

Is there anything else you may suggest?

Thanks,
Juan Carlos

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 05 October 2010 - 13:28

I have done what you suggested (opening update.exe), but I have two previous setups, so I did it for the oldest first (7.3) and I see the RemoveFile table with a little green plus-sign icon. The contents of the table is what I originally included.

The green plus sign means that RemoveFile table has been added to the patch. So things are proper here.

I repeated the process with my other version (7.3.1) and this time the RemoveFile table shows a little blue pen icon and I see the rows as I wrote them but the Component and FileName columns show a little red mark in the top-right corner.

The blue pen means that something has changed(edit). The red mark, I feel, means that the IDE believes that something wrong is happening.
please point your mouse to the red mark and see the tooltip. You might find what IDE wants there. Also, right clicking on the column with red mark will give you some undo options.

Try these options. I feel there is something wrong in the second patch as the red mark appears on the column.

Edited by MSIYER, 05 October 2010 - 13:30.


jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 05 October 2010 - 16:24

The tooltip in the red mark indicate the previous value. I think this is because in version 7.3.1 I populated this table and for 7.3.2 I changed the Component and in the FileName column I used a wildcard character.

In 7.3.1 it was like this:
FileKey: DesktopShortcut
Component_: MyProgram.exe
FileName: My Program 7.3.lnk

DirProperty: DesktopFolder
InstallMode: 3

In 7.3.2 it is now like this:
FileKey: DesktopShortcut
Component_: ProgramFiles
FileName: My Program 7.3.*.lnk

DirProperty: DesktopFolder
InstallMode: 3

However this upgrade path works perfectly, the one giving trouble is the 7.3 to 7.3.2 upgrade path, which is the one showing the green plus icon.

Any other idea?

Thanks,
Juan Carlos


MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 07 October 2010 - 06:26

Please look at the wildcard you are using.
My Program 7.3.*.lnk
This will delete all files that have the following name pattern:
My Program 7.3.1.lnk
My Program 7.3.2.lnk
My Program 7.3.3.lnk
.
.
.
.
.
My Program 7.3.n.lnk
where n = third part of version number of the latest patch

In no way can this delete My Program 7.3.lnk

Please correct this and everything should work.
You can try a wildcard pattern like:
My Program 7.3*.lnk
or better still use file names explicitly in the RemoveFile table(Create a row for each file and use the full name of the file to be deleted).





jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 07 October 2010 - 18:13

I'm sorry, I made a mistake when typing in here.

The values in the RemoveFile table are actually as follows:

FileKey: DesktopShortcut
Component_: ProgramFiles
FileName: My Product 7.*.lnk
DirProperty: DesktopFolder
InstallMode: 3

This works from 7.3.1 to 7.3.2 but not from 7.3 from 7.3.2.

Sorry about the confusion.

Thanks.

MSIYER

MSIYER
  • Full Members
  • 90 posts

Posted 08 October 2010 - 06:46

Avoid the wildcard and author a RemoveFile table with explicit values as I mentioned earlier. For example:
ROW 1
FileKey: DesktopShortcut
Component_: ProgramFiles
FileName: My Product 7.3.lnk
DirProperty: DesktopFolder
InstallMode: 3

ROW 2
FileKey: DesktopShortcut
Component_: ProgramFiles
FileName: My Product 7.3.1.lnk
DirProperty: DesktopFolder
InstallMode: 3

etc...

Try this approach and see if it works.
Let us first get this thing to work and then drill down to the reason why it failed earlier.

jcarlos10

jcarlos10
  • Full Members
  • 13 posts

Posted 13 October 2010 - 22:59

Thanks for your suggestion MSIYER,

Unfortunately it doesn't work. I have tried all the options that you mention but continue getting the same behavior.

I really appreciate your help, but seems like at this point I'm stuck on this.

The alternative I have is to release the full installer, which is working fine, and forget about the patch for the moment (I've a release to ship).

Thanks,
Juan Carlos