Delayed environment variable expansion and command extensions in CMD.EXE

If you want to use delayed environment variable expansion and command extensions in a batch script, here’s a batch script that functions as a useful cheat sheet for setting, detecting and using them:

@ECHO OFF
IF “%1″ == “TEST_EOF” (
GOTO :EOF
) ELSE IF “%1″ == “TEST_EXPANSION” (
SET extensions=enabled
IF “!extensions!”==”enabled” (
ECHO Delayed environment variable expansion = ON
) ELSE (
ECHO Delayed environment variable expansion = OFF
)
) ELSE IF “%1″ == “TEST_EXTENSIONS” (
:: CALL :label is not available if test extensions are disabled…

GNU which for Windows: which.cmd

I’ve implemented GNU which as a batch script for Windows. GNU which is a utility that is used to find which executable (or alias or shell function) is executed when entered on the shell prompt…

BATCH & Python Chimera code

I’ve create an example of how to create a file that can be run both as a valid cmd.exe batch script as well as a valid Python script…

Fuzzing Opera browser: how to get rid of the “start-up dialog” after a crash

If you want to automate running Opera to run fuzzers, you’ll find that once you’ve crashed Opera, it does not start as normal the next time you run it…