Automatic login to Lotus Notes

80 pts.
Tags:
Lotus Domino security
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Struax
    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 pointsBadges:
    report
  • Stiletto
    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
    4,125 pointsBadges:
    report
  • Struax
    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 pointsBadges:
    report
  • BruceWayne
    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,110 pointsBadges:
    report
  • Struax
    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 pointsBadges:
    report
  • Stiletto
    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.
    4,125 pointsBadges:
    report
  • Struax
    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 pointsBadges:
    report
  • BruceWayne
    You have to log with the same ID (and password) that is specified in your NOTES.INI file
    4,110 pointsBadges:
    report
  • Brooklynegg
    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 pointsBadges:
    report
  • Struax
    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 pointsBadges:
    report
  • Stiletto
    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?
    4,125 pointsBadges:
    report
  • Struax
    Able to get results needed from Excel with SendKeys. Thanks to all for suggestions Steve
    80 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following