mGalaxy forum

General Discussions => Need Help? => Topic started by: AnimeFan95 on June 29, 2017, 12:19:20 PM

Title: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on June 29, 2017, 12:19:20 PM
Hello.

First of all,  I want to say thank you very much for inventing 'mGalaxy'. It is an incredible frontend and I could not ask for a nice and simple user interface for my arcade cabinet.

I do have one question though if anyone doesn't mind. I am running 'mGalaxy' as a 'Custom User Interface' on Windows 10. This makes it so that the 'mGalaxy.exe' process starts instead of 'explorer.exe' (https://technet.microsoft.com/en-us/library/cc975911.aspx). Now with "explorer.exe" (Windows Explorer), you can run certain programs on startup. I do not know how to do this with the "Custom User Interface" policy. I wish to run the 'JoyToKey' program in background when 'mGalaxy' starts. Does anyone know how to run an additional program or .exe process on a 'Custom User Interface'?

I know this is a silly question to put on here since its Microsoft Windows related, but I want to achieve this so that I can navigate through the 'mGalaxy' main menu using my USB joystick.

Any help will be GREATLY appreciated.

Many thanks :)
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: Aeliss on June 30, 2017, 10:00:00 AM
IDK for windows 10 but you have some other solutions here http://www.mgalaxy.com/forum/index.php?topic=615.msg2268#msg2268
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on June 30, 2017, 07:19:42 PM
I'm sorry Aeliss but that's not what I need. "Instant Shell" only works when you have one .exe process specified as a frontend, which I have already done with a Windows 10 policy ("Custom User Interface").

I just want to run an additional program or .exe process in background when mGalaxy runs as a "Custom User Interface" when the PC boots up. Do you know if there is any possible way to achieve this?

Many thanks :)
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: Aeliss on July 01, 2017, 05:53:52 AM
You can use batch file or converted file (lot of application to convert script to exe, autoit too).

All files you put in AppData\Roaming\Microsoft\Windows\ Start Menu\Programs\Startup will be executed too

All file in the registry will be executed too
Code: [Select]
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices

I haven't tried with win10 (paths are not exactly the same I think) and depend on the solution you choose, this is for a normal configuration, I don't know what instant sheller change in the configuration.
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on July 01, 2017, 10:55:56 AM
Hi Aeliss.

Thanks very much for your help. But I think these options are only suitable when the "explorer.exe" process starts, which it doesn't in my case.
I have "mGalaxy" started as soon as the PC turns on instead of "explorer.exe" (Windows Explorer).

Do you have any other suggestions? I would really appreciate it.

Thanks :)
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: jmd on July 02, 2017, 02:38:03 AM
From my understanding one can only load ONE application when booting in "kiosk" mode.
Would you please tell me exactly what you did to boot on mGalaxy (link/tutorial - cause I don't know about 'Custom User Interface') so that I can help you my best?
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on July 02, 2017, 04:17:46 AM
Certainly JMD.

I have setup 'mGalaxy' to be my "Custom User Interface" using this tutorial: https://www.youtube.com/watch?v=Qxe4LJBP-FI

So every time my computer boots and logs on, it will open up 'mGalaxy' as the interface instead of the Desktop.

I wish to open another application in background, more specifcally 'JoyToKey' so that I can navigate through the mGalaxy main menu using my joystick and buttons.

Do you know if there is anyway to accomplish this? Many thanks for your help :)
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: jmd on July 02, 2017, 02:47:42 PM
Just found this (https://social.technet.microsoft.com/Forums/windowsserver/en-US/06045453-a42e-4c17-aa2d-e53886e4f572/custom-user-interface-and-run-these-programs-at-user-logon?forum=winserverGP), tell me if it helps!

Quote
If you want to run more than one software with 'Custom User Interface' enabled, you can setup the 'Custom User Interface' to run a cmd batch file.
For example to run internet explorer and google chrome:
Code: [Select]
cd\
cd c:\Program files\internet
Start iexplorer.exe
de\
cd c:\Program files\google
Start Chrome.exe
Exit

Notice that you must use the command "start" that more than one software can run using the cmd command.
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on July 02, 2017, 03:25:33 PM
Thanks for finding this JMD :)

I have one question though. How would I setup the "Custom User Interface" to run a cmd batch file?
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: jmd on July 02, 2017, 04:10:19 PM
Quote
have one question though. How would I setup the "Custom User Interface" to run a cmd batch file?

Create the .bat file (let's call it "startup.bat")
Create a text file, paste these lines inside (edit it so that the path an application name are correct)
Code: [Select]
cd\
cd c:\Program files\internet
Start iexplorer.exe
de\
cd c:\Program files\google
Start Chrome.exe
Exit
Save and exit, then rename this file to "startup.bat" (check that file extensions are visible in your windows settings, it is important to delete the original .txt extension and replace it with .bat)

Now, go to "Custom User Interface" settings and choose the "startup.bat" file as the application you want to run (instead of 'mGalaxy.exe')

Note: to edit a .bat file (if you have to correct something), right-click the .bat file and select "Edit" (double-clicking it would run the commands inside!)
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on July 02, 2017, 04:13:06 PM
Thank you so very much JMD :D

I will give this a try and will let you know soon.

Again, many thanks for your assistance.
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: AnimeFan95 on July 03, 2017, 05:33:17 AM
JMD. You are my lord and saviour. I cannot thank you enough for helping me :D

I have been stuck on this issue for weeks and I am completely relived that it has been resolved.

Again, many thanks for your assistance. I sincerely hope people in future will appreciate your help.

Kindest regards,
AnimeFan95
Title: Re: Run another program in background when mGalaxy starts on boot
Post by: jmd on July 03, 2017, 05:52:11 AM
My pleasure! ;) Thank you!