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:
[autorun]
icon=config.icon
Second step is a new drive label. I’ll install Ubuntu on my flash drive, so the new file line is:
icon=config.icon
label=Ubuntu
The main thing: how to launch virtual machine?
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)
The final autorun.inf content:
[autorun]
icon=config.icon
label=Ubuntu
shellexecute=vmlauncher.exe .\ubuntu\ubuntu.vmx
UseAutoPLAY=1






