When INI file directory or the file itself is not writable (for example when the INI file is in Program Files folder or when it is explicitly set read-only), WinSCP does not preserve its state when exiting. Access=readĪ simpler way to make whole configuration read-only is to use an INI file and set it read-only in a file system. As INI files have no root section, WinSCP looks into a special section named (a single underscore).įor example the following INI file sets all configuration read-only, with an exception of a host key cache and interface settings (but in turn with an exception of transfer settings, which are again read-only): #MAILSTORE FREE CONFIGURATION FILE LOCATION WINDOWS#In Windows registry, it is a key in WinSCP root registry key. To change the default state of whole configuration, set root Access key. To enable writing to a subsection of a read-only section, set the subsection Access key to full. To set a section read-only, set its Access key to readonly. If the key is not set, a section inherits the state of its parent section. Setting a configuration section read-only makes WinSCP silently discard any changes to that section, when saving the configuration.Īn access to individual sections is controlled using an optional Access key. This way you can for example prevent a user from changing default transfer settings, while still allowing other kinds of customizations. You can set individual configuration sections read-only. Particularly, when using a shared INI file or when pre-configuring WinSCP for a specific task, you may want to set the configuration or its parts read-only. This is also the configuration mode used by WinSCP. That is particularly useful for scripting, to make sure that the script always starts with all defaults. With /ini=nul command-line switch, WinSCP starts with the default configuration and does not save the configuration on exit. You may also use an INI file in a different folder or with a different name using /ini switch or in preferences. If the directory is not writable, INI file is stored to application data directory of your user profile. When you opt to use INI file for the first time, WinSCP tries to write it to directory, where WinSCP executable is stored in. to C:\Users\username\AppData\Roaming\WinSCP.ini. If INI file in not found there, WinSCP looks to application data directory of your user profile, i.e. ini extension and the same name as the executable (i.e. When loading configuration, WinSCP first looks for an INI file in the directory, where WinSCP executable is stored in. If you use registry as configuration storage, the configuration is stored under the following key: See Sharing WinSCP configuration between machines using cloud storage. Sharing the Configuration between Machines Make sure you include Advanced settings to the URL. If you want to transfer just one specific stored site, you can generate a session URL from the site on the source location, transfer the URL to the target location, paste it to the Login dialog and save it. To transfer your configuration to another computer/location, export the configuration to an INI file and then import the file on the another computer/location. See also How do I transfer my settings from a non-working computer? Transferring the Configuration To import/restore the configuration, go to Tools > Import/Restore configuration on Login dialog. In older versions of WinSCP, use Export button on Preferences dialog.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |