第494篇--How to open FTP site in Resources management window?

In the current project I am working on, the client wants to open the FTP site in the resources management window instead of the web browser, to be honest, I have tried many ways like using the ExceShell or start a resource management process, but all failed. Finally, I figured out why all those methods I have tried did not work.

You need to do it in two steps:

1) Make sure you have checked out the "Enable FTP folder view(outside of Internet Explorer)" in IE.

2) Start the Explorer.exe process.

 /// <summary>
        /// Open FTP in resources management window.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            // Beijing university FTP
            System.Diagnostics.Process.Start("Explorer.exe", "ftp://ftp.pku.edu.cn/");
}


PS:
Sometimes, we also need to change the certain value in the registry like below:

1 Run-->Regedit

2 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_INTERNET_SHELL_FOLDERS

3 Double click the “iexplorer.exe" item on the right part of the window.
4 Change the value from 0 to 1.

 

And Finally, you will get :

posted @ 2013-01-23 20:30  Shanghai Jim Zhou  阅读(292)  评论(0编辑  收藏  举报