I recently had to reinstall Cygwin and in doing so, I have ran into a problem with some application because Cygwin seems to be appended to my PATH environment variable. I have tried to remove this by following these instructions <https://www.java.com/en/download/help/path.xml> but something strange happens. If I look at the value of Path under 'Environment Variables', Cygwin is not there; however if I type PATH in cmd.exe, I see Cygwin gets appended at the end of the PATH. Can you please help me to know to remove Cygwin from the PATH?

As an example, this is what I see in the Environmental Variables window Path value:

> 
> Path=C:\Program Files (x86)\Intel\iCLS Client\;C:\Program
>  Files\Intel\iCLS
>  Client\;c:\Oracle\11g\_R2\_x64\Administrator\11.2.0\client\_1\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program
>  Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
>  (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program
>  Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
>  (x86)\Intel\Intel(R) Management Engine
>  Components\IPT;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Apps\Anaconda3;C:\Apps\Anaconda3\Scripts;C:\Apps\Anaconda3\Library\bin
> 
> 
> 

And this is what I see in cdm.exe:

> 
> PATH PATH=C:\Program Files (x86)\Intel\iCLS
>  Client\;C:\Program Files\Intel\iCLS Clien
>  t\;c:\Oracle\11g\_R2\_x64\Administrator\11.2.0\client\_1\bin;C:\ProgramData\Oracle\
>  Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS
>  \System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:
>  \Program Files\Intel\Intel(R) Management Engine
>  Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine
>  Components\DAL;C:\Program Files\Intel\Int el(R) Management Engine
>  Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Man agement
>  Engine
>  Components\IPT;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\App
>  s\Anaconda3;C:\Apps\Anaconda3\Scripts;C:\Apps\Anaconda3\Library\bin;C:\blp\DAPI;
>  C:\blp\DAPI\DDE;C:\Apps\cygwin64\bin
> 
> 
> 

As you can see, I have Cygwin in the second case, whereas I don't have it on the first case.

**UPDATE:**

Thanks to Patrick for his answer below. Just to complement, in Windows you should be able to edit both the user and system environment variables from the Control Panel as in this screenshot:

[![enter image description here](https://i.stack.imgur.com/723BV.png)](https://i.stack.imgur.com/723BV.png)