'Windows Script Host Object Model'.WshShell Automation error

Jatin_Patel
Member Posts: 200
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?
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
Microsoft Dynamics NAV Consultant
Jatin's Blog
0
Comments
-
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 specialist0 -
-
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 specialist0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions