我正在尝试使用exec执行命令,但由于某种原因我收到错误:
# with either
set mycmd "C:\\Windows\\System32\\nslookup.exe"
set mycmd "C:/Windows/System32/nslookup.exe"
set mycmd "nslookup.exe"
set mycmd "nslookup"
catch {exec $mycmd} result
puts $result
结果:couldn't execute "nslookup": no such file or directory'
C:\Windows>dir /B /S nslookup.exe
C:\Windows\System32\nslookup.exe
C:\Windows\SysWOW64\nslookup.exe
任何人都知道我为什么会收到这个错误? (使用tcl8.6)