I don't have Windows 11, but on Windows 10 a simple way is with
HKEY_CLASSES_ROOT\.xyz\shell\open\command
with for example, for a test :
"E:\Sources\Test7\Debug\test7.exe" "%1"
=>
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have an application that is being purely written in C++ and I want to associate a file type of a certain extension like ('.xyz').
Requirement is that if I double click on a '.xyz' file if my application is available, it should launch my application irrespective my application is running or not.
I have looked through some documentation, but I wasn't understanding much about it. There it was talking about ProgIDs. I am new to this so couldn't understand it properly and wasn't able to try it out.
Reference links that I have gone through:
Can someone help me in this? Thanks in advance.
I don't have Windows 11, but on Windows 10 a simple way is with
HKEY_CLASSES_ROOT\.xyz\shell\open\command
with for example, for a test :
"E:\Sources\Test7\Debug\test7.exe" "%1"
=>
Hi, Rohan Pande
Add the .xyz
key in registry root:
Computer\HKEY_CLASSES_ROOT\.xyz
Change the key's default value to your app name.
Then add sub keys below:
Modify the command's default value.
Such as :
"XXX\yourapp.exe" "%1"
Use CMD
to notify the system:
assoc .xyz=your app's name
Sample:
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.