Everybody knows about Windows “autorun” feature. That’s exactly what we need! To enable autorun behavior we should place file named autorun.inf to the root directory of flash drive. Let’s find out exact content of this file for our purposes. Starting from simple things: let’s change default drive icon to virtual machine one. All we need is a config.ico file from VMware installation and one line in .inf file. Copy config.ico to the root folder of flash drive and rename it to config.icon (otherwise Windows will suspect graphical media content on flash drive and may be will prompt to view it). Hence the first line of our file is:
Second step is a new drive label. I’ll install Ubuntu on my flash drive, so the new file line is:
The main thing: how to launch virtual machine? Open command does not work, but shellexecute is a thing we need. Simply type shellexecute=ubuntu.vmx – this will launch installed virtualization software.
Looks pretty good, but there are small problems here:
1) Workstation does’not run virtual machine, it just opens vmx file (-X command line parameters solves this)
2) Player 2.0 does not understand gui.fullScreenAtPowerOn = "TRUE" vmx entry anymore, so we can’t just launch virtual machine in full screen.
The final autorun.inf content:
Plus vmlauncher.exe in the flash drive’s root directory.