mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-09-13 13:41:29 -04:00
Update for "Set Program Access and Defaults" support
This commit is contained in:
@@ -87,7 +87,8 @@ namespace FeedCenter
|
|||||||
Current.SetStartWithWindows(Settings.Default.StartWithWindows);
|
Current.SetStartWithWindows(Settings.Default.StartWithWindows);
|
||||||
|
|
||||||
// Set whether we should be the default feed reader
|
// Set whether we should be the default feed reader
|
||||||
SystemConfiguration.SetDefaultFeedReader(Settings.Default.RegisterAsDefaultFeedReader);
|
if (Settings.Default.RegisterAsDefaultFeedReader)
|
||||||
|
SystemConfiguration.SetDefaultFeedReader();
|
||||||
|
|
||||||
// Initialize the window
|
// Initialize the window
|
||||||
mainWindow.Initialize();
|
mainWindow.Initialize();
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ namespace FeedCenter.Options
|
|||||||
settings.RegisterAsDefaultFeedReader = registerAsDefaultFeedReaderCheckBox.IsChecked.Value;
|
settings.RegisterAsDefaultFeedReader = registerAsDefaultFeedReaderCheckBox.IsChecked.Value;
|
||||||
|
|
||||||
Application.Current.SetStartWithWindows(settings.StartWithWindows);
|
Application.Current.SetStartWithWindows(settings.StartWithWindows);
|
||||||
SystemConfiguration.SetDefaultFeedReader(settings.RegisterAsDefaultFeedReader);
|
|
||||||
|
if (settings.RegisterAsDefaultFeedReader)
|
||||||
|
SystemConfiguration.SetDefaultFeedReader();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string CategoryName
|
public override string CategoryName
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using FeedCenter.Properties;
|
||||||
|
|
||||||
namespace FeedCenter
|
namespace FeedCenter
|
||||||
{
|
{
|
||||||
public static class SystemConfiguration
|
public static class SystemConfiguration
|
||||||
{
|
{
|
||||||
public static void SetDefaultFeedReader(bool value)
|
public static void SetDefaultFeedReader()
|
||||||
{
|
{
|
||||||
// Get the location of the assembly
|
// Get the location of the assembly
|
||||||
var assemblyLocation = Assembly.GetEntryAssembly().Location;
|
var assemblyLocation = Assembly.GetEntryAssembly().Location;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<?define ProductName="$(fileVersion.ProductName($(var.FeedCenter.TargetPath)))" ?>
|
<?define ProductName="$(fileVersion.ProductName($(var.FeedCenter.TargetPath)))" ?>
|
||||||
<?define CompanyName="$(fileVersion.CompanyName($(var.FeedCenter.TargetPath)))" ?>
|
<?define CompanyName="$(fileVersion.CompanyName($(var.FeedCenter.TargetPath)))" ?>
|
||||||
<?define ProductVersion="$(fileVersion.ProductVersion($(var.FeedCenter.TargetPath)))" ?>
|
<?define ProductVersion="$(fileVersion.ProductVersion($(var.FeedCenter.TargetPath)))" ?>
|
||||||
|
<?define FileDescription="$(fileVersion.FileDescription($(var.FeedCenter.TargetPath)))" ?>
|
||||||
|
|
||||||
<Product Id="*"
|
<Product Id="*"
|
||||||
Name="$(var.ProductName)"
|
Name="$(var.ProductName)"
|
||||||
@@ -127,6 +128,47 @@
|
|||||||
Value='1'
|
Value='1'
|
||||||
KeyPath='yes' />
|
KeyPath='yes' />
|
||||||
|
|
||||||
|
<!-- Capabilities keys for Vista/7 "Set Program Access and Defaults" -->
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="SOFTWARE\Feed Center\Capabilities"
|
||||||
|
Name="ApplicationDescription"
|
||||||
|
Value="$(var.FileDescription)"
|
||||||
|
Type="string" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="SOFTWARE\Feed Center\Capabilities"
|
||||||
|
Name="ApplicationName"
|
||||||
|
Value="$(var.ProductName)"
|
||||||
|
Type="string" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="SOFTWARE\Feed Center\Capabilities\URLAssociations"
|
||||||
|
Name="feed"
|
||||||
|
Value="FeedCenter.URL.feed"
|
||||||
|
Type="string" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="SOFTWARE\Feed Center\Capabilities\URLAssociations"
|
||||||
|
Name="feeds"
|
||||||
|
Value="FeedCenter.URL.feed"
|
||||||
|
Type="string" />
|
||||||
|
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="SOFTWARE\RegisteredApplications"
|
||||||
|
Name="Feed Center"
|
||||||
|
Value="SOFTWARE\Feed Center\Capabilities"
|
||||||
|
Type="string" />
|
||||||
|
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\Classes\FeedCenter.URL.feed"
|
||||||
|
Value="URL:Feed Center Add RSS Feed"
|
||||||
|
Type="string" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\Classes\FeedCenter.URL.feed\DefaultIcon"
|
||||||
|
Value="[INSTALLFOLDER]FeedCenter.exe"
|
||||||
|
Type="string" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\Classes\FeedCenter.URL.feed\shell\open\command"
|
||||||
|
Value=""[INSTALLFOLDER]FeedCenter.exe" %1"
|
||||||
|
Type="string" />
|
||||||
|
|
||||||
<File Source="$(var.Common.TargetPath)" />
|
<File Source="$(var.Common.TargetPath)" />
|
||||||
<File Source="$(var.Common.Native.TargetPath)" />
|
<File Source="$(var.Common.Native.TargetPath)" />
|
||||||
<File Source="$(var.Common.Wpf.TargetPath)" />
|
<File Source="$(var.Common.Wpf.TargetPath)" />
|
||||||
|
|||||||
Reference in New Issue
Block a user