The exec command requires a list, and you’re giving it what amounts to a string. So it’s trying to find and run a program named c:\dir\pgm.exe “parm1” “parm2” “parm3”, when you want it to run a program named c:\dir\pgm.exe and pass in the parameters parm1, parm2, and parm3.
The other wrinkle is that it the list needs to be flattened, that is, at the same level as the exec command, not just contained in a variable. Otherwise, your program will see a single parameter rather than three separate parameters.
Fortunately, the fix is easy. The eval command will not only run any other TCL command, but also flatten out the list structure for you. Just issue the command like this:
eval exec c:\dir\pgm.exe “parm1” “parm2” “parm3”
Essentially, any time you want to construct a command programmatically, then execute it, just use the eval exec combo.
BTW, I generally find it easier to use single forward slashes rather than double the backslash. Of course, if you’re passing a pathname to a native DOS/Windows command, you may not have any choice…