Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Host Sink Permissions

Status
Not open for further replies.

JBL312

IS-IT--Management
Jan 14, 2004
56
US
Hello all, I am in the process of trying to write an Event Sink for Exchange Server 2000. Once I register the Event Sink the code never seems to run. After a few days of thinking that it was some how a problem with my code, I came across a KB article that described registering the Script Host Sink. Apparently it is required to be registered to handle Event Sinks and is not installed when you install Exchange Server 2000.

Now when registering the Script Host Sink a username and password are required. From what I read this needs to be a user account that has permissions to do things that the Event Sink is going to do (hopefully that made sense.). I supplied the Administrator user account when registering the Script Host Sink. Stupid me, the Administrator does not have access to users mail boxes. So I am going to need to unregister and then reregister the Script Host Sink with a user name that does have the right permissions.

Has anyone done this before? I would like to know what user account you would use to register the Script Host Sink. Additionally, after the Script Host Sink is registered you have the ability to specify a user account for the script to run under. Dose this have to be the same user account used to register the Script Host Sink or can it be a different one?

If any one has done what I am trying to do and has some recommendations, I would welcome them.
 
JBL,

I just started working with event sinks in the last couple of weeks.

1) check and double check for typos in your script. I've found that just one typo killed the whole script.
2) make sure you restart the SMTP services after you register the sink.
3) did you 'cut and paste' the script? I got caught on this one. I cut and pasted a script from MS ... forgot to turn off wordwrap ... and it didn't work. :cool:

--

I was not prompted for a user/password; but, I was logged in as an administrator when I did the registration.

eric
 
Icvanstra, thanks for the quick replay.

1. I have tested my scripts by running the VBS file and have not had any problems. These are just basic scripts dealing with the FSO, designed to log the subject of all email coming in to the server. It is only a test; I do not have a need for this.

2. I have been stopping and then starting the SMTP service after I install the event sink. I make sure to uninstall the event sink prior to trying to reinstall it.

3. I have been cutting and pasting my scripts but not from Word. I have been working on this project from work and have been connecting remotely from work, to my server located at home (Setup for this project. We did not want to modify our existing network setup to allow for a test Exchange server, running on the same network that our production server is running.). I have been using terminal services (On the server, Remote Desktop on my work XP machine.) to connect to my home machine and have been pasting text from a notepad file on my work computer to a notepad file on my home server. I tried files but it will not do that.

4. When I registered the DLLs that compose the Script Host Sink, I was not required to provide a username or password. It was when I ran the VBScript component of the registration that I was required to input a username and password.


The above URL points to a MS KB article listing the commands that I used to register the Script Host Sink. I located the two DLL files and the VBScript file on the Exchange Server 2000 install CD and placed them in the C:\Program Files\Exchsrvr\BIN folder. I then went to a command prompt and pathed to the location I placed the files. However when I first ran through the commands and got to the “cscript eshmts.vbs install” command, it came back with instructions on running the script, listing the username and password as an expected input.

5. When I registered the DLLs that are the Script Host Sink, I was logged on to the computer remotely from work, using terminal services. This may or may not account for why I was prompted for a username and password.

Since you have been working with event sinks for a little while, I would like to ask you for a favor. Could you provide me with an event sink (I do not care what it does), that you know works? If I have my server configured correctly and your sink will run then I know it’s my code. Or perhaps you could tell me how my code runs? I would be happy to post an event sink that I have been playing around with. If you would be willing to take a look at it and if you deem it safe, run it that would tell me if my server configuration is the issue.
 
jbl,

oh what a joy are jobs can be... I'm at home right now building a 'lab box'. the girlfriend is out with co-workers so I'm playing with computers?!?!

It's raining cats and dogs here ... and all my notes are in the car... I'll get back with you in a bit.

as a side note: I don't have a whole lot of spare equipment at work either so I've been doing the number one mistake: testing on production. When I get my lab box done I'll be happy to work with you some more.

later,
eric
 
good morning... I was able to follow Q324021 and get a working script.
 
I have resolved the problem I was having with my Event Sink. It would seam that a typo and a lot of ignorance will go along way. It was not until Saturday that I was able to fix the problem.

There are 4 main things that I changed, one of them had to be changed. One or two of the other three may not have been needed.

1. Created a new user account to use with the Event Sink. As I was not concerned with security, I wanted this user to be able to access every mail box. So I created this user account and added it to the Exchange Domain Servers group (I read that this group has full control to the mail boxes.). I did not add it to any other group. I only added the user to this group because by default all admin accounts are denied access to user mail box folders and had I added the user to any of these groups it would have been denied access.

2. I came across some actual instruction on installing the Event Sink Handler COM+ object. These were not the typical Microsoft instructions where you are told to go to a command prompt and register two DLL files and then run a VBS script file. The instructions that I found tell you to go to the Component Services snap-in and create the object. When I was done following the instructions there were more components under the COM+ object than there had been when I used the Microsoft method.

3. I installed CDO. I came across this in another article on CDO. It talked about problems and fixes and one of those problems was Event Sinks just not running. The article said to make sure that CDO was installed. I could have thrown the computer out a window after reading that line. No where had I ever read that CDO was something that needed to be installed. Everything that I read made it sound like it was a built-in component of Windows. I guess I can do nothing but plead ignorant. So according to the article you install CDO with Office. It is an option under Outlook. If you already have some Office application installed then you go to add and remove in the control panel and you click on the change button. So I did this and added CDO.

4. This one was my fault. A damn typo. The script was to output some information about the incoming email, to a file. Well when specifying the file name and path I forgot to surround it in double quotes. Actually I think what happened is that I was modifying the path and I deleted one of them and did not notice it. However I did it, I messed this portion up.


After that it worked. I have no question that the typo was a problem, but am not sure what exactly fixed my problem. Fixing the typo alone would not have done it. Do I really have to install CDO? Did I need this new user to be able to run the sinks? Did I need to reinstall the COM+ object, or would the Microsoft way have worked? Hell if I know. All I know is that it is working now. This basically means that I am going to have to get my scripts working just right and then tare down my server and rebuild it from the start. That way I know what is defiantly required to be in place prior to installing on my production server.

Thanks for the help, Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top