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

Sopor

I have tried to use Automatic INI file but it will only mess it up for me.

Strange that it use %APPDATA% in Automatic INI file, but I can't manually use it in Custom INI file. 😥
johnwick6

GUEST POST

Get help and report bugs here. I'll try to answer your questions as soon as possible. Maybe other users answer you faster. Before posting, please learn How to ask for support or report bug.



MALIK66
martin

Yes, that's what I have meant.

Btw, if you choose Automatic INI file (and you have WinSCP installed), it will use %APPDATA%\WinSCP.ini.
https://winscp.net/eng/docs/config#ini
Sopor

So, you mean that every user that run WinSCP have to add /ini=%APPDATA%\WinSCP\WinSCP.ini as a command line switch to the shortcut?

That sounds a bit too complex for the regular user. That should be supported by default.

That is why i found it a bit weird that it won't supports it in the Configuration storage paths.
martin

What will work? The /ini=%APPDATA%\WinSCP\WinSCP.ini? The %APPDATA% in shortcut target is resolved by Windows shell before executing WinSCP.

And yes, WinSCP supports environment variables in PuTTY command-line. That's imo quite irrelevant here.
Sopor

No, I haven't tried /ini= yet.

If more than one account use WinSCP, how will that work if it won't support variable names?

If I open the dropdown menu for external applications I will find this line:
%ProgramFiles%\PuTTY\putty.exe -t -m "%TEMP%\putty.txt" !`cmd.exe /c echo cd '!/' ; /bin/bash -login > "%TEMP%\putty.txt"`

So, it looks like it will work, but not everywhere 😊
martin

You mean you get an error even when you use /ini=%APPDATA%\WinSCP\WinSCP.ini?

Currently all errors when writing the random seed file are silently ignored. WinSCP works without random seed file, but it degrades security.

What "most other Windows program" have similar configuration that allows using environment variables?
Sopor

I don't know how it should work, but if I get an error message when I use %APPDATA% in the INI path. Shouldn't it show the same error message in the seed file path when I use %APPDATA%?

Will WinSCP work without a seed file? I don't really know what it do, but I didn't have one in my folder.

BTW, why isn't variables supported like most other Windows program?
martin

Re: Can't use %APPDATA% in "Custom INI file:", but i can in "Random seed file:"

You can use /ini=%APPDATA%\WinSCP\WinSCP.ini command-line switch, if you want to use environment variables. You can create a desktop shortcut for that.
Sopor

Can't use %APPDATA% in "Custom INI file:", but I can in "Random seed file:"

I want to have the path to my WinSCP.ini like this %APPDATA%\WinSCP\WinSCP.ini, but if I try that I get an error message (see attached file).

I can use %APPDATA%\WinSCP\winscp.rnd for the seed file without any error message.

I don't have any winscp.rnd file in %APPDATA%\WinSCP\, though.

Maybe that path is invalid for the seed file too? The only difference is that it won't show an error message?

After changing the path to C:\Users\<username>\AppData\Roaming\WinSCP\winscp.rnd I now have a winscp.rnd file too.