/build/static/layout/Breadcrumb_cap_w.png

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!

0 Comments   [ + ] Show comments

Answers (1)

Posted by: captain_planet 14 years ago
Black Belt
0
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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