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?
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]', ...)
Move plink.exe path to lpCommandLine parameter instead of passing it as lpApplicationName. This way, a folderless plink.exe call should use the first available one from the path environment. See http://www.heidisql.com/forum.php?t=21873
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.