|
|
|
start date: Thu, 23 Aug 2007 01:46:00 -0700,
posted on: microsoft.public.dotnet.framework.compactframework
back
| Thread Index |
|
1
davebythesea
|
|
2
Peter Foot [MVP]
|
Installing .NET Framework along with application
Hi,
So I have built a PocketPc 2003 application. It uses a Sql Mobile database.
I built the app in VS2005.
Now, I need to have .NET framework and SqlCe database installed on the
device to have the app run ok. So, when I developed the Smart device CAB
installer, it basically contains the required .NET and SqlCe CAB files along
with the main application exe and the other files it uses.
I included a Setup DLL in the install CAB, so that once the CAB is unpacked
I initiate a soft reset of the device. When the device turns back on I run a
shortcut in StartUp folder (which was copied during unpacking of the CAB
file). This shortcut points to a WinCE exe (not dependent on .NET) and the
purpose of this exe is to run the .NET and SqlCe CABs and install them to the
device. Once this is over I then soft reset the device and the app can run as
normal.
But, this seems to me liek there must be a better way for the main Instal
CAB to detect if .NET and SqlCE is installed on the device and install it
where required?
I think maybe this can be done via having the device cradled and the
application installed by way of a desktop installer. But, my app is delivered
from the Internet and downloaded to a device so theres no direct interface to
detect whats on the device and whats not i.e. .NET framework.
So, I'm just curious how everyone else is deploying there .NET applications
via the internet? Especially as there is no way to know if the device has the
framework installed or not.
Thanks for any insights, tips etc...
Dave
Date:Thu, 23 Aug 2007 01:46:00 -0700
Author:
|
Re: Installing .NET Framework along with application
You can detect the presence of the .NETCF on the device from your setup dll
by checking the registry. Look at the key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework]
This contains DWORD values for each of the framework versions installed and
their install state (1 installed, 0 not installed). Because these are the
full build versions you can check for likeness on those beginning with 1.0
or 2.0 or check for the full version if you want to deploy a service pack if
the version installed is older.
You can check for the Sql Mobile dll in this key:-
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Installer\Assemblies\Global]
Value is a multistring called System.Data.SqlServerCe, Version=3.0 etc
Installing separate cab files will still require a similar approach, another
which should work is to queue up the installer after your cab file is
installed (the installer cannot run multiple installations concurrently so
use CeRunAppAtTime to start the .NETCF cab installing a short while after
your custom setup dll is last called). Alternatively stick to your existing
reset and autorun approach.
Peter
--
Peter Foot
Microsoft Device Application Development MVP
www.peterfoot.net | www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility
"davebythesea" wrote in message
news:F017C529-5266-4B34-AFA9-67E9EE21194A@microsoft.com...
> Hi,
>
> So I have built a PocketPc 2003 application. It uses a Sql Mobile
> database.
> I built the app in VS2005.
>
> Now, I need to have .NET framework and SqlCe database installed on the
> device to have the app run ok. So, when I developed the Smart device CAB
> installer, it basically contains the required .NET and SqlCe CAB files
> along
> with the main application exe and the other files it uses.
>
> I included a Setup DLL in the install CAB, so that once the CAB is
> unpacked
> I initiate a soft reset of the device. When the device turns back on I run
> a
> shortcut in StartUp folder (which was copied during unpacking of the CAB
> file). This shortcut points to a WinCE exe (not dependent on .NET) and the
> purpose of this exe is to run the .NET and SqlCe CABs and install them to
> the
> device. Once this is over I then soft reset the device and the app can run
> as
> normal.
>
> But, this seems to me liek there must be a better way for the main Instal
> CAB to detect if .NET and SqlCE is installed on the device and install it
> where required?
>
> I think maybe this can be done via having the device cradled and the
> application installed by way of a desktop installer. But, my app is
> delivered
> from the Internet and downloaded to a device so theres no direct interface
> to
> detect whats on the device and whats not i.e. .NET framework.
>
> So, I'm just curious how everyone else is deploying there .NET
> applications
> via the internet? Especially as there is no way to know if the device has
> the
> framework installed or not.
>
> Thanks for any insights, tips etc...
>
> Dave
Date:Thu, 23 Aug 2007 11:13:46 +0100
Author:
|
|
|