How to run LibreOffice as a service on Windows 7

Did anybody successfully create a service to run LibreOffice as a service on Windows 7 ?

I did follow these directions, using this string for AppParameters value:

"C:\Program Files (x86)\LibreOffice 3.5\program\soffice.exe" -accept="socket,host=0.0.0.0,port=8100;urp;StarOffice.ServiceManager" -headless -nodefault -nofirststartwizard -nolockcheck -nologo -norestore

The service appears in the services.msc screen, but, when started, it fails after few seconds with error 1053 (timeout).

The same error occurs when using the uffical “sc create service” method…

Why would you want to do this anyway?

for example to to a batch conversion of 1000 LO files to pdf.
I’m writing a thesis with latex, but do my graphics with LO. So it would be handy to have a script to convert those all in one batch.
see this project: GitHub - mirkonasato/pyodconverter: Python script to automate document conversions using LibreOffice/OpenOffice.org
Unfortunately, the technique described there doesn’t work for LO4

edit:
there is a simpler way to solve my problem: use the --convert-to command line parameter…

soffice.exe --headless --convert-to pdf --outdir “C:\tmp” “C:\tmp\file.odg”

@rafik I think this is a better way to achieve what you want. Services are typically for things that need to be running all the time; not for batch jobs that exit when done.

I’m equally unenlightened about why one would want to run LibreOffice as a service.

If you want to be able to run one of LibreOffice applications without having to wait for the whole package to initialize every time, you could do what I do: enable the Quicklauncher: from the LibreOffice main menu or from any LibreOffice application, under Tools | Options, expand the “LibreOffice” part of the menu, then click on “Memory”. On that page is “Load LibreOffice during system start-up.” If that is checked, the next time you start up Windows 7 or run a LibreOffice application, the Quicklauncher will be started and there will be an icon in the “notification area” (right end) of the task bar. Then when you right+click on the LibreOffice icon in the notification area, you can pick which LibreOffice applicaiton you wish to open, and it will open faster than if the whole program had to be started up from scratch.

If you do not see “Load LibreOffice during system start-up” when you go into Tools | “Options” → LibreOffice → Memory, it could be that the quickstarter wasn’t installed, which means running the installer again and this time manually selecting the quickstarter (quickstart.exe) to be installed.

This is the way I normally run LibreOffice since I am updating a document or spreadsheet more often than I reboot this machine and I normally have too many things open to get a clear shot of the desktop icons (short of hitting a “show desktop” that minimizes everything else).