Creating a unified installer for both SmartPhone and PocketPC

Hi,

Is it possible to create a unified installer that automatically installs the correct version of software depending on whether a SmartPhone versus PocketPC is connected?

Basically, one installer self extracting Windows .exe file that installs the correct .cab file of two .cab files (SmartPhone versus PocketPC).

Can it be done with the .inf/.ini files?

[363 byte] By [MarkRejhon] at [2007-12-16]
# 1

I have found out .NET CF 1.0 apps can run on both SmartPhones and PocketPC's all the way to 2002 (at least, in my testing) so I'll be using the unified executable method instead.

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 2
I have updated the executable to function properly on both PocketPC and SmartPhone.

How do I create a .cab file that will install itself on either SmartPhone (2003) or PocketPC (2002, 2003)?

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 3

You can't. CAB format is different for SP 2003 and PPC 2003. Unified CAB format is supported on Windows Mobile 5.0.

Create two different CABs and specify supported platforms in relevant sections of the CAB's INF instead.

IlyaTumanov at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 4
I have two different .cab files successfully created for each device.

I searched Microsoft's MDSN several times over the last two working days, but have been unable to do this. How do I modify the two .inf files and the corresponding .ini file, so that a single installer will automatically install the correct .cab file?

I tried the "UnsupportedPlatforms" section and that did not work.

I have manually installed the executable and it works great on PPC2002, WM2003, WM2003SE, and SmartPhone 2003. (176x220, 240x240, 320x240, 240x320).

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 5
I just copied CabWiz from VS 2005 and used it to create a .cab file under my existing VS 2003 environment.

Surprise! The .cab file installs on PocketPC 2002, 2003, 2003SE and SmartPhone 2003. Seems like a unified .cab file is possible after all... Unified executable, unified cab file.

(Why doesn't Microsoft advertise this? I wasted a full day trying to figure this out.)

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 6

We'd love to, but CAB format IS different. SP 2003 CABs are compressed and signed; PPC CABs are uncompressed and unsigned.
Which SP 2003 device do you have? Any chance it's PPC 2003 Phone Edition?

Here's how to specify platform in CAB's INF:

http://groups-beta.google.com/group/microsoft.public.smartphone.developer/msg/871ef3e1806be9d1?hl=en&

IlyaTumanov at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 7
It's an Audiovox SMT 5600, clearly SmartPhone 2003.

The other devices we are testing on are an old Samsung SPH-i700 (PocketPC 2002) as well as an Audivox PPC-6600 (Windows Mobile 2003 SE)

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 8
I just tested on an iPaq 4155 (PocketPC 2003), and it works.

The very same wireless-OTA-download installable .cab file works on all of these:
- Audiovox SMT5600 (Windows Mobile 2003 SE)
- Samsung SPH-i700 (PocketPC 2002)
- iPaq 4155 (PocketPC 2003)
- Audiovox SMT 5600 (SmartPhone 2003)

It works as long as I use cabwiz.exe from VS 2005 at the command line to build the .cab file. Is it a miracle? What makes this possible?

The application is a Compact Framework 1.0 compatible application, that runtime automatically detects SmartPhone versus PocketPC.

Nontheless, I am pleased I have a single installer installing a single executable on all these platforms, making it user-friendly. (We expect to send this software away for Microsoft certification soon..)

If you want to email me back at mark05 (at) magma.ca I can tell you the company I work for and the details and we can figure out what the heck I did wrong (or right) to cause this scenario to happen.

If you wish, I can even supply you with the "miracle" cab file that works on all these platforms.

Although I am mainly testing wireless OTA downloads of the .cab file at this time for simplicity since our target is wireless capable devices anyway, the same desktop installer .exe works on all platforms too (installing the same cab file)

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 9
More details:

- I built the executable targeted towards SmartPhones in VS .NET 2003, but made sure that it also works on PocketPC's. So the executable is signed, but the older PocketPC's just seems to just ignore the signature in the executable. (Which is okay with me.)

- Compact Framework 1.0 in C# is used.

- I build the .cab using cabwiz from VS .NET 2005, but avoiding SmartPhone command line options. i.e. NO COMPRESSION.

- This .cab installs fine on PocketPC 2002, 2003, 2003SE, and SmartPhone 2003. I doublechecked this by doing it 3 times on each device.

The .cab file is not compressed. The SmartPhone seems to accept uncompressed .cab files fine, but it does give me a warning that the .cab is from an untrusted source and asks if I should continue anyway. I press the appropriate button, and it installs it anyway.

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 10
One thing that does get me thinking - It may be necessary for Microsoft certification to have two separate .cab files, since my company is looking to purchase signing services for SmartPhone units.

So the existence of signature on a .cab file might cause PocketPC installation attempts to fail?

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 11

Q: As part of our security initiatives, we are starting to sign all of our CABs, but after we sign a Pocket PC CAB, it no longer works. Why?

Please see this answer here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/migration_developers_faq.asp

IlyaTumanov at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 12
Thanks for letting me know.

We will change this approach after our beta testing is completed, since we do want to follow proper Microsoft procedure since we want to get the software Microsoft certified soon.

At the moment, we are targetting only 2002 and 2003 devices, and beta testers do not mind the unsigned files initially. However, we will need to target 2005 devices once we have the ability to test actual hardware, and we will need a proper installer during actual release.

MarkRejhon at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices General...