how to get all filename contain in msi file before install?
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
Answers (3)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
Posted by:
AngelD
15 years ago
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.
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.
Posted by:
jmcfadyen
15 years ago
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.