IFileAssociations

DeclarationCopy link to this sectionLink to this section copied!

IFileAssociations : IDispatch

OverviewCopy link to this sectionLink to this section copied!

This interface is meant to manage file associations

MethodsCopy link to this sectionLink to this section copied!

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 Copy link to this sectionLink to this section copied!

Array<IDefaultProgramFA> DefaultPrograms
Gets the collection of default programs setups.

Array<IProgIdFA> ProgIds
Gets the collection of ProgId setups.

ExampleCopy link to this sectionLink to this section copied!

$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)