@cd C:\CADOSYS\Server\ 
@set binPath=C:\CADOSYS\Server

REM @set param=/DB=\"Data Source=(local)\Instance;Initial Catalog=CaptureThis_{KundenName};Persist Security Info=True;Integrated Security=true\" /Port=8732 /WF=localhost
@set param=/DB=\"Data Source=(local)\Instance;Initial Catalog=CaptureThis_{KundenName};Persist Security Info=True;User Id=Cadosys; Password=CadoSqlPass\" /Port=8732 /WF=localhost

@set user="domain\CaptureThis"
@set pass="password"

@set serviceName=CADOSYS-Supervisor
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Supervisor.Host.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-Observation
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Observation.Host.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%
REM pause
@set serviceName=CADOSYS-Input
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Station.Input.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-OCR1
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Station.Ocr.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-Erkennung1
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Station.Recognition.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-Export
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Station.Export.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-Statistic1
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Statistic.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-Statistic2
@sc Create %serviceName% binpath= "%binPath%\cadosys.Workflow.Services.Statistic.exe %param%" DisplayName= "%serviceName%" start= auto 
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@set serviceName=CADOSYS-ServiceGuard
@sc Create %serviceName% binpath= "%binPath%\cadosys.ServiceGuard.exe" DisplayName= "%serviceName%" start= delayed-auto  
@sc Config %serviceName% obj= %user% password= %pass%
@sc start %serviceName%

@sc failure %serviceName% reset= 86400 actions= restart/15000/restart/30000/restart/60000
REM nach 1 Tag = 86400 Sekunden den Resetzaehler zuruecksetzen - restart nach 15 Sekunden, nach 30 Sekunden und einer Minute

@echo Fenster wird in 5 Sekunden geschlossen.
@ping localhost -n 5 >NUL
@exit