How to start Servoy Server when Windows Starts up

Hi,

Could anyone tell me how to start Servoy Server when windows starts up. I mean like a service does.

I´m talking about a Win2008 Server.

Thanks in advance.

Did you install Servoy with the ‘install service’ option checked?

Juan,

in the application_server folder you will find a folder: services
(if you don’t have that folder, you did’nt selected that in the installer. Just run the installer somewhere with that option selected, on your local machine, and copy over the that folder, to your windows server!)
there you have bat file named uninstall_windows_service.bat

duplicate that one and call it install_windows_service:
and change the bat file to this:

cd..
"%CD%\service\Wrapper.exe" -i "%CD%\service\wrapper.conf"

ofcourse the wrapper.conf is involved here:
there are a few lines that you need to check for fixed folder path’s

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=D:\Servoy\Servoy5\application_server\service

# Java Additional Parameters
wrapper.java.additional.1=-Djava.awt.headless=true
wrapper.java.additional.2=-Duser.dir="D:\Servoy\Servoy5\application_server"
wrapper.java.additional.3=-XX:MaxPermSize=128m

Also in the same file, you can choose a service name you want:

#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=MyService

# Display name of the service
wrapper.ntservice.displayname=MyWonderFull Application Server

# Description of the service
wrapper.ntservice.description=MyWonderFull Application Server

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Priority at which the service is run.  NORMAL, LOW, HIGH, or
#  REALTIME
wrapper.ntservice.process_priority=NORMAL

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

if the settings are correct run the bat file: install_windows_server.bat
that will create the services for the Servoy Server

Hi,

and don´t forget the Patrick’s tip to add a service dependency (for wait for the db service).

Hi Victor I have tried to follow Patrick´s tip, but when registering the postgre service I get the error 1057. I have run command window as an administrator

Here is the command I´m using: pg_ctl register -N PostgreServoy -U DBA -P DBA -D \servoy\application_server\database -l \servot\application_server\postgres_db\postgres_log.txt

The paths are the same I´m using.

Any clue?

Thanks.

Thanks Harjo.

I will try your instructions but I´m having troubles registering postgreSQL service.

Will let you know as soon as I solve the DB problem.

jasantana:
when registering the postgre service I get the error 1057

It’s the ERROR_INVALID_SERVICE_ACCOUNT, so the account name is invalid or the password is invalid for the account name