Windows Installer API (SDK)
InstallExecuteSequence Table
Referenz » InstallExecuteSequence Table | Microsoft Docs
VBS class InstallExecuteSequence
Class classInstallExecuteSequenceTable
Private mAction, mCondition, mSequence
Public Property Get pAction
pAction = mAction
End Property
Public Property Let pAction(strAction)
mAction = strAction
End Property
Public Property Get pCondition
pCondition = mCondition
End Property
Public Property Let pCondition(strCondition)
mCondition = strCondition
End Property
Public Property Get pSequence
pSequence = mSequence
End Property
Public Property Let pSequence(intSequence)
mSequence = intSequence
End Property
Private Sub Class_Initialize
'Anweisungen
End Sub
' -----------------------------------------------------------------
Public Function ModifyInstallExecuteSequenceRecord()
Dim strSQL, objView, objTableRow
strSQL = "SELECT * FROM InstallExecuteSequence"
Set objView = objDatabase.OpenView(strSQL)
objView.Execute
Do
Set objTableRow = objView.Fetch
If objTableRow Is Nothing Then Exit Do
objTableRow.StringData(1) = mAction
objTableRow.StringData(2) = mCondition
objTableRow.IntegerData(3) = mSequence
objView.Modify msiViewModifyAssign, objTableRow
Loop
objDatabase.Commit()
objView.Close
Set objView = Nothing
End Function
' -----------------------------------------------------------------
Public Function ReorderInstallExecuteSequenceTable(CapturePlaces)
Dim strSQL, objView, objTableRow
Dim intSequence, strAction, strFlag
strSQL = "SELECT * FROM InstallExecuteSequence"
intSequence = ""
strAction = ""
Set objView = objDatabase.OpenView(strSQL)
objView.Execute
Do
Set objTableRow = objView.Fetch
If objTableRow Is Nothing Then Exit Do
If IsNumeric(CapturePlaces) Then
If objTableRow.IntegerData(3) = CapturePlaces Then
intSequence = objTableRow.IntegerData(3)
strAction = objTableRow.StringData(1)
Exit Do
End If
Else
If Left(CapturePlaces,6) = "Before" Then
strAction = Mid(CapturePlaces, 7)
If objTableRow.StringData(1) = strAction Then
intSequence = objTableRow.IntegerData(3)
strFlag = "Before"
Exit Do
End If
End If
If Left(CapturePlaces,5) = "After" Then
strAction = Mid(CapturePlaces, 6)
If objTableRow.StringData(1) = strAction Then
intSequence = objTableRow.IntegerData(3)
strFlag = "After"
Exit Do
End If
End If
End If
Loop
objView.Close
Set objView = Nothing
If intSequence <> "" AND strAction <> "" Then
If strFlag = "Before" Then
mSequence = intSequence - 2
End If
If strFlag = "After" Then
mSequence = intSequence + 2
End If
Else
If IsNumeric(CapturePlaces) Then
mSequence = CapturePlaces
End If
End If
End Function
' -----------------------------------------------------------------
Private Sub Class_Terminate()
'Anweisungen
End Sub
End Class
' ---------------------------------------------------------------------