Hi,
I have created a TransportAgent for my Exchange 2013 Server like it is described on this website.
I only changed the if-condition and added a line to execute a local VBS file.
To start the VBS file I have added this line in the TransportAgent
System.Diagnostics.Process.Start("C:\\MyProgram\\Prog.vbs");
This is working fine. The VBS file is executed but in my VBS file I want to execute a local exe file and this isnt working.
My VBS file looks like this.
Set FSO =CreateObject("Scripting.FileSystemObject")SetMyFile= FSO.CreateTextFile("C:\MyProgram\Testfile.txt ", TRUE)MyFile.CloseSetMyFile= FSO.OpenTextFile("C:\MyProgram\Testfile.txt",8)MyFile.WriteLine("Test!")MyFile.WriteLine("End")MyFile.CloseSetWshShell=WScript.CreateObject("WScript.Shell")WshShell.Run"C:\MyProgram\program.exe",0,True
For testing purpose I have added the creation of a testfile to check if the VBS was executed. This is working fine.
But the "programm.exe" cant be executed. The exe file establishes a connection to an remote server (internet). But this is never executed.
I think this is because the TransportAgent is executed with the Network Service Account but I don´t know how I can solve this.
I dont want to give critical rights to the account.
Can anyone help me?