Hallo MiThoTyN,

ich weiß nicht unter was ich da suchen muß!

ich hab jetzt mal folgendes probiert, aber kommt immer nur ganz kurz ein schwarzer Bildschirm!

Meine 2 Versuche:

@Echo off
cls
Echo Alarmierung
if %2="0"then -Fromname FW-xy-Gesamt
if %2="1"then -Fromname FW-xy-Kleinalarm
if %2="2"then -Fromnane FW-xy-DLK-Maschinisten
if %2="3"then -Fromname FW-xy-Probealarm
echo %3> c:\temp.txt
ansiasci c:\temp.txt c:\Alarm.txt /an /o
c:\Programme\baycom\poc32\clemail.exe -to danny-@gmx.de -from danny@gmx.de -smtpserver mail.gmx.de -popserver pop.gmx.de -popuser **** -poppass ***** -subjectfile c:\Alarm.txt -bodyfile C:\alarm.txt
wait 5


und

Echo off
cls
Echo Alarmierung
if %2="0"then text="Gesamt"
if %2="1"then text="Kleinalarm"
if %2="2"then text="DLK-Maschinisten"
if %2="3"then text="Probealarm"
echo %3> c:\temp.txt
ansiasci c:\temp.txt c:\Alarm.txt /an /o
c:\Programme\baycom\poc32\clemail.exe -to danny-@gmx.de -from danny@gmx.de -fromname FW-xy +"text" -smtpserver mail.gmx.de -popserver pop.gmx.de -popuser 211789 -poppass PASSWORT -subjectfile c:\Alarm.txt -bodyfile C:\alarm.txt
wait 5

Was habe ich verkehrt gemacht?

Wie kann das gehen?

Danny