Associate a file extension with an application.




1 Extension File extension to be associated
2 Type Set the type of the association. If not specified defaults to Open.
Open = Launch the associated applicatio
Edit = Launch the associated editor and opens the document for editin
Icon = Associate an icon with the extensio
3 Filename File to be associated. May be defaulted or may be a file name or full path. If it's not specified then it defaults to:

If only the file name is specified then the path is assumed to be:

4 Option This is optionally used to specify the DefaultIcon index. If the icon is contained with the program exe then this can be used with Open or Edit. Otherwise the Icon type can be used to specify an external DefaultIcon.
5 UseRegAddBoot Defaults to False. If set to True then RegAddBoot is used to create the association.


This function will mount and unmount the appropriate registry hive each time its called. If many associations are being created then its more efficient to use Add_Asso instead.


This sets notepad.exe as the program to open files with extension ext using icon with index 153 from shell32.dll for the association.


If your scripts defines the variables %ProgramFolder% and %ProgramEXE% then the above example can be replaced with: