예제 #1
0
 private static string ToWindowsInstallerClause(SccmWindowInstallerDetectionRule windowsInstallerRule)
 {
     var clause = new StringBuilder();
     if (windowsInstallerRule.MsiProductCodeMustExist)
     {
         clause.AppendFormat("MSI Product Code: {0} Exists", windowsInstallerRule.ProductCode);
     }
     else
     {
         clause.AppendFormat("MSI Product Code: {0} Version: {1} {2}", windowsInstallerRule.ProductCode,
             windowsInstallerRule.MsiRuleOperator, windowsInstallerRule.MsiRuleValue);
     }
     return clause.ToString();
 }
예제 #2
0
 private static SccmWindowInstallerDetectionRule CreateNewWindowsInstallerRuleWithDefaults()
 {
     var windowInstallerRule = new SccmWindowInstallerDetectionRule
     {
         MsiProductCodeMustExist = true,
         MsiRuleOperator = WindowsInstallerRuleOperatorType.Equals,
         MsiRuleProperty = WindowsInstallerRulePropertyType.Version,
         MsiRuleValue = string.Empty,
         ProductCode = string.Empty
     };
     return windowInstallerRule;
 }