When Tcl exec
s a program, it searches for the program on your PATH
(i.e., $::env(PATH)
) using the OS's normal rules. Programs not on the PATH
(and not in the current directory on Windows) are simply not found.
Fix 1
Update your PATH
; I believe you can do this through the Control Panel on a per-user basis, or for all users (with appropriate permissions).
Fix 2
Update the PATH
in your script. Be aware that the Windows path separator is a command separator in Tcl (i.e., needs to be escaped or come from substitution) and the elements in the PATH
need to be native directory names.
append ::env(PATH) $::tcl_platform(pathSeparator) \
[file nativename "C:/Program Files/vim/vim74"]
## This will do the same thing...
# append ::env(PATH) {;C:\Program Files\vim\vim74}