ShellExecute api call

Jeffcoat, Al Al.Jeffcoat at orhs.org
Mon May 8 18:37:59 CEST 2006


Hello All,

 

I've got a programmer here trying to send a status message to hobbit
from a windows machine.  He's having a problem executing the bb code.  I
myself am not a programmer, so I figured I'd pass on his e-mail and see
if anyone else knows the answer to his problem.

 

TIA,

 

Al

 

--- Quote ---

There is a problem doing this from within a program. The shellexecute
function requires you to pass the program name and parameters seperate.

 

E.G.,

 

program = "bb.exe" 

parameters = "hobbit status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"

 

(hobbit is not part of the program name and that is why it can't be part
of program name)

 

If I try to simulate this on command line with   

 

bb "hobbit status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"

 

I get

 

 bb: incorrect number of arguments

 

--- /Quote ---

 

I know the format of a message, and if I change his message to read

 

bb hobbit "status kn306109.dtr-status red
<center>DTR-STATUS</center><br>Last Failure = 05/04/20 06 00:00:01 Last
Success = 05/08/2006 00:00:01<br>Copies = 50"

 

It works fine.

 

My thought was to write a "wrapper" batch file.

 

I'm open to any other ideas.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060508/e12df93b/attachment.html>


More information about the Xymon mailing list