Das Notes Forum
Domino 9 und frühere Versionen => ND8: Administration & Userprobleme => Thema gestartet von: mweitzel am 07.01.14 - 09:07:03
-
Hallo,
besteht die Möglichkeit nach der Benutzeranmeldung von Notes ein Script automatisch anzustarten? Wie könnte so etwas dargestellt werden?
-
Sowas ist möglich durch einbinden einer DLL via EXTMGR (die DLL muss man natürlich vorher geschrieben haben). Client- Management- Tools (Client Genie, Marvel Client, Desktop Manager) können sowas. Ansonsten musst Du Dich an eine Datenbank hängen, die der User auf jeden Fall aufmacht (z.B. seine Mail- Datenbank)...
-
Mit DLL Programmierung kenne ich mich nicht aus. Geht es automatisch eine lokale Datenbank zu starten die wiederum nichts anderes macht als eben dieses Skript auszuführen und sich dann wieder schließt?
-
Man kann über die notes.ini eine Startdatenbank mittels Replik-ID angeben, siehe
http://www.duffbert.com/duffbert/blog.nsf/d6plinks/tduf-5w8udc
Ich würde aber eine Datenbank auf dem Server verwenden, sonst hast Du noch das Problem, die Datenbank lokal zu verteilen und das Script ggf. später ändern zu müssen.
Andreas
-
Hallo,
ich habe es nun hinbekommen, dass eine Datenbank automatisch beim Notes-Start startet.
Nun soll folgendes Script mit starten und danach die Datenbank wieder geschlossen werden. Das klappt nur irgendwie nicht. Wenn das Script in einer Schaltfläche eingebaut ist geht es. Aber wo muss man das platzieren damit es beim Datenbankstart sauber läuft?
Kann man am Ende des Scriptes auch ein schließen der Datenbank implementieren?
Function UpdateUsersLocationDocument()
Dim session As New NotesSession
Dim viewLocations As NotesView
Dim viewPeople As NotesView
Dim docLocation As NotesDocument
Dim docPerson As NotesDocument
Dim dbNAB As NotesDatabase
Dim dbPAB As NotesDatabase
Dim LocationDocument As String
Dim nnUserName As NotesName
Dim PersonalAddressBook As String
Dim MailFile As String
Dim MailFilePerson As String
Dim dbCurrent As NotesDatabase
Set dbCurrent = session.CurrentDatabase
Dim DateTimeNow As NotesDateTime
Set DateTimeNow = New NotesDateTime(Now)
Dim sDateTime As String
sDateTime = DateTimeNow.LsLocalTime
'Get the personal address book from the notes.ini and remove any cascaded local address books
PersonalAddressBook = Trim(session.GetEnvironmentString("Names",True))
If InStr(PersonalAddressBook, ",") > 0 Then
PersonalAddressBook = Left$(PersonalAddressBook, InStr(PersonalAddressBook, ",") -1)
Else
If InStr(PersonalAddressBook, ";") > 0 Then
PersonalAddressBook = Left$(PersonalAddressBook, InStr(PersonalAddressBook, ";") -1)
End If
End If
'Get the personal address book, exit if cannot be opened
Set dbPAB = session.GetDatabase("", PersonalAddressBook)
'Set dbPAB = session.GetDatabase("", "names.nsf")
If dbPAB.IsOpen = False Then GoTo FinishFunction
'Get the current location document in use, exit if any errors
Set viewLocations = dbPAB.GetView("Locations")
If viewLocations Is Nothing Then GoTo FinishFunction
LocationDocument = Trim(session.GetEnvironmentString("Location",True))
If LocationDocument = "" Then GoTo FinishFunction
LocationDocument = Left$(LocationDocument, InStr(LocationDocument, ",") -1)
If LocationDocument = "" Then GoTo FinishFunction
Set docLocation = viewLocations.GetDocumentByKey(LocationDocument)
If docLocation Is Nothing Then GoTo FinishFunction
'Get the Public Address Book from the current server
Set dbNAB = session.GetDatabase(dbCurrent.Server, "names.nsf")
If dbNAB.IsOpen = False Then GoTo FinishFunction
'Get the current users person document. Exit if user not in address book
Set viewPeople = dbNAB.GetView("($VIMPeople)")
Set nnUserName = New NotesName(session.UserName)
Set docPerson = viewPeople.GetDocumentByKey(nnUserName.Abbreviated)
If docPerson Is Nothing Then GoTo FinishFunction
'Get the name of the mail file from the person document and current database
MailFile = dbCurrent.FilePath
MailFilePerson = docPerson.MailFile(0)
If LCase(Right$(MailFilePerson, 4)) <> ".nsf" Then
MailFilePerson = MailFilePerson & ".nsf"
End If
'Update the Location Document, if the mail file name in the address book matches the name of the current database
If LCase(MailFile) <> LCase(MailFilePerson) Then GoTo FinishFunction
docLocation.MailFile = MailFile
docLocation.MailServer = "Testserver"
docLocation.DirectoryServer = "Testserver"
docLocation.CatalogServer = "Testserver"
docLocation.Domain = "Testdomain"
docLocation.ImailAddress = docPerson.InternetAddress(0)
docLocation.Name = docPerson.Firstname(0) + " " + docPerson.Lastname(0)
docLocation.Proxy_HTTP = "proxy/proxy.pac:8080"
docLocation.InternetDomain = "domain.de"
Call docLocation.Save(True, False)
Call session.SetEnvironmentVar("DateLocationModified", sDateTime, False)
FinishFunction:
End Function
-
Ich würde das im Datenbankscript der Datenbank abhandeln:
Im PostOpen per Formel die Datenbank wieder schließen
@Command ([FileCloseWindow])
Im QueryClose das Script ausführen lassen
-
Hallo,
kann er das nicht einfach in die Mailschablone einbauen, dann noch eine Gruppe erstellen bei denen das Script laufen soll?
Die Maildatenbank mach der User doch in der Regel eh auf!
Halle
-
Hallo,
danke für den Hinweis mit dem Postopen. Die Datenbank geht nun auch gleich wieder zu. Im Queryclose habe ich das Script nun mit CALL UpdateUsersLocationDocument hinzugefügt.
Leider tut er aber nicht das was im Script steht. Woran kann das noch liegen?
-
Problem erkannt, es lag an dem Vergleich im Script.
Danke an alle die geholfen haben.
-
Hallo,
ich muss leider noch einmal das Thema angehen. Der Start einer Datenbank über den ini-Paramter Startupdb=C..... funktioniert bei mir nur, wenn die Datenbankkachel auch im Arbeitsbereich besteht. Wenn die Kachel gelöscht wird zieht der Parameter nicht mehr. Gibts dafür eine Lösung?
-
Ja
Marvel Client....
oder
das script in die Mailbox einbauen.
-
Dafür gibt es eine Policy
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=%2Fcom.ibm.help.domino.admin.doc%2FDOC%2FH_CREATING_SETUP_POLICY_SETTINGS_DOCUMENTS.html
Default databases added to bookmarks
Create a link for each database to add to the user workspace.
Note If the server that stores a database is down during setup, a bookmark will not be created.
Andreas
-
Moin
Gilt die Setup Policy nicht nur beim Einrichten des Notesclients?
Was ist mit bestehenden?
Evtl. Mail an betroffene schicken mit einem speziellen Form -> Queryopen des Forms macht ein Notesuiworkspace.addDatabase