batch file is a script file used to automate tasks in Windows.You don't need to modify the software running on the printer. Like I mentioned before just write the barcode to a ".txt" file and print the ".txt" file with a ".bat" file or in any other way you want.
If I'm not wrong , Printing can also be controlled from within Batch Script via the NET PRINT command

