Showing posts with label Cheat Sheet. Show all posts
Showing posts with label Cheat Sheet. Show all posts

Wednesday, 27 May 2020

Character Table OEM, ANSI, and Unicode - To see what character will display in the console and how it will appear in Notepad.

Informational Posts

Character Table

Codepages 850/1252
Name OEM Type Range (Unicode conversion of OEM Character)

    0 0x0 ␀  Control  Control Codes

    1 0x1 ␁ ☺ Control  Control Codes

    2 0x2 ␂ ☻ Control  Control Codes

    3 0x3 ␃ ♥ Control  Control Codes

    4 0x4 ␄ ♦ Control  Control Codes

    5 0x5 ␅ ♣ Control  Control Codes

    6 0x6 ␆ ♠ Control  Control Codes

    7 0x7 ␇ • Control  Control Codes

    8 0x8 ␈ ◘ Control  Control Codes

    9 0x9 ␉ ○ Blank Control Space  Control Codes

    10 0xA ␊ ◙ Control Space  Control Codes

    11 0xB ␋ ♂ Control Space  Control Codes

    12 0xC ␌ ♀ Control Space  Control Codes

    13 0xD ␍ ♪ Control Space  Control Codes

    14 0xE ␎ ♫ Control  Control Codes

    15 0xF ␏ ☼ Control  Control Codes

    16 0x10 ␐ ► Control  Control Codes

    17 0x11 ␑ ◄ Control  Control Codes

    18 0x12 ␒ ↕ Control  Control Codes

    19 0x13 ␓ ‼ Control  Control Codes

    20 0x14 ␔ ¶ Control  Control Codes

    21 0x15 ␕ § Control  Control Codes

    22 0x16 ␖ ▬ Control  Control Codes

    23 0x17 ␗ ↨ Control  Control Codes

    24 0x18 ␘ ↑ Control  Control Codes

    25 0x19 ␙ ↓ Control  Control Codes

    26 0x1A ␚ → Control  Control Codes

    27 0x1B ␛ ← Control  Control Codes

    28 0x1C ␜ ∟ Control  Control Codes

    29 0x1D ␝ ↔ Control  Control Codes

    30 0x1E ␞ ▲ Control  Control Codes

    31 0x1F ␟ ▼ Control  Control Codes

    

      Char Type Range

    32 0x20   Blank Space  Basic Latin

    33 0x21 ! Punct  Basic Latin

    34 0x22 " Punct  Basic Latin

    35 0x23 # Punct  Basic Latin

    36 0x24 $ Punct  Basic Latin

    37 0x25 % Punct  Basic Latin

    38 0x26 & Punct  Basic Latin

    39 0x27 ' Punct  Basic Latin

    40 0x28 ( Punct  Basic Latin

    41 0x29 ) Punct  Basic Latin

    42 0x2A * Punct  Basic Latin

    43 0x2B + Punct  Basic Latin

    44 0x2C , Punct  Basic Latin

    45 0x2D - Punct  Basic Latin

    46 0x2E . Punct  Basic Latin

    47 0x2F / Punct  Basic Latin

    48 0x30 0 Number Hex  Basic Latin

    49 0x31 1 Number Hex  Basic Latin

    50 0x32 2 Number Hex  Basic Latin

    51 0x33 3 Number Hex  Basic Latin

    52 0x34 4 Number Hex  Basic Latin

    53 0x35 5 Number Hex  Basic Latin

    54 0x36 6 Number Hex  Basic Latin

    55 0x37 7 Number Hex  Basic Latin

    56 0x38 8 Number Hex  Basic Latin

    57 0x39 9 Number Hex  Basic Latin

    58 0x3A : Punct  Basic Latin

    59 0x3B ; Punct  Basic Latin

    60 0x3C < Punct  Basic Latin

    61 0x3D = Punct  Basic Latin

    62 0x3E > Punct  Basic Latin

    63 0x3F ? Punct  Basic Latin

    64 0x40 @ Punct  Basic Latin

    65 0x41 A Alpha Upper Hex  Basic Latin

    66 0x42 B Alpha Upper Hex  Basic Latin

    67 0x43 C Alpha Upper Hex  Basic Latin

    68 0x44 D Alpha Upper Hex  Basic Latin

    69 0x45 E Alpha Upper Hex  Basic Latin

    70 0x46 F Alpha Upper Hex  Basic Latin

    71 0x47 G Alpha Upper  Basic Latin

    72 0x48 H Alpha Upper  Basic Latin

    73 0x49 I Alpha Upper  Basic Latin

    74 0x4A J Alpha Upper  Basic Latin

    75 0x4B K Alpha Upper  Basic Latin

    76 0x4C L Alpha Upper  Basic Latin

    77 0x4D M Alpha Upper  Basic Latin

    78 0x4E N Alpha Upper  Basic Latin

    79 0x4F O Alpha Upper  Basic Latin

    80 0x50 P Alpha Upper  Basic Latin

    81 0x51 Q Alpha Upper  Basic Latin

    82 0x52 R Alpha Upper  Basic Latin

    83 0x53 S Alpha Upper  Basic Latin

    84 0x54 T Alpha Upper  Basic Latin

    85 0x55 U Alpha Upper  Basic Latin

    86 0x56 V Alpha Upper  Basic Latin

    87 0x57 W Alpha Upper  Basic Latin

    88 0x58 X Alpha Upper  Basic Latin

    89 0x59 Y Alpha Upper  Basic Latin

    90 0x5A Z Alpha Upper  Basic Latin

    91 0x5B [ Punct  Basic Latin

    92 0x5C \ Punct  Basic Latin

    93 0x5D ] Punct  Basic Latin

    94 0x5E ^ Punct  Basic Latin

    95 0x5F _ Punct  Basic Latin

    96 0x60 ` Punct  Basic Latin

    97 0x61 a Alpha Lower Hex  Basic Latin

    98 0x62 b Alpha Lower Hex  Basic Latin

    99 0x63 c Alpha Lower Hex  Basic Latin

    100 0x64 d Alpha Lower Hex  Basic Latin

    101 0x65 e Alpha Lower Hex  Basic Latin

    102 0x66 f Alpha Lower Hex  Basic Latin

    103 0x67 g Alpha Lower  Basic Latin

    104 0x68 h Alpha Lower  Basic Latin

    105 0x69 i Alpha Lower  Basic Latin

    106 0x6A j Alpha Lower  Basic Latin

    107 0x6B k Alpha Lower  Basic Latin

    108 0x6C l Alpha Lower  Basic Latin

    109 0x6D m Alpha Lower  Basic Latin

    110 0x6E n Alpha Lower  Basic Latin

    111 0x6F o Alpha Lower  Basic Latin

    112 0x70 p Alpha Lower  Basic Latin

    113 0x71 q Alpha Lower  Basic Latin

    114 0x72 r Alpha Lower  Basic Latin

    115 0x73 s Alpha Lower  Basic Latin

    116 0x74 t Alpha Lower  Basic Latin

    117 0x75 u Alpha Lower  Basic Latin

    118 0x76 v Alpha Lower  Basic Latin

    119 0x77 w Alpha Lower  Basic Latin

    120 0x78 x Alpha Lower  Basic Latin

    121 0x79 y Alpha Lower  Basic Latin

    122 0x7A z Alpha Lower  Basic Latin

    123 0x7B { Punct  Basic Latin

    124 0x7C | Punct  Basic Latin

    125 0x7D } Punct  Basic Latin

    126 0x7E ~ Punct  Basic Latin

    127 0x7F  Control  Basic Latin

    

      UTF ANSI OEM Type Range (ANSI conversion of OEM Character eg ® replaced by R)

    128 0x80 € € ¼ Control  Control Codes

    129 0x81   ü Control  Control Codes

    130 0x82 ‚ ‚ → Control  Control Codes

    131 0x83 ƒ ƒ Æ Control  Control Codes

    132 0x84 „ „ ▲ Control  Control Codes

    133 0x85 … … & Control Space  Control Codes

    134 0x86 † †  Control  Control Codes

    135 0x87 ‡ ‡ ! Control  Control Codes

    136 0x88 ˆ ˆ ã Control  Control Codes

    137 0x89 ‰ ‰ 0 Control  Control Codes

    138 0x8A Š Š ` Control  Control Codes

    139 0x8B ‹ ‹ 9 Control  Control Codes

    140 0x8C Œ Œ R Control  Control Codes

    141 0x8D   ì Control  Control Codes

    142 0x8E Ž Ž } Control  Control Codes

    143 0x8F   Å Control  Control Codes

    144 0x90   É Control  Control Codes

    145 0x91 ‘ ‘ ↑ Control  Control Codes

    146 0x92 ’ ’ ↓ Control  Control Codes

    147 0x93 “ “ ∟ Control  Control Codes

    148 0x94 ” ” ↔ Control  Control Codes

    149 0x95 • • " Control  Control Codes

    150 0x96 – – ‼ Control  Control Codes

    151 0x97 — — ¶ Control  Control Codes

    152 0x98 ˜ ˜ ▄ Control  Control Codes

    153 0x99 ™ ™ " Control  Control Codes

    154 0x9A š š a Control  Control Codes

    155 0x9B › › : Control  Control Codes

    156 0x9C œ œ S Control  Control Codes

    157 0x9D   Ø Control  Control Codes

    158 0x9E ž ž ~ Control  Control Codes

    159 0x9F Ÿ Ÿ x Control  Control Codes

    160 0xA0     á Blank Space  Latin-1 Supplement

    161 0xA1 ¡ ¡ í Punct  Latin-1 Supplement

    162 0xA2 ¢ ¢ ó Punct  Latin-1 Supplement

    163 0xA3 £ £ ú Punct  Latin-1 Supplement

    164 0xA4 ¤ ¤ ñ Punct  Latin-1 Supplement

    165 0xA5 ¥ ¥ Ñ Punct  Latin-1 Supplement

    166 0xA6 ¦ ¦ ª Punct  Latin-1 Supplement

    167 0xA7 § § º Punct  Latin-1 Supplement

    168 0xA8 ¨ ¨ ¿ Punct  Latin-1 Supplement

    169 0xA9 © © ® Punct  Latin-1 Supplement

    170 0xAA ª ª ¬ Alpha Lower Punct  Latin-1 Supplement

    171 0xAB « « ½ Punct  Latin-1 Supplement

    172 0xAC ¬ ¬ ¼ Punct  Latin-1 Supplement

    173 0xAD ­ ­ ¡ Control Punct  Latin-1 Supplement

    174 0xAE ® ® « Punct  Latin-1 Supplement

    175 0xAF ¯ ¯ » Punct  Latin-1 Supplement

    176 0xB0 ° ° ░ Punct  Latin-1 Supplement

    177 0xB1 ± ± ▒ Punct  Latin-1 Supplement

    178 0xB2 ² ² ▓ Number Punct  Latin-1 Supplement

    179 0xB3 ³ ³ │ Number Punct  Latin-1 Supplement

    180 0xB4 ´ ´ ┤ Punct  Latin-1 Supplement

    181 0xB5 µ µ Á Alpha Lower Punct  Latin-1 Supplement

    182 0xB6 ¶ ¶ Â Punct  Latin-1 Supplement

    183 0xB7 · · À Punct  Latin-1 Supplement

    184 0xB8 ¸ ¸ © Punct  Latin-1 Supplement

    185 0xB9 ¹ ¹ ╣ Number Punct  Latin-1 Supplement

    186 0xBA º º ║ Alpha Lower Punct  Latin-1 Supplement

    187 0xBB » » ╗ Punct  Latin-1 Supplement

    188 0xBC ¼ ¼ ╝ Punct  Latin-1 Supplement

    189 0xBD ½ ½ ¢ Punct  Latin-1 Supplement

    190 0xBE ¾ ¾ ¥ Punct  Latin-1 Supplement

    191 0xBF ¿ ¿ ┐ Punct  Latin-1 Supplement

    192 0xC0 À À └ Alpha Upper  Latin-1 Supplement

    193 0xC1 Á Á ┴ Alpha Upper  Latin-1 Supplement

    194 0xC2 Â Â ┬ Alpha Upper  Latin-1 Supplement

    195 0xC3 Ã Ã ├ Alpha Upper  Latin-1 Supplement

    196 0xC4 Ä Ä ─ Alpha Upper  Latin-1 Supplement

    197 0xC5 Å Å ┼ Alpha Upper  Latin-1 Supplement

    198 0xC6 Æ Æ ã Alpha Upper  Latin-1 Supplement

    199 0xC7 Ç Ç Ã Alpha Upper  Latin-1 Supplement

    200 0xC8 È È ╚ Alpha Upper  Latin-1 Supplement

    201 0xC9 É É ╔ Alpha Upper  Latin-1 Supplement

    202 0xCA Ê Ê ╩ Alpha Upper  Latin-1 Supplement

    203 0xCB Ë Ë ╦ Alpha Upper  Latin-1 Supplement

    204 0xCC Ì Ì ╠ Alpha Upper  Latin-1 Supplement

    205 0xCD Í Í ═ Alpha Upper  Latin-1 Supplement

    206 0xCE Î Î ╬ Alpha Upper  Latin-1 Supplement

    207 0xCF Ï Ï ¤ Alpha Upper  Latin-1 Supplement

    208 0xD0 Ð Ð ð Alpha Upper  Latin-1 Supplement

    209 0xD1 Ñ Ñ Ð Alpha Upper  Latin-1 Supplement

    210 0xD2 Ò Ò Ê Alpha Upper  Latin-1 Supplement

    211 0xD3 Ó Ó Ë Alpha Upper  Latin-1 Supplement

    212 0xD4 Ô Ô È Alpha Upper  Latin-1 Supplement

    213 0xD5 Õ Õ ı Alpha Upper  Latin-1 Supplement

    214 0xD6 Ö Ö Í Alpha Upper  Latin-1 Supplement

    215 0xD7 × × Î Punct  Latin-1 Supplement

    216 0xD8 Ø Ø Ï Alpha Upper  Latin-1 Supplement

    217 0xD9 Ù Ù ┘ Alpha Upper  Latin-1 Supplement

    218 0xDA Ú Ú ┌ Alpha Upper  Latin-1 Supplement

    219 0xDB Û Û █ Alpha Upper  Latin-1 Supplement

    220 0xDC Ü Ü ▄ Alpha Upper  Latin-1 Supplement

    221 0xDD Ý Ý ¦ Alpha Upper  Latin-1 Supplement

    222 0xDE Þ Þ Ì Alpha Upper  Latin-1 Supplement

    223 0xDF ß ß ▀ Alpha Lower  Latin-1 Supplement

    224 0xE0 à à Ó Alpha Lower  Latin-1 Supplement

    225 0xE1 á á ß Alpha Lower  Latin-1 Supplement

    226 0xE2 â â Ô Alpha Lower  Latin-1 Supplement

    227 0xE3 ã ã Ò Alpha Lower  Latin-1 Supplement

    228 0xE4 ä ä õ Alpha Lower  Latin-1 Supplement

    229 0xE5 å å Õ Alpha Lower  Latin-1 Supplement

    230 0xE6 æ æ µ Alpha Lower  Latin-1 Supplement

    231 0xE7 ç ç þ Alpha Lower  Latin-1 Supplement

    232 0xE8 è è Þ Alpha Lower  Latin-1 Supplement

    233 0xE9 é é Ú Alpha Lower  Latin-1 Supplement

    234 0xEA ê ê Û Alpha Lower  Latin-1 Supplement

    235 0xEB ë ë Ù Alpha Lower  Latin-1 Supplement

    236 0xEC ì ì ý Alpha Lower  Latin-1 Supplement

    237 0xED í í Ý Alpha Lower  Latin-1 Supplement

    238 0xEE î î ¯ Alpha Lower  Latin-1 Supplement

    239 0xEF ï ï ´ Alpha Lower  Latin-1 Supplement

    240 0xF0 ð ð ­ Alpha Lower  Latin-1 Supplement

    241 0xF1 ñ ñ ± Alpha Lower  Latin-1 Supplement

    242 0xF2 ò ò ‗ Alpha Lower  Latin-1 Supplement

    243 0xF3 ó ó ¾ Alpha Lower  Latin-1 Supplement

    244 0xF4 ô ô ¶ Alpha Lower  Latin-1 Supplement

    245 0xF5 õ õ § Alpha Lower  Latin-1 Supplement

    246 0xF6 ö ö ÷ Alpha Lower  Latin-1 Supplement

    247 0xF7 ÷ ÷ ¸ Punct  Latin-1 Supplement

    248 0xF8 ø ø ° Alpha Lower  Latin-1 Supplement

    249 0xF9 ù ù ¨ Alpha Lower  Latin-1 Supplement

    250 0xFA ú ú · Alpha Lower  Latin-1 Supplement

    251 0xFB û û ¹ Alpha Lower  Latin-1 Supplement

    252 0xFC ü ü ³ Alpha Lower  Latin-1 Supplement

    253 0xFD ý ý ² Alpha Lower  Latin-1 Supplement

    254 0xFE þ þ ■ Alpha Lower  Latin-1 Supplement

    255 0xFF ÿ ÿ   Alpha Lower  Latin-1 Supplement



