Search code examples
filebatch-filefile-association

Set file association from batch file


I want to set file association from a batch file. I want to associate .pdf files with foxitreader. The thing is I have the foxitreader portable edition so it doesn not have any registry key. I have searched but there is no clean explanation of how to do and what syntaxes to use.


Solution

  • Using batch, use the following commands:

    ftype Foxit.Document=<replace with foxit full path name>
    assoc .pdf=Foxit.Document
    

    But it could be more convenient to use "Open with", "Select program" and "Always use this program".