You are here

Allowing multiple instances of PuTTYPortable

4 posts / 0 new
Last post
neddyfreddy
Offline
Last seen: 9 years 4 months ago
Joined: 2007-01-13 07:21
Allowing multiple instances of PuTTYPortable

I know this has been discussed in some of the other topics here. Is there anyway that PortableApp PuTTY can be made to utilize other registry locations so that multiple instances of PuTTY can be ran? I looked into some other ways around this problem, like xming and portaPuTTY but I don't want an option that modifies the source code.

John T. Haller
John T. Haller's picture
Online
Last seen: 36 min 48 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nope

PuTTY is hard-coded to only use a specific registry key. There's no way around it. And I don't think the developers have any intention of changing it.

Sometimes, the impossible can become possible, if you're awesome!

adywarna
Offline
Last seen: 16 years 11 months ago
Joined: 2007-05-03 03:01
Utilize a lock file?

I know what putty portable currently do is back up the existing registry key

HKEY_CURRENT_USER\Software\SimonTatham\PuTTY

to a different location, then imports its own.

What if putty portable utilize a lock file, so that it knows another copy is running and not do anything to the registry keys (backup and import). The last instance that exits save the registry, and remove lockfile.

This is what I do using a batch file (e.g. myputty.bat):


@echo off
if not exist myputty.lock goto iamfirst
goto startandrelease
:iamfirst
echo 1 > myputty.lock
regedit /s putty_clearsessions.reg
regedit /s myputty.reg
echo DO _NOT_ CLOSE THIS WINDOW
putty-0.60.exe
regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
del myputty.reg
rename new.reg myputty.reg
regedit /s putty_clearsessions.reg
del myputty.lock
goto end
:startandrelease
start putty-0.60.exe
rem pause
:end

putty_clearsessions.reg contains this:


REGEDIT4

[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions]

The bad thing about this batch file implementation is that the first instance carry around a cmd.exe window Smile Ugly!

crenner
Offline
Last seen: 16 years 7 months ago
Joined: 2007-09-03 00:03
Need some real docs on Portable Apps Creation

I wouldn't mind tackling this using Xming's Portable PuTTY as a Portable App, but I have not found any decent docs on creating Portable Apps.

Here is a U3 version of Xming's Portable PuTTY that I threw together in less than a day as proof-of-concept: http://cr.cyber-vault.com/Xming_PuTTY_U3_6.9.0.40_Sample.u3p

While this is still a preliminary version of this package, it will do exactly what you want (give you a true portable version of PuTTY that you can run with zero impact on the host system, and that you can run multiple instances of), IF YOU HAVE A U3 device to run this on.

I really would rather make this a Portable App, but I need some better docs!!!

EDIT: You may wish to use my newer version. It's a little less of a hack job. Smile Still U3 based, though. Sad
See my post here: https://portableapps.com/node/5878#comment-48674

Also, I actually like the lock file hack above! It's less of a hack than what the current Portable PuTTY does! Smile

Log in or register to post comments