Setup file association in click once deployed applications
-
Tuesday, April 10, 2012 12:10 PM
Dear,
I've an application published over internet via click once deployment. It is used to open a file downloaded from my website. If the user tries to open the file after installing my application, it will open correctly in my application. Everything will be fine in this case. But if the user tries t open my file without installing the application, it will prompt user to choose the application to open with. For eg. if the user opens it with notepad and sets it as default application, it won't open the file in my application if i installed my application after that. How can I change the file association registry or whatever, so that I can just give the patch to the user and they can correct it in one click. The client OS can be Win XP / Win 7.
Thanks
MK
- Changed Type Bob Wu-MTMicrosoft Contingent Staff, Moderator Tuesday, April 17, 2012 2:04 AM
All Replies
-
Friday, April 13, 2012 3:16 AMModerator
Hi moncytvs,
First, you can Create File Associations for a ClickOnce application by editing the application manifest, such as <fileAssociation extension=".abc" description="myABC" progid="abcMY" defaultIcon="turtle.ico" xmlns="urn:schemas-microsoft-com:clickonce.v1" />. For more details, see http://msdn.microsoft.com/en-us/library/bb892924.aspx.
Another way is Open Publish tab in properties windows, click “Options…” and create a File Associations by filling the GridView.Second, according to my knowledge, there is no build-in way to set default program in ClickOnce. However, you can set default program by using IApplicationAssociationRegistration interface(http://msdn.microsoft.com/en-us/library/bb776332(v=vs.85).aspxc). For more details, check http://msdn.microsoft.com/en-us/library/bb776332(v=vs.85).aspx.
However, clickonce doesn’t support custom action, so you can either check or set the current default program when your application open (just as IE or Chrome did) or create a Custom Installer for a ClickOnce Application. To create a Custom installer, see http://msdn.microsoft.com/en-us/library/dd997001.aspx.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Edited by Bob Wu-MTMicrosoft Contingent Staff, Moderator Friday, April 13, 2012 3:16 AM
- Marked As Answer by Bob Wu-MTMicrosoft Contingent Staff, Moderator Wednesday, April 18, 2012 2:09 AM
-
Tuesday, April 17, 2012 2:05 AMModeratorHi moncytvs,
I am writing to check the status of the issue on your side.
Is the issue solved?
Would you mind letting us know the result of the suggestions?
Best Regards,Bob Wu [MSFT]
MSDN Community Support | Feedback to us


