Shell-Substitute "Oyster"

Administrator
Member, Moderator, Administrator Posts: 2,506
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.
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.
0
Comments
-
there's a discussion in
http://www.mibuso.com/forum/viewtopic.php?p=22170
showing a better way to prevent from warning messages by using the MS-Shell :oops:0 -
Sorry for my Question - maybe I am a little bit stupid.
I have registered the oyster.ocx.
How do I have to define a Variable "OYSTER" ?
Thank you !0 -
toenne wrote:aod wrote:
How do I have to define a Variable "OYSTER" ?
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 ?0 -
aod wrote:toenne wrote:aod wrote:
How do I have to define a Variable "OYSTER" ?
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??0 -
Many Thanks,
I Think this is the problem - so we have to spend more money !!0 -
You need the granule 1750 Tools - C/OCXTimo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Up to 3.70 I wrote shell('net time /set /yes'); to sync the clients time.
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.Svensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)0 -
svensk.tiger wrote:Up to 3.70 I wrote shell('net time /set /yes'); to sync the clients time.
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.SHELL(ENVIRON('windir') + '\system32\net.exe','/set /yes');
or also ENVIRON('SystemRoot')
For all evironment-variables, open a dosbox and enter 'SET' as command. You will see all environment-variables.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thats true,
but your have to find and modify all your shell calls before going to 4.x.Svensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)0 -
svensk.tiger wrote:Thats true,
but your have to find and modify all your shell calls before going to 4.x.
Finding them is not so difficult: export all objects as text and search for 'SHELL'.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
What would be really great, to have a method to return stdout from the application.0
-
zehnan wrote:What would be really great, to have a method to return stdout from the application.
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I want to use oyster to convert a file to another before I continue in NF.
How can I set oyster that he waits for the command to be ready (like it is in WaitVar := SHELL('notepad.exe'); )?0 -
I don't know if it is possible with oyster, but there is another method:
Check out this http://www.mibuso.com/forum/viewtopic.php?t=6204Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Yes I used that in the beginning.
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.0 -
dick11 wrote:Then I noticed that Windows 2000 has no "'Windows Script Host Object Model'".
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
My test PC has SP3. But is a Server. Does that matter?
I have currently no normal W2K PC so I cannot check that.0 -
dick11 wrote:My test PC has SP3. But is a Server. Does that matter?
I have currently no normal W2K PC so I cannot check that.
But it is possible that SP4 makes the difference.
But before you install that, I advice to check it out on another PC.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
-
Try to install all fixes for W2K you can find.
BTW:Did you check OCX or automation? It is an automation.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I created a Tip and Trick-topic on how to use the Shell of "Windows Script Host Object Model".
See http://www.mibuso.com/forum/viewtopic.php?t=12417Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks.
If have tried this again. And yes it workes with XP. But it still does not work at our W2K PC's.0 -
I checked the MS site:
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
-
Hallo,
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/0
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