harshal119
Posts: 21
Joined: Wed Mar 27, 2019 10:18 am

File association and extension

Hi team,

We are building installer which assigns icons to specific type of files. like Icon A for .xxr extension. We are doing this using File associations. Its working as expected. I.e. assigns icons to respective extensions. However, we would like to achieve some different functionalities as below:

1. Give icon to specific file extension. already done as explained above
2. When user clicks these type of files, it opens our application as icons were assigned using our .exe as resource. We would like to prevent opening of application in this case. Therefore, if user clicks on such files, it should open either notepad or do not open anything or ask user to select application to open instead of just opening our application.

We would appreciate if you can suggest some way to achieve this.
Thanks
Catalin
Posts: 6600
Joined: Wed Jun 13, 2018 7:49 am

Re: File association and extension

Hello,

Unfortunately, I am afraid that I am not aware of any method in which that can be achieved. That is what a file association does, it associates a file extension with your application so your application can open it, which makes your request a bit strange, to be honest with you.

I am not quite sure, but maybe this could be handled from within your application itself. For instance, if your application receives some parameters from the OS (such as the "verb"), it can close itself and then open notepad. However, this can be troublesome and I wouldn't go for it.

Hope this helps somehow.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”