The documented UserInstallation mechanism for specifying a profile directory does not work on Windows. I think the reason is that 'UserInstallation' is defined in "C:\Program Files\LibreOffice\program\bootstrap.ini" and it can not be over-ridden with an environment variable or using the documented command line option -env:UserInstallation=file://... Can LO be made to ignore the setting in .ini if the user explicitly over-rides it with a command line option? --- details --- This prevents safely using LO as a batch tool to convert files (--convert-to option etc.) because if the user has an interactive session running then random aborts will occur. https://wiki.documentfoundation.org/UserProfile says the following will start LO with a different user profile: For Windows: soffice.com -env:UserInstallation=file:///c:/my-test-profile Initially, that fails because .../program/ was not registered by the installer to be in PATH, so "soffice.com" is not found. If the fully-qualified path is specified, then a pop-up error says The application cannot be started. The configuration file "C:\Program Files\LibreOffice\program\bootstrap.ini" is corrupt. That .ini file does contain "C:\Program Files\LibreOffice\program\bootstrap.ini" which seems to cause this conflict. STEPS TO REPRODUCE: 1. Using Vim or Notepad, create a file "test.bad" containing the following two lines (change the paths appropriately): mkdir "C:\Users\Admin0\AppData\Local\Temp\TestProfile" "C:\Program Files\LibreOffice\program\soffice.com" "-env:UserInstallation=file://C:\Users\Admin0\AppData\Local\Temp\TestProfile" 2. Type the name/path of the script (e.g. "test.bat") RESULTS: The "corrupted" error pop-up appears and LO stalls waiting for the user to click ok. ----------------- Note: There is no such problem on Linux.
I'm sorry (copy-paste mistake), the .ini file contains UserInstallation=$SYSUSERCONFIG/LibreOffice/4 Also, the batch file name should end in .bat not .bad
Fwiw, file://C:\Users\Admin0\AppData\Local\Temp\TestProfile with backslashes is not a valid URL, and it also lacks the (empty) host subcomponent, that should be file:///C:/Users/Admin0/AppData/Local/Temp/TestProfile instead.
@Eike - Thank you. Fixing the incorrect URI makes it work There remains a small bug in that the source of the error is mis-diagnosed as being a "corrupt C:\Program Files\LibreOffice\program\bootstrap.ini" when the error was actually in a passed-in environment variable. It might not be worth the trouble to keep track of the over-ride for diagnostic purposes, however. I'm going to mark this RESOLVED. Thank you for the help!