There are no notfications.

eMI FileNameExtension-ProgramAssociation Module

eMI FileNameExtension-ProgramAssociation Module
Developer: eMedia Intellect
Initial release:
Stable release: ()
Written in: PowerShell (UTF-8)
Operating system: Microsoft Windows
Size: 14709 bytes
Development status: Active
Available in: English
Type: Configuration module
Licence: GNU GPLv3

eMI FileNameExtension-ProgramAssociation Module is a PowerShell module to associate file name extensions with programs.


Directory index
  • eMI.FileNameExtensionProgramAssociation directory
    • AssociateFilesWithProgram.psm1 file
    • eMI.FileNameExtensionProgramAssociation.psd1 file
    • gpl-3.0.txt file

The module consists of a single function called AssociateFilesWithProgram. It takes the following 3 mandatory arguments:

-FileNameExtensions (string array)
Specifies the file name extensions to associate with a program. An array item containing a full stop ('.') represents extensionless files.
-FileTypeName (string)
Specifies the file type name of the file name extensions. In the Registry, the file name extensions point to a file type name which in turn points to a program. This argument must not contain any white-space.
-ProgramPath (string)
Specifies the path to the program to which the file type name points.


In the following example, two program associations are created, each containing 3 extensions:

# Import the module into the current session.
Import-Module -Name 'eMI.FileNameExtensionProgramAssociation'

# Extensionless files, text files and XML files are associated with Visual Studio Code.
AssociateFilesWithProgram -FileNameExtensions @('.', '.txt', '.xml') -FileTypeName 'Visual-Studio-Code' -ProgramPath 'C:\Program Files\Microsoft VS Code\Code.exe'

# Ogg files are associated with VLC media player.
AssociateFilesWithProgram -FileNameExtensions @('.oga', '.ogg', '.ogv') -FileTypeName 'VLC-media-player' -ProgramPath 'C:\Program Files (x86)\VideoLAN\VLC\vlc.exe'


eMI FileNameExtension-ProgramAssociation Module by eMedia Intellect is licensed under GNU General Public License version 3.
GNU General Public License