473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Copying a .sdf file to Pocket PC on install

Hello everyone,

I am trying to create an application that utilizes a SQL
Mobile database. I have included that database in my main project, and
it compiles and debugs just fine.

I then created a custom installer project packaged as a class
library and made an installer project to wrap the whole thing up into
an MSI package. Basically the idea behind doing all this is so the
handheld app can be pushed out through group policy.

So far everything has gone according to plan, except for two
things....first thing is that I cannot get shortcuts to show up on the
device for my app, no matter what I do. I've created an .inf file that
SHOULD do it.....here's a snippet from the file:
__________________________________________________ ___________________
[CEStrings]
AppName="Inventory Counter"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common",,"C:\Code\MobileInventoryCounter\Inven toryCounter\bin\Release"

[SourceDisksFiles]
InventoryCounter.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
InventoryCounter.exe,,,0

[Shortcuts]
Inventory Counter,0,InventoryCounter.exe,%CE11%
__________________________________________________ ________________

The second problem I'm having is a simple one, but I can't figure out
how to do it. I need to copy the SQL Mobile database file to the
\Program Files\<appNamedirectory on the device, but can't find any
options or parameters inside Visual Studio to do that. I'm new to VS
2005, but have used prior versions, so maybe it's something I'm
missing....Thanks for your help!

Jul 11 '06 #1
4 3644
It is not recommended to use any hardcoded strings in shortcut locations
(like "Start Menu" in the following fragment Shortcuts=0,%CE2%\Start Menu).
Find the %CE??% that translates to the folder you need and use instead of a
hardcoded value.

For the second problem you can use a Remote File Viewer or ActiveSync to
copy the files you need to the device. If you want to deploy a file
automatically, use "Additional Files" field in the Project
Properties->Configuration Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello everyone,

I am trying to create an application that utilizes a SQL
Mobile database. I have included that database in my main project, and
it compiles and debugs just fine.

I then created a custom installer project packaged as a class
library and made an installer project to wrap the whole thing up into
an MSI package. Basically the idea behind doing all this is so the
handheld app can be pushed out through group policy.

So far everything has gone according to plan, except for two
things....first thing is that I cannot get shortcuts to show up on the
device for my app, no matter what I do. I've created an .inf file that
SHOULD do it.....here's a snippet from the file:
__________________________________________________ ___________________
[CEStrings]
AppName="Inventory Counter"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common",,"C:\Code\MobileInventoryCounter\Inven toryCounter\bin\Release"

[SourceDisksFiles]
InventoryCounter.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
InventoryCounter.exe,,,0

[Shortcuts]
Inventory Counter,0,InventoryCounter.exe,%CE11%
__________________________________________________ ________________

The second problem I'm having is a simple one, but I can't figure out
how to do it. I need to copy the SQL Mobile database file to the
\Program Files\<appNamedirectory on the device, but can't find any
options or parameters inside Visual Studio to do that. I'm new to VS
2005, but have used prior versions, so maybe it's something I'm
missing....Thanks for your help!

Jul 12 '06 #2
I tried changing it to a "macro" value like %CE1% and no dice on the
shortcuts.

As far as the file, I've tried just about everything I can find online
and still nothing... I'm getting read to start digging into the
documentation. I'm VERY open to suggestions at this point, so please
let me know if you have anything for me.

Wish me luck in my documentation browsing.
Yaroslav Goncharov wrote:
It is not recommended to use any hardcoded strings in shortcut locations
(like "Start Menu" in the following fragment Shortcuts=0,%CE2%\Start Menu).
Find the %CE??% that translates to the folder you need and use instead of a
hardcoded value.

For the second problem you can use a Remote File Viewer or ActiveSync to
copy the files you need to the device. If you want to deploy a file
automatically, use "Additional Files" field in the Project
Properties->Configuration Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello everyone,

I am trying to create an application that utilizes a SQL
Mobile database. I have included that database in my main project, and
it compiles and debugs just fine.

I then created a custom installer project packaged as a class
library and made an installer project to wrap the whole thing up into
an MSI package. Basically the idea behind doing all this is so the
handheld app can be pushed out through group policy.

