Originally posted in Sutol Connections
Martin Jinoch wrote an article about parameters required for headless designer
I did some experiments how to get the db to a server. Here are first thoughts. I'Il probably write more later.
1. Batch file to run it
2. NSF db that does notes operations
1. In batch file biggest issue was to find when the job is done, since it creates separate processes. Google offered some advices, so I ended up using pslist from pstools and sleep command found somewhere else.
Here is the file
designer.exe -RPARAMS -console -vmargs -Dcom.ibm.designer.cmd="true,true,trtest.nsf,importandbuild,C:\Git\Teamroom\TR\.project,trtest.nsf"
C:\pstools\PSLIST notes2 >nul 2>&1
IF ERRORLEVEL 1 (
) ELSE (
ECHO designer is still running
C:\sleep\SLEEP 5 /quiet
echo "launch client to copy"
2. Local db that has configuration profile for the app. it is called using notes:// link (and calling it with nlnotes has nice sideeffect that it waits to complete). Biggest issue was to automatically closed notes when done.
Link actually opens document using form that has queryopen event to do the job and postopen with @Command([ExitNotes]) . It has to be called using viewunid and unid of the document, since I use form formula of the view to redirect it to form that does the job, instead of standard form that I use for configuration.
Code can be than pretty much anything I have for now just:
Dim doc As NotesDocument
Dim sourcedb As New NotesDatabase("",doc.profilekey(0))
If sourcedb.IsOpen Then
Dim targetdb As New NotesDatabase(doc.targetserver(0),doc.targetnsf(0))
If targetdb.IsOpen Then
And that's all. I tested it with teamroom db and it worked fine.