PortableApps.com Platform and Suite 1.6 have been released.
WinSCP integration with PuTTY?Submitted by beq on December 21, 2008 - 3:06am
Does anyone know why PuTTY Portable must be started manually before WinSCP Portable can invoke it via its toolbar button? Do the standard (non-PortableApps) versions of these programs have this same limitation? Also, I noticed that WinSCP Portable is configured to use the file "PuTTYPortableLinker.exe" as the path for the PuTTY program. Would the integration also work if I change this WinSCP setting to the direct path of the putty.exe program file (or perhaps the puttyportable.exe launcher file)? Sorry I'm somewhat clueless... ( categories: )
|


Oh, is the use of the
Oh, is the use of the puttyportablelinker.exe file necessary because the PuTTY path setting in WinSCP must be an absolute (instead of relative) path?
As Is
You must do it as is with no changes. They both use the registry to pass information from one to the other which is why you must use the launcher and have it running first.
Sometimes, the impossible can become possible, if you're awesome!
How about this?
So let me see if I understand this. At the point where PuTTYPortableLinker.exe sends up the error and the prompt to the user, it has already checked for the existence of PuTTYPortable and found it (from reading the linker source). So the problem is that the one key HKCU\...\Sessions\WinSCP Portable Temporary Session is a "portable" key, but it has been put into the local version of the registry,so when you launch PuTTYPortable, that session will get backup up as part of the local registry and not passed on to the portable version. So this is why PuTTYPortable must be launched first, so when that key is created, the key will go into the portable version of the registry. Ok, so how about this for an idea? At the point where PuTTYPortableLinker normally deletes that key and sends up an error, why can't we do the following:
Export just the temp session key into a .reg file.
Delete the temp session key from the registry
Simulate a launch of PuTTYPortable.exe (but only the registry edits)
-Back up the registry the same way PuTTYPortable does.
-Import PuTTYPortable/Data/settings/putty.reg into the registry
(Because we've already found PuTTYPortable, so we can access its Data)
Now we re-import the temp session key into the registry because it is in it's "portable state"
Now simulate a PuTTYPortable shutdown
Export the entire PuTTY key back into PuTTYPortable/Data/settings/putty.reg
Delete the portable PuTTY keys from the registry
Restore the registry to it's original state
Now you can launch PuTTYPortable and the temp session key will be loaded correctly, without having to have PuTTYPortable open first
In effect, this would achieve the same as having PuTTYPortable open when the user clicked on the PuTTY button in WinSCP because the registry would be in the correct state.
[Update]
I think I got this working, testing and feedback would be appreciated.
Quamquam omniam nescio, nec nihil scio.
Also...
Also, it would be nice if the PuTTYPortable launcher could check for the existence of HKCU\Software\SimonTatham\Sessions\WinSCP Portable Temporary Session on shutdown and delete it before it backs up the key to putty.reg. It is a TEMPORARY session after all, so it's just annoying for it to be there the next time you launch PuTTYPortable.
Quamquam omniam nescio, nec nihil scio.