?
Solved

Accessing Environment variables

Posted on 2000-02-20
5
Medium Priority
?
203 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 300 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

777 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