Understanding File Associations: How Your Computer Identifies Programs

Understanding File Associations: How Your Computer Identifies Programs

Steven Lv8

Understanding File Associations: How Your Computer Identifies Programs

Table of Contents

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

IFileAssociations

Declaration

IFileAssociations : IDispatch

Overview

This interface is meant to manage file associations

https://techidaily.com

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.

https://techidaily.com

Properties

Array DefaultPrograms
Gets the collection of default programs setups.

Array ProgIds
Gets the collection of ProgId setups.

https://techidaily.com

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)

Copy
https://techidaily.com

See also

ITextFileUpdatesComponent

ITextUpdateFile

Did you find this page useful?

Please give it a rating:

Thanks!

Report a problem on this page

Information is incorrect or missing

Information is unclear or confusing

Something else

Can you tell us what’s wrong?

Send message

Also read:

  • Title: Understanding File Associations: How Your Computer Identifies Programs
  • Author: Steven
  • Created at : 2024-10-10 00:54:44
  • Updated at : 2024-10-10 21:29:15
  • Link: https://fox-zero.techidaily.com/understanding-file-associations-how-your-computer-identifies-programs/
  • License: This work is licensed under CC BY-NC-SA 4.0.