Solved

Accessing Environment variables

Posted on 2000-02-20
5
195 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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