Wednesday, 18 December 2019

Decoding Errors

Informational Posts

Decoding Errors
Decoding Errors
 
-2147220978 style numbers are 32 bit signed integers, convert to hex with calculator.
 
Windows errors (smallish numbers) and  COM HResults (typically, but with exceptions, start with an 8 as in 0x80040154) are defined in WinError.h, except 8007nnnn where you look up the Window error number that it contains.
 
As a general rule Windows errors are less than 65,535 (0xFFFF). Errors starting 0x80000001 are Component Object Model (COM) HResults. Errors starting 0xC0000001 are NTStatus results. Errors starting 0xD0000001 are also NTStatus values returned in a HResult.
 
NTStatus errors (typically but not always start with an C as in 0xC0000022) are defined in NTStatus.h. 
 
.h files are the best source because it includes the symbolic name of the error which can give clues such as the source of the error. FormatMessage doesn't give the symbolic name only the description.
 
You get these files by downloading the Platform SDK (it's gigabytes)

https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/
 
If you just want the two files I have them on my skydrive so I can reference them anywhere I go.

https://skydrive.live.com/redir?resid=E2F0CE17A268A4FA!121 (but they are from 2006)
 
Note internet errors (12,000 - 12,999) are windows errors but are specified in wininet.h also available above. 
 
There are errors defined in other .h files. But 99% are in the three above.
 
Structure of HResults and NTStatus Codes
 
The most significant bit in HResults, and the two most significant bits in NTStatus are set on error. Hence Hresults start 8 on error and NTStatus starts C on Error. The next 14 or 15 bits are reserved and some specify the facility - what area the error is in. This is the third and fourth number when reading hex. EG 0xnn07nnnn - An HResult facility code 7 is a normal Windows' error (returned from a COM program - hence it's returned as a HResult). Facility codes are defined in Winerror.h for HResults and NTStatus.h for NTStatus codes. They are different.
 
 
To Decode 0x8003nnnn Errors
 
HResults with facility code 3 means the HResult contains OLE Structured Storage errors (0x0 to 0xff). These are the same as Dos error codes. These don't seem to be in Windows' header files and the list of codes is at the end of this post.

 
To Decode 0x8004nnnn Errors
 
HResults with facility code 4 means the HResult contains OLE errors (0x0 to 0x1ff) while the rest of the range (0x200 onwards) is component specific errors so 20e from one component will have a different meaning to 20e from another component.

 

This is why the source of the error is extra important for errors above 0x80040200.

 

To Decode 0x8007nnnn Errors
 
HResults with facility code 7 means the HResult contains a Windows' error code. You have to look up the Windows' error code not the HResult.

 
To decode 0x80070002. The 0x means it's a hexadecimal number, the 8 means error, the first 7 means it a windows error, and the rest of the number, 2, is the actual Windows error.
 
To look up the error we need it in decimal format. Start Calculator (Start - All Programs - Accessories - Calculator) and choose View menu - Scientific, then View menu - Hex. Enter 2. Then View menu -  Decimal. It will say 2.
 
Start a Command Prompt (Start - All Programs - Accessories - Command Prompt) and type
 
net helpmsg 2
 
and it will say
 
The system cannot find the file specified.
 
or look it up in winerror.h
 
//
// MessageId: ERROR_FILE_NOT_FOUND
//
// MessageText:
//
// The system cannot find the file specified.
//
#define ERROR_FILE_NOT_FOUND             2L
 
