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; } }
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); } }