george7a
13th April 2007, 11:59
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
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:
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:
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
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
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:
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:
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