Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mobile 5.0 Setup.dll running multiple CAB files - wceload.exe

97 views
Skip to first unread message

Charcoal

unread,
Dec 8, 2005, 4:27:03 PM12/8/05
to
I posted some additional detail a few days ago on this topic (wceload.exe
issue in mobile 5.0) but have not gotten a response, so I thought I would try
again…


Issue: Using setup.dll in my applications CAB to install support CABs (ie:
sql.ppc3.arm.CAB and sqlce.ppc3.arm.CAB).
I am trying to provide backwards compatibility for Microsoft Mobile 5.0 OS.

A little history…I developed a mobile application that ran perfect on Dell
Axim versions 5.0 and earlier on Windows CE version OS. Now that our clients
are purchasing Dell Axim 5.1/5.1v the app fails. This is because the OS was
“upgraded” to Windows Mobile 5.0 for these new devices, which includes
Compact Framework 2.0 also upgraded.

To resolve the failure; I downloaded the Microsoft Visual Studio 2005 and
re-compiled my application/s. I adjusted references to library components as
needed and I added a CAB project. Made a few edits in the .inf and put the
package together.

Everything installs on the mobile device BUT the supporting CABs (mentioned
above) do NOT automatically install as they did before. I will get "compact
frame work" related errors until I manually initiate install of the
additional CABs. Then everything works fine. No changes to the setup.dll code
were made except I re-compiled in VS ’05 for support on Windows Mobile 5.0
Pocket PC SDK (ARMV4I).

Question: Is there sample C++ code that shows how to create a setup.dll for
Mobile 5.0 that will auto install multiple supporting CABs and will run on
Mobile 5.0 OS?

I am only running one instance of wceload.exe. I get its handle, run one CAB
and finish, then run subsequent…Here is a simple example of code in my dll:

// Sample CESetup DLL

#include <windows.h>
#include <tchar.h>
#include "ce_setup.h"
#include <winbase.h>

const TCHAR szTITLE[] = TEXT("CESetup Sample DLL");
const TCHAR szINST_INIT[] = TEXT("Install_Init\n\nContinue?");
const TCHAR szINST_EXIT[] = TEXT("Install_Exit\n\nContinue?");
const TCHAR szUNINST_INIT[] = TEXT("Uninstall_Init\n\nContinue?");
const TCHAR szUNINST_EXIT[] = TEXT("Uninstall_Exit");
const TCHAR szError[] = TEXT("Error");

BOOL WINAPI DllMain(HANDLE hMod, DWORD dwReason, LPVOID lpvReserved)
{
return TRUE;
}

codeINSTALL_INIT Install_Init(
HWND hwndParent,
BOOL fFirstCall,
BOOL fPreviouslyInstalled,
LPCTSTR pszInstallDir)
{
return codeINSTALL_INIT_CONTINUE;
}

codeINSTALL_EXIT Install_Exit(
HWND hwndParent,
LPCTSTR pszInstallDir,
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts)
{
DWORD dwError = NOERROR;
PROCESS_INFORMATION pi = {0};

LPWSTR lpExe = TEXT("\\windows\\wceload.exe");
LPWSTR lpCmdLine = TEXT("\\windows\\sql.ppc3.arm.cab");

CreateProcess(lpExe, lpCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
if (pi.hProcess)
CloseHandle (pi.hProcess);
if (pi.hThread)
CloseHandle (pi.hThread);

Sleep(10000);

lpCmdLine = TEXT("\\windows\\sqlce.ppc3.arm.cab");
CreateProcess(lpExe, lpCmdLine, NULL, NULL, FALSE, 0, NULL, NULL, NULL, &pi);
if (pi.hProcess)
CloseHandle (pi.hProcess);
if (pi.hThread)
CloseHandle (pi.hThread);

return codeINSTALL_EXIT_DONE;
}

codeUNINSTALL_INIT Uninstall_Init(HWND hwndParent, LPCTSTR pszInstallDir)
{
return codeUNINSTALL_INIT_CONTINUE;
}

codeUNINSTALL_EXIT Uninstall_Exit(HWND hwndParent)
{
return codeUNINSTALL_EXIT_DONE;
}

////////////////////

I left out some fat so it is easy to read…Thanks to anyone how can point me
in the right direction!!

Chuck

P.S
I hope I get an answer because I would hate to keep posting this for the
rest of my life until I do :-)

