473,890 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="Invent ory Counter"
InstallDir=%CE1 %\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Sho rtcuts
CopyFiles=Files .Common

[SourceDisksName s]
1=,"Common",,"C :\Code\MobileIn ventoryCounter\ InventoryCounte r\bin\Release"

[SourceDisksFile s]
InventoryCounte r.exe=1

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

[Files.Common]
InventoryCounte r.exe,,,0

[Shortcuts]
Inventory Counter,0,Inven toryCounter.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\<appNamed irectory 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....Than ks for your help!

Jul 11 '06 #1
4 3665
It is not recommended to use any hardcoded strings in shortcut locations
(like "Start Menu" in the following fragment Shortcuts=0,%CE 2%\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->Configuratio n Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gm ail.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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="Invent ory Counter"
InstallDir=%CE1 %\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Sho rtcuts
CopyFiles=Files .Common

[SourceDisksName s]
1=,"Common",,"C :\Code\MobileIn ventoryCounter\ InventoryCounte r\bin\Release"

[SourceDisksFile s]
InventoryCounte r.exe=1

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

[Files.Common]
InventoryCounte r.exe,,,0

[Shortcuts]
Inventory Counter,0,Inven toryCounter.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\<appNamed irectory 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....Than ks 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,%CE 2%\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->Configuratio n Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gm ail.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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="Invent ory Counter"
InstallDir=%CE1 %\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Sho rtcuts
CopyFiles=Files .Common

[SourceDisksName s]
1=,"Common",,"C :\Code\MobileIn ventoryCounter\ InventoryCounte r\bin\Release"

[SourceDisksFile s]
InventoryCounte r.exe=1

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

[Files.Common]
InventoryCounte r.exe,,,0

[Shortcuts]
Inventory Counter,0,Inven toryCounter.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\<appNamed irectory 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....Than ks 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*********@gm ail.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.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,%CE 2%\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
automaticall y, use "Additional Files" field in the Project
Properties->Configuratio n Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gm ail.comwrote in message
news:11******* *************** @m73g2000cwd.go oglegroups.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="Invent ory Counter"
InstallDir=%CE1 %\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Sho rtcuts
CopyFiles=Files .Common

[SourceDisksName s]
1=,"Common",,"C :\Code\MobileIn ventoryCounter\ InventoryCounte r\bin\Release"

[SourceDisksFile s]
InventoryCounte r.exe=1

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

[Files.Common]
InventoryCounte r.exe,,,0

[Shortcuts]
Inventory Counter,0,Inven toryCounter.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\<appNamed irectory 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....Than ks 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*********@gm ail.comwrote in message
news:11******** **************@ m79g2000cwm.goo glegroups.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,%CE 2%\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->Configuratio n Properties->Deployment.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com
"Robert Iver" <ro*********@gm ail.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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="Invent ory Counter"
InstallDir=%CE1 %\%AppName%

[CEDevice]
VersionMin=3.00
VersionMax=4.99

[DefaultInstall]
CEShortcuts=Sho rtcuts
CopyFiles=Files .Common

[SourceDisksName s]
1=,"Common",,"C :\Code\MobileIn ventoryCounter\ InventoryCounte r\bin\Release"

[SourceDisksFile s]
InventoryCounte r.exe=1

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

[Files.Common]
InventoryCounte r.exe,,,0

[Shortcuts]
Inventory Counter,0,Inven toryCounter.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\<appNamed irectory 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....Than ks 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
4980
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 Compact Framework-The .NET Compact Framework is in ROM in all new Pocket PC 2003 devices, and can be installed in RAM in Pocket PC 2000 and Pocket PC 2002 devices. The question is: how? Answers would be greatly appreciated
1
1028
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 syncronization with remote database using merge replication. I found contradictory results while installing the application. I will mention here all the steps that I done while creating and installing setups. Result: Case 1: worked fine. ...
11
6648
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 transfer data across.On the serve I am using Socket 2 API (recv function to read bytes)and not using ..NET. I use FileStream to open the file on the pocket pc, then associate a BinaryReader object with the stream and call ReadBytes to read all the...
8
18369
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
4830
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 invoke a CAB file from the VB app? Thanks
8
7738
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 to create two solutions. The first contains smart Device Porject called PocketApp. The second solution generates the .msi file and contains the projects CustomerInstaller, Pre-build and Setup. my question is Under which solution should I...
3
2388
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 compact framework, opennetcf, and sqlce separentely. I am thinking if there is a way to run a setup file and install all the necessary components and files to pocket pc. I have done a search in google group. actually found 1 artcile talking...
2
1522
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 can get that in Visual Studio 2005 Standard via a competitive upgrade for under $200, is that correct? I went ahead and downloaded the free VB 2005 Express version (even though it won't create Pocket PC apps) just to get a feel for it. If I...
3
1629
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 is that I do not know which drive letter will be used for the CD (EG D:\, E:\ F:\). I have tried copying the file using windows.h and system("COPY .... "); both look for the files in my documents, not on the CD... Example code: ...
0
9976
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9814
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10903
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8006
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5834
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6034
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.