Sometimes a client will ask you to change the default windows program for them.  It’s easy enough to do from Windows itself but what if you want to change it without disturbing them?  This is where we can use a remote command line to change the file associations to do this in the background without disturbing them.  In this case, we were asked to change wav files from opening up in iTunes.

### Step1. Open your remote command prompt

This can be either through your RMM or using PSEXEC.  This needs to be elevated.

### Step 2. Execute the “assoc | more” command

From the command prompt type

`assoc | more`

This will list your current file associations.  Now in this case we are going to be changing wav files to opening with Windows Media Player instead of iTunes.  There are two options here.  We 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.

For example, WMA is associated as .wma=WMP11.AssocFile.WMA

We can type either of the following commands and it will achieve the same result

`assoc .wav=WMP11.AssocFile.WAV`

or

`assoc .wav="C:\Program Files\Windows Media Player\wmplayer.exe"`

### Step 3. Check the new association

From the command prompt type:

`assoc .wav`
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.882601261138916, "perplexity": 2574.7728173998}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540529955.67/warc/CC-MAIN-20191211045724-20191211073724-00293.warc.gz"}