Jump to content

How-to: Microsoft Virtual PC 2007 Additions and VMware Tools


Arie

Recommended Posts

I wrote parts of the following in a private reply to someone, but believe that more can benefit from this how-to.

When doing a test installation of my unattended installation source in a virtual environment, it annoys me that once the installation is done, I still need to install extra virtual drivers such as Microsoft Virtual PC 2007 Additions or VMware Tools to properly be able to work with the installed virtual environment. To automate this process, I have created silent installation packages for both Microsoft Virtual PC 2007 and VMware Tools, which are both SVCPACK.INF compatible and which will only install if they are run from within their relative virtual environment.

Microsoft Virtual PC 2007 Additions

Creating a package yourself for the Microsoft Virtual PC 2007 Additions could not be easier. Simply start up an installed virtual machine and start the installation of the Additions. This installation gets launched from a temporary virtual CD-ROM. Browse to the Windows folder on this virtual CD-ROM. For English, copy the file VirtualMachineAdditions.msi to another location. You will need this file for your silent installation package. If you would like a different language, choose the right VirtualMachineAdditions.msi file accordingly.

post-152562-1195559087_thumb.jpg

By heart I believe there is also an ISO-file on the host machine, in the installation folder of Microsoft Virtual PC 2007. This is the ISO-file which gets mounted on the temporary virtual CD-ROM drive as discribed above. You could extract the correct VirtualMachineAdditions.msi file from this ISO-file as well and use this. Both methods have the same result, so choose which ever you prefer.

Next you will need to create an SFX archive for example which will run the MSI-file silently during setup. The command for the archive to run is as follows.

VirtualMachineAdditions.msi /quiet /norestart

VMware Tools

Obtaining the installation files for VMware Tools is identical to obtaining the installation files for Microsoft Virtual PC 2007 Additions. Simply start up an installed virtual machine and start the installation of the VMware Tools. This installation also gets launched from a temporary virtual CD-ROM. Copy the contents of this virtual CD-ROM to another location.

post-152562-1195559130_thumb.jpg

Another way of obtaining the installation files for VMware Tools is by browsing to the installation folder of VMware Workstation on the host machine. Here you will find a file named Windows.iso, which is the ISO-file which gets mounted on the temporary virtual CD-ROM drive as discribed above. Extract the contents of this ISO-file to another location. Both methods have the same result, so choose which ever you prefer.

Next you will need to perform an administrative installation of VMware Tools by running the following command. You will need these files for your silent installation package.

msiexec /a "VMware Tools.msi"

Browse to the folder where you previously copied the contents of the before mentioned virtual CD-ROM to, or to the folder where you extracted the ISO-file to, and copy the "Drivers" folder including all subfolders from "program files\VMware\VMware Tools" to the same place in the folder where you performed the administrative installation of VMware Tools to, overwriting any files if necessary.

post-152562-1195559138_thumb.jpg

Next you will need to create an SFX archive for example which will run the MSI-file silently during setup. The command for the archive to run is as follows.

VMware Tools.msi /quiet /norestart

innotek VirtualBox 1.5.2

Thus far I have not been able to create a proper SFX archive for the VirtualBox drivers yet. My best result at current always installs, even when not being run within a virtual environment, so it's not useful yet. While still trying to figure this out, I also asked RogueSpear about it in the hope that he had figured it out already (it's useless to re-invent the wheel), but he hasn't managed to create a proper SFX archive yet either. Has anyone here managed to get this working?

Hope this little how-to is useful :)

Link to comment
Share on other sites


Thanks again for the information Arie (I'm the one he replied to privately :) )

I would like to make some observations on the Virtual PC additions:

1) I decided to try if an admin installation of the MSI file would work. Although it made the installer size around 600KB, it seemed to produce an error each time my VM was started. I think I'll have to do some more testing there.

2) If you run the installer you made from SVCPACK and then use the RunOnceEx method later in your install to install stuff directly from the CD/DVD (i.e. not using $OEM$ folders), Windows Setup will complain that it can't find the CD. It turns out that the Additions installer ejects the CD / releases the ISO image after an install. I had to tell Virtual PC to remount my ISO so it could then find my installers. Looking at the VirtualMachineAdditions.msi, it mentions a cdeject.exe, which I think is the culprit. I don't know exactly what it does to help the installation, so it may be possible to remove it from the MSI: more testing required. :)

-- Jondar

Link to comment
Share on other sites

