drewjbx Posted October 21, 2021 Share Posted October 21, 2021 (edited) So I have an 4 Player arcade cab..... when I want to use gamepads it will show up as player 5 and 6. This is a problem in RetroArch as the game controller order stays the same and cannot be switched (unless I missed something) I have a 2 powershell scripts that disables and enables all 4 joysticks. So let's say N64 I want to use gamepads, I just need to launch the script pre and post for each game but obviously that would take a long time to edit each and every game. I did not see an option in bulk edit for additional apps, I thought it would have been added by now. Is there another way I can do this? <AdditionalApplication> <Id>351fbb05-88f5-47ec-a813-6bf6588b5d03</Id> <PlayCount>1</PlayCount> <GameID>a6ca06d7-3e6a-48ca-a129-4e2a7dc3583f</GameID> <ApplicationPath>..\Tools\Scripts\[ DISABLE JOYSTICKS ].lnk</ApplicationPath> <AutoRunAfter>false</AutoRunAfter> <AutoRunBefore>true</AutoRunBefore> <CommandLine /> <Name>Disable Joysticks</Name> Edited October 21, 2021 by drewjbx Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted October 22, 2021 Share Posted October 22, 2021 18 hours ago, drewjbx said: Is there another way I can do this? This might help. And then if something gets messed up during that process.. 1 Quote Link to comment Share on other sites More sharing options...
Krakerman Posted October 22, 2021 Share Posted October 22, 2021 Request: Be nice to add an icon to the menu for this plugin. Quote Link to comment Share on other sites More sharing options...
drewjbx Posted October 22, 2021 Author Share Posted October 22, 2021 7 hours ago, JoeViking245 said: This might help. And then if something gets messed up during that process.. Thankyou! Very handy. Now I just need to figure out a clean way to launch the script as LB is bypassing the batch file shortcut resulting in the command window showing and taking focus. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted October 22, 2021 Share Posted October 22, 2021 9 minutes ago, drewjbx said: [keep] the command window [from] showing and taking focus. The easiest (well, only) way I've found to "hide" running PS scripts is to create shortcuts to them. Then edit the shortcut(s) (right-click, properties). In Target: add the full path to your powershell.exe to the beginning on the line (put quotes around it if there're spaces in the path) , then add -ExecutionPolicy Bypass -File And then at the end, add -WindowsStyle Hidden C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "F:\Misc\Toggle Internet\ToggleInternet.ps1" -WindowsStyle Hidden So here, "F:\Misc\Toggle Internet\ToggleInternet.ps1" is what was originally in the Target: field. Your actual path to powershell.exe may be different. Who knows what I got going on here. lol Next click Advanced... button and check Run as administrator and click OK. Lastly, change Run: to Minimized. Click OK. Now direct LaunchBox to those shortcuts. Good luck and enjoy. Quote Link to comment Share on other sites More sharing options...
drewjbx Posted October 22, 2021 Author Share Posted October 22, 2021 9 minutes ago, JoeViking245 said: The easiest (well, only) way I've found to "hide" running PS scripts is to create shortcuts to them. Then edit the shortcut(s) (right-click, properties). In Target: add the full path to your powershell.exe to the beginning on the line (put quotes around it if there're spaces in the path) , then add -ExecutionPolicy Bypass -File And then at the end, add -WindowsStyle Hidden C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "F:\Misc\Toggle Internet\ToggleInternet.ps1" -WindowsStyle Hidden So here, "F:\Misc\Toggle Internet\ToggleInternet.ps1" is what was originally in the Target: field. Your actual path to powershell.exe may be different. Who knows what I got going on here. lol Next click Advanced... button and check Run as administrator and click OK. Lastly, change Run: to Minimized. Click OK. Now direct LaunchBox to those shortcuts. Good luck and enjoy. The last option '-WindowsStyle Hidden' is what was missing from my batch file. Thanks again! C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "D:\Tools\Scripts\Disable Joysticks.ps1" 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.