Exemplo n.º 1
0
 public static void Set(this Microsoft.Deployment.WindowsInstaller.Session session, string property, string value)
 {
     if (session.IsActive())
     {
         session[property] = value;
     }
     else
     {
         session.CustomActionData[property] = value;
     }
 }
Exemplo n.º 2
0
 public static bool TryGetValue(this Microsoft.Deployment.WindowsInstaller.Session session, string property, out string value)
 {
     value = null;
     try
     {
         if (session.IsActive())
         {
             value = session[property];
         }
         else
         {
             value = session.CustomActionData.ContainsKey(property)
                                         ? session.CustomActionData[property]
                                         : string.Empty;
         }
         return(true);
     }
     catch
     {
         return(false);
     }
 }