So far everything has gone according to plan, except for two
things....first thing is that I cannot get shortcuts to show up on the
device for my app, no matter what I do. I've created an .inf file that
SHOULD do it.....here's a snippet from the file:
__________________________________________________ ___________________
[CEStrings]
AppName="Inventory Counter"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common",,"C:\Code\MobileInventoryCounter\Inven toryCounter\bin\Release"

[SourceDisksFiles]
InventoryCounter.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
InventoryCounter.exe,,,0

[Shortcuts]
Inventory Counter,0,InventoryCounter.exe,%CE11%
__________________________________________________ ________________

The second problem I'm having is a simple one, but I can't figure out
how to do it. I need to copy the SQL Mobile database file to the
\Program Files\<appNamedirectory on the device, but can't find any
options or parameters inside Visual Studio to do that. I'm new to VS
2005, but have used prior versions, so maybe it's something I'm
missing....Thanks for your help!
Jul 12 '06 #3
I would recommend to start from a cab sample you can find in the SDK. Then
modify it step by step to suit your needs. At the end you should get a cab
file that works.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
>I tried changing it to a "macro" value like %CE1% and no dice on the
shortcuts.

As far as the file, I've tried just about everything I can find online
and still nothing... I'm getting read to start digging into the
documentation. I'm VERY open to suggestions at this point, so please
let me know if you have anything for me.

Wish me luck in my documentation browsing.
Yaroslav Goncharov wrote:
>It is not recommended to use any hardcoded strings in shortcut locations
(like "Start Menu" in the following fragment Shortcuts=0,%CE2%\Start
Menu).
Find the %CE??% that translates to the folder you need and use instead of
a
hardcoded value.

For the second problem you can use a Remote File Viewer or ActiveSync to
copy the files you need to the device. If you want to deploy a file
automatically, use "Additional Files" field in the Project
Properties->Configuration Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googleg roups.com...
Hello everyone,

I am trying to create an application that utilizes a SQL
Mobile database. I have included that database in my main project, and
it compiles and debugs just fine.

I then created a custom installer project packaged as a class
library and made an installer project to wrap the whole thing up into
an MSI package. Basically the idea behind doing all this is so the
handheld app can be pushed out through group policy.

So far everything has gone according to plan, except for two
things....first thing is that I cannot get shortcuts to show up on the
device for my app, no matter what I do. I've created an .inf file that
SHOULD do it.....here's a snippet from the file:
__________________________________________________ ___________________
[CEStrings]
AppName="Inventory Counter"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common",,"C:\Code\MobileInventoryCounter\Inven toryCounter\bin\Release"

[SourceDisksFiles]
InventoryCounter.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
InventoryCounter.exe,,,0

[Shortcuts]
Inventory Counter,0,InventoryCounter.exe,%CE11%
__________________________________________________ ________________

The second problem I'm having is a simple one, but I can't figure out
how to do it. I need to copy the SQL Mobile database file to the
\Program Files\<appNamedirectory on the device, but can't find any
options or parameters inside Visual Studio to do that. I'm new to VS
2005, but have used prior versions, so maybe it's something I'm
missing....Thanks for your help!

Jul 13 '06 #4
Thank you for your responses Yaroslav. I ended up getting it working.
For everyone that is reading this post and is having the same problem I
did, here's what I did to fix my problem:

First, I have to give credit to the following two websites for giving
me the bulk of the information that I needed to get it working:

http://msdn.microsoft.com/library/de...deployment.asp
http://www.codeproject.com/netcf/Pac...ployingPPC.asp

The CodeProject Article is the one that I used the most and used the
MSDN article to "fill in the holes" where appropriate.

Basically I started with a setup that you would have at the end of
following the steps in the CodeProject article. What I did differently
was basically let VS generate the CAB files and inf files, and then got
rid of the BuildCabs.bat and .inf files. I created a Smart Cab Project
in VS and added the Primary Output and Content Files from my main
project into the CAB file. I also added the shortcuts that were needed
by right clicking on my Cab Builder Project, clicking View, then File
System. You can create shortcuts to the primary output and then drop
them where ever you'd like a shortcut to show up. I had to add the
Start Menu into the File system by right-clicking the root and add the
Start Menu as a special folder. Then once I had that done, I added the
Primary Outputs from the Smart CAB project into my installer (MSI)
project.

After that, I got rid of the pre-build event in the Custom Installer
and then I had to modify the .ini file that CEAppMgr uses to reflect
the VS generated CAB file. I also had to modify the build order by
using project dependencies.

