How to install file to storage card

B

Brad Wood

I need to install my application's database to a storage card.

Questions:
- I couldn't find any way to do this with a cabwiz create .cab file. Am
I wrong?
- Consequently, I would have to use a 3rd party tool to create my
install, correct?
- The current deployment model is for Internet connected users to simply
click on links to .cab files which automatically download and run. If I
create an install via a 3rd party, I would no longer be able to use this
simple deployment model, correct?
 
I

Ilya Tumanov [MS]

You can install the database file to the application folder and choose to
install the application to the storage card if you have one.
That would ensure your application can be installed even if you do not have
storage card.
It's not a good idea to hardcode the storage card name.

Best regards,

Ilya

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

Darren

You will need to install the database to the CF card if the database is much
larger than the onboard memory.
SQL CE allows for databases as large as 2GB.


"Ilya Tumanov [MS]" said:
You can install the database file to the application folder and choose to
install the application to the storage card if you have one.
That would ensure your application can be installed even if you do not have
storage card.
It's not a good idea to hardcode the storage card name.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Date: Tue, 08 Mar 2005 14:53:35 -0700
From: Brad Wood <bradley_.wood_@ndsu_.edu>
User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: How to install file to storage card
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 66.28.162.30
Lines: 1
Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.compactframework:72780
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

I need to install my application's database to a storage card.

Questions:
- I couldn't find any way to do this with a cabwiz create .cab file. Am
I wrong?
- Consequently, I would have to use a 3rd party tool to create my
install, correct?
- The current deployment model is for Internet connected users to simply
click on links to .cab files which automatically download and run. If I
create an install via a 3rd party, I would no longer be able to use this
simple deployment model, correct?
 
B

Brad Wood

Ilya said:
You can install the database file to the application folder and choose to
install the application to the storage card if you have one.
That would ensure your application can be installed even if you do not have
storage card.

That's not at all what I need to accomplish. I want the application
installed on volatile memory except for my database; I need that on
non-volatile.
It's not a good idea to hardcode the storage card name.

I know; that's why I posted this question. I could in fact easily
install my database to a memory card by hard coding the install path in
my cab file setup's .inf, but what I need to do is dynamically find the
path to a storag card (if one exists) and install my database there.
 
B

Brad Wood

Darren said:
You will need to install the database to the CF card if the database is much
larger than the onboard memory.

Yes I know; I'm asking how this can be done...
 
I

Ilya Tumanov [MS]

Granted, it's a little bit twisted, but it is what you're trying to
accomplish.
You can install data base to the application folder you can redirect to any
installed flash card.
That does not mean you have to install other files to the same location.
You can specify any location you want using available macros.
Allow me to demonstrate:

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

[CEStrings]
AppName = "TEST"
InstallDir = %CE1%\%AppName%

[CEDevice]
UnsupportedPlatforms = "HPC","Jupiter"
BuildMax = 0xE0000000

[DefaultInstall]
CopyFiles = Files.Application,Files.DataBase

[DestinationDirs]
Files.Application = 0,%CE1%\%AppName%
Files.DataBase = 0,%InstallDir%

[Files.Application]
"app.txt",app.txt,,0x20000001

[Files.DataBase]
"db.txt",db.txt,,0x20000001

[SourceDisksNames]
1 = ,"Path",,

[SourceDisksFiles]
app.txt = 1
db.txt = 1

That would install db.txt to the storage at your choice (make sure
appropriate command line is used for WCELOAD).
And it would install app.txt to \Program Files\Test.

Alternative solution would be to copy the db file from setup DLL, but that
only would work if it's small enough.
Or, if you're using Active Sync for deployment, you could push DB file to
the storage card separately from the CAB using RAPI.

Best regards,

Ilya

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

--------------------
 
B

Brad Wood

Ilya said:
That would install db.txt to the storage at your choice (make sure
appropriate command line is used for WCELOAD).

So I tried to test out using wceload, and I'm at a loss. Running this
code does nothing:

using OpenNETCF.Diagnostics;
ProcessStartInfo pi = new ProcessStartInfo(@"\Windows\wceload.exe app.cab");
Process.Start( pi );

If I simply run Internet Explorer, it works. I've used Path.Exists to
verify that the paths to wceload.exe and app.cab (in root) as included
in the parameter to ProcessStartInfo are valid. app.cab is a valid cab
that executes fine on its own.
 
C

Chris Tacke, eMVP

You're trying to start the CAB itself, not wceload. Start wceload with the
cab file path as the parameter.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
I

Ilya Tumanov [MS]

I would guess you're using ProcessStartInfo incorrectly. Consider
installing console to your PPC for experiments.
Do not forget you need WCELOAD to ask you for destination. You should add
/askdest argument to a command line.
Should you use Active Sync for deployment, it would ask for destination.

Best regards,

Ilya

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

--------------------
Date: Wed, 09 Mar 2005 10:52:21 -0700
From: Brad Wood <bradley_.wood_@ndsu_.edu>
User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: How to install file to storage card
References: <[email protected]>
<[email protected]>
 
B

Brad Wood

You're trying to start the CAB itself, not wceload. Start wceload with the
cab file path as the parameter.

I don't understand; that's exactly what I'm doing. The paramater to
ProcessStartInfo is a command line (@"\Windows\wceload.exe app.cab").
It gives the path to wceload.exe and the path to the cab as wcload's
first parameter (app.cab is in the root).
 
C

Chris Tacke, eMVP

Wow, how the hell did I miss that? I must need more coffee - sorry. try a
fully qualified path to the CAB.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
B

Brad Wood

Ilya said:
Consider
installing console to your PPC for experiments.

I installed "pocket console" and "cmd" from symbolictools. I'm not sure
that those tools are designed for Windows Mobile 2003 SE (screens
jumbled, console doesn't echo text, etc..), but it worked.
The app.txt file went to it's program files directory and the db.txt
file went where I directed it after prompting from wceload.

Is this because the destination for db.txt in the .inf file in your
example is "InstallDir" which does not yet exist that wceload knows to
prompt for the location to install that file while it doesn't prompt for
the location of the app.txt?

[DestinationDirs]
Files.Application = 0,%CE1%\%AppName%
Files.DataBase = 0,%InstallDir%
 
I

Ilya Tumanov [MS]

No, that's because %InstallDir% is a special macro which can be substituted
upon installation.
Value you have to specify for InstallDir in CEStrings section is just a
default one.

Best regards,

Ilya

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

--------------------
Date: Wed, 09 Mar 2005 15:22:53 -0700
From: Brad Wood <bradley_.wood_@ndsu_.edu>
User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: How to install file to storage card
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
In-Reply-To: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <u#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: 66.28.162.30
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.compactframework:72891
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
Consider
installing console to your PPC for experiments.

I installed "pocket console" and "cmd" from symbolictools. I'm not sure
that those tools are designed for Windows Mobile 2003 SE (screens
jumbled, console doesn't echo text, etc..), but it worked.
The app.txt file went to it's program files directory and the db.txt
file went where I directed it after prompting from wceload.

Is this because the destination for db.txt in the .inf file in your
example is "InstallDir" which does not yet exist that wceload knows to
prompt for the location to install that file while it doesn't prompt for
the location of the app.txt?

[DestinationDirs]
Files.Application = 0,%CE1%\%AppName%
Files.DataBase = 0,%InstallDir%
 

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