Das Notes Forum
Domino 9 und frühere Versionen => Administration & Userprobleme => Thema gestartet von: Goofy am 05.11.02 - 16:35:02
-
Hi @ all,
ich habe da eine Frage. Wir haben ca. 800 Mail-Benutzer angelegt. Der Notes Client ist lokal (komplett) auf jedem Rechner installiert.
Künftig soll der Client ebenfalls lokal auf jedem Rechner installiert werden, das data-Verzeichnis allerdings soll auf dem Netz/Server liegen (Laufwerk H für HOME).
Vorteil:
Der User kann sich künftig an verschiedenen Rechnern anmelden und mit Lotus Notes arbeiten.
Frage:
Wie kann ich die Pfade in der Notes.ini für alle User anpassen bzw. abändern, ohne jede ini-Datei einzeln händisch abzuändern???
Gruß
Goofy
-
Hi!
Deine Frage kann ich dir leider auch nicht konkret beantworten...
Es müsste aber möglich sein, dass über einen Agenten laufen zu lassen... Aber frag bitte nicht wie...
Aber ein tip dazu: Auf dem jeweiligen PC-Client solltest du den neuen Pfad für die Notes.ini im Path der Umgebungsvariablen eintragen...
Aber ansonsten kann ich nur sagen, dass dieser Aufbau recht gut funktioniert. wir setzen ihn auch ein.
Gruß,
Marion
-
Die Ini kannst du mit folgendem Code manipulieren:
Function INI_Write(INI_Path As String, INI_FileName As String,INI_Section As String,INI_Variable As String,INI_Value As String,ErrorMessage As String) As Variant
' this function will locate a given ini file and look for the given section and variable within that inifile. If it does not find the section it will add the section
' the variable and the value.
' if it does find the section it will look for the variable. if it does not find the variable within the given section it will add the variable and the value
' if it does find the variable it will add the new value.
' to use this function parameters MUST be specified in the given format....
' INI_PATH example ..... "C:\Windows\"
' INI_FileName example .... "notes.ini"
' INI_Section example .... "[Notes]"
' INI_Variable example .... "Directory"
' INI_Value example .... "c:\notes\data"
' ErrorMessage is used to hold the value of the error message. If the function fails you can find the error message here.
' return values for errors
' INIWrite_Path_Not_Found
' INIWrite_File_Not_Found
INI_Write = True
INI_Section = Ucase$(Trim$(INI_Section)) ' convert to uppercase and trim spaces
INI_Variable = Ucase$(Trim$(INI_Variable)) ' convert to uppercase and trim spaces
Dim FileName As String
Dim FileHandle As Integer
Dim TempLine As String
Dim Counter As Long
Dim IniFileLines() As String
Dim SectionFound As Variant
Dim VariableFound As Variant
Dim ArrayIndex1 As Long
Dim ArrayIndex2 As Long
Dim OutPutArray As Variant
Dim EqualSignPosition As Integer
' first thing to do is check for the existence of the path.
On Error 76 Resume Next ' Error is Path not found
FileName = Dir$(INI_Path & "*.*", 0)
If Error() = "Path not found" Then
Print "Path Not Found."
INI_Write = False
ErrorMessage = "INIWrite_Path_Not_Found"
Exit Function
End If
' second thing to do is check for the existence of the file.
FileName = Dir$(INI_Path & INI_FileName,0)
If FileName = "" Then
Print "File Not Found"
INI_Write = False
ErrorMessage = "INIWrite_File_Not_Found"
Exit Function
End If
' get a file handle
FileHandle = Freefile
' open the file
Open INI_Path & INI_FileName For Input Access Read As FileHandle
' now read in the file line by line into an array
Counter = 0
Do While Not Eof(FileHandle)
Line Input #FileHandle , TempLine
Redim Preserve IniFileLines(Counter) As String
IniFileLines(Counter) = Ucase$(Trim$(TempLine))
Counter = Counter + 1
Loop
Close #FileHandle
' now look for the section
SectionFound = False
VariableFound = False
For ArrayIndex1 = 0 To Counter - 1
If IniFileLines(ArrayIndex1) = INI_Section Then ' found the correct section
SectionFound = True
For ArrayIndex2 = ArrayIndex1 + 1 To Counter - 1 ' look for the variable
If Left$(IniFileLines(ArrayIndex2),1) = "[" And Right$(IniFileLines(ArrayIndex2),1) = "]" Then ' found next section without finding variable add the variable here.
' insert variable and value
Call InsertIntoArray(IniFileLines,Counter,ArrayIndex2,INI_Variable & " = " & INI_Value)
VariableFound = True
Exit For
Else
If Not Left$(IniFileLines(ArrayIndex2),1) = ";" Then ' is not a comment
' Locate equal sign in the string
EqualSignPosition = Instr(IniFileLines(ArrayIndex2),"=")
If Not EqualSignPosition = 0 Then ' found the equal sign
If Trim(Left$(IniFileLines(ArrayIndex2),EqualSignPosition - 1)) = INI_Variable Then ' found correct variable
VariableFound = True
' replace the variable and the value
IniFileLines(ArrayIndex2) = INI_Variable & " = " & INI_Value
Exit For
End If
Else
If Not IniFileLines(ArrayIndex2) = "" Then ' append equal sign to the line
IniFileLines(ArrayIndex2) = IniFileLines(ArrayIndex2) & " = "
End If
End If
End If
End If
Next
Exit For
End If
Next
If SectionFound = False Then ' section never found, insert section, variable and value
' insert section
Call InsertIntoArray(IniFileLines,Counter-1,Counter,INI_Section)
' insert variable and value
Call InsertIntoArray(IniFileLines,Counter,Counter+1,INI_Variable & " = " & INI_Value)
Else
If VariableFound = False Then 'variable never found, insert variable and value
' insert variable and value
Call InsertIntoArray(IniFileLines,Counter-1,Counter,INI_Variable & " = " & INI_Value)
End If
End If
' write the values of the array out to the ini file
' get a file handle
FileHandle = Freefile
' open the file
Open INI_Path & INI_FileName For Output Access Write As FileHandle
Print Cstr(Ubound(IniFileLines))
For ArrayIndex1 = 0 To Ubound(IniFileLines)
If Not IniFileLines(ArrayIndex1) = "" Then
If Left$(IniFileLines(ArrayIndex1),1) = "[" And Right$(IniFileLines(ArrayIndex1),1) = "]" Then ' found next section
Print #FileHandle , ""
End If
Print #FileHandle , IniFileLines(ArrayIndex1)
End If
Next
Close #FileHandle
End Function
Jetzt musst du nur noch ein bisschen Code um die Function herumschreiben, der die Ini in allen Verzeichnissen der User sucht und dann ensprechend anpasst. ;D ;D
eknori
-
So, und damit solltest du es hinkriegen, die Ini Files zu finden:
http://eknori.dyndns.org/knowledge/devidea.nsf/703257f00a483fb180256879002c0178/777f21a2eb514fc0c1256aee0023364a?OpenDocument&Highlight=0,files
eknori
-
Hallo Leute,
nur mal so zwischendurch !!! Warum macht wollt ihr das ganze notes/data Verzeichnis auf das Home- LW legen....ich bin Supporter in einer Firma, wo auch Roaming- Notes angewandt wird. Hier werden die wichtigen Dateien wie Desktop5.dsk, names.nsf,busytime.nsf und auch natuerlich die id- Datei und die notes.ini in das Profile der Domäne gespeichert.
Ich finde das auch eine gute Idee...vor allen Dingen da ihr ja sowieso den Client auf dem Rechner installieren wollt.
Ich weiss nicht genau wie es im Hintergrund abläuft, aber ich weiss wohl das es mit einer umgeschriebenen notes.exe gestartet wird und bei der Erstkonfiguration die Daten aus dem daten/notes- Verzeichnis in das Profile kopiert werden bzw. angelegt (names.nsf).
Es tut mir leid das ich nicht genauer werden kann...aber vielleicht ist es ja ein kleiner Gedankenanstoss...oder vielleicht erklärt ihr mir die Vorzüge der obigen Variante???
Gruss mcp71
-
Hi,
schließe mich mcp71 an mit der Erweiterung auch den Client in das Netz zu stellen und über nlnotes.exe aufzurufen.
;D MOD
-
Dem Vorschlag von mcp71 kann ich folgen - aber was bringt es, wenn ich den ganzen Client auf einem Netzlaufwerk installiere - die Datensicherung hat entspechend mehr zu tun - der Traffic im Netz steigt - auf der anderen Seite, kann ich den Client über die Datensicherung zurückspielen, anstatt ihn neu zu installieren - aber sonst?
Bei uns wird (leider) immer noch diskutiert, ob/wann zumindest das Data-Verzeichnis ins Netz installiert wird (liegt z.Zt.) alles lokal ;-(((
Gruß
Wolfgang
-
Hi Wolfgang,
1. Ich installiere den Client dann nur einmal bei über 1000 Usern.
2. Ein Update auf eine andere Version verwalte ich zentral für alle User.
3. Im Falle eines Rollback setzte ich die User auf das "alte" Verzeichnis zurück.
Genug Vorteile?
;D MOD
-
Hallo eknori,
vielen Dank für Deine schnelle Hilfe. Allerdings habe ich von Scripten und Codes überhaupt einen Plan.
Gruß
Goofy