M-x shell is not the main problem here. Running a vb script every time in such case is not a huge annoyance.
The main problem is that PATH is local for each shell, but there's also a main PATH for emacs itself. That's the one used when you call a shell command(M-S-x) and when emacs uses external tools like diff, git, e.t.c... PATH variable gets updated, I can verify it from outside of Emacs, but Emacs still sees the old values and restarting it does not help. (getenv "PATH") is wrong too. There seems to be no way to update that main PATH without restarting Windows. At least in my case. -- Best Regards, Nikolay Kudryavtsev --- Это сообщение свободно от вирусов и вредоносного ПО благодаря защите от вирусов avast! http://www.avast.com