run aaa.exe in C# Application

J

joo

Is it possible to execute built-in window program,
for example control.exe(to show control panel), in .net
compact framework based application?
I want to run control.exe to show control panel in my
app.
How can I do this?
Thanks in advance.
 
D

da kila

Try with System.AppDomain.ExecuteAssemly(string filename)

Do not forget that Windows CE do not know relative paths.
Thus the filename should be the name of your executable
file incl. absolute path. Something like this:
@"\Program Files\app\app.exe"
 
A

Andreas Möller

Hello joo ?!(no real name?)

to start external programs from your application you can use api-function
CreateProcess.
If you want to wait, while external program is running, you can import
api-function WaitForSingleObject.
To start p.e. control with your application, you have to start ctlpnl.exe
from your window directory with parameter cplmain.cpl,7 to show
displaysettings.

Greetings from Germany

Andreas Möller to show displaysettings.
 
P

Peter Foot [MVP]

You will need to P/Invoke the native CreateProcess function which can start
any native executable. You will find this and many other API functions in
OpenNETCF's WinAPI library - www.opennetcf.org/winapi.asp
e.g.

OpenNETCF.WinAPI.Core.CreateProcess("calc.exe", null)

Peter
 
A

Andreas Möller

Hello joo ?!(no real name?)

to start external programs from your application you can use api-function
CreateProcess.
If you want to wait, while external program is running, you can import
api-function WaitForSingleObject.
To start p.e. control with your application, you have to start ctlpnl.exe
from your window directory with parameter cplmain.cpl,7 to show
displaysettings.

Greetings from Germany

Andreas Möller to show displaysettings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top