I created my own menu and launcher for my game, so I need to launch the standalone EXE file from my menu. My code for launching the game is the following (vb.net):
Dim pProcess As New Process
pProcess.StartInfo.FileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) & GeneralPaths.MapGhostTown 'This returns the path to the standalone file, relative to the location of the program. This is a correct path, because the game actually starts, the error comes from within the standalone file.
pProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
pProcess.Start()
First I thought it had something to do with the focus (because I sometimes had problems when going out of a running executable game, and that would give me an error), but I am quite sure that the standalone I launch instantly gets focus when using the process.Start() method, so I don't think that is the problem. I also tried launching the executable using cmd:
start "" "path_to_file"
But that also gives me the same error (Runtime error 3002, no more information is supplied in the messagebox).
Has anyone else encountered this problem? Or does anyone know how I can fix this, or work around the problem?