The System.Diagnostics assembly is part of the Silverlight CLR framework, but it only includes classes related to debugging, the Process class is not available. Is there any other way to start an outside process from a Silverlight application?
Yes, you can in Silverlight 4 (in out-of-browser with elevated full trust), example:
dynamic cmd = AutomationFactory.CreateObject("WScript.Shell");
cmd.Run("calc.exe", 1, true);
Using an elevated trust out of browser app (shall we coin ETOOB or OOBET for short) Silverlight 4 application you may be able to start a new app in a new process if it is a COM Automation server. For example:-
dynamic excel = ComAutomationFactory.CreateObject("Excel.Application");
Should fire up Excel in its own procress.
There is no short answers, but there is a complex one...
If you are runnign SL4 Out-Of-Browser, and you indicated that you are ok running elivated (which really mean SL doesnt run in IE-Protected mode, but rather as standard app...) there is a way for you by using WMI to basically do ANY THING you want to. This blog post will help you - http://justinangel.net/CuttingEdgeSilverlight4ComFeatures . Just keep in mind, this is high end fancy coding, so watch yourself ;)
There are two great sample chapters on Windows Phone and Silverlight for Windows Phone on the LearningWindosPhone.com site. There is great Windows Phone Trainng material , and dont forget the Windows Phone Develoeprs Blog
If you are running your application either in the browser or as a standard out of browser application, being able to start another process would break the Silverlight model, allowing your application access to the machine outside the browser sandbox.
A full trust application will be able to do this.
Why do you want to start another process?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With