Robert Levy [MS]

unread,
Dec 8, 2005, 5:50:40 PM12/8/05
to
On Windows Mobile 5, only one instance of wceload.exe can run at a time. We
have a whitepaper in the queue showing how to work around that, but here's
the suggestion I put in the Migration FAQ:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/migration_developers_faq.asp
"Starting with Windows Mobile 5.0, only one instance of the installer
(wceload.exe) can be running at a time on Pocket PC devices. This
restriction has always been in place on Smartphone. As a result, CAB files
that start other CAB files from a custom setup DLL may not work on Windows
Mobile 5.0. The workaround for this is to have a small executable in the CAB
that a custom setup.dll starts in its Install_Exit entry point. This
executable can get a handle to the running wceload.exe process, wait for
wceload.exe to exit, and then restart wceload.exe on the additional CABs."

--
-Robert Levy
Program Manager, Windows Mobile Developer Experience
http://blogs.msdn.com/windowsmobile

"Charcoal" <Char...@discussions.microsoft.com> wrote in message
news:3F621FE8-462F-4308...@microsoft.com...


>I posted some additional detail a few days ago on this topic (wceload.exe
> issue in mobile 5.0) but have not gotten a response, so I thought I would
> try

> again.


>
>
> Issue: Using setup.dll in my applications CAB to install support CABs (ie:
> sql.ppc3.arm.CAB and sqlce.ppc3.arm.CAB).
> I am trying to provide backwards compatibility for Microsoft Mobile 5.0
> OS.
>

> A little history.I developed a mobile application that ran perfect on Dell

> and finish, then run subsequent.Here is a simple example of code in my

> I left out some fat so it is easy to read.Thanks to anyone how can point

Charcoal

unread,
Dec 9, 2005, 11:05:02 AM12/9/05
to
Thanks for the quick response Robert; unfortunately, this does not help me
much. I’ve seen this information posted all over the Internet but I’m not
sure that is the problem in my case. You see I’m only running one instance of
wceload.exe, as far as I can tell, but my setup.dll still does not trigger
the two additional CABs to begin installing.

In my self extracting .exe (created using WinRAR) has 3 files, a setup.ini,
setup.vbs, and the application CAB (eScheduleMobile_PPC.ARM.CAB).
======================================
Setup.vbs: This calls the CEAPPMGR.EXE mobile application installer.

CODE SAMPLE

Dim WSHShell

Set WSHShell = WScript.CreateObject("WScript.Shell")

If MsgBox("This will install eSchedule Mobile to your handheld device.
Click [OK] to continue or [Cancel] to abort the installation.", VBOKCancel,
"eSchedule Mobile Installation") = VBOK Then

Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App" &
Chr(32) & "Paths\CEAPPMGR.EXE\"

RegPath = WSHShell.RegRead (Key)

Set filesys = CreateObject("Scripting.FileSystemObject")

WSHShell.Run Chr(34) & RegPath & Chr(34) & Chr(32) & Chr(34) &
filesys.GetAbsolutePathName("Setup.ini") & Chr(34)

End If

======================================

Setup.ini: Instructions
CODE SAMPLE

[CEAppManager]
Version = 1.0
Component = eSchedule Mobile

[eSchedule Mobile]
Description = eSchedule Mobile
CabFiles = eScheduleMobile_PPC.ARM.CAB

The applications CAB file (eScheduleMobile_PPC.ARM.CAB)

It’s best to show you the inf file to see what is included:

[Version]
Signature="$Windows NT$"
Provider="Pulte Homes"
CESignature="$Windows CE$"

[CEStrings]
AppName="eSchedule Mobile"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=4.21
VersionMax=5.00
BuildMax=0xE0000000 ; support for square screens and screen rotation

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[DefaultInstall.ARM]
CopyFiles=Files.ARM
CESetupDLL=eScheduleMobileSetup.dll

