cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

searching all tables with an extern Script at Keywords

Hi Team !

I have a task to implement a quality wich can search an MSI / MSI with Mst from an external script or something else. The keywords should be stored in an ini file so that a doofus can add keywords to a list.

I give you an example. A quality manager wants to know if the scripter has done a great job an didn't leave any hard coded drive mappings in the registry or elsewere.

Thats my task.
Has anybody an idea if this is possible ?

I know that you can modify some Informations with sql statements when the msi is runnin, but i never did that...

I'am glad about any idea... :confused:

Thx 4 reading...
A$-User
(2) Replies
Help... has nobondy any hint for me ??? :confused:
Open the database in vbscript and run SQL queries.

Example
database.OpenView("SELECT `Dialog` FROM `Dialog` WHERE `Dialog`=?")


To open the database:


' Connect to Windows Installer object
On Error Resume Next
Dim installer : Set installer = Nothing
Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : CheckError

' Open database
Dim databasePath : databasePath = Wscript.Arguments(0)
Dim database : Set database = installer.OpenDatabase(databasePath, msiOpenDatabaseModeReadOnly) : CheckError


Sub CheckError
Dim message, errRec
If Err = 0 Then Exit Sub
message = Err.Source & " " & Hex(Err) & ": " & Err.Description
If Not installer Is Nothing Then
Set errRec = installer.LastErrorRecord
If Not errRec Is Nothing Then message = message & vbLf & errRec.FormatText
End If
Fail message
End Sub