Ansi hack ver 0.004b-d by gynvael.coldwind//vx
http://gynvael.coldwind.pl

!!! Use at your own risk !!!
!!! Use at your own risk !!!
!!! Use at your own risk !!!

This little patch adds ANSI escape code support for internal
CMD commands like prompt, echo, etc.

Tested on:
- Windows XP SP2 x86
- Windows XP SP3 x86
- Windows Vista Ultimate x86-64
- Windows Vista Home Premium x86
- Windows 7 RC x86 (new in version D)

* More info

For more info check here:
http://gynvael.coldwind.pl/?id=130 (EN)
http://gynvael.coldwind.pl/?id=128 (PL)

And:
http://gynvael.coldwind.pl/?id=181

* Installation notes:

!!! Use at your own risk !!!
!!! Use at your own risk !!!
!!! Use at your own risk !!!

In both cases, remember to copy both DLLs (AnsiSupport.dll and
DllSpoof.dll) to the c:\windows\system32 directory!!!


** Windows Vista / 7:

- Execute ansihack.exe - if everything went OK, it should create
  a patched _cmd.exe in the current directory
- Test (see \tests directory) if the _cmd.exe works OK
- Go to file C:\windows\system32\cmd.exe, and make a backup of it
- Change the ownership of the file (either using the Properties /
  Security dialog, or using the A COPY of cmd.exe command line
  (you have to have full admin privs to do that, so run the cmd
   copy as admin): 
  takeown /f C:\windows\system32\cmd.exe
- Now, grant yourself full access rights to the file, and revoke
  system and trustedinstaller write/modify access (they should
  have only read access to cmd.exe) - you can do this using 
  the same Security dialog, or using the command line:
  cacls c:\windows\system32\cmd.exe /e /g YourUser:F
  cacls c:\windows\system32\cmd.exe /e /p SYSTEM:R
  cacls c:\windows\system32\cmd.exe /e /p "NT SERVICE\TrustedInstaller":R
- Overwrite the c:\windows\system32\cmd.exe with the patched 
  _cmd.exe file


** Windows XP:

Since the above does not always work, you can use a trick with
the registry.

- Execute ansihack.exe - if everything went OK, it should create
  a patched _cmd.exe in the current directory
- Test (see \tests directory) if the _cmd.exe works OK
- Copy _cmd.exe to c:\windows\system32\_cmd.exe
- Add the following entry to the registry (you can use the below
  to create a .reg file)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\cmd.exe]
"Debugger"="c:\\windows\\system32\\_cmd.exe"

- Now, everytime you execute cmd.exe, _cmd.exe will be executed
  instead!






