VoiceGuide IVR Software Main Page
Jump to content

Running Vb Script

Recommended Posts

Hello,

I can run below vbs from window without any problem.

but when I use it in VG scrip, it won't work.

 

the job of this vbs is to delete a file in message directory.

 

please advise,

 

Thanks

-------------------------------------------------------------------------------

Set obj = CreateObject

 

("Scripting.FileSystemObject") 'Calls the File

 

System Object

obj.DeleteFile("C:\Program Files\IVR Masseging and

 

Recharging phone\Msgfile\$RV[LookForMsg_1_1].wav") 'Deletes the file throught the DeleteFile function

 

set vg = CreateObject("VoiceGuide.CommandLink")

vg.Run_ResultReturn $RV_LINEID, "[fileStatus]{"& Success &"}"

set vg = Nothing

Share this post


Link to post

Do you have any Anti-Virus type applications on the system that would prevent the execution of VBScripts?

 

This is usually what is stopping VB Scripts that are started by the VoiceGuide script from running.

Share this post


Link to post

Hello,

I have disable my anti Virus and run the vbs in VG again, but still it is not working.

 

please note if the anti virus stop running the vbs, it should also stop it when I am running it from windows.

 

Farzad

Share this post


Link to post
I have disable my anti Virus and run the vbs in VG again, but still it is not working.

Can you try fully uninstalling the Anti Virus software and try again?

 

please note if the anti virus stop running the vbs, it should also stop it when I am running it from windows.

Not necessarily.

 

Which anti-virus software are you using?

Share this post


Link to post

Hello,

I was using AVG, but I removed it to test VB Script via the VG.

 

unfortunatly still the VB scrip doesn't run.

 

Just the reminder, I have no problem runing the VB Scrip vis the Windows.

Share this post


Link to post

Is it possible that there is some other anti-virus type software on that system, or was there before and was not fully removed?

 

In all cases where we encountered this before it was a case of anti-virus software preventing execution.

Most anti-virus software prevents process-launched VBScripts form running - and many have some way of specifying exceptions to this rule.

 

Quickest way to resolve this is to reformat the hard disk and re-install Windows followed by installing the Dialogic drivers and VoiceGuide.

Share this post


Link to post

Hello,

I have attached the log file. in this file you will see how vbs script hung.

 

I thought this file will help you to see if there is any other problem that VG can not complete VBS process.

 

Thanks

0105_0700_vgEngine.zip

Share this post


Link to post

Hello,

I have use my other VG script that has few VBS module. it seems those module are running fine throught VG.

 

I can not find the differences in my VB Script that one is runing fine and the other is not.

 

Attached is the log file with new VG script that VBS module is running fine.

 

please advise, what is the differences between these two log files. ( I have sent you one log file for the script that VBS module can't run, with my previous email. )

Share this post


Link to post
I have use my other VG script that has few VBS module. it seems those module are running fine throughout VG.

 

I can not find the differences in my VB Script that one is running fine and the other is not.

 

To debug why a VBScript module isn't fully running the VBScript specified its best to start with something like this in the VBScript module:

 

set vg = CreateObject("VoiceGuide.CommandLink")
vg.Admin_TraceLogAdd 0, 0, "This trace was printed from VB Script"
set vg = Nothing

 

then gradually add your code here:

 

set vg = CreateObject("VoiceGuide.CommandLink")
vg.Admin_TraceLogAdd 0, 0, "This trace was printed from VB Script"

'add some of your VBScript here

set vg = Nothing

 

adding more Admin_TraceLogAdd calls throughout your VBScript code will let you see which lines of your code get executed and where does the VBscript gets stuck.

 

Please see: http://www.voiceguide.com/vghelp/source/html/com_admin_tracelogadd.htm

Share this post


Link to post

Thank you for your advise,

I have implemented code lines you mentioned, but still the vbs module won't execute.

please note my other vbs mode works fine, this code also works fine in windows the only problem it won't run in VG.

 

here is what I have added to my code:

 

set vg = CreateObject("VoiceGuide.CommandLink")

vg.Admin_TraceLogAdd 0, 0,

 

Set obj = CreateObject("Scripting.FileSystemObject") 'Calls the File System Object

vg.Admin_TraceLogAdd 0, 0,

obj.DeleteFile("C:\Program Files\IVR Masseging and

Recharging phone\Msgfile\20123502350.wav") 'Deletes the file throught the DeleteFile function

vg.Admin_TraceLogAdd 0, 0,

 

 

vg.Run_ResultReturn $RV_LINEID, "[fileStatus]{"& Success &"}"

set vg = Nothingvg.Admin_TraceLogAdd 0, 0,

Share this post


Link to post

Please change the script that your 'VB Script' module runs to:

 

set vg = CreateObject("VoiceGuide.CommandLink")
vg.Admin_TraceLogAdd 0, 0, "trace point vg"
Set obj = CreateObject("Scripting.FileSystemObject")
vg.Admin_TraceLogAdd 0, 0, "trace point fso"
obj.DeleteFile("C:\Program Files\IVR Masseging and Recharging phone\Msgfile\20123502350.wav")
vg.Admin_TraceLogAdd 0, 0, "trace point delete"
vg.Run_ResultReturn $RV_LINEID, "[fileStatus]{Success}"
set vg = Nothing

 

also, I think the file to be deleted should not be hard coded, but and $RV shold be used for it, yes?

 

Please post vgEngine trace of the call capturing the attempt to run the above VBScript.

Share this post


Link to post

the code is working now. I am sure these sample vbs codes can be used for all VG user.

 

many thanks for your help.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×