如何在 C# 中使用进程类启动资源管理器
我已经用我的应用程序替换了 Windows shell,它工作得很好,关闭我的应用程序后,我必须使用以下代码启动 Windows 资源管理器
启动资源管理器的代码
Process.Start(@"c:\windows\explorer.exe");
我用来替换 shell 的注册表密钥
HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVersion\WinLogon\Shell
它不显示任务栏和开始菜单,它只显示 mydocuments 文件夹。 资源管理器启动后我需要开始菜单和任务栏
i have replaced windows shell with my application it worked perfectly, after closing my application i have to launch windows explorer with the following piece of code
Code to start explorer
Process.Start(@"c:\windows\explorer.exe");
Registry key i have used to replace shell
HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVersion\WinLogon\Shell
it doesnt show taskbar and start menu, it just shows mydocuments folder. I need start menu and taskbar while after explorer started
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的猜测是,由于资源管理器没有定义为外壳程序,因此它不会作为外壳程序运行。 我认为您必须更改注册表设置才能在运行之前再次使资源管理器成为外壳。
My guess is that since explorer isn't defined as the shell, it won't run as the shell. I think that you'd have to change the registry settings to make explorer the shell again before you run it.
因此,正如您所写,您用自己的版本替换了注册表中的 shell。 因此,由您决定是否显示开始菜单等。如果您想启动一个资源管理器并让它充当外壳,请继续将注册表中的条目替换为旧条目。
由于您想再次成为 shell,下次 Windows 启动时,也许以下技巧可以做到:
先决条件:
Action至:
So, as you wrote you replaced the shell in the registry with your own version. So it's up to you to show a start menu, etc. If you like to start a explorer and let it act as a shell, go on and replace the entry in the registry with the old one.
Due to the fact, that you like to be the shell again, next time windows starts, maybe the following trick will do it:
Prerequisities:
Action to to:
在再次启动资源管理器之前,您可能必须终止现有的 shell 进程(即您的应用程序)。
You will probably have to kill the existing shell process (i.e. your app) before starting explorer again.