Solved

Accessing Environment variables

Posted on 2000-02-20
5
198 Views
Last Modified: 2013-12-18
Hi all,

I want to know if its possible to access the values that are already in the Notes.ini. (not user defined variables).

Reason is this - I need to get a UserId out of the Notes.ini, the only way to get the user Id is to use the ID filename (eg userid.id) and the only way I can get to this effectively is to use the ini.

I tried using @environment("Keyfilename") but this returns a NULL. If I use @environment("Keyfilename";"Test") to set it, then a new value turns up in the ini as $Keyfilename=test - which I dont want!

I guess what Im really asking is there anyway to get the filename of the id file that is currently in use? (So that it changes when you use SwitchID). I have tried using @maildbname, but this doesnt change when I use switch ID.

Any ideas?

Mat
0
Comment
Question by:prenexus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Accepted Solution

by:
Arunkumar earned 100 total points
ID: 2541985
Hi Mat,

I am not sure to what you are upto.

Anyway,
Try setting the environment values using script.  You can avoid the $ prepending the variable name.

Check SetEnvironmentVar in Notes help for more details...

Good Luck !

-Arun

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 2542841
HI

You can extract the system parameters defined in Notes.ini using script, Here is the code to do that:

     Dim session As New NotesSession
     Msgbox session.GetEnvironmentString( "KeyFileName", True )

Simple, but there is no way (as far as my knowledge goes) to do it thru Notes Formula Lang,

Good Luck
~Hemanth
0
 
LVL 4

Expert Comment

by:stamp
ID: 2543508
Hi,

put into your (I hope admin) mail memo for a button.

Put into button click event this code:
Sub Click(Source As Button)
 Dim FileName As String
 Dim fileNumber As Integer
 Dim InputLine As String
 FileName = "notes.ini"
 FileNumber = Freefile()
 Open FileName For Input As #FileNumber
 Do While Not Eof(FileNumber)
  Input #FileNumber, InputLine
  If (Left$(InputLine,12) = "KeyFilename=") Then
   Print InputLine                  
  End If
 Loop
 Close #FileNumber
End Sub

Send such a memo to user and let him try...

Perhaps he hes to allow you access in his ECL!!!

But wath do you need this for???

Regards,
stamp

0
 
LVL 4

Expert Comment

by:stamp
ID: 2543691
I forgot...

if you are interested, I have the code to automaticaly send back to you
the complete notes.ini from user...

Give me a note.

Regards,
stamp
0
 

Author Comment

by:prenexus
ID: 2543782
Thanks everyone!

All those answers were great!

Ill give the points to Arun, seeing as he ws first in this morning.

Many thanks again,

Mat
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question