all groups > dotnet compact framework > may 2004 >
You're in the

dotnet compact framework

group:

Launching external app


Re: Launching external app Jon Skeet [C# MVP]
5/31/2004 6:25:46 PM
dotnet compact framework:
[quoted text, click to view]

You need the Process class from OpenNETCF - see
http://www.opennetcf.org/library

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
Launching external app Vitaly Zayko
5/31/2004 8:58:29 PM
Hi all!
How to launch an external exe-file on PocketPC from C# application? For
example if I need to open help file I need to run peghelp.exe
Thanks!
Vitaly

Re: Launching external app Chris Tacke, eMVP
6/1/2004 11:06:44 AM
[quoted text, click to view]

It will fail as CABs are not directly executable.

[quoted text, click to view]

Yep. passing the /noui and/or the /noaskdest parameter is also useful.

-Chris



Re: Launching external app Chris Tacke, eMVP
6/1/2004 12:47:08 PM
[quoted text, click to view]

I'm about 90% certain they are - I'd have to go back and check. The pain in
the ass is that none of these are documented.

Re: Launching external app Jon Skeet [C# MVP]
6/1/2004 4:00:40 PM
[quoted text, click to view]

Yup - it's in the OpenNETCF.Diagnostics namespace.

[quoted text, click to view]

Processes never share threads. Just close your app after you've started
the other one.

I don't know exactly what it'll do when you try to start a CAB as a
process, however. If you want it to be installed, you should start
\Windows\wceload.exe with the cab filename as the parameter.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
Re: Launching external app Jon Skeet [C# MVP]
6/1/2004 4:15:39 PM
[quoted text, click to view]

Ooh... didn't know about those parameters. They could be rather handy.
Not sure about /noaskdest though - when installing using wceload, I
don't get asked about a destination anyway. It all just happens unless
a file needs to be overwritten, or the app is already installed.

Are those definitely parameters to wceload and not to CeAppMgr on the
desktop? I'd be *extremely* happy if the latter is the case :)

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
Re: Launching external app jez
6/1/2004 4:32:47 PM
I also need to open an external application (a CAB-file to be more
precise) - I looked at the SDF but couldn't find the Process class - could
you tell me where it is ?

Does the new app2 that I start from app1 reside on the same thread as app1 ?
I would like to close app1 as soon as app2 is started..

thanks,
jez

[quoted text, click to view]

Re: Launching external app jez
6/1/2004 5:13:29 PM
thanks for that! I'll have a look at it now/tomorrow and will let you know
how it is (or is not..) going. I did find the following thread useful (for
those interested in CAB file installations with ShellExecute) :

[quoted text, click to view]

Re: Launching external app jez
6/1/2004 5:14:36 PM
thanks for that! I'll have a look at it now/tomorrow and will let you know
how it is (or is not..) going. I did find the following thread useful (for
those interested in CAB file installations with ShellExecute) :

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=bosg31-kqe.ln1%40news.dt.contrigo.de&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3Dshellexecute%2Bgroup%253Amicrosoft.public.dotnet.framework.compactframework%26meta%3Dgroup%253Dmicrosoft.public.dotnet.framework.compactframework

[quoted text, click to view]

Re: Launching external app Jon Skeet [C# MVP]
6/2/2004 9:44:31 AM
[quoted text, click to view]

Not sure - it's not visible on my box either, but it's definitely
there. I think it may be hidden.

[quoted text, click to view]

You need to specify the full path name to the executable, so

@"\Windows\wceload.exe" or @"\Windows\wceldcmd.exe"

According to a google search, wceldcmd is a non-GUI version of wceload.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
Re: Launching external app jez
6/2/2004 10:28:41 AM
ok well.. can't get that CAB file installed. On my PPC (Symbol PPT8846) I
couldn't find wceload.exe (in the windows folder), I think it uses
wceldcmd.exe instead.

I did a "use OpenNETCF.Diagnostics;" and in a method I used the following :
Process.Start("wceldcmd.exe", "'\\My Documents\\myProject_PPC.ARM.cab'");

When I execute the method nothing happens.. no error or anything. I also
tried using the /noui as recommended by Chris.

Any tips/hints ?


[quoted text, click to view]

Re: Launching external app jez
6/2/2004 11:10:39 AM
Still doesn't work. This is the latest code :

string _cabFile = @"\My Documents\myProject_PPC.ARM.cab";
Process.Start(@"\Windows\wceldcmd.exe", _cabFile);

Am I using Process.Start() correctly ? Maybe that is the problem ?



[quoted text, click to view]

Re: Launching external app Jon Skeet [C# MVP]
6/2/2004 12:05:29 PM
[quoted text, click to view]

You should put your parameter in quotes, as it will currently be parsed
as

\My
Documents\myProject_PPC.ARM.cab

If you change your first line to

string _cabFile = "\"\\My Documents\\myProject_PPC.ARM.cab\"";

then it might work. I'd still try wceload.exe though.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
Re: Launching external app jez
6/2/2004 3:56:26 PM
Well.. looks like it works!
The funny thing is that I don't actually get asked if I want to (re)install
the application - it simply installs it. I don't even get to see the
progress bar or anything. I guess it has its advantages as well!

thanks for that!

[quoted text, click to view]

AddThis Social Bookmark Button