VanDyke Software Forums

VanDyke Software Forums (
-   Scripting (
-   -   Noob Question (

vkbeaudreau 04-18-2005 07:59 PM

Noob Question
Product in Question: Version 2.3.3 (build 217)

I am trying to write a file upload trigger that checks for a certain user id and, upon success, transfers that user's file to another secure ftp server. Actually I want it to activate on a file upload to a particular folder, but I thought this would be easier.

My batch file is very simple right now as I havent started checking for the username yet - im still trying to get the file transfer part working.

The command I have in my batch file is:
e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:
the batch file is called thus in the trigger command:
e:\sftp.bat %P

This works when I run it from the command line, but doesn't seem to work when used as a trigger. I don't see anything amiss in the VShell Log files or the Windows event log.

Any thoughts?


jdev 04-18-2005 11:42 PM

VShell trigger scripts run as the same user that the VShell service is running as, which is, by default SYSTEM.

This means that any number of things could go wrong when VShell runs the process (that don't go wrong when you run it interactively):

I noticed that you are supplying information for both public-key and password authentication. If the private key is protected with a passphrase, could it be that 'pscp' is hanging on a prompt asking for the passphrase?

Since 'pscp' is running as SYSTEM, it's possible that it's getting stuck in the host key verification phase through which all "first-time" secure shell connections to a specific host must pass.

Are you able to get any debug output from 'pscp' to verify if it is hanging on the hostkey verification phase?

Have you attempted to add any debug output to a log file from within the .bat file to see what might be going wrong?

For example:

@echo off
echo. Command: "e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:"
e:\pscp.exe -i e:\identity.ppk -pw password %1 user@server:
echo. Result: %ERRORLEVEL%

vkbeaudreau 04-19-2005 09:00 AM

Thanks very much Jake. The problem was indeed the service account under which VShell was running (System). I set it to run under another account that has rights to run batch jobs and everything works great.

bgagnon 05-13-2013 03:24 PM

Hi all,

There was an old thread (since deleted) where a user requested the ability to configure triggers on a "per user" basis.

This thread seemed very similar so I decided to post an update here.

The functionality of being able to configure triggers on a per user basis is now available in a pre-release version of VShell (Windows only).

This version of VShell also includes a complete revamp of triggers in VShell for Windows, including multiple actions per trigger, built-in email support and the ability to fire triggers for specific users/groups.

If anyone is interested in trying the new trigger functionality in VShell please send an email to and include "Feature Request - Forum Thread #702" in the subject line.

Please specify the specific version of VShell installer you would need:
  • 32-bit or 64-bit
  • SFTP only or SFTP + FTP/SSL version of VShell
Please contact us from (or include information on) the email address associated with your VanDyke Software download account.

All times are GMT -6. The time now is 08:59 PM.