Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

Exception on WSCript.Shell Run method

$
0
0

Hi,

I'm facing an strange issue on my Silverlight LOB app. I'm trying to launch notepad from Silverlitght App (It has elevated permissions) but I'm receiving an exception.

My code looks like:

if (AutomationFactory.IsAvailable)
{
dynamic cmd = AutomationFactory.CreateObject("WScript.Shell");
cmd.Run(@"C:\RemotePdf.pdf", 1, true);
}
When cmd.Run method is executed I recieved a RuntimeBinderException with message: "'object' does not contain a definition for 'Run'.
I have checked this code with a single silverlight app and it works as expected.
What I'm doing wrong)
Thanks

Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>