While later versions of Windows have a where command, you can also do this with Windows XP by using the environment variable modifiers, as follows:
c:\> for %i in (cmd.exe) do @echo. %~$PATH:i
C:\WINDOWS\system32\cmd.exe
c:\> for %i in (python.exe) do @echo. %~$PATH:i
C:\Python25\python.exe(
reference
marstheinfomage
Feb 01, 2012 15:42
@rem code to simulate the WHENCE command on Windows
@rem given a file, prints all instances of that file in the PATH folders
@setlocal
@set P2=.;%PATH%
@for %%e in (%PATHEXT%) do @for %%i in (%~n1%%e) do @if NOT "%%~$P2:i"=="" echo %%~$P2:i
reference
marstheinfomage
Jul 15, 2011 11:25
do
set wshshell = CreateObject("WScript.Shell")
wshshell.sendkeys "{SCROLLLOCK}"
WScript.sleep 500
loop
reference