I have successfuly registered my Com+ event and then tried to run cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 "file://./backof ficestorage/[domain]/MBX/[user]/inbox/[sub folder]/" -m deep -file "c:\OnSaveEventSync.vbs" but after a moment I get the following Error Opening Record : -2147217768 Object cannot be created at this URL because an object named by this URL already exists. I have rights to the mailbox in question and this directory is existing? What am I doing wrong?
Hi James, you'll have to add the name of the sink to the path: cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 "file://./backofficestorage/[domain]/MBX/[user]/inbox/[sub folder]/myeventsink.evt" -m deep -file "c:\OnSaveEventSync.vbs" Kind regards, Henning "James Robertson" wrote in message news:99D0C98F-DD4E-4102-BC60-038180A616B7@microsoft.com... >I have successfuly registered my Com+ event and then tried to run > > cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 > "file://./backof > ficestorage/[domain]/MBX/[user]/inbox/[sub folder]/" -m deep -file > "c:\OnSaveEventSync.vbs" > > but after a moment I get the following > > Error Opening Record : -2147217768 Object cannot be created at this URL > because > an object named by this URL already exists. > > I have rights to the mailbox in question and this directory is existing? > What am I doing wrong?
Boy do I feel silly. Oh well that is what I get for not reading between the lines. Anyways I have another question I created this and it is supposed to save the attachment to a specific folder but it isnt. Also I cannot tell if it is even working. First how can I tell if it is working or not? Second can you look at the script I am using and let me know if I have something wrong? <SCRIPT LANGUAGE="VBScript"> savepath = "c:\temp\" Set msgobj = CreateObject("CDO.Message") msgobj.DataSource.Open bstrURLItem For Each objAttachment In msgobj.Attachments savefile = savepath savefile = savefile & objAttachment.filename objAttachment.SaveToFile savefile next set msgobj = nothing </SCRIPT> "Henning Krause [MVP - Exchange]" wrote: > Hi James, > > you'll have to add the name of the sink to the path: > > cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 > "file://./backofficestorage/[domain]/MBX/[user]/inbox/[sub > folder]/myeventsink.evt" -m deep -file "c:\OnSaveEventSync.vbs" > > Kind regards, > Henning > > > "James Robertson" wrote in > message news:99D0C98F-DD4E-4102-BC60-038180A616B7@microsoft.com... > >I have successfuly registered my Com+ event and then tried to run > > > > cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 > > "file://./backof > > ficestorage/[domain]/MBX/[user]/inbox/[sub folder]/" -m deep -file > > "c:\OnSaveEventSync.vbs" > > > > but after a moment I get the following > > > > Error Opening Record : -2147217768 Object cannot be created at this URL > > because > > an object named by this URL already exists. > > > > I have rights to the mailbox in question and this directory is existing? > > What am I doing wrong? > >
Hi James, which user have you selected for the COM+ application you created in the Component services MMC? That user must have read access to c:\ and read/write access to c:\temp in your case. You can use FileMon from Microsoft (formerly SysInternals) to check if the sink tries to write to the disk. Kind regards, Henning "James Robertson" wrote in message news:FCC02BCA-DE1F-40EF-96DE-98D9050D15DA@microsoft.com... > Boy do I feel silly. Oh well that is what I get for not reading between > the > lines. Anyways I have another question I created this and it is supposed > to > save the attachment to a specific folder but it isnt. Also I cannot tell > if > it is even working. First how can I tell if it is working or not? Second > can you look at the script I am using and let me know if I have something > wrong? > > <SCRIPT LANGUAGE="VBScript"> > > savepath = "c:\temp\" > Set msgobj = CreateObject("CDO.Message") > msgobj.DataSource.Open bstrURLItem > For Each objAttachment In msgobj.Attachments > savefile = savepath > savefile = savefile & objAttachment.filename > objAttachment.SaveToFile savefile > next > set msgobj = nothing > > </SCRIPT> > > > "Henning Krause [MVP - Exchange]" wrote: > >> Hi James, >> >> you'll have to add the name of the sink to the path: >> >> cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 >> "file://./backofficestorage/[domain]/MBX/[user]/inbox/[sub >> folder]/myeventsink.evt" -m deep -file "c:\OnSaveEventSync.vbs" >> >> Kind regards, >> Henning >> >> >> "James Robertson" wrote in >> message news:99D0C98F-DD4E-4102-BC60-038180A616B7@microsoft.com... >> >I have successfuly registered my Com+ event and then tried to run >> > >> > cscript regevent.vbs add "onsave" ExOleDB.ScriptEventSink.1 >> > "file://./backof >> > ficestorage/[domain]/MBX/[user]/inbox/[sub folder]/" -m deep -file >> > "c:\OnSaveEventSync.vbs" >> > >> > but after a moment I get the following >> > >> > Error Opening Record : -2147217768 Object cannot be created at this URL >> > because >> > an object named by this URL already exists. >> > >> > I have rights to the mailbox in question and this directory is >> > existing? >> > What am I doing wrong? >> >>