When i create a Batch-File and Compile it to an .exe file (with Bat to Exe Converter), i suffer from a problem that when i execute the .exe file of the Batch my AntiVirus pop-up as the file is a threat or a virus, but i don't have any malicious codes inside the file, just a normal Batch-File Game or something. Can someone please explain to me why is this happens and how to prevent it (Because if i uploaded the file to the Internet for the other users to use it can happen to them as what happened to me), And Thanks!
no cyber security expert, but i have experienced this as well. Also this happens if you use binary executable compression tools like UPX.
It seems that these tools add signature to the executable binary that make them be detected as virus by your Antivirus software heuristic algorithm.
I quickly googled to help you out, but it turns out this is a problem for over a decade now. Apart from simply not using these mechanisms if it is not necessary, https://superuser.com/a/1117751/428630 offers the advice to send your binary to the AV creator in question to report a false positive. good luck!
EBGreen in the comments was pretty much spot on. Antivirus programs like to play it safe with batch files wrapped in executables as they can be used to drop malware and whatnot.
The wrapper program itself is most likely safe, but it's the method that it uses that causes the antivirus to trip.
Instead of wrapping the batch file, just develop a program that launches it for the user, drop a shortcut file in the same folder, or if it doesn't need any special configuration, just ask the user to run the batch file directly. There already exists software out there that runs directly from batch scripts.