This is a supplement to the Windows Embedded Compact 7 getting started series, to provide additional information showing the steps to configure a Virtual PC to boot to Compact 7 using DiskPrep.
The Compact 7 getting started series, written in simple and easy to follow format, is created to provide technical information to help academic, hobbyist and commercial developers to engage in Windows Embedded Compact development.
The 9 main articles for this series, along with the supplemental articles, were created to provide information showing the steps to develop OS design, build customized OS runtime image and deploy the image to a target device for testing. In addition, this series also provide information about managed and native code application development for Compact 7 device, using C++, C# and Visual Basic.
For more information about this series, visit the following URL:
For additional information about using Virtual PC as a target device to support Compact 7 development, refer to the following application notes:
· Compact 7 Getting Started Part-3a: Develop OS Design for Virtual PC
· Loopback Adapter with Virtual PC as Target Device for Compact 7 Development
· Using Static IP Addresses for Windows Embedded Compact
To work through the exercise in this application note, we need to have the following:
· Windows 7 workstation with Virtual PC installed.
· DiskPrep power toy.
· A Compact 7 OS runtime image build with the Virtual PC board support package.
The DiskPep power toy is a software utility, initially created to configure storage device with BIOSLoader to launch Windows Embedded CE 6.0 (CE 6.0) OS runtime image, an earlier version of Windows Embedded Compact 7.
With the release of Windows Embedded Compact 7, Microsoft changed the product name from “Windows Embedded CE” to “Windows Embedded Compact”.
Although the DiskPrep utility was created for CE 6.0, it also supports Compact 7. The DiskPrep utility is available for download from the following URL:
In this section, we will go through the following steps to create and configure a Virtual PC and virtual hard disk (VHD) to boot to Compact 7 OS using the DiskPrep utility:
· Create a VHD and configure the VHD to boot Compact 7 using DiskPrep.
· Create a Virtual PC virtual machine and associate the VHD to the virtual machine.
· Launch the virtual machine to boot to Compact 7 OS.
Create VHD using DiskPrep
Work through the following steps to create and configure the VHD:
1. Launch the DiskPrep utility with administrator privilege, by right click on the DISKPREP.EXE executable and select the “Run as administrator” option, to launch the DiskPrep utility, as shown in Figure-1.
Figure - 1
2. From the DiskPrep program screen, select the following:
o For Disk Selection, select the <VHD I create or specify when I click OK> option.
o For Use File System Format, select the FAT32 option.
o For Splash Screen, select the Use the default Windows CE splash option.
o For BOOT.INI, select the Place a BOOT.INI file on the disk option.
o For Physical Video Mode, select the 640 x 480 option.
o For Bit Depth, select the 16 bpp option.
o Select the Use “CEPC” as device name prefix option.
o Select the Load specific image file copied from option, and click Browse to select an OS runtime image file, NK.BIN, created for the Virtual PC.
For this example, we will use the OS runtime image, NK.BIN, from the MyVPC OS design, created as part of the exercise in the “Compact 7 Getting Started Part-3a: Develop OS Design for Virtual PC” application note.
3. Click OK to bring up the Create or Select Virtual Disk screen, as shown in Figure-2.
Figure - 2
4. Select the Create a new Virtual Hard Disk (VHD) option.
5. Click Browse and navigate to a folder where you want to place the VHD and enter a file name for the VHD. For this example, we will use the following directory and file name:
6. For the Size in Megabytes entry, increase the size to 256 MB.
7. Click OK to create the VHD.
Creating a Virtual Machine
Next, we need to create a virtual machine and associate the VHD created in the previous step to the virtual machine to launch the Compact 7 OS.
Work through the following steps to create a new virtual machine:
1. From the Windows Start menu, select Windows Virtual PCàWindows Virtual PC to launch Virtual PC.
2. From the Virtual PC menu, click on Create virtual machine to launch the Create a virtual machine wizard.
3. Enter Compact7_VPC as the name and select a directory where the Compact7_VPC.VHD was created in the previous section, as shown in Figure-3.
Figure – 3
Note: For this example, we create the virtual machine in the following directory:
4. Click Next to continue and bring up the Specify memory and networking options screen, as shown in Figure-4.
Figure - 4
5. For the Specify memory and networking options step, keep the default settings and click Next to continue and bring up the Add a virtual hard disk screen, as shown in Figure-5.
Figure - 5
6. Select the “Use an existing virtual hard disk” option.
7. Click Browse and select the Compact7_VPC.VHD created from the earlier step.
8. Uncheck the “Enable Undo Disks” option.
9. Click Create to create the virtual machine.
By default, the virtual machine is created with two network interfaces. Work through the follow steps to remove one of the network interfaces:
1. From the Virtual PC screen, select the Compact7_VPC.vmcx virtual machine.
2. From the Virtual PC menu, click Settings to bring up the Compact7_VPC – Windows Virtual PC Settings screen, as shown in Figure-6.
Figure - 6
3. From the left pane, select Networking from the Setting column.
4. From the right pane, change Adapter 2 setting to Not Connected.
5. Change the Number of network adapters to 1.
6. Click OK to save the settings and close.
Launch the Compact 7 Virtual PC
At this point the Compact7_VPC virtual machine is created, with a VHD configured to launch a Compact 7 OS runtime.
To launch the Compact 7 OS runtime configured for this virtual machine, launch the Compact7_VPC.vmcx virtual machine, or double click on the following file:
It takes little bit of time for the virtual machine to boot up and launch the Compact 7 OS runtime image. After the OS image is launched, the Compact 7 desktop is shown on the virtual machine, as shown in Figure-7.
Figure – 7
A Virtual PC configured to boot to Compact 7 OS, built with appropriate CoreCon components, can be used as a target device, to support the following Compact 7 application develop tasks:
· Develop managed code application, in C# or Visual Basic, from the Visual Studio 2008 IDE.
· Develop native code application, in Visual C++, from the Visual Studio 2008 IDE.
· Establish connectivity between the Visual Studio 2008 IDE and the Compact 7 Virtual PC target device, to download managed and native code application to the device for testing and debug.
View this page in another language: