Run WinSCP as a Windows Service with AlwaysUp

How to Run a WinSCP Script as a Windows Service with AlwaysUp

Reliably schedule your WinSCP Script to run in the background whenever your server is on - even if no one ever logs on. Ensure that your FTP solution is available 24x7!

WinSCP is a free SFTP/SCP/FTP client available since 2000. In addition to sporting a GUI for conventional file transfer usage, WinSCP also features very powerful scripting capabilities to facilitate unattended automation.

To set up WinSCP as a Windows Service with AlwaysUp:

  1. Download and install WinSCP, if necessary. Please make a note of where you installed it as this will be used in a later step.

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Add to open the Add Application window:

    Add Application

  5. On the General tab:

    • In the Application field, enter the full path to the WinSCP command line program, WinSCP.com. If you installed WinSCP in the default location, this is:

      C:\Program Files\WinSCP\WinSCP.com
      or
      C:\Program Files (x86)\WinSCP\WinSCP.com
      on 64-bit systems.

    • In the Arguments field, enter the parameters to WinSCP.com.

      Since we want to run our sample script, we enter /script= followed by the full path to our script. Be sure to quote the entire path to your script if it contains a space, as ours does.

    • In the Name field, enter the name that you will call the application in AlwaysUp. We suggest WinSCP Script but you can specify another name if you like.

    WinSCP Windows Service: General Tab

  6. Click over to the Logon tab and enter the username and password of the Windows account in which you installed and configured WinSCP. WinSCP must run in this account so that it can find its settings.

    WinSCP Windows Service: Logon Tab

  7. Switch to the Restart tab:

    • To run your script every hour, on the hour, (instead of the default, 24x7) select the Not immediately and On the next hour options as we have done below.

    • Also, we recommend checking the Minimize event logging as the application stops & restarts box. If not, AlwaysUp will write a few log entries each time the script completes and is rescheduled - of no value in this scenario.

    WinSCP Windows Service: Restart Tab

  8. Click over to the Startup tab and check the Ensure that the Windows Networking components have started box. This informs AlwaysUp that WinSCP needs the TCP/IP networking stack to do its work.

    WinSCP Windows Service: Startup Tab

  9. And finally, switch to the Extras tab:

    • If your computer is configured to go into a low-power state after a period of inactivity, check the Prevent the computer from automatically going to sleep box to avoid that behavior while the WinSCP service is active.

    • To capture the output from your script, check the Capture output to this log file box and enter the full path to a suitable text file. Set the options beneath to prevent the file from growing too large.

    WinSCP Windows Service: Extras Tab

  10. We are now done configuring your WinSCP script to run as a service so click the Save button to record your settings. In a couple of seconds, an application called WinSCP Script will show up in the AlwaysUp window. It is not yet running though.

    WinSCP Windows Service: Created

  11. To start your WinSCP script, choose Application > Start "WinSCP Script". The state should transition to Running and your script will be executed in the background. Now would be a good time to review the text file capturing output to ensure that the script is working as expected.

    Once your script has done its work and exited, the state will transition to Waiting in AlwaysUp. Click on the associated icon to reveal when it will next be run:

    WinSCP running as a Service with AlwaysUp

  12. That's it! Next time your computer boots, WinSCP will run as scheduled, without anyone having to log on to run your script manually at the desired times. We encourage you to edit WinSCP in AlwaysUp and check out the many other settings that may be appropriate for your environment. Boost priority, send email when the computer boots, and much more.



WinSCP not working properly as a Windows Service?

  • Consult the AlwaysUp Troubleshooter - our online tool that can help you resolve the most common problems encountered when running an application as a windows service.
  • Launch your application from a windows service command prompt to see error messages, reveal startup problems and more.
  • From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and WinSCP. The AlwaysUp Event Log Messages page explains the messages that may turn up.
  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
  • Contact us and we will be happy to help!

Download & Try it Free!

Download AlwaysUp and Run as a Service Today! Version 15.1 New!

7.9 MB Installer
Our 12,000+ customers include...
Compatible with Windows 11 Compatible with Windows Server 2022 Compatible with Windows 10
Over 94,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 19+ years!