Beispielskript für das API-basierte Auslösen des Produktquellenupdate-Managers

Betrifft: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

Letzte Aktualisierung des Themas – November 2007

Auf dem Microsoft System Center Configuration Manager 2007-Client können einige Ereignisse eintreten, die dazu führen, dass der Produktquellenupdate-Manager-Agent die Quellpfade für eines oder mehrere Windows Installer-Produkte aktualisiert. Mit dem folgenden VBScript-Skript können Sie einen Quellenlisten-Aktualisierungszyklus für Windows Installer aktivieren.

Skript

' Name of script is updateps.vbs.

dim oSrcList
dim oSrcLocs
dim sLoc

Set objArgs = WScript.Arguments

If objArgs.Count < 1 then
    WScript.echo "Usage: updateps.vbs {Product Code}" 
    WScript.quit
end if


set oSrcList = CreateObject ("SrcUpdateMgr.ProductSourceList")

if oSrcList is nothing then 
    wscript.echo "Could not create Product Source List Object - quitting"
    wscript.quit
end if

oSrcList.UpdateSourceList objArgs(0), FALSE

oSrcLocs = oSrcList.GetSourceList(objArgs(0))

dim nIndex
for nIndex = LBound(oSrcLocs) To UBound(oSrcLocs)
    WScript.echo oSrcLocs(nIndex)
next


WScript.echo "Successfully update source list for product" + objArgs(0)

Siehe auch

Tasks

Konfigurieren der Windows Installer-Quellupdateverwaltung

Konzepte

Informationen zum Windows Installer Source Location Manager

Weitere Informationen finden Sie unter Configuration Manager 2007 – Informationen und Support (möglicherweise in englischer Sprache).
Das Dokumentationsteam erreichen Sie per E-Mail unter: SMSdocs@microsoft.com