Q: How do I attach a floppy disk to a virtual machine (VM) with Windows Virtual PC?

Use a script to attach floppy drives to a VM.

John Savill

May 29, 2012

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A: The graphical interface to configure virtual machines (VMs) doesn't have an option to attach floppy drives. However, it's still possible through a script.

The script below attaches the floppy disk image (VFD) to the VM specified:

Set objVPC = CreateObject("VirtualPC.Application")Set objVM = objVPC.FindVirtualMachine("NT351")Set colFloppyDrives = objVM.FloppyDrivesFor Each objDrive in colFloppyDrives    retVal = objDrive.AttachImage("d:tempwin98sewin98ebd.vfd")Next


Change the name of the VM (NT351) and the VFD (d:tempwin98sewin98ebd.vfd) to match your values.

To detach run the following script:

Set objVPC = CreateObject("VirtualPC.Application")Set objVM = objVPC.FindVirtualMachine("NT351")Set colFloppyDrives = objVM.FloppyDrivesFor Each objDrive in colFloppyDrives    retVal = objDrive.ReleaseImage()Next

See more FAQs on virtualization, System Center, and all things IT pro at John Savill's FAQs.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like