Jump to content
LaunchBox Community Forums

How to force startup on a specific platform?


Xpendable

Recommended Posts

I have about 8 platforms on my system.  I also have an automatic system reboot configured for 6:30am daily.  I've noticed that BigBox saves the last platform the user was in only if BigBox is user-exited.  If the system gets rebooted by the OS, BigBox does not remember this was the current platform and reverts back to what it was set to when  BigBox was last user-exited.

I want to have BigBox ALWAYS start with my MAME platform, and I do not want to disable the other platforms.  Is there any way to force this regardless of which was the last platform when BigBox was user-exited?  Or can BigBox be changed to save the current platform whenever it changes (and do a flush so that this gets written immediately and not cached by the .NET filesystem)?

Or is there a command-line argument that I could pass to force it to a specific platform on startup?

Link to comment
Share on other sites

1 hour ago, Xpendable said:

is there a command-line argument that I could pass

No.  There are no command line options available.

1 hour ago, Xpendable said:

Is there any way to force this regardless of which was the last platform when BigBox was user-exited?

This is a stretch, I only tested it only once, you won't be able to save any [subsequent] changes to BigBox (theme, view, button assignments...) but.... it appeared to work.

...after adjusting any applicable settings you need, being in the Platform you want to start in and exiting BigBox.....   Go to your   ../LaunchBox/Data/   folder and set "BigBoxSettings.xml" to Read Only. 

There shouldn't be any ill side affects, but I have been wrong before.  But I usually do pretty good. ;) 

Link to comment
Share on other sites

That gave me an idea.  If I can figure out where the last viewed platform is actually stored (and this seems to be not obvious to me as of yet - I've scanned all of the XML files a couple of times and don't see where this is saved), I could write a C# program that starts before BigBox that changes the last viewed platform to my desired value, saves the file, then closed.  Then BigBox would launch.  (I'd wrap both of these program in a batch file so they run in sequence).  Then no matter what, BigBox will always start with my desired platform.  I just have to figure out where this value is stored.  I might have to use some file watchers to see what changes between runs.

Link to comment
Share on other sites

1 hour ago, C-Beats said:

BigBoxSettings.xml. Field you are looking for is <LastPlatform>

Thanks, yes, that's it.  I didn't see it because it was missing from my file when I checked because I had turned off the RememberLastPlatform feature and then turned it back on, but instead of exiting BigBox, I rebooted (via the Reboot command in BigBox)... It didn't write out the LastPlatform value.  But when I exited it out normally, I checked the file, and it was indeed written.  So I'll just write my code to insert the node if it is missing, and change the value to my intended platform "MAME" when it is already present. 

Link to comment
Share on other sites

I've implemented this as a program and it is working.  Here's the source code (and compiled EXE) that you can download in GitHub.  Use at your own risk.

https://github.com/Xpendable172/BigBoxLauncher

You will need to edit the BigBoxLauncher.exe.config file and update the path to your BigBoxSettings.xml, and you will need to edit the LastPlatform entry in BigBoxLauncher.exe.config to the name of your platform that you want to force BigBox to use as LastPlatform.  Case matters!  Not sure what will happen to BigBox if you misspell the entry.  

Also, this program does not ACTUALLY launch BigBox.  It could easily be done but I felt that was overkill for what I needed.

Edited by Xpendable
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...