Using WinSCP from portable device where drive letter changes
In the spirit of portable thunderbird and portable mozilla, Im trying to run winscp strictly from a USB jumpdrive (trying to make it truly portable). Im storing all the configuration settings in a winscp.ini file located on the jump drive.
My problem, is that when using the jump drive on different computers, I am never able to predict what drive letter will be alloted to the jump drive. Winscp stores its configurations according to absolute paths. For example here is what I pulled out of the winscp374.ini file:
PuttyPath=E:%5Cputty%5Cputty.exe
What I want putty to do is to store the settings according to relative paths. I would prefer for example if the statement above read as follows:
Putty Path = .%5Cputy%5Cputty.exe (or something similar).
I noticed that putty also stores its data in the registry under the HKCU branch with absolute paths. In the putty help manual, they suggested a workaround with batch files that would write and then delete the registry settings. My problem with their suggestion is that they referenced a needed reg file called PUTTYRND.REG, that contained the following.
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
"RandSeedFile"="a:\\putty.rnd"
Again an absolute path is mentioned. I know in order to write to the registry absolute paths are needed. Does anyone know a way, preferable through a batch file, or I guess through a c executable, that could return the root drive, and then make it possible to reconstruct the above statements with the variable returned?
Thanks
My problem, is that when using the jump drive on different computers, I am never able to predict what drive letter will be alloted to the jump drive. Winscp stores its configurations according to absolute paths. For example here is what I pulled out of the winscp374.ini file:
PuttyPath=E:%5Cputty%5Cputty.exe
What I want putty to do is to store the settings according to relative paths. I would prefer for example if the statement above read as follows:
Putty Path = .%5Cputy%5Cputty.exe (or something similar).
I noticed that putty also stores its data in the registry under the HKCU branch with absolute paths. In the putty help manual, they suggested a workaround with batch files that would write and then delete the registry settings. My problem with their suggestion is that they referenced a needed reg file called PUTTYRND.REG, that contained the following.
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
"RandSeedFile"="a:\\putty.rnd"
Again an absolute path is mentioned. I know in order to write to the registry absolute paths are needed. Does anyone know a way, preferable through a batch file, or I guess through a c executable, that could return the root drive, and then make it possible to reconstruct the above statements with the variable returned?
Thanks