the batch esential is the folowing line
sqlcmd -S DESKTOP-4TQK0H9\SQLEXPRESS -U %Username% -P %Password% -d %Database% -Q "BACKUP DATABASE %Database% TO DISK = '%BaseFolderPath%\%Database%.bak' WITH NOFORMAT, INIT, SKIP, NOREWIND, NOUNLOAD, S
in another normal winform batch file is running withoout problem.