VoiceGuide IVR Software Main Page
Jump to content

Delayed Start Of Vgmulti.exe

Recommended Posts

Again, this is probably only useful to the newbies, but it took me a long time to figure out so maybe posting here will save someone else some time. This is probably only useful to those with Dialogic cards.

 

We know that VgMulti (VG) should not be started until after the Dialogic card and service is fully initialized. This was a problem when someone else was rebooting the system that runs VG for us (seems they always forgot to wait for a minute, then Start VG). So posts here suggested writing a .bat file that would call MS's sleep.exe routine to delay the start of VG. Some of us did this and then found that the CMD window stayed open (unless you Exited VG - then it would close).

 

I guess everyone eventually finds the magic combination and here's what worked for me. I run VG on a box with WINXP Pro. I am using the Dialogic patch at version 6.0.2384. I need this version to start VG using the -icon command line feature.

 

Sleep.exe is in my \Windows\System 32\ folder. (I think I had to download it from somewhere a few years back. So if sleep.exe is not in your system, check the MS site for it.)

 

My .bat is named Delay VGMulti.bat. Probably a bad idea to have a file name with a space in it, but I do stupid things often. Builds character.

 

My .bat looks like this:

 

@echo off

 

echo . Leave this window OPEN for now... waiting for Dialogic card/service to initialize.

echo .

echo . Complete initialization takes about 1 minute.

echo .

echo . Leave this window OPEN until the VgMulti.exe -icon message is displayed

echo . with a comment saying it is ok to close the window (in about 1 minute).

echo .

sleep 30

echo . About 30 seconds remaining...

echo .

sleep 20

echo . About 10 seconds remaining...

echo .

sleep 10

echo . Initialization Complete.

echo ...

 

@echo on

 

start VgMulti.exe -icon    "Ok to Close this window now."

exit

 

Change it or fix it all you want. I put the messages out just to keep folks from closing my .bat prematurely.

 

This is so darn simple, What took me so long?, you might ask. Well, read about the start commmand with a start /?. And then add an old habit of using quotes to prevent misinterpretation of intention when there are spaces invovled...

 

For example, start's function is to "Starts a separate window to run a specified program or command." And start supports a /b switch to suppress opening a separate window. Therefore one would expect: start /b "vgmulti.exe -icon" to work just fine (start VgMulti without opening a separate window) - Wrong. And then I went down all the wrong paths. Don't waste your time analyzing cmd /?, start /?, MS knowledgebase articles about calling programs from a .bat or .cmd, etc. And run away even faster when the "solution" involves using .bat to call another .bat. What mess I got into. My dog bit me, my wife kicked me out of the bed, my car died, no less than 13 birds dropped their dudie on me... you get the idea.

 

Anyway, if I can save just one other soul...

 

Enjoy!

 

p.s.

 

One last change I made: The shortcut in my Startup folder is created using the option to Start Minimized, so the messages I put out are only going to be seen if someone opens the minimized window. Perhaps I don't need the messages any more (or perhaps the minimized window is more at risk??!!). Like I said... Change it or fix it all you want.

Share this post


Link to post

I know next to nothing about starting VG as we are discussing.

 

That being said I'm posting my "solution". Let me know what you think.

 

I took a little different approach. As I've posted before I thought it would be better to try to determine if the Dialogic card was actually ready for VG to start so I based my solution on that approach.

 

I'm also using a VB script to start VG instead of a batch file.

 

I am aware of a few problems.

 

I can't seem to get the vb script to run from a directory other than the one that VgMulti.exe is located in. Everything I try gives me an error. I've tried the full path several times using quotes, parentheses and both around the full path. Nothing seems to work. I'm sure I'm just doing something wrong with the path.

 

Anyone have the solution?

 

I have some concerns about the way I'm starting VG using this script and they may apply equally to your batch file.

 

I think we both are using a shortcut in are Windows Start Startup folder. Are there potential problems with this?

 

I put mine in the "C:\Documents and Settings\All Users\Start Menu\Programs\Startup". So I might have a problem if other users log on. If others do log on will I have multiple instances of VG running? Probably so.

 

It's not a problem in my case because I use a dedicated computer with only one user. But it might be a problem for you. How have you handled this? Did you just put the shortcut to your batch file in only one users startup folder?

 

My other major concern is am I checking the proper dialogic marker to indicate that the dialogic card is ready? It works but is it the best thing to check?

 

Rob something that might be of interest to you is that using this method it is possible to start VG using "Hide the window and activates another window" method. I'm not exactly sure what this does but I think it would run VG hidden from the user. It would not show on the task bar. The only problem currently is that it does not appear that VG currently supports this.

 

Unfortunatly Not all applications respond to the window style options. For example, Control Panel (Control.exe) always opens in the same way, regardless of the window style specified in the script. It probably is possible and more than likely very simple for the developers to make a change that would allow you to start the program in the "Hidden" mode. Might be something to think about.

 

I'm looking forward to comments or questions.

VoiceGuideAutoStartAtBoot.vbs

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
×