Hi to all!

The most people are sure that there are no analogs of command.com in Win2k. It is not quite so. There are such module as cmd.exe - console mode shell but I can't start it without graphics. In other words, if I can't load WindowsXP or 2000 I never rename or copy any file or directory on the HDD before Windows repair. A week ago when during Windows 2000 server reinstall I have found that if I boot up my computer from CD then I can do those operations in manual mode. It meens that there are programs that can work in console mode with NTFS volumes.

I know how to write such program as cmd.exe but how to start it before Win2k load without any safe modes?

Mike
Posted on 2004-04-01 07:15:26 by Mike

I know how to write such program as cmd.exe but how to start it before Win2k load without any safe modes?

You can write a native application (not using kernel32, user32 etc but only ntdll.dll I think). Some www.sysinternals.com program does this (the page file defrag I think), and a couple of commercial defragmentation apps, too. I don't know how you get your app to load at boottime though, but I guess there's info somewhere on the net, perhaps sysinternals.

There's also stuff like www.winternals.com ERD commander - it uses the XP kernel but none of the usual shell and such, to work as a very powerful rescue/admin tool - the benefit of the XP kernel is that you can use regular windows drivers for stuff like RAID drive access, that the NTFS support isn't a bloody hack, and that you can even run a lot of normal windows applications for it. This requires licensing from microsoft, though.

If you're interested in how the whole NT system is built, you might want to look at Inside Windows 2000, especially the chapter that deals with the boot phase.
Posted on 2004-04-01 08:50:54 by f0dder
Thanks, f0dder!

ERD Commander is very interesting application, but I want to write myself. For this I must teach the NT structure, of cource. If you guess me where I can find "Inside Windows 2000" and what it is - book or site or something else.

Mike
Posted on 2004-04-02 08:38:45 by Mike
Inside Windows 2000 is a book, and the .CHM version is included on CD when you buy the book. It's written by Solomon and Russinovich, from microsoft press. It's a very good book, although it doesn't go to reverse engineering details, it has a very good overview of the win2000 system, description of some formats and algorithms, and is generally very nice to understand what's going on behind the shell.

NT is a really good architecture, probably the best design of any OSes running on x86 hardware (though the interface and a lot of related ring3 code sucks). I have a lot of respect for the NT kernel developers, they did a lot of things right.
Posted on 2004-04-02 08:47:35 by f0dder