home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2004 September / maximum-cd-2004-09.iso / Software / Apps / CorelDRAWGraphicsSuite12.exe / CorelDRAW Graphics Suite 12.msi / Binary.NewBinary29 < prev    next >
Encoding:
Text File  |  2004-01-07  |  1.1 KB  |  39 lines

  1. Const msiNoAction = -1
  2. Const msiInstallStateAdvertise = 1
  3. Const msiInstallStateAbsent = 2
  4. Const msiInstallStateLocal = 3
  5. Const msiInstallStateSource = 4
  6. Const msiInstallStateDefault = 5
  7.  
  8. On Error Resume Next
  9.     
  10. If (IsFeatureExists("LocalInstallsOnly")="1") Then
  11.     If ((Session.Property("IsAdminPackage") = "1") And (Session.Property("INSTALLDIR") <> Session.Property("INSTALLDIRRES"))) Then
  12.         Session.FeatureRequestState("LocalInstallsOnly") = msiInstallStateAbsent
  13.     Else
  14.         Session.FeatureRequestState("LocalInstallsOnly") = msiInstallStateLocal
  15.     End If
  16. End If
  17. '///////////////////////////////////////////////////////////////////////////
  18. Function IsFeatureExists(sFeature)
  19. On Error Resume Next
  20.  
  21.     Dim objDB: Set objDB = Session.Database
  22.  
  23.     Dim sQuery: sQuery = "SELECT * FROM `Feature` WHERE `Feature`.`Feature` = '" & sFeature & "'"
  24.  
  25.     Dim objView: Set objView = objDB.OpenView(sQuery)
  26.     objView.Execute
  27.  
  28.     Dim objRec: Set objRec = objView.Fetch
  29.  
  30.     If (objRec Is Nothing) Then
  31.         ' not there
  32.         IsFeatureExists = 0
  33.     Else
  34.         ' there
  35.         IsFeatureExists = 1
  36.     End If
  37.  
  38. End Function
  39.