Shell-Substitute "Oyster"
Substitute for Navision-internal "Shell"-Command.
Prevents warning messages in Navision 4.0
Register it, make a suiting variable (Oyster) and use it like:
cmd:='notepad.exe';
if Oyster.Oyster(cmd) then ...;
You have to used a text variable (cmd), passing constant text will raise an error.
http://www.mibuso.com/dlinfo.asp?FileID=492
Discuss this download here.
Comments
http://www.mibuso.com/forum/viewtopic.php?p=22170
showing a better way to prevent from warning messages by using the MS-Shell :oops:
I have registered the oyster.ocx.
How do I have to define a Variable "OYSTER" ?
Thank you !
In the form "C/AL Globals" or "C/AL Locals" you add a new line variable with
Name = Oyster
Data Type = OCX
and in column SubType you pick "Oyster.OysterCtl" from the lookup list.
Thanks,
But I don't have the Data-Type OCX ?!
Is it avaiable at a Report or only at CodeUnits ?
OCX are available in all types of objects. it might be restricted by licence??
I Think this is the problem - so we have to spend more money !!
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
In 4.0 Sp1 the %PATH% will be ignored and the net.exe not found!!!
I have to change it to shell('C:\Winnt\system32\net.exe ',' /set /yes');
Assuming, windows ist alway installed in C:\winnt, what is not true.
So the environment variable %SystemRoot" has to be determined.
Because of the short flashing up of a black CMD-Window, we use a similar
OCX automation server, wich gives us the possibility to hide the window.
To avoid the problems, that could rise with not registered OCX's, we have
merged it in the Navision client installer MSI.
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)
For all evironment-variables, open a dosbox and enter 'SET' as command. You will see all environment-variables.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
but your have to find and modify all your shell calls before going to 4.x.
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)
Finding them is not so difficult: export all objects as text and search for 'SHELL'.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In the DOS-command, put "c:\..\MyCommand.exe > c:\temp\MyFile.txt"
This to save the stdout of the DOS-application into a file.
Then open the file in Navision and read it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
How can I set oyster that he waits for the command to be ready (like it is in WaitVar := SHELL('notepad.exe'); )?
www.dasautomatisering.nl
Check out this http://www.mibuso.com/forum/viewtopic.php?t=6204
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Then I noticed that Windows 2000 has no "'Windows Script Host Object Model'".
So I am searching for a Shell that workes with NF 4 without asking permission and wait's until the command is finished and also workes with Windows 2000.
www.dasautomatisering.nl
I created a function that uses that automation when I still was working on W2K.
Which service pack of W2K do you have? I had SP4.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I have currently no normal W2K PC so I cannot check that.
www.dasautomatisering.nl
But it is possible that SP4 makes the difference.
But before you install that, I advice to check it out on another PC.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Any other ideas?
www.dasautomatisering.nl
BTW:Did you check OCX or automation? It is an automation.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
See http://www.mibuso.com/forum/viewtopic.php?t=12417
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
If have tried this again. And yes it workes with XP. But it still does not work at our W2K PC's.
www.dasautomatisering.nl
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/9d24095d-46a2-44d7-b900-fd4a0497a314.asp
Under "What is WSH" it is written that it should also work on W2K.
I am getting out of ideas of what the problem could be on your W2K-pc's.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So. Has someone else an idea?
www.dasautomatisering.nl
Oyster is working fine in Windows XP =D> , but I cannot register oyster.ocx on a Windows 7 64 bit computer ](*,) .
Can someone please help, thank you.
Regards
SGanzmann
\:D/ I have it: It is working, but it is not so easy to register the OCX-file:
You have to register it in winndows/syswow64 and you have to deactivacte user controll \:D/