Register Apache OpenOffice

Importing Microsoft Word documents as policy documents requires third-party OpenOffice software. This software is included in the RiskVision Server Setup installer, but the registration process requires some additional configuration. On the Windows 2008, 2012, 2016, and 2019 servers, OpenOffice uses the RiskVision Tomcat service that is running with the LocalSystem account.

Register OpenOffice with the LocalSystem account, but human users are not allowed to log in as LocalSystem. The following steps will temporarily impersonate LocalSystem in order to register OpenOffice as this user so that the RiskVision Server can call the OpenOffice API in the future without permission problems.

To register OpenOffice on Windows 2008, 2012, 2016, and 2019 Server:

  1. Log in to the Windows 2008, 2012, 2016, and 2019 server where RiskVision Tomcat Application Server has been installed.

    1. Log in on the server as a user with Administrator privileges and open a command window; or

    2. Open a remote desktop session command window on the server. On your machine, open a command window and enter: mstsc/admin

      Enter your credentials for the remote desktop session. A command window opens when the connection is made.  

  2. Download PsTools from http://technet.microsoft.com/en-us/sysinternals/bb896649. Extract PsTools to the %AGILIANCE_HOME\Install directory.

  3. In the %AGILIANCE_HOME%\install\pstools\ directory, open a command window running under the Local System account with one of the following commands, depending on your version of Tomcat:

    • For Tomcat versions prior to 8.5.53: psexec -i -s cmd.exe

    • For Tomcat version 8.5.53 and above: psexec -d -i -u "NT Authority\Local Service" cmd.exe

  4. Click Agree to open a new command window. In this window, move to the %AGILIANCE_HOME%\OpenOffice\program directory and run soffice.exe

  5. This OpenOffice program will prompt for user registration. Because you appear to be LocalSystem rather than an ordinary user, (using Tomcat running as LocalSystem) will be the registered owner of the OpenOffice installation. Enter your registration information, complete the process, and exit.

  6. Close all open command prompt windows.

  7. Set the following property in the config\agiliance.properties file :

    com.agiliance.word.OpenOffice.program=<path to OpenOffice installation>

    For example, if %AGILIANCE_HOME% is C:\Server:

    com.agiliance.word.OpenOffice.program=C:/Server/OpenOffice/program

  8. Restart the RiskVision Tomcat service to show the latest changes.
Failure to register OpenOffice will result in a runtime error while importing the Word documents.

To register OpenOffice on Windows 2003 Server:

  1. Open a remote desktop session command window on the RiskVision Server. On your machine, open a command prompt window and enter : mstsc/admin

    Enter your credentials for the remote desktop session. A command window opens while the connection is made.

  2. Create a temporary service, which by default will run as LocalSystem. At the command line, enter: sc create testsvc binpath= "cmd /K start" type= own type= interact

  3. Start the service: sc start testsvc

    The error--[SC] StartService FAILED 1053-- is expected. A new command window, running as LocalSystem, will open.

  4. Switch to the new, LocalSystem, command window. Change the directory to the OpenOffice folder under Program Files. Run the command: soffice.exe.

    This OpenOffice program will prompt for user registration. Because you appear to be LocalSystem rather than an ordinary user, (using Tomcat running as LocalSystem) will be the registered owner of the OpenOffice installation. Enter your registration information, complete the process, and exit.

    Failure to register OpenOffice will result in a runtime error when importing Word documents.
  5. Close the LocalSystem command window. In the original command window, remove the temporary service by entering: sc delete testsvc

  6. Set the following property in the config\agiliance.properties file:

    com.agiliance.word.OpenOffice.program=<path to Open Office installation>

  7. Restart the RiskVision Tomcat service to apply the latest changes.