home *** CD-ROM | disk | FTP | other *** search
- Const msiNoAction = -1
- Const msiInstallStateAdvertise = 1
- Const msiInstallStateAbsent = 2
- Const msiInstallStateLocal = 3
- Const msiInstallStateSource = 4
- Const msiInstallStateDefault = 5
-
- On Error Resume Next
-
- If (IsFeatureExists("LocalInstallsOnly")="1") Then
- If ((Session.Property("IsAdminPackage") = "1") And (Session.Property("INSTALLDIR") <> Session.Property("INSTALLDIRRES"))) Then
- Session.FeatureRequestState("LocalInstallsOnly") = msiInstallStateAbsent
- Else
- Session.FeatureRequestState("LocalInstallsOnly") = msiInstallStateLocal
- End If
- End If
- '///////////////////////////////////////////////////////////////////////////
- Function IsFeatureExists(sFeature)
- On Error Resume Next
-
- Dim objDB: Set objDB = Session.Database
-
- Dim sQuery: sQuery = "SELECT * FROM `Feature` WHERE `Feature`.`Feature` = '" & sFeature & "'"
-
- Dim objView: Set objView = objDB.OpenView(sQuery)
- objView.Execute
-
- Dim objRec: Set objRec = objView.Fetch
-
- If (objRec Is Nothing) Then
- ' not there
- IsFeatureExists = 0
- Else
- ' there
- IsFeatureExists = 1
- End If
-
- End Function
-