After all that, I built the solution and it worked!!!

If you are having problems even after all this, e-mail me or better
yet, post something in this group and I'll help in whatever way I can.

Yaroslav Goncharov wrote:
I would recommend to start from a cab sample you can find in the SDK. Then
modify it step by step to suit your needs. At the end you should get a cab
file that works.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...
I tried changing it to a "macro" value like %CE1% and no dice on the
shortcuts.

As far as the file, I've tried just about everything I can find online
and still nothing... I'm getting read to start digging into the
documentation. I'm VERY open to suggestions at this point, so please
let me know if you have anything for me.

Wish me luck in my documentation browsing.
Yaroslav Goncharov wrote:
It is not recommended to use any hardcoded strings in shortcut locations
(like "Start Menu" in the following fragment Shortcuts=0,%CE2%\Start
Menu).
Find the %CE??% that translates to the folder you need and use instead of
a
hardcoded value.

For the second problem you can use a Remote File Viewer or ActiveSync to
copy the files you need to the device. If you want to deploy a file
automatically, use "Additional Files" field in the Project
Properties->Configuration Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hello everyone,

I am trying to create an application that utilizes a SQL
Mobile database. I have included that database in my main project, and
it compiles and debugs just fine.

I then created a custom installer project packaged as a class
library and made an installer project to wrap the whole thing up into
an MSI package. Basically the idea behind doing all this is so the
handheld app can be pushed out through group policy.

So far everything has gone according to plan, except for two
things....first thing is that I cannot get shortcuts to show up on the
device for my app, no matter what I do. I've created an .inf file that
SHOULD do it.....here's a snippet from the file:
__________________________________________________ ___________________
[CEStrings]
AppName="Inventory Counter"
InstallDir=%CE1%\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Shortcuts
CopyFiles=Files.Common

[SourceDisksNames]
1=,"Common",,"C:\Code\MobileInventoryCounter\Inven toryCounter\bin\Release"

[SourceDisksFiles]
InventoryCounter.exe=1

[DestinationDirs]
Files.Common=0,%InstallDir%
Shortcuts=0,%CE2%\Start Menu

[Files.Common]
InventoryCounter.exe,,,0

[Shortcuts]
Inventory Counter,0,InventoryCounter.exe,%CE11%
__________________________________________________ ________________

The second problem I'm having is a simple one, but I can't figure out
how to do it. I need to copy the SQL Mobile database file to the
\Program Files\<appNamedirectory on the device, but can't find any
options or parameters inside Visual Studio to do that. I'm new to VS
2005, but have used prior versions, so maybe it's something I'm
missing....Thanks for your help!
Jul 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: boble | last post by:
Sorry, it's may be off topic ;_((( The following article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k3/ht ml/winmob03.asp states that a.. Microsoft Windows .NET...
1
by: santhosh_176 | last post by:
:I Created a Pocket PC application for iPAQ 5450. Every thing went fine even installer creation. I could run the setup and install it into the actual device and worked fine. The application enables...
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
8
by: Randy | last post by:
Hi, is it possible to show the progress of a big file being copied e.g. in a "progressbar"? I tried to use file.copy - but this seems to make no sense :-( Thanks in advance, Randy
8
by: Krishnan Margabandhu | last post by:
I'm writing a Pocket PC app that will run when a device is first powered on. I want this program to get some data from the user and invoke a CAB file to install a software on the device. How do I...
8
by: A_PK | last post by:
Hi, I am using VB.net to develop my application. I understand that to get CE App Manager to install applications, I have to specify an INI file where I run it. Since I am using VB.net. So I need...
3
by: AAA | last post by:
Hi, how could I deploy all my CF, SQLCE and my applicaiton .CAB file to pocket pc... I am now only able to run the msi setup file and install my application to my pocket pc, but I need to intall...
2
by: Kent Briggs | last post by:
I'm a Delphi programmer with a need to create a Pocket PC app. Since full support for the .NET Compact Framework won't be added to Delphi for another year, I'm looking at learning VB. Apparently I...
3
by: ipointer | last post by:
I am an experienced programmer that is fairly new to C++. I have written a small installation executable that is supposed to copy a set of files from within a directory just on the CD. The problem...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.