I used C++ to create custom action , how to get all filename contain in msi file before install? I only get folder install through "INSTALLDIR". Thanks!
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
You need to interrogate the File table. The Platform SDK, a free d/l from Microsoft, has a number of VB Scripts which you could use as templates. One which springs to mind is WiExport.VBS.
Answered 05/19/2008 by: VBScab
Red Belt

Please log in to comment
0
If you are going to do this through a custom action you would need to as Ian mentioned enumerate the File table entries.
However you also need to take into account if the component the file is associated with will be installed or not. This is done by the CostFinalize action so you need to add your custom action after this CA and check if the component is set to be installed or not.
Answered 05/19/2008 by: AngelD
Red Belt

Please log in to comment
0
this excerpt should do what you need.



Set oView = session.database.openview("Select * FROM File")
oView.Execute
Do
Set oRecord = oView.Fetch
if oRecord is nothing then
exit do
end if
sComponent = oRecord.StringData(2)
cComponentState = session.componentRequestState(sComponent)

If session.componentRequestState(sComponent) > 1 Then
sFilePath = "[#" & oRecord.StringData(1) & "]"
sFilePathValue = FormatRecord(sFilePath)

sCompFldr = "[$" & oRecord.StringData(2) & "]"
sCompFldrValue = FormatRecord(sCompFldr)
sFileSize = oRecord.StringData(4)
sFileVersion = oRecord.StringData(5)
oLogFile.Writeline "FilePath: " & sCompFldrValue
oLogFile.Writeline "FileFldr: " & sFilePathValue
oLogFile.Writeline ""

CreateFile oRecord.StringData(2), sFilePathValue, sCompFldrValue, sFileSize, sFileVersion
'
End If
Loop
Answered 05/20/2008 by: jmcfadyen
Fifth Degree Black Belt

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