Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th April 2007, 10:59
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,490
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Thumbs up bic_info runs on the Windows server - Solution!

Hi All,

I have been trying to execute bic_info on a Windows server for a long time but it didn't work if I wasn't on the server itself. So I have found a solution that will "trick" the windows server and execute bic_info without the famous shared memory error.

Here is how I have done it:

Create 2 Batch files and save them under the server (I have saved them under c:\george. My $BSE = E:\baan):

The first batch file is bic2.bat
Code:
E:\baan\bin\bic_info.exe {YOUR_DLL_NAME} > c:\george\DLL.txt 2> c:\george\DLL.err
The second (& main) batch is Mybic.bat and here is the code:
Code:
call E:\baan\bin\fillenv.bat
call C:\george\bic2.bat
If you try to double click Mybic.bat via remote desktop it will not work! But (and here comes the tricky part) if you scheduled a task (using the windows scheduling tasks program) on the server itself to run mybic.bat it will work! All you have to do then is to go to the scheduler via remote desktop, execute our task & you will get your result in a text file.

The other way to execute Mybic.bat is using a simple Baan script:
Code:
long run.id
run.id=run.prog("c:\george\mybic.bat","",RP_WAIT)
if run.id<> 0 then
   message("Could not run the batch file. Error number:" & str$(run.id))
endif
I hope you find this helpful,

- George
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.
Reply With Quote
  #2  
Old 13th April 2007, 14:54
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,490
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Thumbs up More generic

With some simple addition we can make this solution more generic:

I have updated the batch files with the following

bic2.bat:
Code:
E:\ln6.1\bin\bic_info.exe %1 >c:\george\%1.txt 2> c:\george\%1.err
Mybic.bat:
Code:
call E:\ln6.1\bin\fillenv.bat
call C:\george\bic2.bat %1
Now we can call any DLL from our Baan script as in the following example:
Code:
long run.id
run.id=run.prog("c:\george\mybic.bat MyDLLName","",RP_WAIT)
| MyDLLName is a variable (or a extern field in a session)
if run.id<> 0 then
   message("Could not run the batch file. Error number:" & str$(run.id))
endif
| You can copy the result txt file to the local and view it too!
- George
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.

Last edited by george7a : 13th April 2007 at 15:16. Reason: comments
Reply With Quote
Sponsored Links
  #3  
Old 13th April 2007, 15:07
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,490
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Thumbs up Another useful utility

The last (updated) batch files can be also executed (on the server) from the client using PsExec.

I have wrote another batch file that will activate psexec. I have called it client_bic_info.bat:
Code:
d:\bic\psexec.exe \\BaanServ -u baan -p **** c:\george\mybic.bat %1
Now we can run bic_infro from the client on any DLL we want. This is an example of how to use the client_bic_info.bat:
Quote:
d:\bic\client_bic_info.bat ottdllbw
The result will be found under the server. We can simply change the result's path to any shared directory.

- George
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Printing Logos with Windows Server (LN 6.1) mack56 Tools Development 0 1st March 2007 10:41
SQL Server 7.0 SP4 + BaanERP compatiblity Jabran Tools Administration & Installation 1 4th October 2004 11:49
Herstellkostenberechnung in BaaN 4c Kai's Forum Users Deutsches Forum 4 5th July 1999 00:00


All times are GMT +2. The time now is 13:05.


©2001-2017 - Baanboard.com - Baanforums.com