djlastnight / KeyboardSplitterXbox

Creates up to 4 virtual xbox 360 controllers and feeds them via one or more keyboards.
493 stars 45 forks source link

Problem with the CLI call using C# #230

Open alejocp00 opened 1 month ago

alejocp00 commented 1 month ago

Hi and thanks for this app!

The problem

I'm currently in develop of an alternative interface for this focused on the CLI, in order to solve the input lag of the main GUI.

My problem is that whenever y run

Process.Start("KeyboardSplitter.exe", $"game={game}");

with a correct game name, the KeyboardSplitter start but just say that it cannot find the game.

Instead off run the game through this, I just create a start.bat file, with

File.WriteAllText("start.bat",$"KeyboardSplitter.exe game={game}");

And when I run the bat, KeyboardSplitter find the game and the game start properly.

In both cases, the line of splitter_log.txt that contains "Autostarting keyboard splitter game=", shows exactly the same game name (i will send both logs files).

I have the same problem when I try to run the start.bat file trough

Process.Start("start.bat");

It only works if I run the bat normally in windows explorer

Additional notes

I also noted that if I run the my app without admin privileges it show this exception, even when the KeyboardSplitter is not located in a system protected folder

My environment

.NET SDK: Version: 8.0.107 Commit: 1bdaef7265 Workload version: 8.0.100-manifests.c915c39d

Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.107\


The repo is here

my_program splitter_log.txt start.bat splitter_log.txt