:: @echo off 
sc stop "IN.Midy.Application.MSC" 
sc delete "IN.Midy.Application.MSC"
echo *** New Service 
%~d0
cd %~dp0
sc create "IN.Midy.Application.MSC" binPath= "%cd%\TAME3S.Midy.Application.exe" start= auto
sc description "IN.Midy.Application.MSC" "IN Midy Application - MSC"
sc start "IN.Midy.Application.MSC" 
sc failure "IN.Midy.Application.MSC" reset= 0 actions= restart/0/restart/0/restart/0 
pause