80 pts.
 Automatic login to Lotus Notes
I'm trying to run an Excel update overnight that downloads and organizes a Lotus Notes database. The problem I have is the password entry. I'm not the admin and can't clear it. Is there a way through script or batch file to login and automatically pass the password so that Notes won't ask for it? Thanks Steve

Software/Hardware used:
ASKED: March 20, 2009  12:55 PM
UPDATED: April 3, 2009  7:34 PM

Answer Wiki:
Are you trying to create an excel sheet from lotus notes data? If so then take a look at this ---> http://criverapr.blogspot.com/2008/10/using-poi-to-export-lotus-notes-data-to.html. If not, can you give more details on what you want to accomplish? ======================================================================== If your code is written in VBA, all your need is (love ?) here : "http://www.ibm.com/developerworks/lotus/library/ls-COM_Access/" NOTE : * Initialize: this method can be used on a computer with a Notes client or Domino server and bases the session on the current user ID. If a password is specified, it must match the user ID password. If a password is not specified, the user is prompted for a password as required and as the software permits. If the software does not support prompting (for example, VBScript under ASP/IIS), you must supply the password or the user ID must not have one. * InitializeUsingNotesUserName: this method can be used only on a computer with a Domino server. If a name is specified, the InitializeUsingNotesUserName method looks it up in the local Domino Directory and permits access to the local server depending on the "Server Access" and "COM Restrictions" settings. The password must match the Internet password associated with the name. If no name is specified, access is granted if the server permits Anonymous access. I have managed to solve this problem by using "SendKeys" from vba to login. Thanks to all for your responses. It is much appreciated.
Last Wiki Answer Submitted:  April 2, 2009  3:56 pm  by  BruceWayne   4,075 pts.
All Answer Wiki Contributors:  BruceWayne   4,075 pts. , Criverapr   30 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I’m not trying to create an Excel spreadsheet. I already have that and can extract the data. My problem is simply the login to Lotus Notes. I want to update the existing Excel spreadsheet from a Notes database at night when I’m not in the office. Unfortunately it requires that I enter a password. I’m trying to find out if there is any way to pass the password ton Notes via script or batch file that will not reuire that I enter it.
I’m shelling out to the following batch file using a timer (scheduler JIT). If I could just avoid having to type in the password and pass it automatically.
C:LotusNotesnotes.exe “=%userprofile%application datanotesnotes.ini”

 80 pts.

 

If you know what the pw is, then why not
- change it to match the network pw;
- set Notes to login using the network pw

 2,700 pts.

 

I have tried the following but get an “Automation Error”

Private Sub CommandUsername_Click()
Dim session As NotesSession
Set session = CreateObject(“Lotus.NotesSession”)
Call session.InitializeUsingNotesUserName(“my name”, “mypassword”)
TextUsername = session.UserName
End Sub

 80 pts.

 

Do you have Lotus Notes install on the client where you try to run this code ?
Try to not declare “Dim session as NotesSession”

 4,075 pts.

 

I have tried changing the Notes password to the same as my server password to no avail. I have also remarked the DIM statement out. I still get an “Automation error” on the Call session statement.

 80 pts.

 

I didn’t mean the server pw, I meant the pw you use to log on to the network (Windows?), as opposed to your Notes pw.

 2,700 pts.

 

Sorry I also meant Windows password. I have changed the Lotus Notes password to be the same but still can’t get away from the Automation error when I run the code shown previously. I have Lotus notes add-in loaded into Excel but still can’t open and login with the code.

 80 pts.

 

You have to log with the same ID (and password) that is specified in your NOTES.INI file

 4,075 pts.

 

I think you are trying to do this work in the opposite way that BruceWayne or other advanced developers on this site would suggest. You should develop a Notes agent that finds and updates the Excel sheet. Then the notes agent would run on the server with the proper rights and no password would be required. If the Excel file that is being updated is not on the same server as the Notes agent, then the Notes server would need to run under the rights of a ‘user’ who has rights to the place the Excel file is stored.

Also, I have in the distant past created an agent that creates an Excel spreadsheet using a shell command (I think), populated it, then saved it as an attachment in a Notes database document. That may be another option.

 3,845 pts.

 

Part of my problem is that I don’t know Notes script, so that I have to work from the Excel side. All I want to do is populate an Excel spreadsheet from a Notes database and manipulate the data in Excel. I add other data from other sources as well, without problem. I can get the data from the Notes database if I sit there and login and enter my password, but I’m trying to avoid the 1 hour update time by doing it overnight. I am not an admin so my access is limited as well. Maybe an agent to move the data into an intermediary spreadsheet would be the answer. Thanks in advance for any advice or code. Much appreciated.

 80 pts.

 

Not sure if it would work anyway, but could you set the ACL on the Notes db to allow access (like make the default access Reader) or does that not meet your security requirements?

 2,700 pts.

 

Able to get results needed from Excel with SendKeys. Thanks to all for suggestions
Steve

 80 pts.