runnable batch file code example

Example 1: launch batch in background

Copy in .VBS file:
Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "<YOURFILE>.bat" & Chr(34), 0
Set WshShell = Nothing

launch vbs file and here you go

Example 2: how to run bat file without effect main code

import subprocess
from subprocess import Popen
import time
from multiprocessing import Process,freeze_support

def run_batfile(name='world'):
	subprocess.call(["launch_pg.bat"])

if __name__ == '__main__':
	# freeze_support()
	p = Process(target=run_batfile)
	p.start()
	# p.join()	
	count = 0
	while True:
		count+=1
		print(count)
		time.sleep(1)