How to associate an image file with IrfanView, using command-line in Windows XP?

Published: Sep 26, 2005
Send your feedback


Need to associate for JPG and TIF images with IrfanView, on all Windows XP workstations within a network.


To associate JPG and TIF files with IrfanView, you may use the ASSOC and FTYPE commands in a batch file:

  • ASSOC .JPG=IView
  • ASSOC .TIF=IView
  • FTYPE IView="%Programfiles%\IrfanView\i_view32.exe" "%%1"
  • Optionally, to change the default icon, use this command:

More information

Though the following line works when typed manually in Command Prompt:

When you use it from a batch file, the following alteration may be required: (additional %)

Related articles

FileExtInfo - View the association settings for a file type easily

Repair image file type associations in Windows XP