Tray icon when using script parameter

Advertisement

LupusGressus
Guest

Tray icon when using script parameter

Good evening everyone,

I was able to create a shortcut for WinSCP which opens my connection and keeps the two folders synchronized:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="D:\log.log" /script="D:\script.txt"

And the script.txt contains the commands "open", "keepuptodate" and "exit" generated by the program.

My question is following:
Everytime I start the shortcut, the folders get synchronized, but I can't see the WinSCP program. I know its in the Task Manager of Windows, where I can shut it down, but is it possible to see an additional tray icon?
I get the tray icon, when I start WinSCP and the synchronization manually and minimize it, but I would prefer the automatic way.

Any suggestions?

Thank you very much!

Reply with quote

Advertisement

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

Re: Tray icon when using script parameter

Correct, use the /console switch. If you have minimizing to tray enabled in GUI, the script console will use it too.

Or you can use the /rawconfig Interface\MinimizeToTray=1 command-line switch.
https://winscp.net/eng/docs/rawconfig

If you want to start minimized, put the command to a shortcut and set the shortcut Run parameter to Minimized.

Reply with quote

LupusGressus
Guest

Re: Tray icon when using script parameter

First of all, thank you very much for your help! <3
I finally managed to get what I want by adding the console-Parameter in the link and enabled the "minimize to tray"-function in the settings and changed it in the shortcut.

My final configuration (if anyone else has the same problem) is:

- Enable the "minize to tray"-option in the WinSCP settings
- The command of the shortcut is
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /log="D:\log.log" /script="D:\script.txt"
- set "run as minimized" in the shortcut

Once again, thank you very much! :)

Reply with quote

Advertisement

You can post new topics in this forum