Windows Thread, Using assoc to change file associations in Technical; In the past i've used assoc in a .bat file to change file associations on multiple computers e.g. assoc .bmp=Paint.NET.1 ...
23rd April 2008, 12:53 PM #1
Using assoc to change file associations
In the past i've used assoc in a .bat file to change file associations on multiple computers e.g. assoc .bmp=Paint.NET.1 the problem i'm having is that on certain stations where i've removed VLC Player i can't find how to associate .mpg with Media Player again. When i make changes it isn't changing HKLM it's changing HKCU.
This is the command i'm trying assoc .mpg=wmplayer.exe
23rd April 2008, 01:44 PM #2
- Rep Power
You will also need to use the ftype command.
The "assoc" command tells it what command to use in "ftype".
I think the default assoc for .mpg is mpegfile, so the command to set this is:
With the "ftype" command you then tell it what to open mpegfile with, so this is where you tell it to open with media player. I've just checked my machine and the default command is c:\Program Files\Windows Media Player\wmplayer.exe /prefetch:9 /Open "%L"
so the command for this is:
ftype mpegfile="c:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:9 /Open "%L"
Hope this helps.
23rd April 2008, 01:58 PM #3
Ahh ok i'll try the ftype command i had already tried assoc .mpg=mpegfile but that didn't change anything.
I've got a reg frag that works at the moment but i'd like to sort it for future reference.
23rd April 2008, 03:40 PM #4
Are you running this at logon or system startup? (or while logged on?) If it's not running as a machine startup script then I think this is "by design" - software should look at HKCU before HKLM to see what to do for things like this.
23rd April 2008, 03:59 PM #5
I tried it as a startup script which did work for the paint.net example that was given above.
By reggiep in forum EduGeek Joomla 1.0 Package
Last Post: 22nd April 2008, 03:18 PM
By OutLawTorn in forum Windows
Last Post: 10th September 2007, 12:36 PM
By Samson in forum Scripts
Last Post: 31st August 2007, 11:52 AM
By Geoff in forum Windows
Last Post: 20th November 2006, 02:33 PM
By tosca925 in forum Scripts
Last Post: 23rd March 2006, 07:27 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)