Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Where is the session information kept

Albert wrote:

Hi, I try to add the session into using reshacker but it generate an invalide executable. I also try to view the exisitng RCData but it tells me that this file has a non-standard resource layout.... it has probably been compressed with an "EXE compressor". I can view other resource data such as Incon Group->MAINICON. Any ideas?

Use EXE file from the installation package, which is not compressed.
Albert

Re: Where is the session information kept

Hi, I try to add the session into using reshacker but it generate an invalide executable. I also try to view the exisitng RCData but it tells me that this file has a non-standard resource layout.... it has probably been compressed with an "EXE compressor". I can view other resource data such as Incon Group->MAINICON. Any ideas?

Thanks very much in advance.
Albert

martin wrote:

bfranz wrote:

I would like to know how to store the configuration into the exe file


The solution that WinSCP supports is not perfect. So it may not satisfy your needs, but just in case:

You may embed session settings and key as custom resource (RCData) of executable file. These resources can be changed directly in binary EXE file.

When you start WinSCP, it first checks whether EXE file contains a RCData resource named WINSCP_SESSION. If it does not find the resource, it works as usually. Otherwise, it treats this resource as a content of INI file with session configuration. When WinSCP is started with no parameter it uses first session, otherwise first parameter is considered to be a session name.
Using selected session it starts with connection (supposing, that the session configuration has all required information, otherwise login dialog is shown). When session has no associated key file and WinSCP finds resource named WINSCP_KEY, it uses the key stored in the resource.

How to create session INI file: Create session in WinSCP GUI and save configuration to INI file instead of registry (see preferences dialog). In created INI file (in same directory where EXE file is) find group of the session named [Sessions\session name]. Extract this group to separate INI file.

You cannot embed general configuration options! If you do they will be ignored.

To create key file to embed, use puttygen tool from Putty package (link is on WinSCP site).

To embed INI file and key file to EXE file, use any resource editor you want (there are plenty of them on internet). I've used ResHacker available at: http://www.angusj.com/resourcehacker/
It is a freeware. This tool has GUI, but it can also be used from command-line.
martin

Re: Where is the session information kept

bfranz wrote:

I would like to know how to store the configuration into the exe file


The solution that WinSCP supports is not perfect. So it may not satisfy your needs, but just in case:

You may embed session settings and key as custom resource (RCData) of executable file. These resources can be changed directly in binary EXE file.

When you start WinSCP, it first checks whether EXE file contains a RCData resource named WINSCP_SESSION. If it does not find the resource, it works as usually. Otherwise, it treats this resource as a content of INI file with session configuration. When WinSCP is started with no parameter it uses first session, otherwise first parameter is considered to be a session name.
Using selected session it starts with connection (supposing, that the session configuration has all required information, otherwise login dialog is shown). When session has no associated key file and WinSCP finds resource named WINSCP_KEY, it uses the key stored in the resource.

How to create session INI file: Create session in WinSCP GUI and save configuration to INI file instead of registry (see preferences dialog). In created INI file (in same directory where EXE file is) find group of the session named [Sessions\session name]. Extract this group to separate INI file.

You cannot embed general configuration options! If you do they will be ignored.

To create key file to embed, use puttygen tool from Putty package (link is on WinSCP site).

To embed INI file and key file to EXE file, use any resource editor you want (there are plenty of them on internet). I've used ResHacker available at: http://www.angusj.com/resourcehacker/
It is a freeware. This tool has GUI, but it can also be used from command-line.
bfranz

Re: Where is the session information kept

martin wrote:

WinSCP stores configuration either to Windows registry (HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2) or to INI file (winscp3.ini). You may setup all you need, switch to INI file (from preferences dialog) and distribute the INI file with the application.
WinSCP has also hidden feature that enables you to store all settings into EXE file (it cannot be changed by user). If you would like more information about this, let me know.


Hello Martin

I would like to know how to store the configuration into the exe file

Thank you very much for your kind help

bfranz
martin

Re: Where is the session information kept

WinSCP stores configuration either to Windows registry (HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2) or to INI file (winscp3.ini). You may setup all you need, switch to INI file (from preferences dialog) and distribute the INI file with the application.
WinSCP has also hidden feature that enables you to store all settings into EXE file (it cannot be changed by user). If you would like more information about this, let me know.
Guest

Where is the session information kept

Where is the session information kept and can I pre-configure WinSCP and send it to my clients in such a way that they only have to fill in the password?