Modifying startup parameters if your install and project directories are different
The following process assumes IDM/OpenIDM is installed as a Windows Service. If it is not installed, install it per: Installation Guide › Install IDM as a Service before proceeding with these steps:
- Launch a Command Prompt window and navigate to your install bin directory, for example D:\idm-7.0.0\bin.
- Enter the following command to display the Properties window, replacing IDM with the name of your service: prunmgr.exe //ES//IDM Make the following changes in the Properties window:
- General tab: ensure the path to the executable and the arguments are set correctly, for example, where D:\idm-7.0.0 is your install directory and IDM is the name of your service: D:\idm-7.0.0\bin\amd64\prunsrv.exe //RS//IDM
- Java tab: set the class path as follows: bin\*;framework\*
- Java tab: update the Java® options to include the following line, where D:\idm-7.0.0 is your install directory: -Dopenidm.system.server.root=D:\idm-7.0.0
- Startup tab: set the Working Path to your install directory, for example, D:\idm-7.0.0.
- Startup tab: set Method to start.
- Startup tab: set the arguments to the your project directory, for example, where D:\idm-7.0.0\project is your project directory: -c bin/launcher.json -p D:\idm-7.0.0\project It is important to put these values on separate lines as shown in this example.
- Check the other settings in the Properties window are correct and click Apply, followed by OK to save your changes.
- Start IDM/OpenIDM from the Services window and verify that it is working correctly.
This section covers some common issues you may encounter with this setup:
- Ignored logging changes
- Inconsistent 32-bit and 64-bit architectures
Ignored logging changes
If you make changes to the logging.properties file to change log levels and they are ignored, you should ensure you are updating the correct logging.properties file. If you have followed the above configuration to have separate install and project directories, you must edit the logging.properties file in the conf directory within your project directory (rather than the install directory).
Inconsistent 32-bit and 64-bit architectures
If you see an error similar to the following in the Windows Event Viewer:[2017-11-12 14:07:29] [error] %1 is not a valid Win32 application.
It means that prunsrv.exe is trying to load jvm.dll, which fails if the architectures do not match. To resolve it, you should ensure you are consistently using either 32-bit or 64-bit architectures for the ImagePath and the Java installation. In particular, check the following registry keys:
LOCAL_MACHINE\SYSTEM\ControlSet001\Services\IDM - this points to the ImagePath:
- 64-bit - bin\amd64\prunsrv.exe
- 32-bit - bin\i386\prunsrv.exe
- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\openidm\Parameters\Java - this points to the Java installation.
You can either change one of the registry entries, that is, either update the ImagePath or the path to the Java installation so they both point to 32-bit or 64-bit architectures consistently, update the Java tab in the Properties window (for example, by running prunmgr.exe //ES//IDM) or by initially setting the environment variable ARCH=i386 or ARCH=amd64 before running install.bat to install the server with the appropriate ImagePath.
If you cannot get your changes to work successfully, you should use regedit to export the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\IDM (replacing IDM with the name of your service) and attach the output when you raise a Support ticket.