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


equality1983
2011-09-27T10:01:19Z
Dear all,

I have a problem to execute a script that do a "net use".
I have a server, such as SERVER001 with VisualCron 5.8.1, and I have a task that execute remotely a batch file (run.bat) in SERVER002. The batch file is in SERVER002. The batch is:

@echo off
C:\windows\system32\net.exe use H: \\10.0.0.3\bkp /user:admin password
dir H:
C:\windows\system32\net.exe use /d H:

If I run the batch file from the server SERVER002, this run OK. But, if I run the script from a task in VisualCron, nothing will be run. If I run "run.bat > log.log" from SERVER002, the file log.log report all the sentences OK. Unfortunately, when I run the file from the VisualCron server, the log file is blank (seems that does not execute any sentence).

Anybody can help me?

Thank you a lot.
Sponsor
Forum information
Support
2011-09-27T10:03:00Z
I would output something to the log file before, inbetween and in the end of the code. Just to make sure that the logging works ok.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T10:39:07Z
The credentials that are stored in VisualCron are correct. These file commands are not executed. The script runs on a Windows 2003.

If I run the script manually, it works and in the log file displays information from the three commands properly. If run from VisualCron, the file is created but nothing is written in it.

Support
2011-09-27T10:47:12Z
Originally Posted by: equality1983 

The credentials that are stored in VisualCron are correct. These file commands are not executed. The script runs on a Windows 2003.

If I run the script manually, it works and in the log file displays information from the three commands properly. If run from VisualCron, the file is created but nothing is written in it.



Understood, but did you try to create some debug output besides this? Also, try specifying the full path to the debug log (local full path).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T10:58:34Z
No, I don't try to create another debug output file, only one.
If I specifyed the full path of the commands and files, not run.

@echo off
C:\windows\system32\net.exe use H: \\10.0.0.3\bkp /user:admin password > C:\scripts\log.log
dir H: >> C:\scripts\log.log
C:\windows\system32\net.exe use /d H: >> C:\scripts\log.log

I have this configuration in the task:
Tab Main settings
Task type: remote execute

Tab Remote Execute
Credentials: admin@SERVER002 ---> with the correct credentials
Hostname: SERVER002
Command: C:\scripts\run.bat
Arguments: <none>
Working directory: C:\scripts


The output file such as:

***

The command completed successfully.

Volume in drive H is bkp
Volume Serial Number is C598-0174

Directory of H:\

22/09/2011 10:46 <DIR> .
24/08/2011 10:16 <DIR> ..
14/07/2011 11:15 <DIR> BCKP01
17/05/2011 04:25 <DIR> BCKP01_
19/05/2011 09:16 <DIR> BCKP04
20/05/2011 02:25 <DIR> BCKP022
30/08/2011 11:18 <DIR> CA
0 File(s) 0 bytes
9 Dir(s) 1.884.145.475.584 bytes free
H: was deleted successfully.

***
Support
2011-09-27T11:34:32Z
So, even though you have this debugging the c:\cripts\log.log file is empty when you run it from VisualCron?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T12:21:06Z
Yes, is empty. It appears that the NET USE and DIR commands does not work, is somewhat strange, if other calls to programs that work.
Support
2011-09-27T12:26:30Z
Just for testing, what if you use the full path to DIR and NET?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T12:35:47Z
I use the full path to execute the net command:

C:\windows\system32\net.exe

the remote path is 10.0.0.3, share bkp.

I think that the DIR and NET commands doesn't run, because if you execute the command such as NET, you should at least give an answer of the command launched.
The same with the command DIR, not return any results.
Another command that also skips is PAUSE (to launch PAUSE command in a script is absurd, because the task would not end, but in the TASKMANAGER I see as running a script which includes the PAUSE command, the script disappears from the list of TASKMANAGER.)

Thanks.
Support
2011-09-27T12:42:13Z
Which operative system and service pack is the destination computer?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T12:50:31Z
Windows Server 2003 Standard Edition SP2... but, I tested now the same script in a Windows 2008, and it's run! I don't believe it!
So, I think that is problem of the OS. But, I mustn't change the OS version. Any idea?
Thank you.
Support
2011-09-27T12:52:14Z
My first guess is a permissions problem. You could try to create a new admin user.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
equality1983
2011-09-27T13:06:17Z
Yes, I try to run the script with another user administrator. The log is empty again when I run the script with VisualCron.
Users browsing this topic
Scroll to Top