Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

The IProcessService allows a developer to run processes from inside a view model.

Platform info

FrameworkSupported
WPF
Silverlight 5
Windows Phone 8.0
Windows Phone 8.1
Windows RT 8.0
Windows RT 8.1
Android
iOS
Test/emulation service

Starting a process with arguments

To start a process with arguments, use the following code:

var dependencyResolver = this.GetDependencyResolver();
var processService = dependencyResolver.Resolve<IProcessService>();
processService.StartProcess("notepad.exe", @"C:\mytextfile.txt");

Starting a process with arguments and completed callback

To start a process with arguments and receive a callback on completion, use the following code:

var dependencyResolver = this.GetDependencyResolver();
var processService = dependencyResolver.Resolve<IProcessService>();
processService.StartProcess("notepad.exe", @"C:\mytextfile.txt", OnProcessCompleted);
  • No labels