Windows – Command to restart the command promp itself (in Windows 7)

command linewindows 7

Whenever I change environment variable(in Windows 7) I have to exit and start the command prompt. This is necessary or the changes are not reflected.
Is there any command (or simple method) to restart the command prompt at the same location ?

Update: techie007's original solution start cmd && exit did answered what my question literally meant. But it did not solve my problem. Looks like there is no simple method. I tried the scripts given at Stack Overflow. The scripts worked for me so I mark techie007's answer as accepted.

Best Answer

C:\> start cmd should do the trick to open a new command prompt window in the current folder.

You could also use C:\> start cmd && exit to open a new CMD prompt and then close the window you launched it from, if it managed to open it successfully.

Use just one & to have it close the launching window regardless of success.

edit: Now that grawity was nice enough to point out that I didn't comprehend... :)

There's (intentionally) no inherent way to do this in Windows.

This question was also asked on Stack Overflow and there's some good explanations and a possible script-based work-around there:

Is there a command to refresh environment variables from the command prompt in Windows?

Related Question