21. Januar 2008 18:55
21. Januar 2008 21:21
SHELL
Use this function to execute external programs and operating system commands from C/AL programs. You can run this function modally or non-modally, depending on whether or not you include the return value from the external program in your code.
[ReturnCode]:= SHELL(Name [, Param, ...])
ReturnCode
Data type: integer
ReturnCode is used for two different purposes:
First, if ReturnCode is used, the external program will be run modally, while it will be run non-modally if ReturnCode is not used. For instance, if you want to go to the operating system and get a directory listing and then bring that information back into the system, include ReturnCode. Omit ReturnCode if you want to run the external program non-modally. For instance, if all you want to do is pass information (such as a name and address) to a standardized letter that is set up in a word processor, you would omit the ReturnCode.
Second, ReturnCode can contain the return value of the external program. Since external programs can return different codes to reflect whether errors occurred during the execution of the program, the values stored in ReturnCode depend on the external program.
[INT Run :=] wsh.Run(BSTR Command[, VAR VARIANT WindowStyle][, VAR VARIANT WaitOnReturn])
21. Januar 2008 22:06
22. Januar 2008 10:10