[SourceDisksNames]
20=,"Common5",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
1=,"Common1",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
2=,"Common2",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
3=,"Common3",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
4=,"Common4",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"

[SourceDisksNames.ARM]
18=,"sql",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
19=,"sqlce",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
7=,"ARM7",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"
8=,"ARM_Setup",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_2.0\eScheduleMobileSolution\setup files\"

[SourceDisksFiles]
_eScheduleMobile.exe=20
eScheduleMobile.exe=1
eScheduleMobile.config.xml=2
eScheduleMobile.DB.xml=3
Pulte.Mobile.CompactFramework.dll=4

[SourceDisksFiles.ARM]
sql.ppc3.arm.cab=18
sqlce.ppc3.arm.cab=19
vsd_config.txt.ARM=7
eScheduleMobileSetup.dll=8

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE11%
Files.ARM=0,%InstallDir%
Files.ARM=1,%CE2%

[Files.Common]
_eScheduleMobile.exe,,,0
eScheduleMobile.exe,,,0
eScheduleMobile.config.xml,,,0
eScheduleMobile.DB.xml,,,0
Pulte.Mobile.CompactFramework.dll,,,0

[Files.ARM]
sql.ppc3.arm.cab,,1
sqlce.ppc3.arm.cab,,1
vsd_config.txt,vsd_config.txt.ARM,,0
eScheduleMobileSetup.dll,,,0

[Shortcuts]
eSchedule Mobile,0,eScheduleMobile.exe,%CE11%


7=,"ARM7",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_1.0\eScheduleMobileSolution\setup files\"
8=,"ARM_Setup",,"C:\Development\Pulte\Homebuilder\eScheduleMobileSolution_1.0\eScheduleMobileSolution\setup files\"

[SourceDisksFiles]
_eScheduleMobile.exe=20
eScheduleMobile.exe=1
eScheduleMobile.config.xml=2
eScheduleMobile.DB.xml=3
Pulte.Mobile.CompactFramework.dll=4

[SourceDisksFiles.ARM]
netcf.core.ppc3.arm.cab=17
sql.ppc3.arm.cab=18
sqlce.ppc3.arm.cab=19
vsd_config.txt.ARM=7
eScheduleMobileSetup.dll=8

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu
Files.ARM=0,%InstallDir%
Files.ARM=1,%CE2%

[Files.Common]
_eScheduleMobile.exe,,,0
eScheduleMobile.exe,,,0
eScheduleMobile.config.xml,,,0
eScheduleMobile.DB.xml,,,0
Pulte.Mobile.CompactFramework.dll,,,0

[Files.ARM]
netcf.core.ppc3.arm.cab,,1
sql.ppc3.arm.cab,,1
sqlce.ppc3.arm.cab,,1
vsd_config.txt,vsd_config.txt.ARM,,0
eScheduleMobileSetup.dll,,,0

[Shortcuts]
eSchedule Mobile,0,eScheduleMobile.exe,%CE11%


The Setup.dll code this inf file refers to was included in my very first
posting….This shows I am getting the handle of wceload.exe to run two
additional CABs, one after the other…Not sure why this won’t work on Mobile
5.0 when it did on WindowsCE. This is pretty simple and straightforward.

DOES ANYONE HAVE A CODED SAMPLE SOLUTION that will install multiple CABS on
Mobile 5.0 OS? If so, I would love to see how you coded the setup.dll or
please share a different approach. Very sincerely (but a bit frustrated)
Charcoal
P.S> Again, thanks so much Robert for your response. If I am just missing
your point please feel free to elaborate or perhaps you have a sample to
share with everyone who might have this same issue. Thanks team!
--
Charcoal
Going Mobile...Keep me moving.

Charcoal

unread,
Dec 9, 2005, 11:11:03 AM12/9/05
to

CODE SAMPLE

Dim WSHShell

RegPath = WSHShell.RegRead (Key)

End If

======================================

