markom
22nd August 2002, 21:26
How can I send message to all baan users? We have a winNT system

evesely
22nd August 2002, 21:43
See this thread (http://www.baanboard.com/baanboard/showthread.php?threadid=440)

markom
23rd August 2002, 09:31
Where can I get all bshell pid for all users.
I now command licmon-w.

where can i find script?

NPRao
23rd August 2002, 09:38
Please refer to the link -

http://www.baanboard.com/baanboard/showthread.php?s=&postid=22517#post22517

Old Vens
23rd August 2002, 10:18
Hi Marcom,

In Unix you can use ps -ef|grep bshell|grep -v grep - this will show you information about current bshell connections. Examine man ps for detailed information what differnet columns in the output mean.

markom
23rd August 2002, 10:27
I need for windows NT

markom
3rd September 2002, 15:03
Can anyone send me script for getting bshell.ID on windows NT
sistem not on Unix.
If someone have program for sending massage to all baan users on NT I will be very happy if hi would send mi

Thanks

marko.markic@elan-line.si

klesch
3rd September 2002, 17:56
Hey Markom!

I quess, that Nazdaq's baan2baan product is exactly what you need. And it's quite cheap, too, I think.

ITS is a representative of Nazdaq for Slovenia. Call or email me if you want a demo version.

Aleksander, ITS.

Darren Phillips
3rd September 2002, 19:08
Just tried this, seems to work ok instead of picking up the pid and using bshcmd I get the username and use net send which will work ok if each NT user has their own Baan account . if you wanted to return the pid instead change the tokens=3 to 4 and your own command instead of net send

usage is batname.bat "message to baan user ??????"



%$BSE%\bin\licmon -w > c:\users.txt
set mess=%1
for /f "skip=1 tokens=3 delims=. " %%i in (c:\users.txt) do net send %%i %mess%

muheeb
4th September 2002, 12:15
Hi Darren

I want to ask you about the code you posted...

you pass to "net send" the user login name in baan?!

and how it works?... it didn't work in our system.

Darren Phillips
4th September 2002, 12:33
%$BSE%\bin\licmon -w > c:\users.txt
set mess=%1
for /f "skip=1 tokens=3 delims=. " %%i in (c:\users.txt) do net send %%i %mess%


the %$BSE% picks up the enviroment variable for the baan installation directory (note need to run this on the server) or you could hardcode the location eg d:\baan\bin\licmon -w > c:\users.txt

the licmon -w > c:\users.txt outputs the following information to the users.txt file

eg
SERVER TYPE USER SYSTEM DATE TIME
XXXXXX bx/bw XXX.537 XXXXXX 03-09-2002 07:53
XXXXXX bx/bw XXXXXX.427 XXXXXX 03-09-2002 08:56
XXXXXX bx/bw XXXX.474 XXXXXX 03-09-2002 09:50

when you run the bat file say you call it message.bat
message.bat "this is a message to users"
the "this is a message to users" gets passed to the bat file as %1
so the set mess=%1 sets the mess variable to the message you want to send to the users.

the last line takes the text file users.txt and looks for blocks of text seperated by a space or a . and then takes the 3rd block of text it finds and passes it to the net send command which also picks up the variable mess as the message to send to the users.
the skip=1 tells it to skip the first line as it is the header.

muheeb
4th September 2002, 13:49
Hi,

I know how the code works but my question was:

the fact that this don't do what we want... sending the

message to the right PC according to the username.

that the script passes to the "net send".

We tried it manually in our server and it didn't work

(sending message to the user XXXX we found in licmon

in block 3 "XXXX.ID")

Thanks.

Darren Phillips
4th September 2002, 16:26
So I take it that the first part is working ok it produces the text file.

when you test it manually

eg
net send username message to all users

what is the error message.

muheeb
4th September 2002, 16:30
Hi,

I try the concept of using "net send" with username,

and it didn't work... I mean the spicific username

didn't get any message to his local PC.

So I guess it doesn't work always using "net send"

by "username"... then we need the computer name itself.

Darren Phillips
4th September 2002, 17:40
%$BSE%\bin\licmon -w > c:\users.txt
set mess=%1

for /f "skip=1 tokens=4 delims=. " %%i in (c:\users.txt) do %$BSE%\bin\bshcmd -M %mess% %%i

changed it to use PID and bshcmd instead.

OmeLuuk
4th September 2002, 17:51
Service Messenger needs to be running...

markom
5th September 2002, 15:23
Thanks all

Han Brinkman
5th September 2002, 17:11
If you want to send every baan user a message why not edit the file systemmess in $BSE\lib?

This normally works, if not than you have to add ottstppollmess in bms_mask.

Han

cracked egg
14th April 2003, 22:58
I can see this is an old thread but I have been trying unsuccessfully to get this to work. I have two bat files; 1 with the message and one with the script as below. Can someone please point out what I might have wrong. Thanks.

1st file - sendmsg.bat

e:\baan\bin\licmon -w > c:\users.txt
set mess=%1
for /f "skip=1 tokens=4 delims=. " %%i in (c:\users.txt) do e:\baan\bin\bshcmd -M c:\msg.bat%%i

2nd file - msg.bat

message test

Darren Phillips
15th April 2003, 14:44
I wrote this script some time ago, nice to see it is still of use, I no longer work on baan so cannot test it but this should work

e:\baan\bin\licmon -w > c:\users.txt
for /f " tokens=1 delims=." %%i in (c:\msg.bat) do set mess= %%i



for /f "skip=1 tokens=4 delims=. " %%i in (c:\users.txt) do e:\baan\bin\bshcmd -M %mess% %%i

OmeLuuk
16th April 2003, 12:07
Darren,
What is in (c:\msg.bat)?

Darren Phillips
16th April 2003, 12:44
the message that you want to send to the users.