Jump to content
LaunchBox Community Forums

Bulk edit additional apps or possible other way?


drewjbx

Recommended Posts

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 by drewjbx
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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. :D

Link to comment
Share on other sites

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. :D

 

 

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"

 

  • Game On 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...