private static bool ShouldCreateSharedConfiguration(string programId, string offerId, PartitionId partitionId, out ExchangeConfigurationUnit sctConfigUnit)
        {
            sctConfigUnit = null;
            ADDriverContext processADContext = ADSessionSettings.GetProcessADContext();

            if (processADContext == null || processADContext.Mode != ContextMode.Setup)
            {
                return(true);
            }
            SharedConfigurationInfo sci = SharedConfigurationInfo.FromInstalledVersion(programId, offerId);

            sctConfigUnit = SharedConfiguration.FindOneSharedConfiguration(sci, partitionId);
            return(sctConfigUnit == null);
        }