17. Januar 2007 15:36
17. Januar 2007 18:08
SHELL('c:\windows\system32\cmd.exe', '/c ping 127.0.0.0');MyIP := '127.0.0.0';
ReturnValue := SHELL(ENVIRON('COMSPEC'), STRSUBSTNO('/c ping %1', MyIP));
IF ReturnValue = 0 THEN  // erfolgreich
  ...
ELSE
  ...17. Januar 2007 18:09
17. Januar 2007 18:11
18. Januar 2007 10:48
19. Januar 2007 13:36
{Variables:
WSH_Shell     Automation 'Windows Script Host Object Model'.WshShell
Command       Text100
IP            Text30
ExitCode      Integer
WindowStyle   Variant
WaitOnReturn  Variant}
IP := '127.0.0.1';
Command := STRSUBSTNO('ping %1', IP);
WindowStyle := 0;
{ Window Styles:
0 Hide the window and activate another window. 
1 Activate and display the window. (restore size and position) Specify this flag when displaying a window for the first time. 
2 Activate & minimize. 
3 Activate & maximize. 
4 Restore. The active window remains active. 
5 Activate & Restore. 
6 Minimize & activate the next top-level window in the Z order. 
7 Minimize. The active window remains active. 
8 Display the window in its current state. The active window remains active. 
9 Restore & Activate. Specify this flag when restoring a minimized window. 
10 Sets the show-state based on the state of the program that started the application.}
WaitOnReturn := TRUE;  // modal run, receive ExitCode
IF ISCLEAR(WSH_Shell) THEN
  CREATE(WSH_Shell);
ExitCode := WSH_Shell.Run(Command, WindowStyle, WaitOnReturn);
MESSAGE('%1', ExitCode);   // 0 = OK; 1 := Error