Contents

Quick Reference

Starting / Stopping Services

Making permanent changes to environment variables

It is important to use the correct tools when writing permanent changes to the environment because they also broadcast a notification to running GUI applications to update their environments accordingly.

Notable Environment Variables

Windows Variable Description Linux Equivalent (if any)
%APPDATA%Roaming AppData Directory
%ERRORLEVEL%Return code from last command executed from within cmd.exe$?
%LOCALAPPDATA%Local AppData Directory
%PATH%Path$PATH (note different delimiters: Windows uses semicolons)
%PATHEXT%Path extensions
%ProgramFiles%Path to Program Files directory
%ProgramFiles(x86)%Path to Program Files (x86) directory
%SystemRoot%Path to Windows directory
%TEMP%Path to temp directory
%TMP%Path to temp directory
%USERNAME%Username$USER
%USERPROFILE%Root of user profile directory$HOME

Important Directories

Directory Description Notes
%SystemRoot%\System32Most Windows binaries are located here.
%SystemRoot%\SysWOW64Windows binaries for enabling support for 32-bit x86 programs.Exposed as C:\Windows\System32 to 32-bit apps
C:\Program FilesDefault installation directory for installing program binariesACL restricts non-Admins to R+X.
C:\Program Files (x86)On 64-bit machines, the default installation directory for installing 32-bit x86 program binariesACL restricts non-Admins to R+X.
C:\ProgramDataLocation for saving per-machine data that applies to all usersACL allows full access to standard users. The hidden attribute is set on this directory.
%USERPROFILE%\DesktopDirectory for files residing on the current user's desktopSome desktop icons are not actual files and will not be found here.
%USERPROFILE%\AppDataPer-user dataThe hidden attribute is set on this directory; it will not be visible in Explorer unless the latter is configured to display hidden files.
%USERPROFILE%\AppData\RoamingPer-user data. If the account is a domain account, the contents of this directory might be mounted from a network share (but cached locally for performance).
%USERPROFILE%\AppData\LocalPer-user data that remains on the local machine (ie, not shared across a network).
%USERPROFILE%\AppData\LocalLowUntrusted per-user data (eg browser cache). Not shared across a network.ACL sets mandatory label to low integrity

Registry Essentials

Root Keys

Most registry interactions involve HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER.

Some tools abbreviate root key names: eg. HKLM represents HKEY_LOCAL_MACHINE.

Value Types

Important Subkeys

Useful GUI Utilities

Useful MMC Snap-Ins

Useful Hotkeys

Coming soon! Please check back!

Essential Microsoft Documentation

Error Codes

Authn/Authz/Security

Commands

Useful commands (cmd)

Useful commands (PowerShell)

Useful commands (Sysinternals)

Examples
Command Description
psexec -accepteula -s -i cmd.exeOpens a cmd command prompt as LocalSystem. You may replace cmd.exe with the path to any console program. This command is not usually necessary, but sometimes is useful in order to interactively determine how something behaves while running as LocalSystem.
handle <substring>Find out which process has opened any file whose fully-qualified name contains substring. Useful if you need to find out who might be locking a file.

Useful Downloads