Does anyone know how to start an application from other application in C# for smart devices?

Dani AI

Generated

Short practical follow-up for based on 's pointers: showing another form in the same app is fine the way described, but launching a separate executable on a smart device has a few platform-specific traps that are likely causing the path errors you saw.

Key checklist

  • The device filesystem is rooted with a backslash (not the "My Device/..." UI label). Paths look like \Program Files\... on the device. In C# string literals backslashes must be escaped or a verbatim string used.
  • Confirm the executable actually exists on the device (use Visual Studio's device file viewer / ActiveSync / emulator file browser). Programmatic checks are useful before attempting to launch:
string devicePath = @"\Program Files\MyApp\MyApp.exe";
if (System.IO.File.Exists(devicePath))
{
    // file is present — next step is to start it
}
else
{
    // file not found on device
}
  • The EXE must be built for the device's CPU (ARM/MIPS) and for the OS (Windows CE/Mobile). A desktop x86 EXE will not run on the phone/emulator.
  • Deployment matters: copy the EXE to the device (or install with a CAB) so the path matches what the file viewer shows.
  • Device security can block running unsigned or privileged binaries on some OEMs; signing or installing via a CAB may be required.

If Process.Start is unavailable or still fails on the Compact Framework, the usual next step is to invoke the native platform launch API via P/Invoke (CreateProcess/ShellExecute or their CE equivalents) or use the platform-specific launcher. Useful diagnostic data to capture when debugging: the exact exception text and the full device-side path as seen in the device file viewer.

Hi pete,

I'm not exactly sure what you mean, but if you want to start another form in your application you can do this by:

yourFormName form = new yourFormName();

form.ShowDialog(); //This will lock all your other forms until this dialog is closed
form.Show(); //This will run the form and keep your other forms unlocked aswell, if you close your main form though, this one will close aswel.

Or if you would like to run an executable file, you can just use the System.Diagnostics.Process library.

for example:
System.Diagnostics.Process.Start("C:\WINDOWS\system32\CALC.EXE");

Since this is a standard windows executable though, you could have also used Process.Start("calc.exe");

I hope this helped!

I want to start other application (xyz.exe)
I have tried with Process.Start, but I keep on getting error messages, presumably because of wrong path. Remember that I 'm working on smart device, so my path is something like "My Device/Program Files/..." or am I wrong...

Hi pete,

You might be doing the same thing wrong as i did in my last reply. Sorry about that.
Try using double slashes. Like this:

System.Diagnostics.Process.Start("C:\\WINDOWS\\system32\\CALC.EXE");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.