How to code a new Windows Shell? [closed]

醉酒当歌 提交于 2019-12-28 12:43:11

问题


How would I go about coding a new Windows Vista Shell?


回答1:


Everything you need to do as shell has never been documented, so there are some issues with file change notifications etc. The basics are:

  1. SystemParametersInfo(SPI_SETMINIMIZEDMETRICS,...MINIMIZEDMETRICS) with (undocumented?) flag 8
  2. Register as the shell (SetShellWindow,SetProgmanWindow,ShellDDEInit,RegisterShellHook etc)
  3. Hide welcome screen by setting a signal ("msgina: ShellReadyEvent" and "ShellDesktopSwitchEvent")
  4. Start registry run key, start menu\startup and ShellServiceObjects
  5. Set registry Explorer\SessionInfo

The good thing is, you are not the first to write a new shell, if you look around, you can find some obscure required info. Here is a list to get you started:

  • http://www.lsdev.org/
  • http://bb4win.cvs.sourceforge.net/bb4win/blackbox/Blackbox.cpp?revision=1.49&view=markup
  • http://xoblite.net/source/Blackbox.cpp.html
  • http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/
  • http://www.geoffchappell.com/viewer.htm?doc=studies/windows/shell/explorer/index.htm&tx=36



回答2:


A good place to start would be investigating how to build a command line parser, something that can tokenize and interpret the inputs. There are tools that can help with this like ANTLR, or you might like to try building your own.

Once you've parsed the inputs you need to decide what actions to take - launching processes, piping between processes, redirecting output - and making those system calls.

If you're just after a more powerful shell rather than interested in building one, give PowerShell a try.



来源:https://stackoverflow.com/questions/2270527/how-to-code-a-new-windows-shell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!