Custom Action to get File Table Listing...
Does anyone know if there is a way to create/use a Custom Action that, during the install will query the running installation's File table, grab FileName, FileSize, and Version, then spit it to a text file?
Any help, tips, guidance would be more than greatly appreciated!
Thanks!
Any help, tips, guidance would be more than greatly appreciated!
Thanks!
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
captain_planet
14 years ago
Yeah, put this Type 38 CA just before InstallInitialize with a condition of NOT Installed or whatever.....edit as necessary....you get the idea [;)]:
' ForAppending = 8 ForReading = 1, ForWriting = 2
Const ForAppending = 8
'location of output file
Dim outputFile : outputFile = "c:\output.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile (outputFile, ForAppending, True)
Dim sql : sql = "SELECT FileName, FileSize, Version FROM File"
Set fileView= Session.Database.OpenView(sql)
fileView.Execute
Set fileRecord = fileView.Fetch
While Not fileRecord Is Nothing
objTextFile.WriteLine(fileRecord.StringData(1) & " " & fileRecord.StringData(2) & " " & fileRecord.StringData(3))
Set fileRecord = fileView.Fetch
Wend
Set fileView = Nothing
Set fileRecord = Nothing
objTextFile.Close
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.