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 :-)
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
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.
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%
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
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...