smtp event sink - run
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
smtp event sink - run

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
Søren Ørslund
Guest





Posted: Wed Jan 05, 2005 4:07 pm    Post subject: smtp event sink - run Reply with quote

Hi,

I have a ISMTPOnArrival event sink working fine.
I need to call an application from that sink, but it will not work if the
application i call is using a form.

The Event Sink is :

<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus )
on error resume next
Dim WshShell
set WshShell = CreateObject("WScript.Shell")
WshShell.run ("c:\log\test.vbs")
set WshShell = nothing
EventStatus = cdoRunNextSink
End Sub
</SCRIPT>

If the test.vbs is :

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Dim file
Set file = fs.OpenTextFile("c:\log\test2.txt", 8, True )
file.Write "------- test 1.00 : ----------" & vbCrLf
file.Close

Everything is working, but if test.vbs is :

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("calc")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status

It does not work ?

Can anybody help - i have seen others having troubles with event sink and
"run" or "exec" but i have not seen a solution og explanation ?


Regards,

Søren

Back to top
Oliver Kremp
Guest





Posted: Thu Jan 06, 2005 9:38 am    Post subject: Re: smtp event sink - run Reply with quote

the event sink is running under the same credentials as your SMTP. That is
most probably localsystem and might cause your problems.
You might reconfigure the credentials of your SMTP Server
Hope that helps.
CU




+++
Spam me :-). I am Aloaha protected
+++
"Søren Ørslund" <soeren@oerslund.dk> schrieb im Newsbeitrag
news:#mPqY5w8EHA.2568@TK2MSFTNGP10.phx.gbl...
Quote:
Hi,

I have a ISMTPOnArrival event sink working fine.
I need to call an application from that sink, but it will not work if the
application i call is using a form.

The Event Sink is :

SCRIPT LANGUAGE="VBScript"
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus )
on error resume next
Dim WshShell
set WshShell = CreateObject("WScript.Shell")
WshShell.run ("c:\log\test.vbs")
set WshShell = nothing
EventStatus = cdoRunNextSink
End Sub
/SCRIPT

If the test.vbs is :

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Dim file
Set file = fs.OpenTextFile("c:\log\test2.txt", 8, True )
file.Write "------- test 1.00 : ----------" & vbCrLf
file.Close

Everything is working, but if test.vbs is :

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("calc")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status

It does not work ?

Can anybody help - i have seen others having troubles with event sink and
"run" or "exec" but i have not seen a solution og explanation ?


Regards,

Søren



Back to top
Søren Ørslund
Guest





Posted: Thu Jan 06, 2005 11:48 pm    Post subject: Re: smtp event sink - run Reply with quote

Thank you for the answer - it is correct.


"Oliver Kremp" <UNOK@nospam.hotmail.com> wrote in message
news:uqON6E68EHA.3868@TK2MSFTNGP15.phx.gbl...
Quote:
the event sink is running under the same credentials as your SMTP. That is
most probably localsystem and might cause your problems.
You might reconfigure the credentials of your SMTP Server
Hope that helps.
CU




+++
Spam me :-). I am Aloaha protected
+++
"Søren Ørslund" <soeren@oerslund.dk> schrieb im Newsbeitrag
news:#mPqY5w8EHA.2568@TK2MSFTNGP10.phx.gbl...
Hi,

I have a ISMTPOnArrival event sink working fine.
I need to call an application from that sink, but it will not work if the
application i call is using a form.

The Event Sink is :

SCRIPT LANGUAGE="VBScript"
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus )
on error resume next
Dim WshShell
set WshShell = CreateObject("WScript.Shell")
WshShell.run ("c:\log\test.vbs")
set WshShell = nothing
EventStatus = cdoRunNextSink
End Sub
/SCRIPT

If the test.vbs is :

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Dim file
Set file = fs.OpenTextFile("c:\log\test2.txt", 8, True )
file.Write "------- test 1.00 : ----------" & vbCrLf
file.Close

Everything is working, but if test.vbs is :

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("calc")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status

It does not work ?

Can anybody help - i have seen others having troubles with event sink and
"run" or "exec" but i have not seen a solution og explanation ?


Regards,

Søren






Back to top
Michael Korte
Guest





Posted: Sat Jan 08, 2005 5:31 am    Post subject: Re: smtp event sink - run Reply with quote

:-)
Welcome

"Søren Ørslund" <soeren@oerslund.dk> wrote in message
news:O9KzpfB9EHA.3416@TK2MSFTNGP09.phx.gbl...
Quote:
Thank you for the answer - it is correct.


"Oliver Kremp" <UNOK@nospam.hotmail.com> wrote in message
news:uqON6E68EHA.3868@TK2MSFTNGP15.phx.gbl...
the event sink is running under the same credentials as your SMTP. That
is
most probably localsystem and might cause your problems.
You might reconfigure the credentials of your SMTP Server
Hope that helps.
CU




+++
Spam me :-). I am Aloaha protected
+++
"Søren Ørslund" <soeren@oerslund.dk> schrieb im Newsbeitrag
news:#mPqY5w8EHA.2568@TK2MSFTNGP10.phx.gbl...
Hi,

I have a ISMTPOnArrival event sink working fine.
I need to call an application from that sink, but it will not work if
the
application i call is using a form.

The Event Sink is :

SCRIPT LANGUAGE="VBScript"
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus )
on error resume next
Dim WshShell
set WshShell = CreateObject("WScript.Shell")
WshShell.run ("c:\log\test.vbs")
set WshShell = nothing
EventStatus = cdoRunNextSink
End Sub
/SCRIPT

If the test.vbs is :

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
Dim file
Set file = fs.OpenTextFile("c:\log\test2.txt", 8, True )
file.Write "------- test 1.00 : ----------" & vbCrLf
file.Close

Everything is working, but if test.vbs is :

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("calc")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status

It does not work ?

Can anybody help - i have seen others having troubles with event sink
and
"run" or "exec" but i have not seen a solution og explanation ?


Regards,

Søren






Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB