Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


vistisen
2019-08-17T10:08:41Z
I have a problem running a dos .bat file using VisualCron 8.5 on Windows Server 2016. The batch file calls WSFTPro comamndline with an parameter file like this:

echo %date% %time% >>C:\Batch\logs\EINDIND\download_skattekort.log
"C:\Program Files (x86)\Ipswitch\WS_FTP 12\ftpscrpt" -f C:\Batch\SCRIPTS\EINDIND\download_skattekort.txt>>C:\Batch\logs\EINDIND\download_skattekort.log
echo ---------------------------------- >>C:\Batch\logs\EINDIND\download_skattekort.log


As the parameter fil includes a user account specific connection it has to be run as using particular user. I have set this up in VisualCron and I know the credentials work as they are used to copy files to network shares and that works.

If I log on to windows as the user and execute the dos batch fil from a command prompt it works fine. but when called from visual cron I get this error

[i]The system cannot find the path specified.
The system cannot find the path specified.
'"C:\Program Files\Ipswitch\WS_FTP 12\ftpscrpt"' is not recognized as an internal or external command,
operable program or batch file.
Exception in Task: Non zero exit code
Exit code (9009) description: DNS server not authoritative for zone.


I know it is getting hold of the batch file OK as the two echo comands to a log file work. I'm pretty sure its some Microsoft 'security' thing stopping me from running a program from programsfiles. What I don't understand is it works fine when called from a dos prompt.
Sponsor
Forum information
vistisen
2019-08-17T16:16:03Z
I have solved the problem. Even though I need to load something from the user profile ( a cached login to a SFTP site) I can get the dos programs task to work if I DON'T load the profile. Stange but it works!😲
Support
2019-08-19T08:49:46Z
Originally Posted by: vistisen 

I have solved the problem. Even though I need to load something from the user profile ( a cached login to a SFTP site) I can get the dos programs task to work if I DON'T load the profile. Stange but it works!😲



Glad you could get it sorted! 🙂
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top