Option to set a file association only as "Open with ..." option

%3CLINGO-SUB%20id%3D%22lingo-sub-1820502%22%20slang%3D%22en-US%22%3EOption%20to%20set%20a%20file%20association%20only%20as%20%22Open%20with%20...%22%20option%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1820502%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20associate%20a%20program%20with%20a%20file%20extension%20without%20ever%20taking%20over%20the%20file%20association%3F%20I%20want%20my%20app%20to%20be%20associated%20only%20through%20%22Open%20with%20...%22%20but%20never%20be%20set%20as%20the%20default%20opener%20for%20the%20extension.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20accomplish%20it%20for%20file%20extensions%20already%20associated%20with%20another%20app%20by%20using%26nbsp%3B%20%3CFILETYPEASSOCIATION%20name%3D%22%26quot%3Bthisisatest%26quot%3B%22%20allowsilentdefaulttakeover%3D%22%26quot%3Bfalse%26quot%3B%22%3E.%3C%2FFILETYPEASSOCIATION%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20if%20the%20file%20type%20is%20not%20associated%20with%20a%20program%2C%20then%20my%20program%20launches%20when%20double-clicking%20a%20file%20with%20that%20extension.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20it%20is%20a%20bit%20unusual%2C%20but%20my%20app%20analyzes%20various%20types%20of%20files%20and%20is%20normally%20not%20used%20to%20open%20them%20-%20which%20is%20why%20a%20more%20%22indirect%22%20option%20in%20the%20shell%20right-click%20menu%20makes%20more%20sense.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoable%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EBrian%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1826965%22%20slang%3D%22en-US%22%3ERe%3A%20Option%20to%20set%20a%20file%20association%20only%20as%20%22Open%20with%20...%22%20option%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1826965%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F845337%22%20target%3D%22_blank%22%3E%40brasmusson%3C%2FA%3E%26nbsp%3B%20The%20traditional%20app%20that%20you%20capture%20has%20several%20ways%20to%20set%20up%20the%20scenario%20you%20desire%20when%20deploying%20via%20MSI%20or%20Setup.exe.%20Those%20scenarios%20include%20setting%20the%20.fta%20using%20the%20openwithlist%2C%26nbsp%3B%20openwithprogid%2C%20or%20even%20a%20Shell%20%22alternate%20verb%22%20entry%20for%20the%20particular%20type%20without%20modifying%20the%20default%20value%20of%20the%20.fta%20key.%26nbsp%3B%20Another%20method%20involves%20registration%20via%20the%20%22App%20Paths%22%20key.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20is%20my%20experience%20however%2C%20that%20the%20packaging%20tool%20does%20not%20properly%20capture%20any%20of%20these%20situations%2C%20usually%20resulting%20in%20the%20app%20becoming%20the%20default%20upon%20install%20or%20being%20ignored%20altogether.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EManual%20manipulation%20of%20the%20manifest%20might%20be%20able%20to%20produce%20a%20solution%20--%20I'm%20not%20sure%20--%20but%20certainly%20your%20uap3%3AFileTypeAssociation%20element%20would%20require%20the%20uap%3ASupportedFileTypes%20sub-element%20to%20have%20a%20chance%20to%20associate%20at%20all.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

Is there a way to associate a program with a file extension without ever taking over the file association? I want my app to be associated only through "Open with ..." but never be set as the default opener for the extension.

 

I can accomplish it for file extensions already associated with another app by using  <uap3:FileTypeAssociation Name="thisisatest" desktop2:AllowSilentDefaultTakeOver="false">.

 

However, if the file type is not associated with a program, then my program launches when double-clicking a file with that extension.

 

I know it is a bit unusual, but my app analyzes various types of files and is normally not used to open them - which is why a more "indirect" option in the shell right-click menu makes more sense.

 

Doable?

 

Best regards,

Brian

 

 

 

 

1 Reply

@brasmusson  The traditional app that you capture has several ways to set up the scenario you desire when deploying via MSI or Setup.exe. Those scenarios include setting the .fta using the openwithlist,  openwithprogid, or even a Shell "alternate verb" entry for the particular type without modifying the default value of the .fta key.  Another method involves registration via the "App Paths" key.

 

It is my experience however, that the packaging tool does not properly capture any of these situations, usually resulting in the app becoming the default upon install or being ignored altogether. 

 

Manual manipulation of the manifest might be able to produce a solution -- I'm not sure -- but certainly your uap3:FileTypeAssociation element would require the uap:SupportedFileTypes sub-element to have a chance to associate at all.