Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: TLiner on October 02, 2017, 11:48:33 am

Title: Launching a Game in a Virtual OS through Hyperspin/Rlauncher
Post by: TLiner on October 02, 2017, 11:48:33 am
Hi everyone,

I'm not sure if this can be done and just wanted to see if anyone has tried it and had success with it.
This might be the wrong forum for the question, maybe I need to go to Rlauncher's forum, but I thought I'd try here first.

If I'm running Hyperspin and Rlauncher with Windows 10, and I have a virtual machine (VirtualBox) installed with Windows XP and some games installed there, is it possible to have Hyperspin/Rlauncher switch to the virtual OS and run the game, and when done jump back to Hyperspin?

Please let me know what you think or if you have any experiences with it.
Thanks.
Title: Re: Launching a Game in a Virtual OS through Hyperspin/Rlauncher
Post by: nexusmtz on October 03, 2017, 10:56:38 am
I can only answer conceptually on the VM part, because I use VMWare Workstation for my VMs, and I'm not using rlauncher.

With VMWare, you can launch an Autohotkey file that WinActivates the VM Window, then runs
Code: [Select]
runwait, "c:\Program Files (x86)\VMware\VMware Workstation\vmrun" -T ws -gu xyz runProgramInGuest "x:\virtualmachines\XPGames\XPGames.vmx" -activewindow -interactive "C:\Program Files\PopCap Games\Bejeweled 3\Bejeweled3.exe"
Since the VMRun command doesn't return until bejeweled3.exe exits, as far as the front end is concerned, it's as if the program were running on the regular machine, i.e. the front end will wait.

You'll have to find out if VirtualBox provides a similar interface.
Title: Re: Launching a Game in a Virtual OS through Hyperspin/Rlauncher
Post by: DrakeTungsten on October 03, 2017, 09:02:27 pm
I'm pretty sure it's possible. I run a Windows XP Battlefront 2 server inside VBox, and I can kill or restart the Battlefront program from the host. My host is Linux, but that shouldn't matter. If the VM is running but the Battlfront program is not, this command will start it:
Code: [Select]
VBoxManage guestcontrol swbf2 execute --image c:\relaunch.exe --username sean --wait-stderr
swbf2 is the name of the VM.

c:\relaunch.exe is a compiled AHK script on the guest which in turn launches the Battlefront exe

I forgot why I don't need to supply a password as well as the user name. The password and user name on the host and guest are identical, so that could be it.

I also forgot why I thought it wise to add the --wait-stderr. The command does immediately return on the host, but this is not what you want. You want to know when the launched process exits. I never used it, but --wait-exit sounds like it would serve your needs.

I know I had to do some tricks to get an XP guest working the way I wanted, but I don't recall if any of the extra work was specifically related to controlling processes. I can try to dig up my notes if you want more help.
Title: Re: Launching a Game in a Virtual OS through Hyperspin/Rlauncher
Post by: TLiner on October 09, 2017, 11:55:21 am
Thanks guys,

I don't think we need to dig any farther on this right now. I was just spitballing and seeing if there was an easy solution someone's already got worked out.
I got some good feedback from the guys on the Rlauncher forum as well.
http://www.rlauncher.com/forum/showthread.php?5041-Virtual-OS-Games-(VirtualBox) (http://www.rlauncher.com/forum/showthread.php?5041-Virtual-OS-Games-(VirtualBox))