haimgel / display-switch

Turn a $30 USB switch into a full-featured multi-monitor KVM switch
https://haim.dev/posts/2020-07-28-dual-monitor-kvm/
MIT License
2.83k stars 110 forks source link

windows 10, app refuses to start #82

Open kurktchiev opened 2 years ago

kurktchiev commented 2 years ago

on first run i got the SmartScreen popup asking me if i was sure, which i said I was. I put my ini file in the correct location and started the binary, but nothing comes up in Task Manager. Put it in the startup folder and rebooted for good measure, it is still not starting and no log file is being generated.

jrr commented 2 years ago

Have you tried running it from a command prompt?

kurktchiev commented 2 years ago

That I have not yet

stevegore commented 2 years ago

FWIW I have it running by adding it to a Windows batch file, and adding that batch file to the start up folder. Have yet managed to get it to start minimised though so it's not the best.

LegendaryB commented 10 months ago

FWIW I have it running by adding it to a Windows batch file, and adding that batch file to the start up folder. Have yet managed to get it to start minimised though so it's not the best.

My solution was a launcher.bat + a helper vbs script. Here you go:

hidecmd.vbs CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

launcher.bat wscript "hidecmd.vbs" "display_switch.exe"

I decided to execute the launcher.bat via registry instead of adding it to the startup folder. At startup the cmd window can be seen for a short time but afterwards its hidden. Maybe 1 second visible