title: How to launch a new cmd window with the correct path from Cygwin?
body: <p>When I start cmd.exe from start menu, I get the registered (in registry) PATH variable, in a new window.</p>
  
  <p>I want to have exactly the same effect from my cygwin+mintty, and try the followings:</p>
  
  <p>Firstly I try:</p>
  
  <pre><code>bash$  cmd
  </code></pre>
  
  <p>This gives me a cmd shell, right inside mintty.  But I want it to be in a fresh new window.  emm...  Perhaps I can try:</p>
  
  <pre><code>bash$  cmd /c start cmd
  </code></pre>
  
  <p>It nicely gives me a cmd shell in a new window.  Good.  However, the PATH inside that command shell is not the same as a fresh new one.</p>
  
  <pre><code>C:\&gt;path
  PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapa
  th;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W
  indowsPowerShell\v1.0;C:\opencv\myrelease\bin;C:\Qt\5.3\mingw482_32\bin;C:\Progr
  am Files (x86)\Skype\Phone;C:\Program Files (x86)\Windows Kits\8.1\Windows Perfo
  rmance Toolkit;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\cygwin64\
  lib\lapack;D:\home\robin_hsu\bin
  
  C:\&gt;
  </code></pre>
  
  <p>You can see those paths with <code>cygwin64</code> are not wanted.  So, what can I do to get a new fresh cmd window, with correct PATH?</p>
  
  <p>Note: I believe the problem is due to PATH is inheritable, from <code>bash</code> to <code>cmd</code>.  </p>
  
  <p>Perhaps someone can give me some hint to get the registered PATH of windows system under cygwin's bash.   If that is possible, I can first change the PATH to the desired one, and then call <code>cmd</code></p>