@echo off
title I3Fiskal Installer

echo Instalacija I3Fiskal servisa...
i3fiskal install --DisplayName="I3Fiskal proxy" --Startup=auto --Type=interactive --JvmOptions="-Dfile.encoding=UTF-8" ++JvmOptions="-Djava.library.path=%CD%" --Jvm="%CD%\jre\bin\server\jvm.dll" --Classpath="%CD%\i3fiskal.jar" --LogLevel=Debug --LogPrefix=i3fiskal-service --StdOutput=auto --StdError=auto --LogPath="%CD%" --StartPath="%CD%" --StartClass=hr.iii.fiskal.Proxy --StartMethod=windowsService --StartMode=jvm --StartParams=start --StopPath="%CD%" --StopClass=hr.iii.fiskal.Proxy --StopMethod=windowsService --StopMode=jvm --StopParams=stop

rem Kreiranje cmd datoteka za zaustavljanje, pokretanje i brisanje servisa

del Start-I3Fiskal.cmd > nul 2> nul
del Stop-I3Fiskal.cmd > nul 2> nul
del Remove-I3Fiskal.cmd > nul 2> nul
echo @echo off > Stop-I3Fiskal.cmd
echo title Stop I3Fiskal >> Stop-I3Fiskal.cmd
echo echo Zaustavljanje I3Fiskal servisa... >> Stop-I3Fiskal.cmd
echo i3fiskal stop >> Stop-I3Fiskal.cmd

echo @echo off > Start-I3Fiskal.cmd
echo title Start I3Fiskal >> Start-I3Fiskal.cmd
echo echo Pokretanje I3Fiskal servisa... >> Start-I3Fiskal.cmd
echo i3fiskal start >> Start-I3Fiskal.cmd

echo @echo off > Remove-I3Fiskal.cmd
echo title Remove I3Fiskal >> Remove-I3Fiskal.cmd
echo echo Brisanje I3Fiskal servisa... >> Remove-I3Fiskal.cmd
echo i3fiskal //DS>> Remove-I3Fiskal.cmd


echo Izmjena parametara 
mshta javascript:alert("I3Fiskal Install\n\nPo potrebi izmijenite parametre u datoteci i3fiskal.properties\n\npa pokrenite servis I3Fiskal !");close();

