473,398 Members | 2,404 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,398 software developers and data experts.

Run a CAB File in a Pocket PC App

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
Nov 20 '05 #1
8 4803
i'm interpreting here but i assume an app on your desktop pc will collect
info from the user and then decide what cab files to install on the pocket
pc. i assume this b/c if you copy a cab file to the pocket pc, it will
install it automatically...so to have choices on what to install is a mute
point...you'd have already installed all the cabs you moved to the pocket
pc.

anyway, create the cabs for every solution you plan to have as a "choice" to
install. next, create your desktop installer application. place this code to
un/install the selected choice: (asserts that the targetedSoftware is a
string representing a directory relative to the installer's path)

imports microsoft.win32
imports system.diagnostics
imports system.io

private const regPath as string =
"software\microsoft\windows\currentversion\app paths\ceappmgr.exe"

private enum installAction
install = 0
uninstall = 1
end enum

private sub installSoftware(byval targetedSoftware as string, byval
installAction as installAction)
dim iniFile as string
if installAction = installAction.install then iniFile =
path.combine(system.appdomain.currentdomain.basedi rectory, targetedSoftware
& "\setup.ini")
launchAppManager(iniFile)
end sub

private sub launchAppManager(byval iniFile as string)
dim key as registrykey = registry.localmachine.opensubkey(regPath)
dim appManager as string = cstr(key.getvalue(""))
if appManager is nothing then
dim m as string
m &= "CE Application Manager could not be found." & vbcrlf & vbcrlf
m &= "Please make sure it is correctly installed on this computer."
msgbox(m, msgboxstyle.critical, "Error - Client Installation"
return
end if
if iniFile is nothing then
process.start(string.format("""{0}""", appManager))
' uninstall
else
process.start(string.format("""{0}""", appManager),
string.format("""{0}""", iniFile)) ' install
endif
end sub

you will also need to create a setup program for each application you want
to install - it will include a setup.ini file that tells the ce app manager
what processors are supported by your application. finally, create a setup
program for your main installer application. it should include the cab files
for all of your solutions that may be optionally installed. do this in a
SEPARATE folder for each solution. you'll then need to create the psuedo
installation directory structure using the same folder names as will be
passed to the installSoftware targetedSoftware argument. in each of these
folders should be a link to their respective cab files.

that's pretty robust and on the money...i use this code religiously. i found
a hugely complex routine for installing apps to pocket pc's on msdn. all i
really needed to know was how to launch the app manager with a way for it to
point to the application i wanted to install. i digress. anyway, my textual
step-by-step is more complex in language than in action...this whole thing
shouldn't take a novice more than two hours and a pro less than 10 minutes.
it's quite simple once you know what's going on.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com> wrote in message
news:2c*****************************@phx.gbl...
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

Nov 20 '05 #2
a final thought...you'd have been better off posting this question in the
microsoft.public.pocketpc.developer newsgroup. you got lucky here...i'm not
the only ppc developer that lurks about in this ng...but we certainly are in
the single digits. your odds of getting the answer i posted here are about
the same a winning the lottery.

i left out details on some things...i assume you've made setup packages
before...thought i'd save space in the response by omitting them. if you
have more questions, go ahead and continue this thread. otherwise, this
would have benefited more people had it be posted to a more suitable ng.
post new pocket pc questions to the appropriate audience.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com> wrote in message
news:2c*****************************@phx.gbl...
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

Nov 20 '05 #3
Steve,
How big of a learning curve is involved with PocketPC development for those
of us that have done exclusive desktop development previously?

"steve" <as*@abc.com> wrote in message
news:vo************@corp.supernews.com...
a final thought...you'd have been better off posting this question in the
microsoft.public.pocketpc.developer newsgroup. you got lucky here...i'm not the only ppc developer that lurks about in this ng...but we certainly are in the single digits. your odds of getting the answer i posted here are about
the same a winning the lottery.

i left out details on some things...i assume you've made setup packages
before...thought i'd save space in the response by omitting them. if you
have more questions, go ahead and continue this thread. otherwise, this
would have benefited more people had it be posted to a more suitable ng.
post new pocket pc questions to the appropriate audience.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com> wrote in message
news:2c*****************************@phx.gbl...
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


Nov 20 '05 #4
Thanks a lot. Actually All I want to do is invoke another
CAB from a Pocket PC app. The POCKET PC App that I'm
developing would get some data from the user and kickoff
another CAB file. I think I can customize the code you
provided to do the same.

Thanks again.
-----Original Message-----
a final thought...you'd have been better off posting this question in themicrosoft.public.pocketpc.developer newsgroup. you got lucky here...i'm notthe only ppc developer that lurks about in this ng...but we certainly are inthe single digits. your odds of getting the answer i posted here are aboutthe same a winning the lottery.

i left out details on some things...i assume you've made setup packagesbefore...thought i'd save space in the response by omitting them. if youhave more questions, go ahead and continue this thread. otherwise, thiswould have benefited more people had it be posted to a more suitable ng.post new pocket pc questions to the appropriate audience.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com> wrote in messagenews:2c*****************************@phx.gbl...
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

.

Nov 20 '05 #5
using .net, there's virtually no learning curve. the only thing you have to
be aware of is that most of the file i/o, particulary with paths, has been
stripped from the framework...this is b/c you can save data to memory cards,
the network, main memory, etc. there are other things missing from the
compact frameworks...like thread.abort and some other useful things.

everything else is the same...inheritance, implementation, threading...you
name it. the largest concerned you will have is conserving your memory and
making a speedy ui. just remember all those tips/tricks you learned back in
vb6- when you were installing on 100 mhz processors w/ 16mb of ram...then
you'll do fine.

hth,

steve
"scorpion53061" <sc************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Steve,
How big of a learning curve is involved with PocketPC development for those of us that have done exclusive desktop development previously?

"steve" <as*@abc.com> wrote in message
news:vo************@corp.supernews.com...
a final thought...you'd have been better off posting this question in the microsoft.public.pocketpc.developer newsgroup. you got lucky here...i'm not
the only ppc developer that lurks about in this ng...but we certainly are in
the single digits. your odds of getting the answer i posted here are

about the same a winning the lottery.

i left out details on some things...i assume you've made setup packages
before...thought i'd save space in the response by omitting them. if you
have more questions, go ahead and continue this thread. otherwise, this
would have benefited more people had it be posted to a more suitable ng.
post new pocket pc questions to the appropriate audience.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com> wrote in message news:2c*****************************@phx.gbl...
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



Nov 20 '05 #6
you're welcome.

where's the location of the cab file? on the pocket pc or on the desktop? if
it's going to be on the pocket pc, then you're wasting valuable memory to
house cabs that may/not ever be used not to mention the annoyance of having
to cancel its automatic installation attempt when you move the cab from the
desktop to the pocket pc. if you are pulling the cab from the desktop to the
pocket pc, you are adding a lot of complications...and again, wasting
valuable memory by having an application installed on the pocket pc whose
only purpose is to choose what other applications s/b installed.

imo, you should push all applications from the desktop to the
hand-held...anything else, is a waste of effort and memory.

but that's my $0.02 usd.

hth,

steve
<an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
Thanks a lot. Actually All I want to do is invoke another
CAB from a Pocket PC app. The POCKET PC App that I'm
developing would get some data from the user and kickoff
another CAB file. I think I can customize the code you
provided to do the same.

Thanks again.
-----Original Message-----
a final thought...you'd have been better off posting

this question in the
microsoft.public.pocketpc.developer newsgroup. you got

lucky here...i'm not
the only ppc developer that lurks about in this ng...but

we certainly are in
the single digits. your odds of getting the answer i

posted here are about
the same a winning the lottery.

i left out details on some things...i assume you've made

setup packages
before...thought i'd save space in the response by

omitting them. if you
have more questions, go ahead and continue this thread.

otherwise, this
would have benefited more people had it be posted to a

more suitable ng.
post new pocket pc questions to the appropriate audience.

hth,

steve
"Krishnan Margabandhu" <Kr******************@target.com>

wrote in message
news:2c*****************************@phx.gbl...
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

.

Nov 20 '05 #7
The cab file actually exists on the Intranet. All I need
to do is to install it on the Pocket PC. I want to be
able to do it from the pokcet PC.The Pocket PCs will be
shipped to the filed with my app installed on them. The
user picks the location based on which their access point
will be set. My Question is, how can I execute a remote
CAB file from the pocket PC. My job would be much easier
if I could just do Process.start, but that does not work
on the Compact Framework :-(

-Krishnan
-----Original Message-----
you're welcome.

where's the location of the cab file? on the pocket pc or on the desktop? ifit's going to be on the pocket pc, then you're wasting valuable memory tohouse cabs that may/not ever be used not to mention the annoyance of havingto cancel its automatic installation attempt when you move the cab from thedesktop to the pocket pc. if you are pulling the cab from the desktop to thepocket pc, you are adding a lot of complications...and again, wastingvaluable memory by having an application installed on the pocket pc whoseonly purpose is to choose what other applications s/b installed.
imo, you should push all applications from the desktop to thehand-held...anything else, is a waste of effort and memory.
but that's my $0.02 usd.

hth,

steve
<an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
Thanks a lot. Actually All I want to do is invoke another CAB from a Pocket PC app. The POCKET PC App that I'm
developing would get some data from the user and kickoff another CAB file. I think I can customize the code you
provided to do the same.

Thanks again.
>-----Original Message-----
>a final thought...you'd have been better off posting

this question in the
>microsoft.public.pocketpc.developer newsgroup. you got

lucky here...i'm not
>the only ppc developer that lurks about in this ng...but
we certainly are in
>the single digits. your odds of getting the answer i

posted here are about
>the same a winning the lottery.
>
>i left out details on some things...i assume you've
made setup packages
>before...thought i'd save space in the response by

omitting them. if you
>have more questions, go ahead and continue this
thread. otherwise, this
>would have benefited more people had it be posted to a

more suitable ng.
>post new pocket pc questions to the appropriate
audience. >
>hth,
>
>steve
>
>
>"Krishnan Margabandhu" <Kr******************@target.com> wrote in message
>news:2c*****************************@phx.gbl...
>> 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
>
>
>.
>

.

Nov 20 '05 #8
ok then...

it only gets more complex from here so i hope this first method works for
you. why not try installing the cab via pocket ie...you know, codebase blah,
blah, blah. if that works, then you've used an already installed application
to install what you want...and you can still manage the cab versions in one
location - the server. this also allows you to add/remove selectable
applications w/o having to recompile and redistribute you proposed installer
application. give the user a url w/ checkboxes of the available apps to
install...that page posts the app information to an asp page that
dynamically builds the pointers to each cab file, ex.:

<OBJECT style="visibility:hidden">
CODEBASE="url/to/your/target.cab#Version=1,0,0,0"
CLASSID="CLSID:WHATEVERCLASSIDYOUHAVEFORYOURCODEBA SE"
</OBJECT>

here's a link to help you out w/ a couple of approaches...in case you want
to use a unc in lieu of a url/web page.

http://www.devguy.com/fp/XML/installMSXML4ViaCab.htm

hth,

steve
<an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
The cab file actually exists on the Intranet. All I need
to do is to install it on the Pocket PC. I want to be
able to do it from the pokcet PC.The Pocket PCs will be
shipped to the filed with my app installed on them. The
user picks the location based on which their access point
will be set. My Question is, how can I execute a remote
CAB file from the pocket PC. My job would be much easier
if I could just do Process.start, but that does not work
on the Compact Framework :-(

-Krishnan
-----Original Message-----
you're welcome.

where's the location of the cab file? on the pocket pc

or on the desktop? if
it's going to be on the pocket pc, then you're wasting

valuable memory to
house cabs that may/not ever be used not to mention the

annoyance of having
to cancel its automatic installation attempt when you

move the cab from the
desktop to the pocket pc. if you are pulling the cab

from the desktop to the
pocket pc, you are adding a lot of complications...and

again, wasting
valuable memory by having an application installed on

the pocket pc whose
only purpose is to choose what other applications s/b

installed.

imo, you should push all applications from the desktop

to the
hand-held...anything else, is a waste of effort and

memory.

but that's my $0.02 usd.

hth,

steve
<an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
Thanks a lot. Actually All I want to do is invoke another CAB from a Pocket PC app. The POCKET PC App that I'm
developing would get some data from the user and kickoff another CAB file. I think I can customize the code you
provided to do the same.

Thanks again.

>-----Original Message-----
>a final thought...you'd have been better off posting
this question in the
>microsoft.public.pocketpc.developer newsgroup. you got
lucky here...i'm not
>the only ppc developer that lurks about in this ng...but we certainly are in
>the single digits. your odds of getting the answer i
posted here are about
>the same a winning the lottery.
>
>i left out details on some things...i assume you've made setup packages
>before...thought i'd save space in the response by
omitting them. if you
>have more questions, go ahead and continue this thread. otherwise, this
>would have benefited more people had it be posted to a
more suitable ng.
>post new pocket pc questions to the appropriate audience. >
>hth,
>
>steve
>
>
>"Krishnan Margabandhu" <Kr******************@target.com> wrote in message
>news:2c*****************************@phx.gbl...
>> 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
>
>
>.
>

.

Nov 20 '05 #9

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

Similar topics

5
by: SA Dev | last post by:
Hi, I just finished writing something to make a help file for a Pocket PC device. The Pocket PC device allows not really showing the .HTM file as a long single file, but instead uses a tag to...
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...
2
by: hijack | last post by:
Thanks for reading this message. I'd like to know the programming for accessing CDB File( MS-Access) in PocketPC. Can I use OLE DB provider of ADO.net ?
10
by: Neil Wallace | last post by:
Guys, I am hopping mad. I am just a hobby programmer making little .net applications for pretty much no-one else but me to use. One application I have written would, to my mind, work best on...
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...
1
by: Luis Ramos | last post by:
hello, my friends Can you give me a hand pls?... I made an executable file in vb.net 2003 and i want to run it in a pocket pc with windows mobille 2003. I´ve tranferes the executable file and...
4
by: Robert Iver | last post by:
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...
1
by: shakthi | last post by:
Hi I created an online Mobile application using .net 2.0 on server side and another offline application on mobile client using .net compact framework 2.0. I packaged my offline application to CAB...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.