3.2.4.2.9.2 ExecutablePath (put) (Opnum 13)

The ExecutablePath (put) method sets the Executable path property (section 3.2.1.4) of the action. The Executable path is the directory path and file name of the executable to run if this action is performed.

 [propput, id(FSRM_PROPERTY(FSRM_DISPID_ACTION_COMMAND | 0x01))] HRESULT ExecutablePath(
   [in] BSTR executablePath
 );

executablePath: Contains the Executable path to use for this action.

Return Values: The method MUST return zero on success, or a nonzero error code on failure.

Return value/code

Description

0x80045306

FSRM_E_INVALID_PATH

The supplied path of the executable for the action is not valid. The supplied path MUST be a full path to the executable program or script to be used, and can contain environment variables. The supplied path is not valid if the path is relative or if the path does not point to a file.

0x8004530D

FSRM_E_OUT_OF_RANGE

The content of the executablePath parameter exceeds the maximum length of 4,000 characters.

0x80045317

FSRM_E_INSECURE_PATH

This error code MUST be returned if the service determines that the supplied executable path is not limited only to administrative access; that is, is accessible for write access to users other than local administrators.

0x80045320

FSRM_E_LONG_CMDLINE

 After expanding the environment variables in the executable path of the action, the command exceeds the maximum length of 260 characters.

0x80070057

E_INVALIDARG

The executablePath parameter is NULL.

Upon receiving this message, the server MUST validate parameters:

  • Verify that executablePath is not NULL.

  • Verify that executablePath is an absolute path. If executablePath is not an absolute path, the server MUST return FSRM_E_INVALID_PATH.

  • Verify that executablePath is the path of a valid executable.

  • Verify that executablePath is only writable by administrators, local system, backup operators, or server operators.

If any validation fails, the server MUST terminate processing and return a nonzero error code.

The server MUST use executablePath as the Executable path for this action.