Problem in Running CMD Shell from Navision

pradeepkmr478pradeepkmr478 Member Posts: 13
Hi.. Good Morning.

I am working on Navision Version 2009 Classic. Running a small commad using automation "Windows Script Host Object Model'.WshShell" as WHSPradeep.
Using Code below :-

CMDReturnCode:=-1;
IF ISCLEAR(WHSPradeep) THEN CREATE(WHSPradeep);
Var1Temp:=0;
Var2Temp:=1;
CMDReturnCode := WHSPradeep.Run('Echo Pradeep Bhardwaj >> C:\text.txt',Var1Temp,Var2Temp);
CLEAR(WHSPradeep);


But i am getting error message:-

Microsoft Dynamics NAV Classic
This message is for C/AL programmers:

An exception was raised in method Run. The OLE control or Automation server has returned error (HRESULT) -2147352567.
The component did not provide the exception description.

OK

Please help ....


Thanks in advance
Regards
Pradeep Bhardwaj

Comments

Sign In or Register to comment.