To Decode 0x8019nnnn Errors
 
HResults with facility 0x19 are HTTP errors. Codes under 16,384 (0x4000) are the same as HTTP errors, eg HTTP status 404: The requested URL does not exist on the server is 0x80190194 (0x194 = 404). Codes 16,384 and higher are BITS specific.

To Decode 0xDnnnnnnn Errors
 
HResults starting 0xD are an HResult with a NTStatus value in it. Just cange the lead D to a C and treat as an NTStatus (Hresult = NTStatus OR 10000000).

 

Wednesday, 11 December 2019

Brief Introduction to the Windows' Debugger

Informational Posts

Brief Introduction to the Windows' Debugger
Windbg is from Debugging Tools For Windows.

Download and install Debugging Tools for Windows

 http://msdn.microsoft.com/en-us/windows/hardware/hh852363

Install the Windows SDK but just choose the debugging tools.

Create a folder called Symbols in C:\

Start Windbg. File menu - Symbol File Path and enter

 srv*C:\symbols*http://msdl.microsoft.com/download/symbols

then (for example)

 windbg -o -g -G c:\windows\system32\cmd.exe /k batfile.bat

There is an automatic breakpoint set after loading but before any code runs and one at the end after all code has finished but before being terminated. This allows you to examine memory etc before and after the code has run. Press g to continue.

You can press F12 to stop it and kb will show the call stack (g continues the program). If there's errors it will also stop and show them. You may be able to press g to ignore and continue.

 

Type lm to list loaded modules, x *!* to list the symbols and bp symbolname to set a breakpoint

F12           - break into program 
g             - continue 
p             - Step 
kb            - list call stack 
lm            - list loaded modules 
x *!*         - list all symbols 
ln <address>
- lists the nearest symbols to that address - used when you have a crash address 
bp symbolname - sets a breakpoint 
da <address>
- displays the ascii data found at that address 
dda <address>
- displays the value of the pointer 
dv            - display local variables 
kv 10         - displays last 10 stack frames 

-----------------------------------------------------------------
 
If programming in VB6 then this environmental variable link=/pdb:none stores the symbols in the dll rather than seperate files. Make sure you compile the program with No Optimisations and tick the box for Create Symbolic Debug Info. Both on the Compile tab in the Project's Properties.
 
Also CoClassSyms (microsoft.com/msj/0399/hood/hood0399.aspx) can make symbols from type libraries. 

-----------------------------------------------------------------

WinDbg can also analyse Blue Screen Crash Dumps (and indeed application crash dumps).

Dump Files
 
Dump files are files containing the state of the machine when it crashed. We can analyse the file to identify the driver (or program) causing the crash. See the last section on how to get them analysed by a volunteer.
 
Analyse Dump Files

If you want to analyse your own dump files.
 
You need to start Explorer as Administrator to access the files in C:\windows\Minidump. Right click Explorer and choose Run As Administrator.

Download and install Debugging Tools for Windows

 http://msdn.microsoft.com/en-us/windows/hardware/hh852363

Install theWindows SDK but just choose the debugging tools.

Create a folder called Symbols in C:\

Start Windbg. File menu - Symbol File Path and enter

 srv*C:\symbols*http://msdl.microsoft.com/download/symbols
 
Close and reopen WinDbg. File menu - Open Crash Dump

This will analyse the crash dump. You need to close and reopen WinDbg for each dump file analysed. Because you are downloading symbols from the internet WinDbg will appear to be doing nothing. But it's downloading. Be patient.
 
You are looking for a driver or system library that the crash occurred in at the end of the listing. Find the file, right click then Properties - Details tab. If it shows a driver you'll need to update the driver identified. Most drivers are in c:\windows\system32\drivers.
 

.

Tuesday, 3 December 2019

Command Prompt Cheat Sheet

Informational Posts

Command Prompt Cheat Sheet

**CMD Cheat Sheet**

First thing to remember its a way of operating a computer. It's the way we did it before WIMP (Windows, Icons, Mouse, Popup menus) became common.

**Getting Help**

For general help. Type `Help` in the command prompt. For each command listed type `help <command>` (eg `help dir`) or `<command> /?` (eg `dir /?`).

Some commands have sub commands. For example  `schtasks /create /?`.

The `NET` command's help is unusual. Typing `net use /?` is brief help. Type `net help use` for full help. The same applies at the root - `net /?` is also brief help, use `net help`.

References in Help to new behaviour are describing changes from CMD in OS/2 and Windows NT4 to the current CMD which is in Windows 2000 and later.

