I'm using ORCA to try to customize an MSI packaged application (called Category Manager) provided by the vendor. I have successfully streamed in a few binary settings files and added the necessary entries to the Component, FeatureComponents, Files, and Media tables such that the steamed in binaries are dropped into the appropriate directory. What I want to be able to do is essentially copy one of the binary files to a new file with a different name in the same folder. Eg. file1.txt remains but an exact copy of it is made to file2.txt at installation time. When I create an entry in DuplicateFile and add entries to the Component, FeatureComponents tables I get error "2708" - No entries found in the file table, at install time. If I remove the DuplicateFile entry, my package installs, but obviously without the desired file2.txt. I've tried creating an entry in the Files table but that didn't work either. After hours of spinning my wheels, here I am.

I think the DuplicateFile approach is the right one based on other posts I've read, but I can't seem to get it to work. What are the prerequisite entries that must exist? Perhaps I'm missing one or more. If this is the wrong approach, what should I do instead?

Thanks. Any help is appreciated.

Kevin
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I think the problem lies with the "When I create an entry in DuplicateFile and add entries to the Component, FeatureComponents tables" part. Both the original file as the duplicate file should be in the same component:
You cannot have 2 components install the same file to the same destination directory. If the file is already set to be installed to the same directory by a component assigned to another feature, you are prompted to create a component assignment to the current feature. If you do this, then any future changes to the component will affect all features to which it is assigned. (Wise help)
Answered 02/27/2009 by: Lindeberg IT
Senior Yellow Belt

Please log in to comment
0
I'm using ORCA to try to customize an MSI packaged application (called Category Manager) provided by the vendor....via a transform, I trust?
Answered 02/27/2009 by: VBScab
Red Belt

Please log in to comment
0
Hi Kevin,
could you please post the related lines in component and duplicatefiles tables.
Regards, Nick
Answered 02/27/2009 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
I'm new to this, so am trying to muddle my way through, so forgive me and thanks to everyone for replying.

