Hi All,
I have an auto agent to save some attachment to local disk. The code is all right when I run it manually, but it will crash Lotus Notes if I schedule it on local.]
-
I grant the agent the security level as 3
-
The code also runs good when I use Win XP, but now I upgrated the system to Win7 and it began to fail
-
I grant the “temp” folder “Full control” access for “Everyone”
If ( o.Type = EMBED_ATTACHMENT ) Then
Call o.ExtractFile( "c:\temp" + o.Source )
End If
Thank you.
Subject: ExtractFile error in Window7
Windows 7 permissions are much more restrictive. We had to modify our agents that create files.
Are you the agent signer?
If the file already exists, you need to kill it before writing the new file. And make sure you have error trapping.
For example, I added a line to kill the file name that I am going to write. And in my error handler, I had to trap for the error that would occur if the file didn’t exist to kill (Err = 75)
Subject: RE: ExtractFile error in Window7
Hi,
Yes. I signed the agent and I also have errorhandler. The folder is blank and I also kill the file.
What is starnge is that the the Lotus Notes is crashed and no error message shows. I think that maybe this is a question for the windows security but I don’t know what needs to be set. I already close the UAC.
I tryied another computer with win7 which could run the agent automatically sucessfully. But I still don’t know what I should set in win7.
Subject: RE: ExtractFile error in Window7
Maybe you should use what is set in the os temp environmental. This would always be there and would be set correct for the users rights
change Call o.ExtractFile( "c:\temp" + o.Source ) to
to Call o.ExtractFile( Environ(“Temp”)+"" + o.Source )
Subject: RE: ExtractFile error in Window7
Hi,
Thank you for your advice. I tried and it still not work.
Do you have any other idea?
Subject: RE: ExtractFile error in Window7
Are You sure Notes is crashing in ExtractFile line?Maybe try to Print to NotesLog after each code line is executed. You will see in which code line is problem.
Konrad
Subject: RE: ExtractFile error in Window7
Are you using the debugger, stepping through the code line by line?
Subject: RE: ExtractFile error in Window7
Karl,
It stands that code run manually works OK. When scheduled locally is something going wrong - you cannot catch that by debugger.
Konrad
Subject: RE: ExtractFile error in Window7
Perhaps not, but you can catch it by error logging.
Subject: RE: ExtractFile error in Window7
Here is info on NotesLog
http://www-12.lotus.com/ldd/doc/lotusscript/lotusscript.nsf/1efb1287fc7c27388525642e0074f2b6/c101f9581ba528638525642e007687db?OpenDocument
Add on errors to code. Put log code on everything even if you think it just can’t be that. Also log the file name.
Subject: RE: ExtractFile error in Window7
I tried to remove the “extractfile” code and save the file in the folder before I schedule the agent.Then I scheduled it to run automatically. All the code runs ok. But when I put the code back, it starts to crash again.
So this is why I know the error is caused by “ExtractFile”.
Subject: RE: ExtractFile error in Window7
Log the file name. Also do you have anti virus software. Can you disable it to see if that is the cause?
Subject: RE: ExtractFile error in Window7
I am having a very similar problem. I have code that runs with no issues on WinXP but when migrated to Win7 it fails at the ExtractFile with a System.AccessViolationException error.
I know the code can write to the target directory as my Notes Log writes to the same location.
I have logged the file path that I provide to ExtractFile and it is valid.
I have turned off my virus scanner.
Subject: RE: ExtractFile error in Window7
I am facing the exact issue as yours. Tried ideas from Jupiter. Still doesn’t work.
NSD log always fails at nlsxbe.Java_lotus_domino_local_EmbeddedObject_NextractFile - in case of Java and corresponding dll call in case of Lotus Script.
Subject: RE: ExtractFile error in Window7
Have you tried running the Notes client as “Administrator” (hint: right click the program option and choose “Run As Administrator” when launching Notes). If this work you can change the properties to always run as administrator.
Windows 7 has many more restrictions then WinXP about writing to the file system.
Cheers!