Windows MSC File and Registry Commands

Computer Management and System Tools

compmgmt.msc provides access to various system consoles:

  • ciadv.msc: Indexing Service (speeds up hard disk searches)
  • wmimgmt.msc: Windows Management Instrumentation (WMI) configuration
  • services.msc: Local Service Manager
  • diskmgmt.msc: Hard Disk Manager
  • dfrg.msc: Hard Drive Defragmenter
  • ntmsmgr.msc: Removable storage device management
  • devmgmt.msc: Device Manager
  • lusrmgr.msc: Local users and groups management
  • fsmgmt.msc: Shared resource management
  • gpedit.msc: Group Policy editor
  • secpol.msc: Local security policy settings (accessible via gpedit.msc)
  • ntmsoprq.msc: Removable media application monitoring
  • perfmon.msc: System performance monitor

Windows Registry Keys

  • HKEY_CLASSES_ROOT: Stores file associations and Component Object Model (COM) information. Points to HKEY_LOCAL_MACHINE\SOFTWARE\Classes.
  • HKEY_CURRENT_USER: Stores user-specific settings. Points to HKEY_USERS\SID (SID: Security Identifier).
  • HKEY_LOCAL_MACHINE: Stores system-wide hardware and software information.
  • HKEY_USERS: Contains all active user profiles, including HKEY_CURRENT_USER and the default profile.
  • HKEY_CURRENT_CONFIG: Stores the current hardware configuration profile. Points to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\nnnn.

Registry Operations

Available registry operations using the REG command:

  • QUERY
  • ADD
  • DELETE
  • COPY
  • SAVE
  • LOAD
  • UNLOAD
  • RESTORE
  • COMPARE
  • EXPORT
  • IMPORT

Command Prompt Commands

General Commands

  • at: Schedules commands and programs to run at a specific time. at \computername time /interactive | /every:date,... /next:date,... command
  • help: Provides help information for commands. help [command]
  • cls: Clears the console screen.
  • ver: Displays the Windows version.
  • date: Displays or sets the current date. date [/t] [date] | [options]
  • time: Displays or sets the current time. time [/t] [time] | [options]
  • prompt: Customizes the command prompt. prompt [text]

File and Directory Commands

  • mkdir/md: Creates a directory. mkdir [path]
  • rmdir/rd: Removes a directory. rmdir [/s] [/q] [path]
  • chdir/cd: Changes the current directory. cd [/d] [path]
  • tree: Displays the directory structure. tree [/f] [/a] [path]
  • move: Moves files or directories. move [/y | /-y] [source] [destination]
  • del/erase: Deletes files. del [/p] [/f] [/s] [/q] [/a] [files]
  • attrib: Sets or removes file attributes. attrib [+|-][attribute] [filename] [/s] [/d]
  • dir: Lists files and subdirectories. dir [/p] [/w] [/a[[:]attributes]] [/o[[:]order]] [/s] [/t[[:]timefield]] [/q]
  • copy: Copies files. copy [source] [destination]
  • xcopy: Copies files and directories. xcopy [source] [destination] [options]
  • ren/rename: Renames files or directories. ren [oldname] [newname]
  • type: Displays the contents of a text file. type [filename]
  • fc: Compares files. fc [options] [file1] [file2]

Disk Commands

  • vol: Displays volume information. vol [drive:]
  • label: Creates, changes, or deletes volume labels. label [drive:][label]
  • chkdsk: Checks and repairs disk errors. chkdsk [drive:][[path]filename] [options]
  • defrag: Defragments a drive. defrag [drives] [options]
  • format: Formats a drive. format [drive:] [options]
  • convert: Converts a FAT partition to NTFS. convert [drive:] /fs:ntfs [options]