Hex Conversion via a Batch File

Occasionally, when something bad happens, an application will return an exception code (which is occasionally an NTSTATUS value). Unfortunately dumping out %ERRORLEVEL% can give you a negative value which makes looking up the error a little harder. Since I was in batch-land, I had the desire to take the value and print it out in…

3

Common Process Termination Values

When your application does something the OS (or the application itself) doesn’t like, often the floor gets yanked out and the process is terminated in an abrupt manner. If you don’t happen to be running with a debugger, often the easiest way to get an idea of what went wrong is to look at the…

2

Batch File String Substitution with Nested Environment Variables

The SET command has some nice extensions that let you do various manipulation operations on environment variables. One said operation is the string substitution feature, which is often used to perform basic pattern replacements such as stripping out quotes around filenames:  set ABC=”c:\foo.txt”set ABC=%ABC:”=%echo %ABC% In the above sample, the quotes around the filename are…

2