Running dcm4chee PACS as a Windows service or daemon

dcm4chee logo


Running dcm4chee as a Windows service or daemon will enable dcm4chee to run during start up and in the background without user intervention. You don’t need to click ‘run.bat’ file found under apps/dcm4chee-mysql-2.14.x/bin every time you want to start the PACS server.


Here are the steps with pictures on how to accomplish that. Please make sure everything is running correctly before doing this step. (This tutorial is a continuation on the previous tutorial)

First,  execute install.bat

Open the command prompt from Start>Run
Type cmd and press Enter

Navigate to C:\apps\dcm4chee-mysql-2.14.7\bin
Type install_service.bat

You will get different options (client, server, uninstall)
dcm4chee install_service.bat


Since we will be running dcm4chee as PACS server, we will select the server option. Type ‘install_service.bat server’ without quotes and press Enter.


To avoid the error message: “The specified module could not be found.”, “Failed creating java …\jvm.dll”  which can be seen by going to Windows Event Viewer (usually happens with JDK6)


we need to do an extra step. We need to point the missing dll files to Java. Click on Start>Right click on Computer (or My Computer in XP) and select Properties.
From the left sidebar select Advanced system settings>click on Environment Variables.  Under System Variables click New. For variable name use JAVA_HOME and in Variable value put C:\Program Files\Java\jdk1.6.0_17


We need also to add %JAVA_HOME%\bin to the system PATH environment variable, so java could find file mscvr71.dll


Make sure you include ; before %CommonProgram…. This will ensure proper formatting.
Reboot your computer and login to Windows. Open your web browser and type the following URL:

http://localhost:8080/dcm4chee-web

Congratulations!!


If for any reason you want to stop the service, go to Start> right click on Computer>Manage. Go to Services and in the list you will see dcm4chee service. It should say Started.


You can right click on it and select Stop.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

11 thoughts on “Running dcm4chee PACS as a Windows service or daemon

  1. thanks for the tutoriel.DCM4CHEE is runnig in my PC very well(windows 7)
    but when i try this command “install_service.bat server” i have this message

    ‘JavaService.exe’ is not recognized as internal command or external, operable program or batch file.

    i think the problem is my variable system .i have that:

    variable : value
    JAVA_HOME : C:\Program Files\Java\jdk1.6.0_17
    Path : %JAVA_HOME%\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS……..

    thanks

  2. when i change my JAVA_HOME value for that C:\Program Files\Java\jdk1.6.0_17\bin in user variable
    i had the following msg

    “Could not locate C:\Program Files\Java\jdk1.6.0_17\bin\jre\bin\server\jvm.dll. Please check that JAVA_HOME is set to your
    JDK 1.5 installation directory”

  3. If you get ‘JavaService.exe’ is not recognized as internal command or external, operable program or batch file. Then it means the file is corrupted. Since you tried to execute the command from
    C:\apps\dcm4chee-mysql-2.14.7\bin

    Then you need to download dcm4chee-mysql-2.14.7 again. Extract it and replace the old folder with the new one.
    If you got the missing jvm.dll error just make sure you did the steps in the tutorial correctly. Reboot Windows and test. See if the problem is still there. Good luck!

  4. Very nice tutorial. I was able to set up my DCM4CHEE server without issue. I am able to access the web interface. The problem I am getting is when I try to setup as a service. I get
    Error attempting to install DCM4CHEE Image Archive service.
    Access is denied. I installed all the same version as the tutorial except the Java installer (jdk-6u18). Any ideas? Thanks

  5. If you install a different version of the Java library make sure that the path is correct for the version you have. As you can see from the tutorial the path is linked to the Java version number which is in this case
    C:\Program Files\Java\jdk1.6.0_17

  6. I have the path at C:\Program Files\Java\jdk1.6.0_18. I find it strange that I can run the image server from the run.bat. but I am getting an access is denied error when I try and build the service. Any other thoughts on why this might be giving me this error? Thanks.

  7. Hello, thanks for the example, your help to be really useful!
    I have a problem:

    C:\apps\dcm4chee-2.17.0-mysql\bin>install_service.bat server
    Error attempting to install the DCM4CHEE Image Archive service
    Accesso negato.

    Error attempting to install DCM4CHEE Image Archive service
    Accesso negato.

    C:\apps\dcm4chee-2.17.0-mysql\bin>

    Can You Help me?