PDA

View Full Version : Pocket PC installer



Aragorn5
03-31-2004, 03:49 PM
I have DevStudio9 and have to write an installer for PocketPC. This is my first time with PocketPCs. I have worked on Windows installers before in DevStudio9 (used MSI projects)

Any pointers on where to start would be greatly appreciated.

Thanks for your time!

Aragorn5
03-31-2004, 04:55 PM
Forgot to mention that I wanted it to install through active sync. The documentation mentions a method with a big yellow exclamation mark saying this is not to be used for ActiveSync. Where can I find some documentation about the method to be used with ActiveSync?

Thanks!

captjay
04-02-2004, 10:57 AM
there's an InstallShield whitepaper with instructions on how to do this. You'll need to use the CE redistributable and its associated wizard to setup the device files. The IS build will then produce the CAB file and install it via a windows installer to ActiveSync.

-Jay

whitepaper is on the main support page, or try this link:

http://www.installshield.com/downloads/wp/?pm=isd&wp=Smart_Device_White_Paper_0303.pdf&xmlUse=y

http://www.installshield.com/downloads/wp/?pm=isd&wp=Smart_Device_White_Paper_0303.pdf&xmlUse=y

Aragorn5
04-05-2004, 01:28 PM
Thanks. I am making some progress here and this white paper looks like something I was searching for. I wanted to know how these smart-devices installations work, so that I can figure out what I can or cannot do and how.

:)

captjay
04-05-2004, 01:36 PM
I wish there were more documentation around PPC installs, even the whitepaper isn't detailed enough. I found that for a clean uninstallation you *must* use ActiveSync to uninstall, else files are left behind on the device.

I also tried using a custom DLL (in the CE Object wizard step called "Setup DLLs") built using eMbedded C++ 4.0 (as VS C++ 5 and 6 are now supplanted by this eMbedded IDE). Didn't get it to work right, no docs on this either. I found older docs that require ce_setup.h, but this header is not present on the PPC IDE.

Aragorn5
04-06-2004, 09:28 AM
captjay and others,

I am also trying to play with this setup DLL. I made my setupDLL using eVC++. Currently I am only trying to pop up a MessageBox before and after install and uninstall. For some reason, it does not seem to be working. I tried adding the WindowsCE object to Basic MSI and InstallscriptMSI project and give my setupDLL when it asked if I had any. The installation seems to be working fine. All the required files are copied but no messageBoxes pop up and hence I do not know if my setup DLL is working right or not. My .def file has the four required functions exported. And I am pasting here a relevant portion of the DLL, am I doing something wrong in registering the DLLs or whatever. I am using DevStudio9. Is it supposed to copy this SetupDLL somewhere on PocketPC? I wanted to check if it is doing that. I am hoping to pop up these boxes today.

Any input will be greatly appreciated, again.

Thanks for your time.

------------------------------------------------------

#include <windows.h>

#include "ce_setup.h"


/* This is the entry point of the DLL. This DLL is to be used during */

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}


/* This function will be executed before the install starts */

codeINSTALL_INIT Install_Init(HWND hwndParent,
BOOL fFirstCall,
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir)
{
if(fFirstCall)
{
/* TO DO: Add any "one time only" initialization code here. */
MessageBox(NULL, "First installation: preinstall", "preinstall", MB_OK);
}
else
{
/* TO DO: Add your code here. Be sure to take into account the */
/* fact that "pszInstallDir" may be different each time this */
/* function is called! */
MessageBox(NULL, "Subsequent installation: preinstall", "preinstall", MB_OK);
}

return codeINSTALL_INIT_CONTINUE;

}




/* This function will be executed after the install finishes */
codeINSTALL_EXIT Install_Exit(HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts)
{
/* First, make sure the installation succeeded */

if(cFailedDirs||cFailedFiles||cFailedRegKeys||cFailedRegVals
||cFailedShortcuts)
{
/* The installation failed, so clean up and exit */


/* TO DO: Undo any actions taken in Install_Init() */

#ifdef __WINBUG

/* WINBUG: codeINSTALL_EXIT_UNINSTALL doesn't work - it causes the*/
/* "Writing uninstall info" dialog to hang. We'll always return */
/* codeINSTALL_EXIT_DONE instead. */
return codeINSTALL_EXIT_DONE;

#else

return codeINSTALL_EXIT_UNINSTALL;

#endif

}


/* IMPORTANT NOTE: */

/* We must register OCX controls ourselves for CE 2.11 Palm-size PC */
/* devices due to a bug in "wceload.exe" that causes the device to */
/* hang while creating registry entries. */

/* If you plan to distribute your application to Palm-size PC users,*/
/* **DO NOT** mark the files as self-registering from within */
/* InstallShield for Windows CE. You will need to register the */
/* controls from within this DLL instead. */



/* TO DO: Add any other controls you need to register below. */


MessageBox(hwndParent, "PostInstall", "PostInstall", MB_OK);
return codeINSTALL_EXIT_DONE;
}




/* This function will be executed before the uninstall starts. */

codeUNINSTALL_INIT Uninstall_Init(HWND hwndParent,
LPCTSTR pszInstallDir)
{

/* Undo anything that was done during install through this DLL, */
/* creating shortcuts etc */
MessageBox(NULL, "Pre-uninstall", "Pre-UnInstall", MB_OK);
return codeUNINSTALL_INIT_CONTINUE;

}

/* This function will be executed after the uninstall finishes */
codeUNINSTALL_EXIT Uninstall_Exit(HWND hwndParent)
{
/* TO DO: Undo any other actions taken during installation and not */
/* cleaned up in Uninstall_Init(). */
MessageBox(NULL, "Post-uninstall", "Post-UnInstall", MB_OKCANCEL);
return codeUNINSTALL_EXIT_DONE;
}

leandrobecker
08-30-2005, 04:26 PM
I'm suffering this problem too !
Did you found a solution ?
Please post it ... I'm getting crazy with this problem ...
Thank you