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

Can't update an MSI with new file


1 reply to this topic

lbogni

lbogni
  • Members
  • 1 posts

Posted 01 February 2006 - 07:49

I got an MSI database ((mydir\5.06.0100\MyMSI.Msi) created with IS 9 (basic MSI). In this MSI, I had a file with version 5.06.0663. I want to update a copy of this database (mydir\5.06.0150\MyMSI.Msi) with the new versions 5.06.0666. I open the file in IS, delete the file in the "Files and Folders" view. Then, I add the new version. The files are in a stream, inside the msi file.

It seems OK (the file properties in IS says me 5.06.0666). When I install the msi (msiexec.exe /i (mydir\5.06.0150\MyMSI.Msi), the 5.06.0663 version is installed !!! ohmy.gif

In mydir\5.06.0100\MyMSI.Msi, I have only a stream (Data1.cab)
In mydir\5.06.0150\MyMSI.Msi, I have 2 stream (Data1.cab and Data2.cab).

I try to extract the streams Data1.cab (msidb.exe -d "mydir\5.06.0100\MyMSI.Msi" -x "Data1.cab") and Data2.cab(msidb.exe -d "mydir\5.06.0100\MyMSI.Msi" -x "Data2.cab"), the file is both in Data1.cab (5.06.0663) and Data2.cab (5.06.0666). But in the media Table, IS sets a new sequence for a new media. In the File table, the version and the FileSize fileds are good. For me, everything is good.

Where is my problem ?

So I try to update the MSI file by hand:
- I extract the stream :
msidb.exe -d "mydir\5.06.0100\MyMSI.Msi" -x "Data1.cab"
- I extract the cab :
CabArc.Exe X "mydir\5.06.0100\Data1.cab" *.* "mydir\5.06.0150\cab"
- I copy the new file in mydir\5.06.0150\cab
- I rebuid the cab :
CabArc.Exe N Data1.cab *.*
- I copy "mydir\5.06.0100\MyMSI.Msi" to "mydir\5.06.0150\MyMSI.Msi"
- I remove the stream in "mydir\5.06.0150\MyMSI.Msi"
msidb.exe -d "mydir\5.06.0150\MyMSI.Msi" -k "Data1.cab"
- I add the new Data1.cab :
msidb.exe -d "mydir\5.06.0150\MyMSI.Msi" -a "Data1.cab"
- I update the File table :
msifiler -d "mydir\5.06.0150\MyMSI.Msi" -s mydir\5.06.0150\cab\

When I install, the 5.06.0663 is install !!! mad.gif Where is this file stored in "mydir\5.06.0150\MyMSI.Msi" (I'm sure it's not in the New data1.cab) ?

One more time, where is my problem ?


lavocat

lavocat
  • Full Members
  • 158 posts

Posted 01 February 2006 - 10:48

Look at the Medi table, you should have something like this:
1 1 1 #Data1.cab DISK1
'#' means that the cab file is stored in a stream instead of in the root of the installer folder.

Now look at the File table: There you should find the file with his correct version 5.06.0666. Verify that the old file (5.06.0663) is not present in the file table.
Check also the Sequence column in file table and compare it with the LastSequence column of the Media table.

Create a logfile to know if it is the right cab that's used.
If all is correct verify if the file in the cab is actually the good one.

If it can't help, show me the logfile