Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline vistisen  
#1 Posted : Saturday, August 17, 2019 12:08:41 PM(UTC)
vistisen

Rank: Paid support

Joined: 10/12/2011(UTC)
Posts: 31
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
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.

Edited by moderator Monday, August 19, 2019 10:47:16 AM(UTC)  | Reason: Not specified

Offline vistisen  
#2 Posted : Saturday, August 17, 2019 6:16:03 PM(UTC)
vistisen

Rank: Paid support

Joined: 10/12/2011(UTC)
Posts: 31
Location: Denmark

Was thanked: 1 time(s) in 1 post(s)
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!Blink
Offline Support  
#3 Posted : Monday, August 19, 2019 10:49:46 AM(UTC)
Support

Rank: Official support

Joined: 12/1/2015(UTC)
Posts: 146

Thanks: 16 times
Was thanked: 6 time(s) in 5 post(s)
Originally Posted by: vistisen Go to Quoted Post
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!Blink


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

Please like VisualCron on facebook!
Users browsing this topic
Guest (2)
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top