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?

link|improve this question

50% accept rate
feedback

1 Answer

up vote 0 down vote accepted

In my question I stated

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.

which wasn't true. In fact I had HKEY_CURRENT_USER\Environment\PATHEXT entry and it was empty. It looks like having this entry empty somehow resets PATHEXT to some default value effectively eliminating any extra values added to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PATHEXT.

link|improve this answer
The user environment overrides (has a higher priority than) the system environment. – Synetech Feb 24 at 6:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.