Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...