1) I decided to try if an admin installation of the MSI file would work. Although it made the installer size around 600KB, it seemed to produce an error each time my VM was started. I think I'll have to do some more testing there.

I found my method posted earlier to be the only way to get the installation done without any errors. I tried an administrative installation as well, but it produced an error on my end as well, hence I switched back to the before mentioned method. It works, so I'm happy with it ;)

2) If you run the installer you made from SVCPACK and then use the RunOnceEx method later in your install to install stuff directly from the CD/DVD (i.e. not using $OEM$ folders), Windows Setup will complain that it can't find the CD. It turns out that the Additions installer ejects the CD / releases the ISO image after an install. I had to tell Virtual PC to remount my ISO so it could then find my installers. Looking at the VirtualMachineAdditions.msi, it mentions a cdeject.exe, which I think is the culprit. I don't know exactly what it does to help the installation, so it may be possible to remove it from the MSI: more testing required. :)

Something which I should have mentioned; my bad, sorry :( Found out myself as well when working on the before mentioned installation method. The reason for this is that normally the installation starts from a virtual CD-ROM. After the installation is done, the system needs to be rebooted and the virtual CD-ROM is automatically unmounted, virtually ejected, as there is no need for it anymore. I have only tested this with an unattended installation from an ISO-file; the Virtual Machine Additions get installed, but once the machine reboots, the ISO-file is unmounted and therefore RunOnceEx cannot find it. When installing from a physical CD-ROM, this problem might not occur, but thus far I haven't tested this; it's on my to-do list. Did you test this yourself with a physical CD-ROM or only with an ISO-file?

Link to comment
Share on other sites

I found my method posted earlier to be the only way to get the installation done without any errors. I tried an administrative installation as well, but it produced an error on my end as well, hence I switched back to the before mentioned method. It works, so I'm happy with it ;)

Same here. I'm happy with it. I would've been even happier with an installer that's less than 1MB, but, hey, 1.5MB isn't bad :)

Something which I should have mentioned; my bad, sorry :( Found out myself as well when working on the before mentioned installation method. The reason for this is that normally the installation starts from a virtual CD-ROM. After the installation is done, the system needs to be rebooted and the virtual CD-ROM is automatically unmounted, virtually ejected, as there is no need for it anymore. I have only tested this with an unattended installation from an ISO-file; the Virtual Machine Additions get installed, but once the machine reboots, the ISO-file is unmounted and therefore RunOnceEx cannot find it. When installing from a physical CD-ROM, this problem might not occur, but thus far I haven't tested this; it's on my to-do list. Did you test this yourself with a physical CD-ROM or only with an ISO-file?

No need to apologise: I'm actually having good fun with making this installer. My first real challenge (all the other ones I've made have been straight-forward) :)

I've tested only using an ISO file. I don't actually burn a disc until I'm completely satisfied with my test install using VirtualPC.

I personally don't think it's going to matter with a burnt disc, unless you're using a disc for testing in VirtualPC. Think about it: if you're using a disc in VirtualPC, the CD/DVD drawer is going to open, so you'll know something is going on there (so you can then close the drawer again). Also, if you're using a disc in a real install, the installer is going to realise that you're not using VirtualPC, so it won't install at all, so there will be no reason for the disc to eject :)

I haven't tested it yet, but I think the rows "CA_ExecuteCDEject9X" and "CA_ExecuteCDEjectNT" in the "InstallExecuteSequence" table of the MSI will tell the disc/image to eject. I'd post a transform file but my version of Orca keeps on crashing when trying to drop a row after setting up a transform :-|

-- Jondar

Link to comment
Share on other sites

I personally don't think it's going to matter with a burnt disc, unless you're using a disc for testing in VirtualPC. Think about it: if you're using a disc in VirtualPC, the CD/DVD drawer is going to open, so you'll know something is going on there (so you can then close the drawer again).

Yes, I meant burning a physical disc for testing purposes within Virtual PC 2007. I don't believe however that your statement about ejecting the CD-ROM tray is correct. When launching the Additions normally within Virtual PC 2007, it temporarily mounts a virtual CD-ROM which contains the installer files. If you have a physical disc in your tray, it simply temporarily "disappears" if I'm not mistaken and replaced by the virtual disc. Once the installation of the Additions is done, the virtual disc is ejected from the virtual tray. In this case, the physical disc stays in the physical tray and is not ejected. I could be wrong, but this is my assumption at the moment, but I can only find out of course by actually testing this and thus far I haven't had time for it, but it's defenitely on my to-do list! Please keep me informed of your progression :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...