Jump to content
LaunchBox Community Forums

BigBox Shell Setup Questions: Startup programs and system controls


jiveturkey458

Recommended Posts

[Edit: SOLVED (sort of) - see my reply below. Warning: Registry editing involved, high risk variable]

This is a question for folks that have experience setting up BigBox as their startup shell, either through regedit, group policy, or other third-party methods.

After I set BigBox to my shell variable in regedit, I was pleased to see that it booted directly in, but I quickly discovered that I had lost keyboard control of my volume, and that JoytoKey (in my startup folder) was not working for the one game I have it configured for (Pokemon Uranium). I dug around in the forums and only found one link that even partially referenced my startup program issue near the end of the thread, but there didn't seem to be an answer (or at least a clear enough one for me to follow).

My guess is that since explorer.exe isn't running as the default shell, it doesn't run certain services related to it, like volume control via keyboard, startup folder items, etc. Has anyone else run into this issue, and if so, how did you resolve it? Is there some way I can enable services that are native to the default shell to run with BigBox?

Thanks in advance for any help or advice regarding this issue!

Edited by jiveturkey458
Link to comment
Share on other sites

  • 2 weeks later...

So I thought I would update the room on where I have landed on this.

I discovered that I was correct about certain services not running if explorer doesn't open up. I also found that the programs that I wanted to run could be opened from Task Manager via Ctrl+Alt+Del, but I didn't want to manually run a bunch of stuff in that manner for my setup every time I booted up, so I dug further.

It turns out that one can add startup items directly to the registry, as outlined here. However, these still do not start without the traditional Windows shell; some are actually direct links to the startup programs one would add via Task Manager/msconfig. I did find one more option that seemed like it would work, though, so I tried it: adding program paths to the Userinit variable, under the Winlogon key that one would edit to change their shell. As long as you leave the userinit.exe path in place, I found that you could add other program paths there, with special arguments, too (C:\blah\blah\steam.exe -silent, for example). I added my programs before the userinit exe, so that Userinit runs after the rest.

This path is risky - I only discovered it from one site that helped with removing startup items, and elaborated on by sites that help people look for viruses in their registry keys, so be careful not to remove the default value of the variable from Userinit. That being said, I have Steam, GOG, and JoyToKey starting before I even log in.

I never implemented a fix to the media keys for volume control; I ended up setting the system volume at 50%, and am using the knob on my speakers for now. I did see in another thread that AutoHotKey would work for that, but I haven't tried it yet.

I really hope this helps other people out with setting up their gaming boxes.

Link to comment
Share on other sites

  • 1 year later...

Hi, 

I just got LaunchBox, BigBox setup and went the same route for my Arcade Cabinet (change the shell to BigBox).  Ran into the same volume control thing and was just about to give up as well.  After digging around, I found that the Controller Automations in BigBox call the explorer dependent APIs for volume control.  "Volume_Up", "Volume_Down", "Volume_Mute".  You get that nice Volume OSD which indicates the volume level.  These are made possible by the Windows Shell Experience which is part of the explorer shell.  But since we're not launching explorer, this doesn't work at all.  

However, since all the other required Audio services (AudioSrv) are automatically launched by windows, its just a matter of scripting at this point.  My workaround was to first roll my own AHK script that polls a "Hotkey" and the Joystick XY axes and sends the correct API call.  One of the things I looked at while Googling, was to run the AutoHotKey executable as a service.  You can't run the executable directly as a service, but you could use a commercial program "AlwaysUp"  https://www.coretechnologies.com/products/AlwaysUp/Apps/RunAutoHotkeyAsAWindowsService.html

I tried it. It works.  But it costs $49 for a 1 user license.  You get a 30 day trial, but I didn't think I needed all the bells and whistles just for some volume control.  Someone might have interest in it, but it was a bit much for my purposes.

Which led me to Windows Task Scheduler (already comes with Windows 10).  Here is my AHK script (probably could be better, but it works).  You can either launch it with AutoHotKey.exe or if you have AutoHotKey installed, just compile it and run it standalone. 

#Persistent  ; Keep this script running until the user explicitly exits it.
SetTimer, WatchAxis, 5
return

WatchAxis:
JoyX := GetKeyState("JoyX")  ; Get position of X axis.
JoyY := GetKeyState("JoyY")  ; Get position of Y axis.
JoyHoldDownPrev := JoyHoldDown  ; Prev now holds the key that was down before (if any).

if (JoyY > 70 and GetKeyState("Joy10") )
{
    JoyHoldDown := "Down"
	SoundSet -1  ; Decrease master volume by 1%
}
else if (JoyY < 30 and GetKeyState("Joy10") )
{
    JoyHoldDown := "Up"
	SoundSet +1  ; Increase master volume by 1%
}
else if (JoyX < 30 and GetKeyState("Joy10") )
{
    JoyHoldDown := "Left"
	if (JoyHoldDown = JoyHoldDownPrev)  ; The correct Left Joystick is already down (or no key is needed).
        return  ; Do nothing.

	; Otherwise, the left stick was previously released
	SoundSet, +1, , mute  ; Toggle the master mute (set it to the opposite state)
	
	SoundGet, master_mute, , mute
	SplashTextOn, , , Master Mute is currently %master_mute%.
	sleep 2000
    SplashTextOff
}
else
    JoyHoldDown := ""


return

 

Then tell Task Scheduler to run it when anyone logs on.

WindowsKey + r  ; taskschd.msc

Create a Basic Task (Right Pane).  Give it a name

image.thumb.png.fc42c432d8327ccdc06ea0716e13d473.pngOn the next screen, select when computer starts or log on. We have to modify it later so either one works for now

image.thumb.png.16b3a5763ef2e38903ddabe972258adc.pngSelect "Start a Program"

image.thumb.png.4cccc37b3916a3b4cace8dbabc971d69.pngOn the next screen, simply browse for you executeable

image.thumb.png.52cf185612adac1b36bd2aeac497aa2e.pngHit next, and be sure to check the checkbox at the bottom before hiting finish

image.thumb.png.43d3fef4fdbf783e582951692361c6aa.pngIn the next dialog, go over to the "Triggers" tab and click edit at the bottom

image.thumb.png.06c5ddd2abb0592678f0b522c5e3d266.pngIn the "Begin Task" dropdown, change it to "At Log on".  Set the radio button to "Any User" or to a Specifc User if you'd like. Then hit ok. 

image.thumb.png.9a37a6e4816d2b9350675cf9549fb5a7.pngGo over to the "Settings" tab, and uncheck the "Stop the task if it runs longer than..." checkbox.

image.thumb.png.45652d585ac9b4815b0ca81dca5c38e9.pngHit okay, and you should see your new scheduled task in the top pane.

image.thumb.png.6e649a149530aaa1853fb42654619df3.pngReboot into your BigBox shell and thats it.  Volume control.

 

  • Like 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...