cancel
Showing results for 
Search instead for 
Did you mean: 

Run command files (VBScript) before data capture during recovery point creation

CESoft
Level 2

Hi,
I've a VBScript that I'd like to run before data capture. I've follow the instructions on the user manual:

To use a Visual Basic script file (.VBS) during a recovery point, you can create a batch file (.BAT) that will run the script.
For example, you could create a batch file called STOP.BAT that contains the following syntax:
Cscript script_filename.vbs
Make sure that Cscript precedes the Visual Basic script filename.

Bat doing that I get this error:

Description: Error EC8F17B7: Cannot create recovery points for job: Recovery point of C:\. Error EC8F0401: External command "C:\BESR\script.bat" returned an error. Error E0BB009C: Incorrect function.

So, following this suggestion (http://seer.entsupport.symantec.com/docs/294095.htm) I've tried to add "echo done" as second line in the script.bat file. As result no error are raised, but the vbs script will not execute.
I've also tried with a really simple vbs script, just one line of code, but without success.
I'm using BESR 8.5.7 and Windows XP SP3.

Has anyone encountered and solved this issue?
Thanks!
Emanuele.

4 REPLIES 4

Markus_Koestler
Moderator
Moderator
   VIP   

Just add the following as the last line of the script:
exit 0

CESoft
Level 2

Thanks for your suggestion,
but adding "exit 0" the vbs will not execute same as adding "echo done".
My commandFile (script.cmd) is:
 

CScript script.vbs
exit 0

And all files are in the same directory. If I call script.cmd from the command prompt all work fine!

CESoft
Level 2

Ok, I've got the solution.
With the objective to write a log file of the vbscript, I call the vbscript from the batch file like you can see below and this work fine!
 

cscript //nologo script.vbs 1>>c:\Log.txt 2>>&1

 

I don't know exactly why, but it's work!
Thanks.
Emanuele.

Markus_Koestler
Moderator
Moderator
   VIP   

Hm, strange. We've had a similar problem caused by a statement that not exited with code 0 that caused the before data capture script not to end with error code 0 and this caused BESR to think the command failed.