I created the following (I've pasted the row from Orca and identified the column names in ():

Component98 DIRECTORY66 0 (Component, directory_, Attributes)

HamelSettings Component98 hamel.ini settings.ini DIRECTORY66 (FileKey, Component_ , File_, DestName, DestFolder)


Ideally, yes, via a transform, but at the moment, I was just trying to get it to work by modifying the MSI. Starting from first principles, if I wanted to copy a file to a new name in the same folder, what would I need to create to make that happen?

Kevin
Answered 02/27/2009 by: kegan
Senior Yellow Belt

Please log in to comment
0
I think your problem lies with your Filekey; which, by the look of it, you have chosen ad random, The FileKey should be the same as the KeyPath >

COMPONENT TABLE:
"Component98__","{ComponentID}","DIRECTORY66","0","","original.txt"
DUPLICATE FILE TABLE:
"original.txt","Component98__","original.txt","duplic~1.txt|duplicate.txt","DIRECTORY66"
Answered 03/02/2009 by: Lindeberg IT
Senior Yellow Belt

Please log in to comment
0
Hi Kevin,
can't see a bad thing here. However make sure, that the "File_" column matches the first column from the appropriate file entry in the file table!
See : http://msdn.microsoft.com/en-us/library/aa368335(VS.85).aspx

@Lindeberg: I'm sorry, but this is completely wrong. The component key path has nothing to do with duplicate files!
The component keypath is used to check the health of the installation. If no keypath is set, the directory is used as the keypath.

Regards, Nick
Answered 03/02/2009 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
My apologies, you are correct.I assumed that would generate an ICE error without actually checking it.
Never used duplicatefile myself and the only thing i could see different from my test.msi was that filekey. Never thought about something basic like using the correct file entry in the filetable; that would be the starting point of this action normally.

FILETABLE:
original.txt Component98__ original.txt

DUPLICATEFILE TABLE
JustSomeFileKey Component98__ original.txt duplic~1.txt|duplicate.txt DIRECTORY66
Answered 03/02/2009 by: Lindeberg IT
Senior Yellow Belt

Please log in to comment
0
In the words of the Kool-aid man, Oh Yeah! I have a small additional problem detailed below but let me summarize what my issue was: It turned out that I was referencing the file by its actual file name (hamel.ini) in the File column of the DuplicateFile table when I should have referenced it by the name of that file as referenced in the File column of the File table (File36), as nheim said.

File Table:
File36 Component96 hamel.ini 1 8192 36

DuplicateFile Table:
HamelSettings Component98 File36 settings.ini DIRECTORY66

**To help anyone else out, note File36 in both. This was required to get it working, along with corresponding (to each Component##) entries in the Component table; entries in the FeatureComponents table mapping a Feature to your Components like this:

FeatureComponents Table:
MainFeature Component98


It's mostly working now but I found that, while I had used WiStream.vbs to stream in the two .ini files into the MSI, upon installation, it's actually copying the two .ini files from the source installation folder. Thus, if I delete the .ini files from the source installation folder (they were in the folder along with the MSI file and MST files) I get errors reporting missing files (the log file references Error 1308. Source file not found) upon install. I can deal with this but I was under the impression that, by streaming the .inis into the MSI file, I wouldn't actually need them outside the MSI.

Am I just not understanding the nature of streaming in uncompressed files or is it really possible to get them extracted from the MSI instead of them coming from the installation source folder? If it is possible, how do I do it.

Thanks again for getting me this far!

Kevin
Answered 03/04/2009 by: kegan
Senior Yellow Belt

Please log in to comment
0
I had used WiStream.vbs to stream in the two .ini files into the MSIIt's never a good idea to mess with vendor MSIs. Use a transform.

Your solution is overly-complex. Just add the files to the 'Files', create a suitable component for it and add the component to a feature.
If you want to persist, however, for stuff you've placed into the Binary table, you must extract it again. Here's a function I use, which I think some kind soul posted here and which I shamelessly filched. Note: most of the error-trapping has been removed to make it easier to follow:Function ExtractBinary(ByVal strBinaryName, ByVal strOutputFile)
Dim objDatabase
Dim objView
Dim objRecord
Dim objBinaryData
Dim objStream

Const msiReadStreamAnsi = 2

ExtractBinary = False

Set objDatabase = Session.Database

Set objView = objDatabase.OpenView("SELECT * FROM Binary WHERE Name = '" & strBinaryName & "'")
objView.Execute

Set objRecord = objView.Fetch

objBinaryData = objRecord.ReadStream(2, objRecord.DataSize(2), msiReadStreamAnsi)

Set objStream = objFSO.CreateTextFile(strOutputFile, True)
objStream.Write objBinaryData
objStream.Close

If objFSO.FileExists(strOutputFile) Then
ExtractBinary = True
End If

Set objStream = Nothing
Set objRecord = Nothing
Set objView = Nothing
Set objDatabase = Nothing

End Function
Answered 03/05/2009 by: VBScab
Red Belt

Please log in to comment
0
Hi Kevin,
this can't work at all with DuplicateFile at all, because the streamed files will never be seen by the MSI logic and therefore no file key is available for them.
As Ian posted, this is something for very special situations. And then you need exactly to know what you can achieve with this and not...
In your case, you should compress the two files into a cab file.
Then you could add the CAB as stream to the MSI.
However, this will only be possible, if you alter the MSI directly. A transform can't hold a CAB.
See: http://www.appdeploy.com/messageboards/postnumber.asp?id=28490
for instructions. There, i have outlined the hole process of adding files to a vendor MSI and using them with DuplicateFile.

Gruss, Nick
Answered 03/05/2009 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Typical me...I assumed the INI file install was a new issue, not part of the whole DuplicateFile question. That'll teach me to think for a second before replying, won't it?A transform can't hold a CAB....not as an internal CAB but it can reference an external CAB. That CAB will, of course, have to be distributed with the MSI and MST.
Answered 03/05/2009 by: VBScab
Red Belt

Please log in to comment
0
Thanks again folks. You've all been very helpful. I'll stick with the external file references for simplicity. So long as I know and remember they have to be in the source folder during deployment, I should be fine.

Cheers!

Kevin
Answered 03/05/2009 by: kegan
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity