Libreoffice As Service
LibreOffice is a free and open source office suite, developed by The Document Foundation. It was forked from OpenOffice.org in 2010, which was an open-sourced version of the earlier StarOffice. The LibreOffice suite comprises programs for word processing, the creation and editing of spreadsheets, slideshows, diagrams and drawings, working with databases, and composing mathematical formula.
Here we will discuss how to make LibreOffice as service.
LibreOffice windows service creation steps:
Pre-requisites: Download and Install the windows resource kit which provides two utilities, Srvany.exe and Instsrv.exe, that allow for the creation of a user-defined service.
1. The following steps will allow for the creation of a user-defined Windows NT service:
Step by Step Example:-
1. Copy srvany.exe and instsrv.exe to your Windows\System32 directory, or for windows 64-bit systems copy to the folder C:\WINDOWS\SysWOW64
2. Select a name for your service, LibreOffice4.1 for instance, and install it as a new service by typing the following at an MS-DOS prompt as an administrator:
INSTSRV LibreOffice4.1 C:\windows\system32\SRVANY.EXE (Modify path as necessary)
If the new service is created successfully, the following message should be received:
The service was successfully added! Make sure that you go into the Control Panel and use the Services applet to change the Account Name and Password that this newly installed service will use for its Security Context.
3. On the taskbar, click the Start button, point to Settings and click Control Panel.
4. In the Control Panel, double-click the Services icon.
5. Select LibreOffice4.1 from the lists of services.
6. If you want your service to start every time you boot your machine, select Automatic for Startup Type in the Service dialog box. Otherwise, select Manual or Disabled. If you select Manual, you will need to go into the Services utility, select the service, and click the Start or Stop button every time you want to start or stop the service.
7. In the service property window Log On tab Log on as area, click Local System Account, select “Allow Service to Interact with Desktop,” and then click Apply and Ok button.
8. Click Close to close the Services control panel.
9. Open notepad and put below content exactly inside the file and save it as LibreOfficeregistry.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LibreOffice4.1] "Type"=dword:00000110 "Start"=dword:00000002 "ErrorControl"=dword:00000001 "ImagePath"=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,\ 5c,00,53,00,79,00,73,00,57,00,4f,00,57,00,36,00,34,00,5c,00,73,00,72,00,76,\ 00,61,00,6e,00,79,00,2e,00,65,00,78,00,65,00,00,00 "DisplayName"="LibreOffice4.1" "WOW64"=dword:00000001 "ObjectName"="LocalSystem" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LibreOffice4.1\Parameters] "Application"="\"C:\\Program Files (x86)\\LibreOffice 4.1\\program\\soffice.exe\" --headless --nofirststartwizard --accept=\"socket,host=0.0.0.0,port=8100;urp;StarOffice.Service\""
Notes:
– Update the C:\\Program Files (x86)\\LibreOffice 4.1\\program\\soffice.exe to your original installed path. Make sure you separate each folder name with double slashes only, keeping every other details in above exact as seen in screenshot.
– here the port number to listen as service is provided as 8100 you can change to any other port as required.
– Be mindful about the escape characters used and keep the change limited to only the path location of installed soffice.exe file to avoid unexpected errors.
10. Right click on the LibreOfficeregistry.reg file and click on merge to add the entries into registry.
11. On the taskbar, click the Start button, and then click run.
12. In the Run dialog box, enter “Regedit” (without the quotes) and click OK.
13. Expand the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LibreOffice4.1\Parameters and make sure below string is available exactly.
"C:\Program Files (x86)\LibreOffice 4.1\program\soffice.exe" --headless --nofirststartwizard --accept="socket,host=0.0.0.0,port=8100;urp;StarOffice.Service"
Note: Path to soffice.exe might come different according to your environment.
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.