Firstly, the "assoc" command changes the general association of the file type in HKEY_CLASSES_ROOT. If you check the entry in regedit, I expect that you will see that you are able to successfully change it. This won't help you if there is already a user preference set in the UserChoice sub-key because it takes priority. I suspect you already know this and that's the reason you are trying to change the other registry keys directly.
The next item I noticed was an error in the key path. You're using "Explorere" instead of "Explorer". This probably means that you are getting no error message when you try to change the key. If you are creating a new unused key then it will have no effect on the behaviour of the file.
Next, you appeared to be asking about how to change the key but didn't seem to be worried about the method (as long as it is scripted) so I just tried one: powershell. A security exception is raised every time I try to write UserChoice but not for other keys. The problem appears to be the access rights for this particular registry key. When I read out the acl in powershell I could see the registry access rule for my account had "SetValue" as "Deny".
The following page gives an excellent description of how to get around this problem and remove the required permissions. Here's the resulting script that worked for me on my Win7 PC. I checked using a .mov file; the script successfully changed the program that was called when double-clicking the file.
$user=<your user account name>
$name = "Software\Microsoft\windows\CurrentVersion\Explorer\FileExts\.mov\UserChoice"
$RegKey ="HKCU:\" + $name
Get-ItemProperty -path $RegKey
get-acl -path $RegKey
$key = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey($name, [Microsoft.Win32.RegistryKeyPermissionCheck]::ReadWriteSubTree,
[System.Security.AccessControl.RegistryRights]::ChangePermissions)
$acl = $key.GetAccessControl()
$rule=new-object System.Security.AccessControl.RegistryAccessRule ($user, 'SetValue', 'Deny')
$acl.RemoveAccessRule($rule)
$key.SetAccessControl($acl)
get-acl -path $RegKey
Set-ItemProperty -path $RegKey -name Progid -value 'WMP11.AssocFile.MOV' -type String
Get-ItemProperty -path $RegKey
If there is any further error, then I suggest you compare the acl permissions. The script prints out the acl before and after and also the current contents of the key.
Notes
1. The displayed icon may not be updated. Double click a .mov file to test.
2. If there are problems then try to verify that you can change the value manually and that you can see the equivalent change in regedit.
Update: I was presuming that you wanted to keep the user-specific setting, but on reading your description a second time, I realised that you didn't specify this. If you want to change the association for all users then you'll have to remove the UserChoice key completely with a relatively simple command like this. Then your "assoc" command should do the trick.
http://www.linglom.com/2008/12/06/deploy-windows-media-player-using-group-policy-part-i-make-an-msi-installer/ see part 2 too – STTR – 2013-02-07T19:41:29.460
did i miss something? both parts are about WMP being deployed via Group Policy. I'm trying to assign .mov file extensions via cmdline powershell or registry. i can see how my question is misleading... let me rephrase it. thanks! – Paul Mung – 2013-02-07T20:23:35.273