Solved

Accessing Environment variables

Posted on 2000-02-20
5
191 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
5 Comments
 
LVL 9

Accepted Solution

by:
Arunkumar earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses 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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now