As far as I understood, right now HeidiSQL would not detect plink.exe on PATH. However, if you install PuTTY through Chocolatey, it puts plink on PATH. I would also assume, that many people put putty executables on PATH manually. So, probably, it makes sense for HeidiSQL to check if it's available there.
When connecting through SSH tunnel, look for plink.exe on PATH
I am using
CreateProcess() to fire the configured path to
plink.exe, with the current directory as
lpCurrentDirectory parameter. That does not mean that plink.exe has to exist there - you can always point the path to some other directory. However, I don't know if that also finds a plink.exe somewhere in your path environment without having a folder in the HeidiSQL plink.exe setting. Try it out?
Do you pass the path to plink as
lpApplicationName or as
lpCommandLine? As I understood from MSDN, the first one would not search PATH, and the second one would.
However, it is not entirely clear in the documentation.
Also, yeah, I tried before posting, it doesn't see plink on the PATH (I tried putting
plink.exe and neither worked).
Currently, HeidiSQL passes the whole string from the plink.exe setting as
lpApplicationName parameter, e.g.
lpCommandLine is then populated with parameters which plink expects, such as
If I read the docs correctly, then I could make use of case 2:
On the other hand, if the CommandLine parameter is non-NULL and the ApplicationName parameter is NULL, then the API attempts to extract the application name from the CommandLine parameter.
With some luck, that case will work with an executable on the path variable:
CreateProcess(nil, 'plink.exe -N -L[more parameters]', ...)
From what I got from the docs, it should do the trick.
r5110 does exactly that. In my tests, I could use a folderless "plink.exe" which then was taken from a folder from my path environment variable. Also, having a folder in that setting does not seem to harm here. Also, having spaces in the path to plink.exe still works here.
Please test yourself after updating heidisql.exe.
Please login to leave a reply, or register at first.