On a device that runs Windows Embedded Compact 7, you can deploy an application in several ways. This article shows you how to use ActiveSync to deploy a CAB file from your development computer to your device by using a USB connection. With ActiveSync, you can transfer your application to a device without using Visual Studio or Platform Builder. By using a CAB file, which contains your application and its installation settings, you can customize installation by specifying registry settings, creating a shortcut on the desktop, and so on. However, if you want to debug your application, you need to use Visual Studio. For a description of one method that uses Visual Studio to deploy an application, see Debug an Application over Ethernet.
In this article:
Before you begin this procedure, verify that your setup meets the following audience, software, hardware, and network prerequisites.
You can package your application in a CAB file when you want to customize installation. Customizations could include installing the application to a specific directory, placing a shortcut on the desktop or on the Start menu, configuring registry settings, including other files such as DLLs, and so on. Windows Embedded Compact 7 supports CAB file installation if the OEM includes this support in the OS design.
To package your application in a CAB file, you need to create an INF configuration file and then execute the CAB wizard (cabwiz.exe) by using the INF file as an input parameter. Optionally, you can include a Setup.dll file to perform actions before and after installation, but we do not use one in this article.
You can create a CAB file using the GUI in Visual Studio. To do this, in the New Project dialog box, in the Other Project Types section, click Setup and Deployment, and then click CAB Project. However, this article assumes you will simply run the CAB wizard at a command prompt. For OEMs who have Windows Embedded Compact installed on their development computer, Cabwiz.exe is located at %_WINCEROOT%\Public\Common\Oak\Bin\I386\. Application developers will find it at <Microsoft Visual Studio Directory>\SmartDevices\SDK\SDKTools.
To package your application in a CAB file
cabwiz <Your INF File>
You must install ActiveSync on your development computer and on your device. If you are an OEM, you should have included support for ActiveSync in the OS design by selecting the ActiveSync catalog item (SYSGEN_AS_BASE). If you are an application developer, the OS provided to you by the OEM must include support for ActiveSync for you to continue with this deployment method. If you are not sure if ActiveSync is supported by the OS, look for the ActiveSync shortcut on the home screen of your device running the OS, or for ActiveSync as an option by clicking the Start button, and then Programs.Before you connect your development computer to the device with a USB cable, install ActiveSync on your development computer:
Using a USB cable, connect a USB port on your development computer to a USB port on your device. (Although this procedure documents the steps for a USB port, you can also use ActiveSync over a serial connection.)
When you connect a USB port on your development computer to a USB port on your device, your development computer automatically launches the ActiveSync application (on Windows XP) or Windows Mobile Device Center (on Windows Vista or Windows 7).
Windows Mobile Device Center displays a Connected notification when your development computer successfully connects to your device. After a connection is established, do the following in Windows Mobile Device Center on your development computer to browse the files on your device.
To transfer the CAB file to your device
After the CAB file is on your device, you need to open it on the device itself (not in Windows Explorer on your development computer using ActiveSync). To launch the CAB installer, double-click the CAB file. Alternatively, you can use the command-line program Wceload to open the CAB file. For more information about Wceload, see Wceload Tool in the Windows Embedded Compact 7 reference documentation.
To open a CAB file by using Wceload
wceload <Your CAB file>
You can now run your application on your device.
Windows Embedded Compact Windows Embedded Compact 7 Reference Documentation
Windows Embedded Compact on the TechNet Wiki
Wendy Giberson edited Revision 3. Comment: Updated title.
Ed Price - MSFT edited Revision 2. Comment: Separated the Community Resources. Great article!
W. Giberson edited Revision 1. Comment: Updated title to include "Windows Embedded Compact 7"
W. Giberson edited Original. Comment: Added a See Also section