:: Installations- und Update-Batch fuer das Programm JHH5 (c) 1996-2017 W. Kuehl @echo off if exist Temp goto Download1 md Temp :Download1 if exist Anwendung-0.1.jar goto Download2 echo 1. Installation call :Download goto Download3 :Download2 echo Update call :Download del Leer*.* :Download3 :Pruefen1 if exist log4j.properties goto Pruefen2 copy Leerlog4j.properties log4j.properties :Pruefen2 if exist ServerConfig.properties goto Pruefen3 cd >cd.txt gawk-3.1.6.exe "BEGIN{getline p<\"cd.txt\";gsub(/\\/,\"/\",p);}{sub(/jdbc:hsqldb:file:~\/hsqldb\/JHH5/,\"jdbc:hsqldb:file:\"p\"/hsqldb/JHH5\");print}" LeerServerConfig.properties >ServerConfig.properties del cd.txt :Pruefen3 if exist hsqldb goto Pruefen4 md hsqldb :Pruefen4 if exist hsqldb\JHH5.properties goto Ende copy LeerJHH5.properties hsqldb\JHH5.properties copy LeerJHH5.script hsqldb\JHH5.script goto Ende :Download echo Download if exist temp\zip rmdir /s/q temp\zip mkdir temp\zip powershell -command "& { (New-Object Net.WebClient).DownloadFile('http://cwkuehl.de/wp-content/uploads/2016/07/JHaushalt-5_1.zip', 'temp\zip\jhh5.zip') }" echo Unzip powershell -command "& { function unzip($filename) { if (!(test-path $filename)) { throw \"$filename does not exist\"; } $shell = new-object -com shell.application; $shell.namespace($pwd.path).copyhere($shell.namespace((join-path $pwd $filename)).items(), 0x14); } unzip('temp\zip\jhh5.zip'); }" del temp\zip\jhh5.zip rmdir /s/q temp\zip goto :eof :Ende del *.sh call #JHH5.cmd :: pause