Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer
    
The user environment overrides (has a higher priority than) the system environment. –  Synetech Feb 24 '12 at 6:36
    
The 'default' string you are seeing matches the PATHEXT policy template. Do you have a Domain Policy setting or Local Policy setting for PATHEXT? –  user165568 Oct 22 at 0:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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