/build/static/layout/Breadcrumb_cap_w.png

Automatically check SOURCELIST in all my packages

Hi,
I don’t suppose anyone has a VBS that will check for the presents of SOURCELIST in a package? My VB is rubbish, I don’t have a clue where to start and I have 100s of packages to check.

Cheers
Charlie

0 Comments   [ + ] Show comments

Answers (6)

Posted by: AngelD 16 years ago
Red Belt
0
Sorry but do you mean you want to check if the SOURCELIST property is included in any installed MSI package(s) and if so where they point to?
Posted by: fuz_kitten 16 years ago
Second Degree Blue Belt
0
No... sorry. I mean I need to check that the SOURCELIST property is present (and ideally correct) in all the packages in my repository.
Posted by: spartacus 16 years ago
Black Belt
0
Hello,

The following VB Script code will output the value of the SOURCELIST property in an MSI database :


'Sourcelist.vbs
Option Explicit
Dim argCount
Dim installer, database, message
Dim databasePath
Dim view, rec

Const msiOpenDatabaseModeReadOnly = 0

If Wscript.arguments.Count = 0 Then
Wscript.Echo "You need to supply the name of the MSI database as a parameter to this script"
Wscript.Quit 1
End If

' Instantiate Windows Installer object
On Error Resume Next
Set installer = Nothing
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")

' Open the MSI database
databasePath = Wscript.Arguments(0)
Set database = installer.OpenDatabase(databasePath, msiOpenDatabaseModeReadOnly)
Set view=Database.OpenView("SELECT `Property`,`Value` FROM `Property` WHERE `Property` = 'SOURCELIST' ORDER BY `Value`")
view.Execute
set rec = View.Fetch
if rec.StringData(2) = "" then
Wscript.Echo "MSI file at " & databasepath & " has a blank SOURCELIST property"
else
Wscript.Echo "MSI file at " & databasepath & " has SOURCELIST property set to " & rec.StringData(2)
end if
Set installer=nothing
Wscript.Quit 0


To use it you need to supply the name of the MSI file as a parameter

i.e. cscript sourcelist.vbs <full path to MSI file>

[I produced this in a bit of rush, so the above code is fairly crude and, more importantly, it won't the situation where you have introduced SOURCELIST in a transform - let me know if this is the case and I'll have a go at that (may take a while longer though [;)] )

Regards,

Spartacus
Posted by: fuz_kitten 16 years ago
Second Degree Blue Belt
0
Your a star! I'll let you know how i get on.

Charlie
x
Posted by: jmcfadyen 16 years ago
5th Degree Black Belt
0
set objInstaller = CreateObject("WindowsInstaller.Installer")
objInstaller.AddSource("ProductCodeofApp", "newSourcelocation")

this will do to change stuff already deployed.

SMS can handle this as well if you are using it.
Posted by: AB 16 years ago
Purple Belt
0
AppDelploy's very own MSISearch.exe is great for sticky jobs like this...
Mange too
Search for Property Values that match your criteria and you get an instant'ish traffic light response
This app has helped me a few times - finding conflict files for instance - back in the day...
Worth saving to your tools repository even if you don't use it today
B/H Mon - you may need to copy your MSI farm to the local drive - a quick test will hightlight its power/weakness
Regards,
Al

From the Options menu you can search through tables galore - well, file names, reg data and values, properties.
Well handy :)
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