home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / Chip_2001-06_cd1.bin / zkuste / vbasic / Data / Utility / MSISDK15.msi / Darice.120 / Binary.ice09.vbs < prev    next >
Text File  |  2000-10-05  |  2KB  |  54 lines

  1. Function ICE09()
  2. On Error Resume Next
  3.  
  4.     Set recInfo=Installer.CreateRecord(1)
  5.     If Err <> 0 Then
  6.         ICE09 = 1
  7.         Exit Function
  8.     End If
  9.  
  10.     'Give description of test
  11.     recInfo.StringData(0)="ICE09" & Chr(9) & "3" & Chr(9) & "ICE09 - Checks for components whose Directory is the System directory but aren't set as system components "
  12.     Message &h03000000, recInfo
  13.  
  14.     'Give creation data
  15.     recInfo.StringData(0)="ICE09" & Chr(9) & "3" & Chr(9) & "Created 05/21/98. Last Modified 1/26/99."
  16.     Message &h03000000, recInfo
  17.  
  18.     'Is there a Component table in the database?
  19.     iStat = Database.TablePersistent("Component")
  20.     If 1 <> iStat Then
  21.         recInfo.StringData(0)="ICE09" & Chr(9) & "3" & Chr(9) & "'Component' table missing. ICE09 cannot continue its validation." & Chr(9) & "http://dartools/Iceman/ice08.html"
  22.         Message &h03000000, recInfo
  23.         ICE09 = 1
  24.         Exit Function
  25.     End If
  26.  
  27.     'process table
  28.     Set view=Database.OpenView("SELECT `Component`, `Attributes` FROM `Component` WHERE `Directory_`='SystemFolder' OR `Directory_`='System16Folder'")
  29.     view.Execute
  30.     
  31.     If Err <> 0 Then
  32.         recInfo.StringData(0)="ICE09" & Chr(9) & "0" & Chr(9) & "view.Execute_1 API Error"
  33.         Message &h03000000, recInfo
  34.         ICE09=1
  35.         Exit Function
  36.     End If 
  37.  
  38.     Do
  39.         Set rec=view.Fetch
  40.         If rec Is Nothing Then Exit Do
  41.  
  42.         'check for permanent attribute.
  43.         If (rec.IntegerData(2) AND 16)=0 Then
  44.             rec.StringData(0)="ICE09" & Chr(9) & "2" & Chr(9) &  "Component: [1] is a non-permanent system component" & Chr(9) & "http://dartools/Iceman/ice09.html" & Chr(9) & "Component" & Chr(9) & "Component" & Chr(9) & "[1]"
  45.             Message &h03000000,rec
  46.         End If
  47.     Loop
  48.     
  49.     'Return iesSuccess  
  50.     ICE09 = 1
  51.     Exit Function
  52.  
  53.  
  54. End Function