QA: How to install a cab file on Pocket PC?
Victor Sharov (vic@softspb.com), October 26, 2001.
Question
I need to install a cab file that is already downloaded to my Pocket PC. How can I
do it from my program?
Answer
Actually the only thing you need is just to start this file. Usually it is done by
creating a new process via CreateProcess() as it is described in
QA: How can I start another program and wait until it will be finished?.
But in this case such approach does not work. To install a cab file you should call
ShellExecuteEx function defined in "Shellapi.h" file and pass it a pointer to
SHELLEXECUTEINFO structure that contains and receives information about the application
being executed.
Note: Pocket PC doesn't support local file names. All file names should contain full path
like _T("\\temp\\my.cab").
Source code
Here is a sample code that installs "my.cab" file located in "\temp" folder:
// Specify an action for the application to perform, flags and other parameters
SHELLEXECUTEINFO info;
info.cbSize = sizeof(info);
info.fMask = SEE_MASK_FLAG_NO_UI;
info.hwnd = NULL;
info.lpVerb = _T("open");
info.lpFile = _T("\\Temp\\my.cab");
info.lpParameters = _T("");
info.lpDirectory = _T("");
info.nShow = SW_SHOW;
info.hInstApp = AfxGetInstanceHandle();
// Call to perform an action
ShellExecuteEx(&info);
Related resources:
-
http://www.pocketpcdn.com/sections/installation.html
Section: Installation
-
http://www.pocketpcdn.com/articles/ezsetup.html
Article: Using EzSetup for creating Pocket PC installations
-
http://www.pocketpcdn.com/articles/airsetup.html
Article: Using Spb AirSetup to create Pocket PC installers
-
http://www.pocketpcdn.com/articles/multicabinstall.html
Article: Installing multiple CAB files with the same setup application
-
http://www.pocketpcdn.com/articles/uninstall.html
QA: How to uninstall a Pocket PC application?
-
http://www.pocketpcdn.com/articles/creatingsetup.html
QA: How can I create setup.exe file that will automatically install necessart .cab file on Pocket PC?
-
http://www.pocketpcdn.com/articles/setupdll.html
QA: How can I add my custom function to installation/uninstallation?
- http://www.microsoft.com/mobile/developer/technicalarticles/installation.asp
Article: Successful Installation for Pocket PC Applications
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnce30/html/appinstall30.asp
Article: Creating an Application Installation Package with Microsoft Windows CE 3.0
- http://www.innovativedss.com/pdfs/installmaster.pdf
Article: Deploying Windows CE applications with Wise InstallMaster
- http://www.devbuzz.com/content/zinc_PPCInstall_pg1.asp
Article: deVBuzz speaks with Jeff Law of PPCInstall