Everything you need to do as shell has never been documented, so there are some issues with file change notifications etc. The basics are:
SystemParametersInfo(SPI_SETMINIMIZEDMETRICS,...MINIMIZEDMETRICS) with (undocumented?) flag 8
Register as the shell (SetShellWindow,SetProgmanWindow,ShellDDEInit,RegisterShellHook etc)
Hide welcome screen by setting a signal ("msgina: ShellReadyEvent" and "ShellDesktopSwitchEvent")
Start registry run key, start menu\startup and ShellServiceObjects
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:
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.
发布评论
评论(2)
作为 shell,您需要做的所有事情从未被记录下来,因此文件更改通知等存在一些问题。基础知识是:
好处是,你不是首先编写一个新的 shell,如果你环顾四周,你可以找到一些晦涩难懂的所需信息。以下是帮助您入门的列表:
Everything you need to do as shell has never been documented, so there are some issues with file change notifications etc. The basics are:
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:
一个好的起点是研究如何构建命令行解析器,它可以标记和解释输入。有一些工具可以帮助解决此问题,例如 ANTLR,或者您可能想尝试构建自己的工具。
解析完输入后,您需要决定采取哪些操作 - 启动进程、进程之间的管道、重定向输出 - 以及进行这些系统调用。
如果您只是想要一个更强大的 shell,而不是有兴趣构建一个,请提供 PowerShell 尝试一下。
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.