WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Run Batch file Plugin (Read 3890 times)
aravinthk
YaBB Newbies
*
Offline



Posts: 2
Run Batch file Plugin
Jan 29th, 2009 at 3:39am
 
I am trying to use the run batch file plugin to monitor a directory for new files and to run a batch file. The batch file basically transfers the new file to a ftp server using coreftp command line scripting. The task works fine when I run it manually, however the task hangs after the coreftp call when I run the task as a Windows Service, since I can see the CoreFTP program running in the background process and it never ends. Can this be because Watch Directory tasks don't have access to the network(internet/tcpip)? How can this issue be best fixed?
Back to top
 
 
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 661
South Germany
Re: Run Batch file Plugin
Reply #1 - Jan 29th, 2009 at 8:09am
 
Hi aravinthk,

please click at the button "Windows Services" at the right column of watchDirectory Control Center.
Look for the service of your task, it is named: watchdirectory:[yourtaskname], where [yourtaskname] is the name of your task. Double click it an chose tab "Login". You can see that the service is running under the credentials of "Local Service". "Local Service" does not have access to the network. Please change this into a user/pass with sufficient rights for network access.
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2239
The Netherlands
Re: Run Batch file Plugin
Reply #2 - Jan 29th, 2009 at 9:59am
 
[quote]don't have access to the network(internet/tcpip)[/quote]
TCP/IP (and thus FTP) *is* available to Services, however a firewall may be the issue here. If you run something like McAfee, please check its logs (or the Windows Event log) to see if it has blocked your coreftp.exe program.

To add to what Dirk suggests, when you run batch files "as a service", also make sure to:
[list][*]Only use UNC style paths (\\server\share) as your network drive-mappings (X:) are not available
[*]Use full paths to files and programs ("C:\Program Files\CoreFtp\coreftp.exe" instead of coreftp.exe) because the PATH is different for services
[/list]

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1