title: Scheduling task in Windows involving SCP, SSH
body: <p>I am running the following script in Windows 8 using Git Bash; works fine when run manually--scp, ssh, etc. all work fine.  But it does not work when put into Task Scheduler.   The Task Scheduler stops at scp ... does not run the scp command. In Scheduler, I am unable to see any error messages or error log (I don't know where to look for log file).</p>
  
  <p>I am using: Run with highest privileges UNCHECKED; Configure for Windows 8; </p>
  
  <pre><code>Wscript.echo "Running abc.exe"
  Set objShell = CreateObject("WScript.Shell")
  Return = objShell.Run ("C:\abc.exe /S", 1, true)
  Wscript.echo "Done Running abc.exe"
  WScript.Sleep(5000)
  Wscript.echo "Done sleeping"
  dim fileSystem
  Set fileSystem = CreateObject("Scripting.FileSystemObject")
  Return = objShell.Run ("scp -i c:/users/uname/.ssh/id_dsa /c/data/*.txt admin@svr3.com:/mnt/wnd01/txt",0,true)
  Wscript.echo "Uploading file, Return message " &amp; Return
  if Return = 0 then
    WScript.Sleep(5000)
    Wscript.echo "Done sleeping on scp"
    fileSystem.MoveFile "C:\data\*.txt","C:\data\archivefiles"
    Return = objShell.Run ("ssh -i c:/users/uname/.ssh/id_dsa admin@svr3.com '/opt/drupal/scripts/import_raw.sh wnd01'",0,true)
  end if
  Wscript.echo "Running DB script on server, Return message " &amp; Return
  </code></pre>
  
  <p>Any help in figuring out what may be going on would be appreciated.</p>