I'm on Windows Vista x64.
C:\Users\Piotr>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC
As far as I know value of PATHEXT environment variable is saved in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and HKEY_CURRENT_USER\Environment keys under PATHEXT entry. In my case the first entry is .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW and the second one does not exist.
Why there's a difference between what set command shows and what's in the registry?