Shell in lotus Script

Hello All,I am using shell command in lotus script scheduled agent.

I am trying to connect to a text file residing in a different server.

In declarations I have the following

%INCLUDE “lserr.lss”

%INCLUDE “lsconst.lss”

In profile document I have values stored in two fields. one field ConnectStr for path & the other field FileName for filename of the text file.

ConnectStr field has the value stored as mentioned below

net use x: \servername.us.co.com\folder/user:userid pwd

FileName as value mention below

x:\filename.txt

My scheduled agent has the following code.

taskId% = Shell(docProfile.ConnectStr, 1)

Sleep(10)

fileNum% = Freefile()

fileName$ = docProfile.FileName(0)

Open fileName$ For Input As fileNum%

When this runs in server gives the error message file not found. Am I missing anything please let me know your suggestions & feedback.

I appreciate your response and thanks in advance.

Subject: Shell in lotus Script

Check to see if your Domino server is running as a Windows service. Security restrictions prevent a service from accessing resources on another server, either thru a mapped drive or thru a UNC path.

Is there any way to get that file on the same box as your Domino server?

Subject: RE: Shell in lotus Script

We have apps (not Domino) running as a service that move data from host to host using a UNC path without issue.

Shawn

Subject: RE: Shell in lotus Script

As do we. But not Domino.

Subject: Shell in lotus Script

An example of reading a file from username/password protected network drive:Read/Write from password-protected shared network drive using LotusScript agent

Subject: RE: Shell in lotus Script

Thank you for your response. Currently I am tried using your link. It is gives me error 1219 when i use the code give in above link.

Any suggestions would be appreciated. Thanks in advance.

Subject: RE: Shell in lotus Script

I’ve tried it now in Notes7 on Win2003 server and it worked fine.

You are probably already connected to the same network drive using another name, that’s why you get the error.

From Microsoft help regarding Error 1219:

For an initial connection, if you use NULL for lpPassword or lpUsername, the interactive user’s credentials are used by default. If there has been a successful initial connection to the server, subsequent attempts to open a connection using a different set of credentials results in error 1219 (ERROR_SESSION_CREDENTIAL_CONFLICT), which indicates a conflict between the supplied set of credentials and the existing one. To establish a connection using a different set of credentials, first you have to cancel the existing connections to the server using WNetCancelConnection2().

http://support.microsoft.com/kb/183366

Subject: Shell in lotus Script

First thing I would confirm is that#1. The agent is set in its security properties to run as an “Unrestricted” agent

#2 The signer of the agent has the rights in the server document to run unrestricted agents.

HTH

Rob