Click here to Skip to main content
1,872 members
Articles / Multimedia / C#

How to Install/Uninstall an Application on a Smartphone (in 8 steps)

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
24 Apr 2012CPOL 12.4K   1  
Learn how to deploy an application on a Smartphone

This article is a sponsored article. Articles such as these are intended to provide you with information on products and services that we consider useful and of value to developers


  1. Visual Studio .NET 2003
  2. SDK for Windows Mobile 2003-based Smartphones
  3. Your smartphone (the tests were made on an Orange SPV C500 Smartphone) with Windows Mobile 2003 SE
  4. Microsoft ActiveSync 3.8

Short Foreword

Like Steve Ballmer said in a Channel 9 interview, in the future we will see more mobile applications (focus on the smartphones), mainly because since now the mobile phones were dumb. In my opinion, Microsoft saw the opportunity to conquer a new market, the mobile one, with the software that took the company in the top of the software makers, Microsoft Windows, this time named Microsoft Windows Mobile (actually a customized Windows CE). I'm very glad they chose to make this move.)

As I am a big fan of .NET Framework, as soon as I got my Orange SPV C500 smartphone, I got glued to it. :) And "the glue" made me more enthusiastic about .NET Compact Framework. I think that a smartphone can be smarter only if you make it so ... by deploying your own applications on it.

Enough Talking… We've Got Things To Do

This article is not intended to show you how to work with the .NET Compact Framework, but instead, it will show you (step by step) how to deploy an application that you have already written (using .NET Compact Framework), on your Smartphone. Keeping this in mind, we will use for deployment, the Sliderpuzzle example, that came with the Microsoft Smartphone 2003 SDK.

Follow the White Rabbit ;)


Please check that you have this example located on
C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle
or in whatever other place, you have installed the SDK.


Open the solution file with VS .NET 2003 and set the version to Release
(from the Build\Configuration Manager menu).


Try to build the .cab file, using the VS.2003 Build\Build Cab File menu.


My guess is that you will get an error, at the end of the building process, an error that will sound like this one:
Error : The CabWiz executable 'C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Smartphone\..\bin\..\bin\cabwiz.exe' could not be invoked


After the error message you will get informed about the creation of the BuildCab.bat file.

Creating batch file 'C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003 \Samples\Managed\Sliderpuzzle\obj\Release\BuildCab.bat' for command line build

This is good news, but let's dig to solve the error…


Open the .bat mentioned file with your favorite editor. You will see that it wants to use a .exe file that doesn't exist. Replace the line
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Smartphone\..\bin\..\bin\cabwiz.exe
C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Tools\CabwizSP.exe
taking care to keep the specified parameters.

After the 3.3 intermediate step, BuildCab.dat will have the following content (except the --- markers):
"C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Tools\CabwizSP.exe" "C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\obj\Release\SliderPuzzle_SMP.inf" /dest "C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\cab\Release" /err CabWiz.SMP.log /cpu ARMV4 X86---

Let's take a closer look to what's happening there:

"C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Tools\CabwizSP.exe"
(this is the .exe file used to generate the .cab file)

"C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\obj\Release\SliderPuzzle_SMP.inf"
(contains metadata information, other information about where to install your application on the device and which shortcuts to create, so a user can use the application)

/dest "C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\cab\Release"
(the target directory that will contain the .cab file)

/err CabWiz.SMP.log
(the specified file will contain the possible generated errors)

/cpu ARMV4 X86
(a .cab file will be generated for each type of specified processor)


Copy this file
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce400\x86\vsd_setup.dll
in the following directory
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Smartphone\wce400\x86


Copy this file
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce400\armv4\vsd_setup.dll
in the following directory
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Smartphone\wce400\armv4


Launch BuildCab.bat. The result will be found in
C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\cab\Release\SliderPuzzle_SMP.ARMV4.CAB.


Next to it, we will find CabWiz.SMP.log file, where you will probably find a couple of warnings.
My file, for example, contains the following lines:
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Warning: Section [DestinationDirs] key "Shortcuts" is not using the string "%InstallDir%"
Warning: Section [DestinationDirs] key "Files.X86" is not a valid file list
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
Warning: Section [DestinationDirs] key "Shortcuts" is not using the string "%InstallDir%"
Warning: Section [DestinationDirs] key "Files.ARMV4" is not a valid file list
Warning: Section [DefaultInstall] key "AddReg" - there are no section entries to process
These warnings are related to some of the options specified in the .inf file. You can remove the sections that you don't need, so there will be no more warnings.


If you managed to stay in touch with the article by this point, the reward will be the deployment itself. ;)


Get connected to your smartphone using Microsoft ActiveSync and press the Explore button. ;)


Copy this file
C:\Program Files\Windows CE Tools\wce420\SMARTPHONE 2003\Samples\Managed\Sliderpuzzle\cab\Release\SliderPuzzle_SMP.ARMV4.CAB
into the following directory
\Storage\windows\Start Menu\Accessories (on your smartphone).


Now "press the buttons of your smartphone".


Start\More\More\Accessories\ and launch SliderPuzzle_SMP.ARMV4.CAB.


You will probably get "Download completed successfully", and you will be asked to specify where you want your application to be installed: on the Phone or on \Storage Card.
I'll select the first option, since my MiniSD card is already full (it's still the default one, 16MB).
Press Done after that.
After a couple of seconds, you will be informed upon the success or in success of your operation (SliderPuzzle_SMP.ARMV4.CAB was successfully installed on your device).


If your eyes are fast enough you will see that the .cab file is now missing. Why?
Because it is erased by default, after the installing operation. If you want to keep your .cab file, set the Read Only permission, before you copy it on your smartphone.


Start the new game, by pressing Start\More\More\SliderPuzzle. Have fun! ;)


In case that you get bored by an application, read the next step. ;)


Start Microsoft ActiveSync.


Use the Add\Remove programs... option from the Tools menu. ActiveSync will connect to the smartphone and it will show you all YOUR installed applications.

In the Add\Remove programs... window, instead of a company name, you saw "My Company". To specify a company name, modify the SliderPuzzle_SMP.inf file.
You can find the .inf file sections explained with a lot of details, in the Smartphone 2003 SDK Help.


Just select the application that you want to uninstall and press the Remove button.

Well… that's it. See you soon with another article... ;)


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Web Developer
Romania Romania
This member doesn't quite have enough reputation to be able to display their biography and homepage.

Comments and Discussions

-- There are no messages in this forum --