|
LibreOffice
LibreOffice 25.2 SDK API Reference
|
Specifies an interface for executing a system command. More...
import"XSystemShellExecute.idl";
Public Member Functions | |
| void | execute ([in] string aCommand, [in] string aParameter, [in] long nFlags) raises ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::system::SystemShellExecuteException ) |
| Executes an arbitrary system command. More... | |
Public Member Functions inherited from XInterface | |
| any | queryInterface ([in] type aType) |
| queries for a new interface to an existing UNO object. More... | |
| void | acquire () |
| increases the reference counter by one. More... | |
| void | release () |
| decreases the reference counter by one. More... | |
Specifies an interface for executing a system command.
| void execute | ( | [in] string | aCommand, |
| [in] string | aParameter, | ||
| [in] long | nFlags | ||
| ) | |||
| raises | ( | ::com::sun::star::lang::IllegalArgumentException, | |
| ::com::sun::star::system::SystemShellExecuteException | |||
| ) | |||
Executes an arbitrary system command.
There are generally two modes of operation for this function:
With URIS_ONLY among the passed-in nFlags, the passed-in aCommand must be a URI that is opened in an "only do secure things, make sure not to execute potentially dangerous code" way (e.g., instead of running an arbitrary app, open a window showing the location of the app).
Without URIS_ONLY among the passed-in nFlags, the passed-in aCommand must be a system pathname of an executable to run.
| aCommand | Specifies the command to execute. This may be an executable file or a document which is registered with an application on a specific platform, so that the platform knows what application to launch for that document. If the command specifies a path to an executable, etc, this has to be a system specific path. |
| aParameter | Specifies a list of space separated parameters. The method does not validate the given parameters, but only passes it as a parameter to the specified command. |
| nFlags | Specifies different flags to control the execution of this method, for example, avoid showing system error messages, in case of failures, etc. |
| com::sun::star::lang::IllegalArgumentException | when the specified flags are wrong or exclude each other; also thrown, with an ArgumentPosition of 0, when nFlags contains URIS_ONLY and aCommand is not an absolute URI reference |
| com::sun::star::system::SystemShellExecuteException | in the case of errors when trying to executed the specified command. |
1.8.14