Calling all Gurus - Frustrating issue with Execution of scheduled Lotusscript agent

Hi,

I have written the agent below whic is supposed to call the Calendar profile and change the users signature path from c: to d: - the Agent works fine when signed and scheduled with my ID - however as soon as I use our corporate signer (which has full ECL access) it produces this error:

31/10/2006 10:53:00 AMgr: Agent ‘Fix_profile’ is scheduled to run next at: 31/10/2006 10:57:00

31/10/2006 10:57:00 AMgr: Start executing agent ‘Fix_profile’ in ‘FixNotes.nsf’ by Executive ‘1’

31/10/2006 10:57:00 AMgr: ‘McKinsey Unrestricted Database Signer/…’ is the agent signer of agent ‘Fix_profile’ in ‘FixNotes.nsf’

31/10/2006 10:58:00 AMgr: Agent ‘Fix_profile’ in ‘FixNotes.nsf’ does not have proper execution access, cannot be run

31/10/2006 10:58:00 AMgr: Agent ‘Fix_profile’ is scheduled to run next at: 31/10/2006 11:02:00

31/10/2006 11:03:00 AMgr: Start executing agent ‘Fix_profile’ in ‘FixNotes.nsf’ by Executive ‘1’

31/10/2006 11:03:00 AMgr: ‘McKinsey Unrestricted Database Signer/…’ is the agent signer of agent ‘Fix_profile’ in ‘FixNotes.nsf’

When I use my own ID it works:

31/10/2006 11:50:00 AMgr: Start executing agent ‘Fix_profile’ in ‘FixNotes.nsf’ by Executive ‘1’

31/10/2006 11:50:00 AMgr: ‘Ralph/LON/Europe/…’ is the agent signer of agent ‘Fix_profile’ in ‘FixNotes.nsf’

31/10/2006 11:50:00 AMgr: Agent (‘Fix_profile’ in ‘FixNotes.nsf’) printing: Getting handle to Mail Preferences…

31/10/2006 11:50:00 AMgr: Agent (‘Fix_profile’ in ‘FixNotes.nsf’) printing: Mail signature path changed.

31/10/2006 11:51:00 AMgr: Agent ‘Fix_profile’ in ‘FixNotes.nsf’ ran successfully; elapsed time was ‘1’ ticks

31/10/2006 11:51:00 AMgr: Agent ‘Fix_profile’ is scheduled to run next at: 31/10/2006 11:55:00

Here is the Code:

Sub Initialize

Dim s As New NotesSession

Dim thisdb As NotesDatabase, thisdoc As NotesDocument

Dim maildb As  New NotesDatabase("", "")

Dim mailprof As NotesDocument  ' Mail Preferences profile

Dim sigpath As Variant

Dim addpath As Variant

Dim searchpath As Variant

Dim eval As Variant



'Get hold of mail DB

Set thisdb = s.CurrentDatabase

Call maildb.OpenMail

If maildb.IsOpen = False Then Error 1000, "Unable to find Mail database - aborting..."



'Get hold of preferences

Print "Getting handle to Mail Preferences..."

Set mailprof = maildb.GetProfileDocument("CalendarProfile")

sigpath = mailprof.GetItemValue("Signature_2")



'If no signature then exit

If sigpath(0) = ""  Then Goto getOut



'Create paths

addpath = "D"

searchpath = "C"



'Change path to D:

sigpath = Replace(sigpath, searchpath, addpath)

Call mailprof.ReplaceItemValue("Signature_2", sigpath)



'Save new path

Call mailprof.ComputeWithForm(True, False)

Call mailprof.Save(True, False)



'Output info	

Print "Mail signature path changed."



'Get out when done

getOut:

Exit Sub



'Error handling	

errHandler:

Select Case Err

Case 1000

	Print "Error"

Case 1001

	Print "Notes fix aborted!"

Case Else

Thanks for taking a look,

Ralph

Subject: Calling all Gurus - Frustrating issue with Execution of scheduled Lotusscript agent

It seems to me at first glance to be an agent execution rights issue. Check whether your corporate signer id doesn’t have enough access to run the agent. Server document->Security tab->Run restricted LotusScript/Java agents;

Run unrestricted LotusScript/Java agents: or actions

Subject: Calling all Gurus - Frustrating issue with Execution of scheduled Lotusscript agent

Dbl check the agent security section of the Server document belonging to the server on which it is running.

Open the agent and check its properties for security, run time access.

Subject: RE: Calling all Gurus - Frustrating issue with Execution of scheduled Lotusscript agent

Hi,In reviewing your error message, I believe Martijn is absolutely spot-on. This is one of those features in LN/D that has driven folks absolutely wild for last couple of releases. ECL list is all too often overlooked, so I’d put my money on Martijn’s solution. Let us know if that helps.

mit freundlichen Gruessen,

Jan

Subject: RE: Calling all Gurus - Frustrating issue with Execution of scheduled Lotusscript agent

Hi Chaps,Thanks for your help. Sorry about the radio silence. The agent is actually trying to run on my local machine - and the DB signer ID has full ECL rights (all checkboxes ticked). Also local agents are set to run and the agent will run when signed with my own ID on my machine and the signer is a manager in the ACL - however as soon as it is signed with the working unrestricted signer it fails with the original error message. Man this is frustrating!