if isclear(WindowShell) then
create(WindowShell);
WindowShell.CurrentDirectory(ENVIRON('windir') + '\system32\');
txtCommand := 'ipconfig';
WSHExec := WindowShell.Exec(txtCommand);
WSHTextStream := WSHExec.StdOut;
//read till 15th line for error
I := 0;
WHILE (NOT WSHTextStream.AtEndOfStream) AND (I < 8) DO BEGIN
txtMsg := WSHTextStream.ReadLine();
I += 1;
END;
message(copystr(txtMsg,45));
WindowShell is of type 'Windows Script Host Object Model'.WshShell
WSHExec is of type 'Windows Script Host Object Model'.WshExec
WSHTextStream is of type 'Windows Script Host Object Model'.TextStream
I is integer
txtMsg is text 1000;
txtCommand is text
Ahmed Rashed Amini
Independent Consultant/Developer
Comments
WindowShell is of type 'Windows Script Host Object Model'.WshShell
WSHExec is of type 'Windows Script Host Object Model'.WshExec
WSHTextStream is of type 'Windows Script Host Object Model'.TextStream
I is integer
txtMsg is text 1000;
txtCommand is text
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Can u make me understand the whole process , which u hace written in code. will it work in navision.
thanx once again
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
you are welcome.
if you want to learn how it work, turn on the debugger and see how it works.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n