{"id":6963,"date":"2020-04-20T23:45:50","date_gmt":"2020-04-20T21:45:50","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=6963"},"modified":"2020-04-21T13:57:56","modified_gmt":"2020-04-21T11:57:56","slug":"windows-change-application-for-a-file-extension-from-command-line","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-change-application-for-a-file-extension-from-command-line\/","title":{"rendered":"Windows: Change application for a file extension from command line"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_6963 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_6963')){$('.twoclick_social_bookmarks_post_6963').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Change%20application%20for%20a%20file%20extension%20from%20command%20line\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0AWindows%20has%20two%20command%20line%20utilities%20to%20alter%20the%20application%20associated%20with%20a%20file%20extension.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-change-application-for-a-file-extension-from-command-line\\\/\",\"post_id\":6963,\"post_title_referrer_track\":\"Windows%3A+Change+application+for+a+file+extension+from+command+line\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>Windows has two command line utilities to alter the application associated with a file extension.<br \/>\n<!--more--><\/p>\n<p>First of all deterine the installed application. <strong>ftype <\/strong>gets the whole list of programs registered in <strong>HKEY_CLASSES_ROOT<\/strong>.<br \/>\nThe <strong>HKEY_CLASSES_ROOT<\/strong> tree is a view combined by merging HKEY_CURRENT_USER\\Software\\Classes and HKEY_LOCAL_MACHINE\\Software\\Classes.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; ftype\r\n<\/pre>\n<p>For example you want to change the file extension .pdf to the Acrobat Reader.<\/p>\n<p><strong>assoc <\/strong>list the current appication associated with .pdf<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; assoc .pdf\r\n<\/pre>\n<p>Then determine the application name<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; ftype | findstr \/i acrobat\r\nacrobat=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; \/ u &quot;%1&quot;\r\nAcroExch.acrobatsecuritysettings.1=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\nAcroExch.Document.2017=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\nAcroExch.FDFDoc=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\nAcroExch.pdfxml.1=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\nAcroExch.XDPDoc=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\nAcroExch.XFDFDoc=&quot;C:\\Program Files (x86)\\Adobe\\Acrobat Reader 2017\\Reader\\AcroRd32.exe&quot; &quot;%1&quot;\r\n<\/pre>\n<p>and link the .pdf extension to.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nD:\\&gt; assoc .pdf=AcroExch.Document.2017\r\n<\/pre>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, Windows has two command line utilities to alter the application associated with a file extension.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5],"tags":[220,122,23,734,959,20],"class_list":["post-6963","post","type-post","status-publish","format-standard","hentry","category-windows","category-windowsknowhow","tag-application","tag-change","tag-command-line","tag-file-extension","tag-program","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=6963"}],"version-history":[{"count":5,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6963\/revisions"}],"predecessor-version":[{"id":6968,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/6963\/revisions\/6968"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=6963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=6963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=6963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}