开发者

Shell execute an EXE in Isolated Storage

开发者 https://www.devze.com 2022-12-18 21:48 出处:网络
Is it possible to shell execute an exe which is stored in the iso开发者_运维问答lated storage space. In silverlightLooks like you can do it in SL 4.0.Check this post http://www.youpvp.com/blog/post/Si

Is it possible to shell execute an exe which is stored in the iso开发者_运维问答lated storage space. In silverlight


Looks like you can do it in SL 4.0. Check this post http://www.youpvp.com/blog/post/Silverlight-meet-ShellApplication.aspx


Apperently you can't.

From the first answer on the linked article:

You can not execute anything outside of the Silverlight sandbox.


In an OOB app with elevated privs, it should be possible to copy a stream to a file in the users private folders and then use Shell COM objects to run the file.

You can't do this from the browser or a standard OOB silverlight app.


Honesty I don't see how it should be possible since that would break the whole idea of running things in a sandbox. Even raised privileges shouldn't allow it, and if it is I would rate it as a critical security flaw in Silverlight.


This is very useful for me: http://forums.silverlight.net/forums/p/183587/417015.aspx

Look the last "Ken Tuker" post:

private void AppLoaded(object sender, RoutedEventArgs e)
        {
            if(App.Current.HasElevatedPermissions)
                {
                string strPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\test.txt";
                StreamReader sr = new StreamReader(strPath);
                textBlock1.Text = sr.ReadToEnd();
                }
        }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号