Use of environment variables in the GUI or command line

Advertisement

sreerao
Joined:
Posts:
2

Use of environment variables in the GUI or command line

Hi,
Is it possible to use common windows environment variables in the GUI (Graphical User Interface) or the command-line. E.g., I would like to publish the WinSCP application (portable) as a RemoteApp, and would like to pass the %username% as a variable in the session. Is this possible?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Use of environment variables in the GUI or command line

You can use environment variables in some GUI fields (such as hostname and username) with 5.x, see documentation:
https://winscp.net/eng/docs/ui_login

You can also use variable in WinSCP scripts.

On command-line, variables are expanded by Windows, in you run WinSCP from .bat file.

Reply with quote

sreerao
Joined:
Posts:
2

Thanks. This is exactly what I was looking for.
Your hint about the batch scripts did work as well. I tested with winscp.exe scp://%username%@hostname.address /rawsettings AuthGSSAPI=1 /hostkey="ssh-rsa 2048 asdfma.fdm.amf.amd.fma.dmf.amdf.,adfd" and it worked really well.
I need to find a way to restrict the menu settings, so that the users see a restricted UI.

Reply with quote

martin
Site Admin
martin avatar

sreerao wrote:

I need to find a way to restrict the menu settings, so that the users see a restricted UI.
There's no easy way to do that.

Reply with quote

Advertisement

You can post new topics in this forum