I was trying to recreate the sourcecode for a launcher to a game I made that requires making and launching a .bat file. When it came time to wrap up the appended lines into a .bat, I found this error. I have researched, thoroughly even. The reason I am asking myself is because none of the answers I came across matched my case. The batch sets variables, echoes some text, then will launch the game. Here's the code, thank you for helping me. I will add more information if you need it, I'll be as helpful as I can.
sb.AppendLine("@echo off")
sb.AppendLine("set ttiUsername=" + username)
sb.AppendLine("set ttiPassword=password")
sb.AppendLine("set TTI_GAMESERVER=10.0.0.77")
sb.AppendLine("set TTI_PORT=7198")
sb.AppendLine("set /P PPYTHON_PATH=<PPYTHON_PATH")
sb.AppendLine("echo ===============================")
sb.AppendLine("echo Welcome to Toontown Rebuilt, %ttiUsername%!")
sb.AppendLine("echo You are connecting to server %TTI_GAMESERVER%!")
sb.AppendLine("echo The server port is %TTI_PORT%")
sb.AppendLine("echo ===============================")
sb.AppendLine("%PPYTHON_PATH% -m toontown.toonbase.ToontownStart")
Dim File As New System.IO.StreamWriter
File.WriteLine(sb.ToString())
Process.Start("C:\Toontown Rebuilt Source\ToontownRebuilt\Launcher.bat")