You need to change the system Path, not the user Path.
Alternatively, rename the MS find.exe to something else.
I do not have admin access (work computer). Wouldn't (setenv "PATH" "..") be the same?
If I rename the MS find.exe (which I cannot without admin aceess), will it not affect any other program using it?
> By I used the brute-force method below just so that the correct find.exe and grep.exe are found by emacs:
>
> (setq exec-path '("C:/Users/kmodi/Dropbox/Portable Software/ezwinports/bin"
> "c:/ProgramData/Oracle/Java/javapath"
No, don't do that, it won't work (as you have found out). Emacs
sometimes invokes commands through the shell, which doesn't know about
exec-path. This way lies madness. You should have your PATH and the
corresponding Emacs variables in sync.
(This is all basic Windows setup, nothing related to Emacs, btw.)
As I mentioned, I also set the PATH using (setenv "PATH "..."). Isn't executable-find returning the correct find.exe and grep.exe a proof that the right executable is being found.
I have had this in my config and it works fine (for a different executable chrome.exe):
(let ((chrome-path "C:/Program Files (x86)/Google/Chrome/Application/"))
(setq exec-path (append exec-path `(,chrome-path)))
(setq browse-url-generic-program (executable-find "chrome")))