Setup.ini: Instructions
CODE SAMPLE

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[DefaultInstall.ARM]
CopyFiles=Files.ARM
CESetupDLL=eScheduleMobileSetup.dll

[Shortcuts]
eSchedule Mobile,0,eScheduleMobile.exe,%CE11%

[Shortcuts]
eSchedule Mobile,0,eScheduleMobile.exe,%CE11%

row...@gmail.com

unread,
Dec 18, 2005, 11:31:58 PM12/18/05
to
i have a coded example.
upon exit of the main ba installation it calls another exe which
installs all the cabs
see:
http://row1.info/content/view/85/2/


Charcoal wrote:
> I posted some additional detail a few days ago on this topic (wceload.exe
> issue in mobile 5.0) but have not gotten a response, so I thought I would try

> again...


>
>
> Issue: Using setup.dll in my applications CAB to install support CABs (ie:
> sql.ppc3.arm.CAB and sqlce.ppc3.arm.CAB).
> I am trying to provide backwards compatibility for Microsoft Mobile 5.0 OS.
>

> A little history...I developed a mobile application that ran perfect on Dell


> Axim versions 5.0 and earlier on Windows CE version OS. Now that our clients
> are purchasing Dell Axim 5.1/5.1v the app fails. This is because the OS was
> "upgraded" to Windows Mobile 5.0 for these new devices, which includes
> Compact Framework 2.0 also upgraded.
>
> To resolve the failure; I downloaded the Microsoft Visual Studio 2005 and
> re-compiled my application/s. I adjusted references to library components as
> needed and I added a CAB project. Made a few edits in the .inf and put the
> package together.
>
> Everything installs on the mobile device BUT the supporting CABs (mentioned
> above) do NOT automatically install as they did before. I will get "compact
> frame work" related errors until I manually initiate install of the
> additional CABs. Then everything works fine. No changes to the setup.dll code
> were made except I re-compiled in VS '05 for support on Windows Mobile 5.0
> Pocket PC SDK (ARMV4I).
>
> Question: Is there sample C++ code that shows how to create a setup.dll for
> Mobile 5.0 that will auto install multiple supporting CABs and will run on
> Mobile 5.0 OS?
>
> I am only running one instance of wceload.exe. I get its handle, run one CAB

> and finish, then run subsequent...Here is a simple example of code in my dll:

> I left out some fat so it is easy to read...Thanks to anyone how can point me

MechTech

