Re: Shellexecute a CAB File
From: Peter Foot [MVP] (feedback_at_no-spam.inthehand.com)
Date: 12/10/04
- Next message: Stuart Celarier: "Having to restart the emulator"
- Previous message: Stuart Celarier: "Re: ListView KeyPress event"
- In reply to: richard slade: "Re: Shellexecute a CAB File"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Dec 2004 15:54:28 -0000
See the OpenNETCF.Diagnostics.Process class in OpenNETCF.dll,you can call it
like so:-
Process.Start("myapp.exe")
It's designed to work just like the System.Diagnostics.Process class on the
desktop.
Peter
-- Peter Foot Windows Embedded MVP www.inthehand.com | www.opennetcf.org "richard slade" <richard.slade@hughsymons.com> wrote in message news:1102686653.079452.236960@f14g2000cwb.googlegroups.com... > Hi, > > I am a web developer that needs to do exactly what you are doing here. > Please can you explain to me where you call the createProcess from? I > have the openNetCf framework, but whereever I try to call it from, I > get an error. > > Many thanks for your help > > Richard > > > > > Jon Davis wrote: >> You nailed it! I put the """"'s around it and it worked. I guess >> that makes some since, I just couldn't see it before you pointed it >> out. >> >> Thanks for pointing that out to me :) >> >> >> "John Atkins" <john@softwareunlimited.co.uk> wrote in message > news:<OcJwwUnfDHA.2400@TK2MSFTNGP11.phx.gbl>... >> > You need to be very careful about spaces in folder and file names. > I have >> > >> > myRapi.CreateProcess(@"\Windows\wceload.exe", @"""" + fullName + > @""""); >> > >> > for executing a CAB. I'm not 100% certain this is required but I am > certain >> > that something similar is required when creating shortcuts. >> > >> > I wasted a long time on this yesterday. I eventually managed to see > the >> > contents of a shortcut file (*.lnk) and found that without double > quotes >> > around the name the path of the program to execute (in Program > Files), the >> > lnk file would contain something like >> > >> > "Program" Files\MyProg.exe" >> > >> > John. >> > >> > "Jon Davis" <rtz@hotmail.com> wrote in message >> > news:8a23d24f.0309180728.5c362ccd@posting.google.com... >> > > My thoughts as well, except that I've tried every combination of >> > > slashes and used quotes and nothing worked. The same exact path >> > > string works fine with a shell statement. >> > > >> > > Funny enough though, if I move the file from the program files > folder >> > > to the windows folder, it worked fine. The only thing I can > think of >> > > is the space in "program files" is causing me problems, but > putting >> > > this in quotes should get around this problem shouldn't it? >> > > >> > > No probs though, I've got a way around it (whether I'm crazy or > not!). >> > > >> > > Thanks a bunch! >> > > >> > > >> > > "Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument.com> wrote in > message >> > news:<OcXD1Q8eDHA.1212@TK2MSFTNGP12.phx.gbl>... >> > > > That sounds like you had either: a) no path or incorrect path > to the >> > target >> > > > cab file, or b) used \\ when \ was right or vice versa. >> > > > >> > > > Paul T. >> > > > >> > > > "Jon Davis" <rtz@hotmail.com> wrote in message >> > > > news:8a23d24f.0309151154.354d6a8f@posting.google.com... >> > > > > "Peter Foot [MVP]" <feedback@nospam-inthehand.com> wrote in > message >> > news:<u1#fqP5eDHA.2348@TK2MSFTNGP12.phx.gbl>... >> > > > > > Use the CreateProcess function (A P/Invoke for this is > included in >> > the >> > > > > > opennetcf WinAPI library:- >> > > > > > http://www.opennetcf.org/WinApi.asp >> > > > > > Call the wceload.exe application and pass in the cab as an > argument >> > e.g. >> > > > > > Core.CreateProcess("wceload.exe", "yourcab.cab"); >> > > > > > >> > > > > >> > > > > I ended up using shell instead of createprocess with the cab > file >> > > > > location/name as the parameter to wceload.exe because when I > did the >> > > > > create process with wceload.exe, I always got a message > "Double-tap a >> > > > > .cab file to install the application" instead of it actually >> > > > > running/opening the cab file. >> > >> > > > > >> > > > > Of course, I was not using the opennetcf winapi library, so > maybe I >> > > > > had something else in my createprocess hosed up (except that > other >> > > > > items that I use create process work fine) >
- Next message: Stuart Celarier: "Having to restart the emulator"
- Previous message: Stuart Celarier: "Re: ListView KeyPress event"
- In reply to: richard slade: "Re: Shellexecute a CAB File"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|