{"id":38,"date":"2015-03-15T03:43:35","date_gmt":"2015-03-14T16:43:35","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=38"},"modified":"2022-11-14T20:05:46","modified_gmt":"2022-11-14T09:05:46","slug":"how-to-change-file-associations-from-the-command-prompt","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/how-to-change-file-associations-from-the-command-prompt\/","title":{"rendered":"How to change file associations from the command prompt"},"content":{"rendered":"<p>Sometimes a client will ask you to change the default windows program for them. \u00a0It&#8217;s easy enough to do from Windows itself but what if you want to change it without disturbing them? \u00a0This is where we can use a remote command line to change the file associations\u00a0to do this in the background without disturbing them. \u00a0In this case, we were asked to change wav files from opening up in iTunes.<\/p>\n<h3>Step1. Open your remote command prompt<\/h3>\n<p>This can be either through your RMM or using PSEXEC. \u00a0This needs to be elevated.<\/p>\n<h3>Step 2. Execute the &#8220;assoc | more&#8221; command<\/h3>\n<p>From the command prompt type<\/p>\n<p><code>assoc | more<\/code><\/p>\n<p>This will list your current file associations. \u00a0Now in this case we are going to be changing wav files to opening with Windows Media Player instead of iTunes. \u00a0There are two options here. \u00a0We can either find a similar extension such as WMA and type in the same details for WAV or we can use the full path to the program.<\/p>\n<p>&nbsp;<\/p>\n<p>For example, WMA is associated as .wma=WMP11.AssocFile.WMA<\/p>\n<p>We can type either of the following commands and it will achieve the same result<\/p>\n<p><code>assoc .wav=WMP11.AssocFile.WAV<\/code><\/p>\n<p>or<\/p>\n<p><code>assoc .wav=\"C:\\Program Files\\Windows Media Player\\wmplayer.exe\"<\/code><\/p>\n<h3>Step 3. Check the new association<\/h3>\n<p>From the command prompt type:<\/p>\n<p><code>assoc .wav<\/code><\/p>\n<p>&nbsp;<\/p>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>Sometimes a client will ask you to change the default windows program for them. \u00a0It&#8217;s easy enough to do from Windows itself but what if you want to change it without disturbing them? \u00a0This is where we can use a remote command line to change the file associations\u00a0to do this in the background without disturbing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[9],"article-tag":[199,198,13,197],"class_list":["post-38","article","type-article","status-publish","format-standard","hentry","article-category-windows-commands","article-tag-change-file-associations-command-prompt","article-tag-change-file-associations-windows-command-line","article-tag-file-association","article-tag-how-to-change-file-associations-from-command-line"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":15,"sum_votes":65},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=38"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}