Application Association Registration plug-in: Difference between revisions
No edit summary |
No edit summary |
||
Line 43: | Line 43: | ||
Pop $Var | Pop $Var | ||
Determines the default application for a given association type. This is the default application launched by ShellExecute for that type. | |||
Returns: | |||
* 'ProgID' that identifies the current default association. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
AppAssocReg::QueryAppIsDefault app_name assoc_name type level | AppAssocReg::QueryAppIsDefault app_name assoc_name type level | ||
Pop $Var | Pop $Var | ||
Determines whether an application owns the registered default assocation for a given application level and type. | |||
Returns: | |||
* '1' if the application is the default. | |||
* '0' if the application is NOT the default. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
AppAssocReg::QueryAppIsDefaultAll app_name level | AppAssocReg::QueryAppIsDefaultAll app_name level | ||
Pop $Var | Pop $Var | ||
Determines whether an application owns all of the registered default associations for a given application level. | |||
Returns: | |||
* '1' if the application is the default. | |||
* '0' if the application is NOT the default. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
AppAssocReg::SetAppAsDefault app_name assoc_name type | AppAssocReg::SetAppAsDefault app_name assoc_name type | ||
Pop $Var | Pop $Var | ||
Sets an application as the default for a given type. | |||
Returns: | |||
* 'success' if the call was successful. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
AppAssocReg::SetAppAsDefaultAll app_name | AppAssocReg::SetAppAsDefaultAll app_name | ||
Pop $Var | Pop $Var | ||
Sets an application as the default for all of the registered associations of any type for that application. | |||
Returns: | |||
* 'success' if the call was successful. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
AppAssocReg::ClearUserAssociations | AppAssocReg::ClearUserAssociations | ||
Pop $Var | Pop $Var | ||
Removes all per-user associations for the current user. This results in a reversion to machine defaults, if they exist. | |||
Returns: | |||
* 'success' if the call was successful. | |||
* 'method failed' if the call failed. | |||
* 'method not available' if IApplicationAssociationRegistration is not available on the system. | |||
Revision as of 13:18, 30 September 2007
SetVistaDefaultApp Plugin for NSIS (2007-09-28)
This plugin can set an application as the default handler for all of the handlers it has registered on Vista.
Version: 0.2 (2007-09-28) - minor cleanup.
Version: 0.1 (2007-09-28) - initial release.
Functions
- SetVistaDefaultApp::SetAsDefault "AppRegistryName" - Sets an application as the default handler for all of the handlers it has registered on Vista. The AppRegistryName is the registry value name associated with the application under:
HKLM\Software\RegisteredApplications\
Details on function parameters
- app_name
The value for app_name is the name for the application under:
HKLM\Software\RegisteredApplications\
- assoc_name
The value for assoc_name can be one of the following:
- For type equals protocol it should be the protocol name (e.g. http, mms, etc.).
- For type equals file it should be the file extension (e.g. .html, .txt, etc.)
- For type equals startmenu it should be the registry subkey name StartMenuInternet, mail, etc.) under:
HKLM\Software\clients
- For type equals mime it should be the MIME type name (e.g. audio/mp3, text/html, etc.)
- type
Possible values for type map to ASSOCIATIONTYPE as follows file = AT_FILEEXTENSION protocol = AT_URLPROTOCOL startMenu = AT_STARTMENUCLIENT mime = AT_MIMETYPE
- level
Possible values for level map to ASSOCIATIONLEVEL as follows machine = AL_MACHINE effective = AL_EFFECTIVE user = AL_USER
AppAssocReg::QueryCurrentDefault assoc_name type level Pop $Var
Determines the default application for a given association type. This is the default application launched by ShellExecute for that type.
Returns:
- 'ProgID' that identifies the current default association.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
AppAssocReg::QueryAppIsDefault app_name assoc_name type level Pop $Var
Determines whether an application owns the registered default assocation for a given application level and type.
Returns:
- '1' if the application is the default.
- '0' if the application is NOT the default.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
AppAssocReg::QueryAppIsDefaultAll app_name level Pop $Var
Determines whether an application owns all of the registered default associations for a given application level.
Returns:
- '1' if the application is the default.
- '0' if the application is NOT the default.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
AppAssocReg::SetAppAsDefault app_name assoc_name type Pop $Var
Sets an application as the default for a given type.
Returns:
- 'success' if the call was successful.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
AppAssocReg::SetAppAsDefaultAll app_name Pop $Var
Sets an application as the default for all of the registered associations of any type for that application.
Returns:
- 'success' if the call was successful.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
AppAssocReg::ClearUserAssociations Pop $Var
Removes all per-user associations for the current user. This results in a reversion to machine defaults, if they exist.
Returns:
- 'success' if the call was successful.
- 'method failed' if the call failed.
- 'method not available' if IApplicationAssociationRegistration is not available on the system.
Example
See Examples\AppAssocReg\Example.nsi
Links
Download
- Current Release: 2007-09-30
AppAssocReg.zip (10 KB)