Running the Transfer Engine without a User Present

The Transfer Engine is a process, not a service. However, you can execute scripts while the system is not logged in if you properly configure Windows DCOM configuration for the Transfer Engine. Carefully read and follow the steps below. A sample script is provided below.

Refer to How to Turn on Automatic Logon in Windows for information about configuring Windows to automate the logon process by storing your password and other pertinent information in the registry database. By using this feature, other users can start your computer and use the account that you establish to automatically log on. Of course, you need to be an administrator on the computer to make changes to the registry.

To configure the TE under the DCOM configuration applet

  1. In the Search box, type: Component Services

  2. Click Component Services. The Windows Component Services dialog box appears.

  3. In the left pane, expand Component Services, expand Computers, expand My Computer, expand DCOM Config, then click TEConnection Class.

  4. Right-click TEConnection Class, then click Properties. The TEConnection Class Properties dialog box appears.

  5. Click the Identity tab.

  6. Under Which user account do you want to use to run this application, click This user, then provide a valid user name and password. It must be the same user as established under your task scheduler's run as property (if applicable), so that the scheduler service can call the COM object as a user. This will enable the Transfer Engine to run with the user settings, and if necessary, access pre-established SSL certificates (for secure connections).

  7. Click OK to save the changes, and close the Properties dialog box.

  8. Close the Component Services dialog box.

Configuration Notes

  • If the system is currently logged in when the TE runs, it runs as the user that you specified in the TEConnection Class Properties dialog box. You will not see the TE icon in the system tray when running CuteFTP's main interface. Also, the hard coded user's settings are employed when the TE is run, not those of the currently logged in user. This is not an issue if you are running the TE while the system is not logged in.

  • You should test your script from the command line while logged in. You can also write to the Event Viewer or a local text file to debug a script when run on system startup if necessary. Below is a sample script that includes event viewer logging of transactions.

  • Your script should not contain Message Box functions or any other function that requires user input or shows a dialog box. Dialog boxes cannot display these prompts while the system is not logged in. Set your overwrite actions in Global Options > Transfer > Smart Overwrite to Always Overwrite to avoid any overwrite prompts, or pre-define various rules to cover various overwrite scenarios. (See also Disabling Prompts.)

Const EVENT_SUCCESS = 0

Set objShell = Wscript.CreateObject("Wscript.Shell")

objShell.LogEvent EVENT_SUCCESS,"AT Loaded me"

Set MySite= CreateObject("CuteFTPPro.TEConnection")

MySite.Option ("ThrowError") = False

MySite.Host = "ftp://anonymous:user@user.com@ftp.globalscape.com/pub/cuteftp"

objShell.LogEvent EVENT_SUCCESS,"vars set"

MySite.Connect

objShell.LogEvent EVENT_SUCCESS, "connected"

MySite.Download "index.txt", "c:\temp"

objShell.LogEvent EVENT_SUCCESS, "downloaded"

MySite.Disconnect

MySite.Close