Skip to content

Sys_SetFileAssociation

Sets file association for a given extension

Sys_SetFileAssociation(sExtenstion, sAction, sCommand, bOverwriteExisting) As Boolean

System restore point description

The action to create

The command to execute when the action is activated

Overwrite association if it already exists

'Program.exe takes a file as a launch parameter which is supplied by Windows by %1
If bStatus Then bStatus = Sys_SetFileAssociation(".extension", "Open", gsProgramFiles & "\Program\Program.exe %1", True)

Scripting Guidelines

Constants Package Property Variables