Installing .NET Framework along with application

G

Guest

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
 
P

Peter Foot [MVP]

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
 
I

Ilya Tumanov [MS]

Small correction:



DWORD values under the key named "X.Y.BBBB.mm" for each installed NETCF
version, value of 0 means it's in RAM, 1 - in ROM.



Versions with the different X.Y are side by side major versions, they are
installed at the same time.



Same X.Y are not side by side. However there can be two of these with same
X.Y if you have version in ROM. Version with higher build number is actually
installed in that case.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Peter Foot said:
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 said:
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
 
G

Guest

Thanks for the replies. Its defiently useful for me to know what RegKeys to
query to see the status of the .NET framework installs on the device. I could
probbaly make my .NET installer a bit more clever now by first querying these
keys to see what needs installing and what doesnt.

Cheers,
Dave

Ilya Tumanov said:
Small correction:



DWORD values under the key named "X.Y.BBBB.mm" for each installed NETCF
version, value of 0 means it's in RAM, 1 - in ROM.



Versions with the different X.Y are side by side major versions, they are
installed at the same time.



Same X.Y are not side by side. However there can be two of these with same
X.Y if you have version in ROM. Version with higher build number is actually
installed in that case.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

Peter Foot said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top