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 targetedSoftwar e is a
string representing a directory relative to the installer's path)
imports microsoft.win32
imports system.diagnost ics
imports system.io
private const regPath as string =
"software\micro soft\windows\cu rrentversion\ap p paths\ceappmgr. exe"
private enum installAction
install = 0
uninstall = 1
end enum
private sub installSoftware (byval targetedSoftwar e as string, byval
installAction as installAction)
dim iniFile as string
if installAction = installAction.i nstall then iniFile =
path.combine(sy stem.appdomain. currentdomain.b asedirectory, targetedSoftwar e
& "\setup.ini ")
launchAppManage r(iniFile)
end sub
private sub launchAppManage r(byval iniFile as string)
dim key as registrykey = registry.localm achine.opensubk ey(regPath)
dim appManager as string = cstr(key.getval ue(""))
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.cri tical, "Error - Client Installation"
return
end if
if iniFile is nothing then
process.start(s tring.format("" "{0}""", appManager))
' uninstall
else
process.start(s tring.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 targetedSoftwar e 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.c om> 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