Windows 10 等效于 LaunchAdvancedAssociationUI [英] Windows 10 equivalent of LaunchAdvancedAssociationUI
问题描述
从 Windows 10 开始,
有没有办法以编程方式在 Windows 10 设置应用程序中打开我的应用程序的按应用程序设置默认值屏幕?
或者是否有其他方法推荐给应用程序以允许其用户在 Windows 10 中自定义关联?
打开设置你的默认程序页面:
%windir%system32control.exe/name Microsoft.DefaultPrograms/page pageDefaultProgram
参考:https://msdn.microsoft.com/en-us/library/windows/desktop/ee330741.aspx
注意:此方法不适用于 2018 年 4 月更新.
<小时>打开按文件类型选择默认应用页面:
Activator->ActivateApplication(Lwindows.immersivecontrolpanel_cw5n1h2txyewy"L"!microsoft.windows.immersivecontrolpanel",L"page=SettingsPageAppsDefaults"L"&target=SettingsPageAppsDefaultsFileExtensionView", AO_NONE, &pid);
<小时>
版本 1709 或更高版本
打开按应用设置默认值页面:
Activator->ActivateApplication(Lwindows.immersivecontrolpanel_cw5n1h2txyewy"L"!microsoft.windows.immersivecontrolpanel",L"page=SettingsPageAppsDefaults"L"&target=SettingsPageAppsDefaultsDefaultAppsListView", AO_NONE, &pid);
Since Windows 10, the IApplicationAssociationRegistrationUI::LaunchAdvancedAssociationUI
method does not work anymore.
On Windows Vista, 7 and 8, it opens the Control Panel on the Set Program Associations page for specified application.
On Windows 10, it does nothing.
It's even documented in Microsoft documentation:
Starting in Windows 10, this does not launch the association dialog box. It displays a dialog to the user informing them that they can change the default programs used to open file extensions in their Settings
(Even the second part of the statement is no longer true in the current version of Windows 10)
And actually in recent versions of Windows 10 that control panel does not exist anymore. Its functionality has been moved to a Settings app, under Apps > Default apps > Set defaults by app > [App name].
Is there a way to open the Set defaults by app screen for my application in Windows 10 Settings app programmatically?
Or is there another approach recommended for an application to allow its users to customize associations in Windows 10?
To open the Set your default programs page:
%windir%system32control.exe /name Microsoft.DefaultPrograms /page pageDefaultProgram
Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ee330741.aspx
Note: This method does not work with April 2018 Update.
To open the Choose default apps by file type page:
Activator->ActivateApplication(
L"windows.immersivecontrolpanel_cw5n1h2txyewy"
L"!microsoft.windows.immersivecontrolpanel",
L"page=SettingsPageAppsDefaults"
L"&target=SettingsPageAppsDefaultsFileExtensionView", AO_NONE, &pid);
Version 1709 or later
To open the Set defaults by app page:
Activator->ActivateApplication(
L"windows.immersivecontrolpanel_cw5n1h2txyewy"
L"!microsoft.windows.immersivecontrolpanel",
L"page=SettingsPageAppsDefaults"
L"&target=SettingsPageAppsDefaultsDefaultAppsListView", AO_NONE, &pid);
这篇关于Windows 10 等效于 LaunchAdvancedAssociationUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!