oktava-studio.ru

Native shell — a command prompt for native mode



Native shell — Windows command prompt which can start before Winlogon and Win32 subsystem

Russian version

Native shell is a program for experiments with a Native API mode of Windows. Native mode is a mode, where chkdsk starts at the boot time before login screen appears. It is used by chkdsk utility to check and correct errors in the system partition. The Native mode itself is a blue screen (it is blue in Windows XP, another color in other versions of Windows), which appears before the Windows login screen. See the image (click the picture to zoom it):

Windows XP Native mode. Native shell application is running.
Windows XP Native mode. Native shell application is running.


The program is a shell (a command line interface). It can perform some basic operations with Windows files and directories. Program runs before starting of main Windows components, so we have access to the entire file system and registry without many restrictions. All operations are implemented through the Native API (ntdll.dll).

Source code:

https://github.com/amdf/NativeShell

Features

  • Starting another process (native processes only, win32 not supported)
  • Read keyboard input and process commands. To display a list of commands type "help" in the console.
  • Navigate through the file system.
  • Copy, move and delete files.
  • Create directories.
  • Turn off and restart the computer.
  • Show list of running processes.
  • Show device tree and system information
  • Displays a list of files in a directory on the screen. Shows file names, short names (in 8.3 format) and file size.
  • Leave native mode and start Windows.
  • Shutdown and reboot PC.

Not implemented

  • Working with registry
  • Autocomplete commands
  • Command input history

List of console commands

If the argument contains a space, it should be put in quotation marks (except for "cd" command, it can process paths without quotes).

  • cd X - Change directory X
  • md X - Make directory X
  • copy X Y - Copy file X to Y
  • move X Y - Move file X to Y
  • poweroff - Power off PC
  • dir - Show directory contents
  • pwd - Print working directory
  • del X - Delete file X
  • reboot - Reboot PC
  • devtree - Dump device tree
  • shutdown - Shutdown PC
  • exit - Exit shell
  • sysinfo - Dump system information
  • lm - List modules
  • vid - Test screen output
  • lp - List processes

Download Native shell source code and executable

The program is written in C. WinDDK and NTNDK header files required. The sources are based on NCLI (Native Command Line Interface) from the TinyKRNL Project. A code from ZenWINX library partially used. The archive contains native.exe executable and a source code. To install and uninstall program use install.cmd, uninstall.cmd, add.reg, remove.reg files.

Russian version of this page is here.







Copyright © 2016- Программирование Native API и расширенные возможности NTFS
По вопросам сотрудничества и другим вопросам по работе сайта пишите на cleogroup[собака]yandex.ru