File - Get Default Viewer

Returns the full path and filename of the executable associated with a specific file extension on the user's system.

In other words, this action determines the default viewer for a file type and stores the path to that viewer in a variable.

Action ID:
Action Category:
Action List Syntax:

13
File 
<<VARIABLE>>
= File.GetDefaultViewer (<<EXTENSION>>)

Settings

Variable name:

The variable that the information will be stored in.

File extension:

The extension that you want to investigate. The full path and filename of the default viewer associated with this file extension in Windows will be stored in the variable specified above.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_READ_FILE_ASSOC

MSG_ERR_READ_FILE_ASSOC
MSG_ERR_VIEWER_CLASS_NAME
<<EXTENSION>>

2

MSG_ERR_READ_FILE_ASSOC

MSG_ERR_READ_FILE_ASSOC
MSG_ERR_VIEWER_COMMAND_LINE
<<EXTENSION>>

3

MSG_ERR_READ_FILE_ASSOC

MSG_ERR_READ_FILE_ASSOC
MSG_ERR_ASSOCIATED_VIEWER_NOT_EXECUTABLE
<<EXTENSION>>

4

MSG_ERR_READ_FILE_ASSOC

MSG_ERR_READ_FILE_ASSOC
MSG_ERR_ASSOCIATED_VIEWER_NOT_EXIST
<<EXTENSION>>

Examples

Getting the version of Acrobat that is installed

Running a PowerPoint presentation

Running a PowerPoint presentation (advanced)