Page 1 of 1
win8 host, winxp guest, dynamic ISO switching
Posted: 31. Mar 2013, 13:43
by anewguy
My elderly father bought a new laptop, with Windows 8 of course. He has 2 slot machine games that he loves that I got working for him in Windows XP without the need to put the games' CD in at run-time (the MasqueGames tech support told me how). So, I'm trying to set something up here that will work before I take the whole idea to him. I have Windows 8 on my laptop and have created a Windows XP guest. If I load the games into the guest I know how to change the logical CD drive to point to different ISO's. However, my father would never be able to grasp that. I've been trying to look at vboxmanage to see if there is a way in a ms-dos bat file to run vboxmanage storageattach to somehow change which ISO image should be assigned to the logical CD drive at run time when the game is started (if I use a batch file instead of just straight to the program exe). So far I can't figure it out. So:
(1) can I run vboxmanage from within a running guest vm?
(2) if so, can I dynamically change which ISO image is assigned to the logical CD drive from an MS-DOS .bat file?
Thank you!
Re: win8 host, winxp guest, dynamic ISO switching
Posted: 31. Mar 2013, 14:33
by mpack
I find it hard to see why selecting from a number of batch scripts will be easier than selecting from a list of ISOs. Do the games need to be booted into, or would they run if you copied the ISO contents to a folder on the virtual hd? A bunch of clickable shortcuts on the desktop should be easy to understand.
Btw, no offense, but do you really know how to change CDs in the VM? I.e. using the "Device" menu at the top of the VM? I ask because I'm pretty sure I could teach my 80+ year old granny how to find something on that menu, and that it would be as easy as anything else, especially if the CDs were present on the "recent" list. Is your father more impaired than usual, e.g. a stroke or something?
Re: win8 host, winxp guest, dynamic ISO switching
Posted: 31. Mar 2013, 20:22
by anewguy
I happen to be a college educated ex-systems programmer and systems administrator of 30 years, writer of software (including floppy, hard disk and printer drivers "way back when" for CP/M), and many recent projects. I know these things without them being mentioned as you do. There is a very real reason for this:
The games are Windows XP games, and they require the CD in the drive to run. I talked to technical support at MasqueGames and explained this need for my father a few years ago, and they provided me with information for getting around this. That solution for what ever reason does not work in a Windows XP guest - I don't know why, so far nobody from virtualbox knows why. So I'm looking for an alternate. I already have the ISO images on disk. However, my father is in his 80's and he doesn't want to have to change disks - he just wants to turn on his laptop and "push buttons". I've already explained the switching ISO's at run-time but this confuses him so he doesn't play the games. These are his FAVORITE games that he's played for years with no need to do anything but click the mouse - I took care of the rest.
So, I want to create a .bat file that mounts the ISO to the virtual drive and then calls the particular game program, create shortcuts on the desktop for them, so that again all he has to do is "push buttons".
If you can't actually help, don't bother to reply.
Re: win8 host, winxp guest, dynamic ISO switching
Posted: 31. Mar 2013, 21:32
by noteirak
You cannot call vboxmanage from the guest.
What about using a software like daemon tools in the guest? You could mount ISOs that way.
Re: win8 host, winxp guest, dynamic ISO switching
Posted: 1. Apr 2013, 06:09
by anewguy
Thanks for the input! I had tried that but not quite what I was hoping for, so I was searching for other things. I really did assume you couldn't call something to manage a virtual machine from within a virtual machine, but wasn't sure, so thanks for clarifying that.
I thought about what MasqueGames was doing with their work around, and did my own thing to get this to work as needed.
I do appreciate your input - it was at least helpful and on topic, and would have been the solution if I could have worked around a couple of quirks. But hey, it's working now, so I'll be able to copy the virtual machine to a flash drive and take it up to him.
Re: win8 host, winxp guest, dynamic ISO switching
Posted: 1. Apr 2013, 13:56
by scottgus1
Anewguy:
I see you got it working, great! Here's something you could try, too. As mentioned, you can't run Vboxmanage in the guest. But there is a way to transfer data back & forth from the host to the guest using "guestproperty get|set" functions. (These were valid as of Virtualbox version 4.0.16) These commands can be used in Windows batch files:
Code: Select all
write from host:
drive:\path\to\vboxmanage guestproperty set <vmname> /yourkey/yourproperty <value>
read from host:
drive:\path\to\vboxmanage guestproperty get <vmname> /yourkey/yourproperty > "result.txt"
result.txt contains text "value: <value>"
write from guest:
drive:\path\to\vboxcontrol guestproperty set /yourkey/yourproperty <value>
read from guest:
drive:\path\to\vboxcontorl guestproperty get /yourkey/yourproperty > "result.txt"
result.txt contains text "value: <value>"
You could write batch files in the guest that would set a guestproperty showing which ISO to mount, then go into a timed loop waiting for the guestproperty to change back to a value showing the ISO is mounted, then launch the appropriate game. On the host, you could have a script running in the background reading that guestproperty, waiting for it to turn to a valid indicator of which ISO to mount, mount the ISO, then change the guestproperty to the "ISO-is-mounted" value. Between the two scripts you can then launch CD-based games from the guest. (Provided, of course, the game's copy protection can allow the disc being ISO'd...)