change file associations in commandline

S

seb

hi,

how to easily destroy and change file associationin commandline under
XP ? using "ftype" and "assoc" does not works well...

thanks of your answers...
 
S

sebastien

Maybe the below will be of some help.
Windows XP File Assocation Fixeshttp://www.dougknox.com/xp/file_assoc.htm

sorry for the late answer, i have tried more than 20 stupid solutions
(and the same number of GHOST imagefile to restore lol) since these
days and now i have found what i want... i can change my file
association in any case ;)

in fact file association under windows XP depends of mime associations
and extension file so to force it to launch what you want they are 3
solutons (not of all can works, i think third works in all case)

1) force path and application filename you want instead of default
file association

ftype IrfanView.mp3="e:\mplayer\mplayer.exe" "%%1"
ftype IrfanView.ogg="e:\mplayer\mplayer.exe" "%%1"
ftype IrfanView.wav="e:\mplayer\mplayer.exe" "%%1"

2) classical assoc and ftype function

assoc .mp4=ztemp1
ftype ztemp1="e:\mplayer\mplayer.exe" "%%1"

3) the registry method, use this hack to simulate "open with"
explorer.exe right click option

****************************************************************
file.reg
REGEDIT4

[HKEY_CURRENT_USER\Software\Classes]

[HKEY_CURRENT_USER\Software\Classes\Applications]

[HKEY_CURRENT_USER\Software\Classes\Applications
\fake_vivilproject_fileextension1.exe]

[HKEY_CURRENT_USER\Software\Classes\Applications
\fake_vivilproject_fileextension1.exe\shell]

[HKEY_CURRENT_USER\Software\Classes\Applications
\fake_vivilproject_fileextension1.exe\shell\open]

[HKEY_CURRENT_USER\Software\Classes\Applications
\fake_vivilproject_fileextension1.exe\shell\open\command]
@="\"E:\\mplayer\\mplayer.exe\" -playlist \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
\FileExts\.m3u]
@=""
"Application"="fake_vivilproject_fileextension1.exe"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
\FileExts\.pls]
@=""
"Application"="fake_vivilproject_fileextension1.exe"
*******************************************************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top