LKBEN11640: How to find out which program will open a certain extension on a windows system from the command line.
Symptom
You need to test which application will open a certain extension.
Cause
Important for troubleshooting.
Solution
To find out which extension will be opened by which application, you can use assoc. The assoc command can list all the extensions and their corresponding applications. You can also change the applications.
Without parameters, assoc will deliver a list of extensions with the associated apps. To ask for a certain exsension, you use the following syntax:
assoc .mp4
assoc .pdf
The answer on my system looks like this:
.mp4=WMP11.AssocFile.MP4
.pdf=Acrobat.Document.DC
If you ask for an unknown extension, the system will tell you it has nothing found.
To change associations, you will need administrative rights. To remove the association for .mp4 you can use:
assoc .mp4=
To associate an extension with an application you can use:
assoc .log=txtfile
To associate a file with no extension you can use:
assoc .=txtfile
Have fun.
Disclaimer:
The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!About the Author
Author:
- Keskon GmbH & Co. KGWim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.
Latest update: 18.01.2023