Especially in multi-user environments it is very helpful if the JTL-Wawi Worker runs on the database server and is not started separately on any workstation. The requirements for this project are: “At system startup, the worker should start automatically as a service.” This results in the following solutions:

  1. Use the Windows task scheduler to create a task that will be started at system startup.
  2. Put the worker into the user’s autostart.
  3. Have the Worker start automatically as the “real” service at system startup.

Solution 2 is out of the question for me, because the corresponding user must be logged in to the server. The remaining solutions are 1 and 3. Solution 1 works, but unfortunately not completely stable, as I found out in practical use. Here it can happen again and again that the worker does not start cleanly and thus no adjustment takes place. Solution 3 again has the problem that the jtl-wawi.exe cannot be started as a service so easily and some parameters have to be specified. So I set out to find a stable running solution that would work cleanly even after an unexpected system reboot. Here is my approach.

The good old batch file is still the safest way to start an application automatically with parameters. The only problem is that such a batch file cannot be set up as a service. The startup method via task scheduling didn’t really satisfy me either. So there must be a way to start this batch file as a service at system startup even before a user logs on to the server. During my research on the Internet I came across the small tool “Non-Sucking Service Manager”, which can also be used to start batch files as a service. The current version can be downloaded here: https://nssm.cc/download

The following script is used as the basis for calling the worker. It is stored in the installation directory of the Wawi and saved as worker.bat:

@Echo off
cd C:\Program Files (x86)\JTL-Software\
JTL-wawi.exe WORKER Standard admin pass eazybusiness

Default* = Profile name when logging on to the Worker

admin* = user name of the user for logging in to the Worker

pass* = user’s password for logging in to the Worker

eazybusiness*= client in the profile of the logon to the Worker

*This information must be deposited!

Just copy the code to the clipboard and then copy it to an empty text file that you create with the edit location (notepad.exe). Now you just have to replace the identifier admin with the password pass in the code with your access data. Then save it in the installation directory of JTL-Wawi as worker.bat.

After downloading “No-Sucking Service Manager”, unzip the ZIP file and copy the nssm.exe file from either the 32-bit or 64-bit directory to the JTL-Wawi installation folder. This completes the preparations.

Now start the command prompt on the PC and change it to the installation directory of JTL-Wawi. Then enter the following command:

nssm install JTL-WawiWorker

2015-05-05 13_27_18-Administrator_ prompt

Under the name JTL-WawiWorker you will then find the service in the system administration under Services. When you have confirmed the entry with Enter, the following window opens:

In the Application tab, you must now specify the path to the batch file. You can do that by clicking on the three dots button.

Then switch to the Log on tab. Here you enter the user name and password of the local administrator under This Account:

Then click the Install service button to set up the service. Once you have received the message that the service has been successfully installed, you can close all windows and restart the server/PC.

If the service does not start automatically after the restart, this is probably because the user name or password was not stored correctly. This can also be adjusted later in the service settings. If everything is correct, it should look like the screenshot below:

Addendum

Rudolf Ring from Click-licht.de sent me a mail with the hint that he does without the batch file from step one and stores the arguments for the start of the worker directly in nssm and thus in the service. Of course, you can also do this as the screenshot he created shows:

Under Application Path the path to JTL-Wawi.exe is stored. The Startup directory then fills itself and does not need to be changed. In Arguments the start arguments are stored as described in the batch file.

Why a batch file?

The reason is relatively simple. If I do it the way Rudolf Ring described, the start parameters are stored in the service. In case of any changes, be it the password changes or JTL changes the parameters for starting the worker, I have to go into the service and make the changes there. With a batch file I have the advantage to make the changes there and also to test them without having to touch the service. Just stop service, merge changes, test and then start service again. That is the background why I have described here the way with a batch file.

Note: When updating JTL-Wawi, it is mandatory to stop the service, otherwise the update to a newer version will not work. The reason is that JTL-Wawi.exe is blocked by the service and will not be deleted upon uninstallation.

Do you have questions or need an individual offer? Do not hesitate to contact us.


    eBakery requires the contact information you provide to contact you regarding our products and services. You can unsubscribe from these notifications at any time. For information on unsubscribing, as well as our privacy practices and commitment to protecting your privacy, please see our Privacy Policy.*.

    • 0/5
    • 0 ratings
    0 ratingsX
    Very bad! Bad Hmmm Oke Good!
    0% 0% 0% 0% 0%

    Haben Sie Fragen oder brauchen ein individuelles Angebot? Zögern Sie nicht, uns zu kontaktieren.


      eBakery requires the contact information you provide to contact you regarding our products and services. You can unsubscribe from these notifications at any time. For information on unsubscribing, as well as our privacy practices and commitment to protecting your privacy, please see our Privacy Policy.*.

      Related Posts

      Leave a Comment

      Hat dir der Artikel gefallen?

      Dann melde dich doch zu unserem Newsletter an!

      Neben unseren Blog Themen informieren wir dich darin regelmäßig zu neuen Features und Tutorials