A pedant that hangs out in the dark corner-cases of the web.

Tuesday, November 17, 2009

What's in your (Windows) path?

perl -le "@x=split/;/,$ENV{PATHEXT};for(split/;/,$ENV{PATH}){print;next unless chdir$_;print qq'\t'.join(qq'\n\t',map{<*$_>}@x)}"

This one-liner will list all executables currently in your path, so you can decide if maybe you want to trim that path a bit, maybe by transferring a few things to doskey macros.

If you add doskey macros, be sure to add a new string value to HKEY_CURRENT_USER\Software\Microsoft\Command Processor called Autorun with the data C:\WINDOWS\system32\doskey.exe /macrofile=macrofile.

No comments: