Options

'Windows Script Host Object Model'.WshShell Automation error

Jatin_PatelJatin_Patel Member Posts: 200
edited 2014-09-26 in NAV Three Tier
Hello,

In NAV 2013 R2 I am running process only report having below code via job queue.

WindowStill := 1;
BooleanReturn := TRUE;
IF ISCLEAR(Shellik) THEN
CREATE(Shellik,TRUE,TRUE);
x := Shellik.Run(TempPath + 'CopyFiles.bat', WindowStill, BooleanReturn);

But it will give below error.

Microsoft Dynamics NAV

Microsoft Dynamics NAV Server attempted to issue a client callback to create an Automation object: 72c24dd5-d70a-438b-8a42-98424b88afb8 (Report 50052 Export PO & IW to GPO). Client callbacks are not supported on Microsoft Dynamics NAV Server.
OK

How we can use Wshshell via job queue?
Jatin Patel
Microsoft Dynamics NAV Consultant
Jatin's Blog

Comments

  • Options
    tinoruijstinoruijs Member Posts: 1,226
    Problem can be you're using ".bat" and default .bat is registrered in the service as "Prohibited File Types" on tab Client Services.
    You can delete .bat from this string after you stop the service.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • Options
    Jatin_PatelJatin_Patel Member Posts: 200
    We already removed .bat from that list.
    Jatin Patel
    Microsoft Dynamics NAV Consultant
    Jatin's Blog
  • Options
    tinoruijstinoruijs Member Posts: 1,226
    How we can use Wshshell via job queue?

    Seems like you can't. Because of "Client callbacks are not supported on Microsoft Dynamics NAV Server".
    Instead of using CopyFiles.bat maybe you can use codeunit File Management?

    Tino Ruijs
    Microsoft Dynamics NAV specialist
Sign In or Register to comment.