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
Comments
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);
Thanks for the PM but better to post on the forum
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.
I am using this class on all systems: (Win2k, XP, Win2k3):
Export your object into text, replace the variable definition with this GUID and Name and import it back.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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 help