public static void UpdateShellExtensions(SubscriptionState subState, ref ShellExposure.ShellExposureInformation shellExposureInformation) { string productName = (string)null; if (shellExposureInformation != null) { productName = shellExposureInformation.AppProduct; } if (productName == null) { productName = subState.SubscriptionId.Name; } if (subState.PreviousBind != null) { Logger.AddInternalState("Removing file associations if existed for the previous version."); ShellExposure.RemoveShellExtensions(subState.SubscriptionId, subState.PreviousApplicationManifest, productName); } Logger.AddInternalState("Registering file associations if there is any in the manifest for the new version. "); ShellExposure.AddShellExtensions(subState.SubscriptionId, subState.DeploymentProviderUri, subState.CurrentApplicationManifest); NativeMethods.SHChangeNotify(134217728, 0U, IntPtr.Zero, IntPtr.Zero); }