--------------------------
**Punctuation**

    &    seperates commands on a line.
    
    &&    executes this command only if previous command's errorlevel is 0.
    
    ||    (not used above) executes this command only if previous command's 
    errorlevel is NOT 0
    
    >    output to a file
    
    >>    append output to a file
    
    <    input from a file
    
    2> Redirects command error output to the file specified. (0 is StdInput, 1 is StdOutput, and 2 is StdError)
    
    2>&1 Redirects command error output to the same location as command output. 
    
    |    output of one command into the input of another command
    
    ^    escapes any of the above, including itself, if needed to be passed 
    to a program
    
    "    parameters with spaces must be enclosed in quotes
    
    + used with copy to concatinate files. E.G. copy file1+file2 newfile
    
    , used with copy to indicate missing parameters. This updates the files 
    modified date. E.G. copy /b file1,,
    
    %variablename% a inbuilt or user set environmental variable
    
    !variablename! a user set environmental variable expanded at execution 
    time, turned with SelLocal EnableDelayedExpansion command
    
    %<number> (%1) the nth command line parameter passed to a batch file. %0 
    is the batchfile's name.
    
    %* (%*) the entire command line.
    
    %CMDCMDLINE% - expands to the original command line that invoked the
    Command Processor (from set /?).
    
    %<a letter> or %%<a letter> (%A or %%A) the variable in a for loop. 
    Single % sign at command prompt and double % sign in a batch file.
    
    \\ (\\servername\sharename\folder\file.ext) access files and folders via UNC naming.
    
    : (win.ini:streamname) accesses an alternative steam. Also separates drive from rest of path.
    
    . (win.ini) the LAST dot in a file path separates the name from extension
    
    . (dir .\*.txt) the current directory
    
    .. (cd ..) the parent directory
    
    
    \\?\ (\\?\c:\windows\win.ini) When a file path is prefixed with \\?\ filename checks are turned off. 
    
    
    
    
    < > : " / \ | Reserved characters. May not be used in filenames.
    
    
    
    Reserved names. These refer to devices eg, 
    
    copy filename con 
    
    which copies a file to the console window.
    
    CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, 
    
    COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, 
    
    LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9
    
    CONIN$, CONOUT$, CONERR$
    
    --------------------------------
    
    Maximum path length              260 characters
    Maximum path length (\\?\)      32,767 characters (approx - some rare characters use 2 characters of storage)
    Maximum filename length        255 characters

--------------------------------
**Starting a Program**


See start /? and call /? for help on all three ways.

There are two types of Windows programs - console or non console (these are called GUI even if they don't have one). Console programs attach to the current console or Windows creates a new console. GUI programs have to explicitly create their own windows. 

If a full path isn't given then Windows looks in

 1. The directory from which the application loaded. 
    
 2. The current directory for the parent process. 
    
 3. Windows NT/2000/XP: The 32-bit Windows system directory. Use the
    GetSystemDirectory function to get the path of this directory. The
    name of this directory is System32. 
    
 4. Windows NT/2000/XP: The 16-bit Windows system directory. There is no
    function that obtains the path of this directory, but it is
    searched. The name of this directory is System. 
    
 5. The Windows directory. Use the GetWindowsDirectory function to get
    the path of this directory. 
    
 6. The directories that are listed in the PATH environment variable.

**Specify a program name**
--------------------------

This is the standard way to start a program.

    c:\windows\notepad.exe

In a batch file the batch will wait for the program to exit. When
typed the command prompt does not wait for graphical
programs to exit.

If the program is a batch file control is transferred and the rest of the calling batch file is not executed.

**Use Start command**
--------------------------

`Start` starts programs in non standard ways.

    start "" c:\windows\notepad.exe

`Start` starts a program and does not wait. Console programs start in a new window. Using the `/b` switch forces console programs into the same window, which negates the main purpose of Start.

Start uses the Windows graphical shell - same as typing in WinKey + R (Run dialog). Try 

    start shell:cache

Also program names registered under `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths` can also be typed without specifying a full path.

Also note the first set of quotes, if any, MUST be the window title.


**Use Call command**
-------------------------

Call is used to start batch files and wait for them to exit and continue the current batch file.


--------------------------------
**Keys**

**Ctrl + C** exits a program without exiting the console window.

For other editing keys type `Doskey /?`