cookie_monster Posted April 23, 2008 Posted April 23, 2008 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 Any ideas? Cheers.
c-r-h Posted April 23, 2008 Posted April 23, 2008 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: assoc .mpg=mpegfile 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.
cookie_monster Posted April 23, 2008 Author Posted April 23, 2008 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. Cheers.
srochford Posted April 23, 2008 Posted April 23, 2008 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.
cookie_monster Posted April 23, 2008 Author Posted April 23, 2008 I tried it as a startup script which did work for the paint.net example that was given above.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now