IFileAssociations
Declaration
IFileAssociations : IDispatch
Overview
This interface is meant to manage file associations
Methods
NewDefaultProgram() returns IDefaultProgramFA
Creates a new default program setup.
RemoveDefaultProgram(IDefaultProgramFA DefaultProgram)
Removes a default program setup.
NewProgId() returns IProgIdFA
Creates a new
ProgId setup.
RemoveProgId(IProgIdFA ProgId)
Removes a new
ProgId setup.
Properties
Array<IDefaultProgramFA> DefaultPrograms
Gets the collection of default programs setups.
Array<IProgIdFA> ProgIds
Gets the
collection of ProgId setups.
Example
$advinst = new-object -com AdvancedInstaller
$project = $advinst.CreateProjectS("architect")
$appExeFile = $project.FilesComponent.AddFileS("appdir", "D:\MyApp.exe")
$progId = $project.FileAssociations.NewProgId()
$extension = $progId.NewExtension($appExeFile)
$verb = $extension.NewVerb()
$defaultProgrram = $project.FileAssociations.NewDefaultProgram()
$defaultProgrram.AddExtension($extension)