unread,
Jan 27, 2006, 7:34:26 PM1/27/06
to
Mobile 5.0 and Active Sync 4.x problems in Dell Axim X51v DELL ADMITS there
is a problem and that they and Microsoft are working on a resolution. I
spend 2 hell weeks with a new Dell Axim X51v & Windows Mobile 4.1, then back
to 4.0 then back to 4.1 ... thought I had it all ironed out UNTIL the Axim
started acting up. Take it form the cradle, fully charged (make sure that
the active sync appication internally is OFF, as a precaution) and go about
your business. The next time you need to use it you will need to do a soft
reset before it will turn on. This happened 3 days straight every time take
out of the cradle ... along with problems of NOT reconizing a 2GB CF storage
card unless soft reset with card OUT then card placed in. (then you'd lose it
at any give time after). NEXT problem is that if taken out of cradle fully
charged, then shut off and placed on your night table for the moring (either
just OFF or OFF with the MAIN switch off, does not matter) when you first
start in the AM ... SOFT reset necessary and tells you the battery is
critically low and that if you continue to use it you could lose data. >>>
>>> AFTER nearly a whole day on line with Microsoft Techs and another 3x with Dell Techs ... they finally admitted today ... that there is a known issue with this and that Microsoft and Dell were working together on a fix ... they could not guarantee when the fix would be available but they expected about 2 weeks.
>>> My next question was ... what do I do for the next 2 weeks and then what about after that ???
>>> the unit was 3 mos old, purchased it in October but just did not have the time to do the transition till Jan 8, 2006 and I've been frustrated ever since.
I am an advanced user and tech and this was racking my brains ... first the
permissions for the firewall, then the bios upgrade, then the darn NECESSITY
to acess the internet ... why does it have to stay connected to the internet
unless you WANT it to ? I don't know about all you out there but MY data on
my OUTLOOK and PDA are PRIVATE ... and not for the benifit of anyone else.
There is NO reason that it MUST stay connected to the internet and ONCE it
knows you have cable access it will near refuse to sync ( as did 2003 w/AS
3.8 but in 3.8 after a few starts with internet access denied ... it would
accept that it was NOT going to get that connection ).
>>> DELL WILL REFUND YOUR MONEY !!! IF you purchased within the last 30 days ... there will be only slight pressure to replace it (for another one with the same issue) but if it is older than 30 days first you must do the Tech line thing and try to reason with the person on the tech line ... the interactive chat session with the people in INDIA that do the chat sessions .. but once you tell them you have the problem with the CF and soft reset necessary and you've done all else ... they will REFUND your money if you insist ... trick here is you must be the original purchaser from Dell as they credit the money to however it had been paid for to tell ... or if you purchased it from the original purchaser ... the original purchaser will get the refund. Be careful they are crafty ... you must know HOW much you paid .. then they try to forget about the additiional items like the extended warranty and the sales tax paid and the shipping but at least you have some relief.
>>> I had ordered a x50v Axim from the Dell Outlet store that arrived a few days ago .. but win, lose or draw .. I could not RISK losing my data and I needed one to work ... and i even reached to Ebay and purchased a X5 for $140 that showed up at my door today BRAND NEW IN THE BOX ... I paid $459.00 for the X50V which I admit is sleeker and sexier ... the X5 bieng bulkier ... but they both have Pocket PC 2003 / 2nd edition ... and use good old Active Sync 3.8. I even purchased the NEWEST version (released YESTERDAY) of Intellisyn 5.5 which I have not even tried you ... so you know how critical this issue was to me.
>>> good luck and I hope you get your $$ back from Dell, if Dell does this than all the other leading manufcaturers should too, I think BUT it is like pulling teeth. For the hourly rate I charge a client to work on thier Networks ... I could have earned over $3000.00 for the time I spend on this issue ... and you tech guys KNOW what I mean ... you CAN'T let it beat you, so you stick to it through sleepless nights and your wife thinks you;re having online chats with other females... LOL but it is the challenge that you have to take.
>> Take my advice now and spend your time negotiating a return on the Axim X51v issue ( or any other manufaturer that has the same 5.0 issues) right now!

JPDS

unread,
Jan 28, 2006, 8:39:35 AM1/28/06
to
I have one customer that has 10 Axim X51s that exhibit the problems you
describe below. Ironically, I have one for development purposes, and rarely
experience any difficulties.

The first thing Dell will have you do if you call them is perform a
hard-reset and re-install all your software. If this does not work, you can
try the hack below that is posted on the AximSite, and that several people
seem to have had success with eliminating the battery draining problem as
well as the power up problem was to put ActiveSync into manual sync mode. To
try this use the following steps:

HERE is the "ACTIVESYNC to MANUAL" trick

a.. Open Activesync on your WM5 device
b.. Click Menu
c.. Click Add Server Source
d.. Enter any server address (eg Chillywinter.com) and click Next
e.. Enter any Username (eg Chillywinter)
f.. Enter any password (eg Chillywinter)
g.. Enter any Domain (eg Chillywinter)
h.. Click Next
i.. Click Finish

Now Menu / Schedule won't be ghosted out, so select it:

a.. Click Menu
b.. Click Schedule
c.. Change Peak times = Manual
d.. Change Off-peak times = Manual
e.. Click OK

You have now successfully changed your activesync option to manual. This
seems to have the effect of ensuring the PDA doesn't try to sync when in
standby mode.

Now delete the fake server you created:

a.. Click Menu
b.. Click Options
c.. Highlight "Exchange Server"
d.. Click Delete

Activesync will no longer try to sync when in battery / standby mode.

"MechTech" <Mech...@discussions.microsoft.com> wrote in message
news:C038624D-1174-4906...@microsoft.com...

0 new messages