home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / WPO11.msi / Binary.NewBinary27 < prev    next >
Text File  |  2003-04-15  |  3KB  |  79 lines

  1. Option Explicit
  2.  
  3. '***********************************************************************************************************
  4. '    Script:    HideFeatures.vbs
  5. '
  6. '    Purpose:    - allows /a install to define features to hide in an admin package
  7. '
  8. '    Logic:    - /a install ...    * set [AdminProperties]-[ADMINREMOVE] to [REMOVE]
  9. '            - install    ...    * read feature names [ADMINREMOVE], set property [FeatureName]
  10. '                        * install condition on each feature, hides feature 
  11. '***********************************************************************************************************
  12.  
  13. '********************************************************************
  14. '    Sub hideFeatures
  15. '
  16. '    - CustomAction for workstation install
  17. '    - reads [ADMINREMOVE] and sets properties
  18. '********************************************************************
  19. Sub hideFeatures
  20.     Dim sFeature: sFeature = ""
  21.     Dim sFeatures: sFeatures = Split(Session.Property("ADMINREMOVE"), ",")
  22.  
  23.     For Each sFeature in sFeatures
  24.         If (sFeature <> "") Then    'Ensure not a null string
  25.             Session.Property(sFeature) = "1"
  26.         End If
  27.     Next
  28. End Sub
  29.  
  30. '********************************************************************
  31. '    Sub setAdminProperties
  32. '
  33. '    - CustomAction for admin install
  34. '    - sets [ADMINREMOVE] to the features the admin wants to remove
  35. '********************************************************************
  36. Sub setAdminProperties
  37.  
  38.     If (Session.Property("ADMINREMOVE") <> "") Then
  39.         Exit Sub    'Already set
  40.     End If
  41.  
  42.     Dim sAdminRemove
  43.     Dim sRemove: sRemove = Session.Property("REMOVE")
  44.  
  45.     If (sRemove <> "" ) Then
  46.         sAdminRemove = sRemove
  47.     End If
  48.  
  49.     ' Check dialog in admin UI
  50.     If (Session.Property("R_PDX") <> "1") Then
  51.         sAdminRemove = sAdminRemove & ",Paradox"
  52.     End If
  53.     If (Session.Property("R_GRAPHICS") <> "1") Then
  54.         sAdminRemove = sAdminRemove & ",Graphics"
  55.     End If
  56.     If (Session.Property("R_FILTERS") <> "1") Then
  57.         sAdminRemove = sAdminRemove & ",Filters"
  58.     End If
  59.     If (Session.Property("R_FONTS") <> "1") Then
  60.         sAdminRemove = sAdminRemove & ",Fonts"
  61.     End If
  62.     If (Session.Property("R_UTILITIES") <> "1") Then
  63.         sAdminRemove = sAdminRemove & ",Utilities"
  64.     End If
  65.     If (Session.Property("R_PR") <> "1") Then
  66.         sAdminRemove = sAdminRemove & ",Presentations11"
  67.     End If
  68.     If (Session.Property("R_QP") <> "1") Then
  69.         sAdminRemove = sAdminRemove & ",QuattroPro11"
  70.     End If
  71.     If (Session.Property("R_WP") <> "1") Then
  72.         sAdminRemove = sAdminRemove & ",WordPerfect11"
  73.     End If
  74.  
  75.     Session.Property("ADMINREMOVE") = sAdminRemove
  76. End Sub
  77.  
  78.  
  79.