Automation Object

SuperSage77
Member Posts: 101
I want use an Automation Object "'Windows Script Host Object Model'.WshShell" in a Report but when I want to compile it I have the following error message " impossible to load the select library".
And when I run the report I have another error message"
The message is for C/AL programmers:
An execption was raised in method Run.The Automation as returned error(HRESULT)-2147352567.The component did not provide the execption description. I make my tests on a PC with Windows XP SP2.
Can you help me for this.
R.Weinling
My new e-mail adress is rudy.weinling@wanadoo.fr
And when I run the report I have another error message"
The message is for C/AL programmers:
An execption was raised in method Run.The Automation as returned error(HRESULT)-2147352567.The component did not provide the execption description. I make my tests on a PC with Windows XP SP2.
Can you help me for this.
R.Weinling
My new e-mail adress is rudy.weinling@wanadoo.fr
0
Comments
-
Hi Rudy
Have you done this
Declare the variable
Name DataType Subtype Length
WsShell Automation 'Windows Script Host Object Model'.WshShell
and in your code
IF ISCLEAR(WsShell) then
CREATE(WsShell);0 -
Hi Rudy
Thanks for the PM but better to post on the forumHi Albertvh,
Thank's for your answer but I have this code
IF ISCLEAR(WsShell) then
CREATE(WsShell);
But I think that this error message appear only on my PC for Test (with XP SP2).In my customer the FileServer irun with 2000 Server and the Report run with no errror message.
I would understand why ?
Thank's
What is the command that you are trying to run as I have created a report and do not get any errors. I am also running XP SP2.0 -
There is one problem with Win2k - the WSShell class has another GUID as on XP.
I am using this class on all systems: (Win2k, XP, Win2k3):Wsh : Automation "{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B} 1.0:{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}:'Windows Script Host Object Model'.IWshShell_Class";
Export your object into text, replace the variable definition with this GUID and Name and import it back.0 -
The code in the Report is following:
IF ISCLEAR(AutWindowsShell_l) THEN BEGIN
CREATE(AutWindowsShell_l);
END;
IntReturnValue_r := AutWindowsShell_l.Run(TxtCommand_p, IntWindowStyle_p, BoolWaitForEndOfCommand_p);
Locals Variables
Name DataType Subtype
AutWindowsShell_l Automation 'Windows Script Host Object Model'.WshShell
Parameters
Var Name DataType Subtype Length
Non TxtCommand_p Text 1024
Non IntWindowStyle_p Integer
Non BoolWaitForEndOfCommand_p Boolean
Thank's for your help0
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