How to nicely shut down and restart VC from an external program?

Hi, I am writing an external program to stop/restart Dragon and friends (Knowbrainer, Voice Computer) when the whole show hangs. I’m writing to ask if there is a preferred way (software API interface preferred) to ask VC to shut down nicely. Otherwise, I have to kill the process, which is a brute-force way that I would rather not use.

For example, Knowbrainer runs at some elevated level so it will not accept a WM_CLOSE message from my app. So, I just have to kill it.

With Dragon, I connect to the DragonBar engine and call the DragonBar.CloseDragonBar() method. After a while, if that doesn’t work, I kill the Dragon process too.

Is there a reachable VC window that will take a respectful WM_CLOSE message or an API available like the DragonBar.CloseDragonBar() method that will nicely disconnect VC from Dragon and shut down VC?

I also try to restart VC by calling Process.Start(voicecomputer.exe). I don’t know if that will work because I don’t have VC installed on my machine.

But after reading your nice answer in the recent “VoiceComputer can’t be closed thread” and other threads (“VC 13 starts D 13 then shuts down”), I’m thinking that you might recommend starting VC before Dragon (because VC will start Dragon too) - in which case I should not be trying to start Dragon again on a global restart sequence.

Thank you for your recommendations,

I appreciate your interest but we already use an external program (voicecomputer.exe,a WinBatch script) to open, close and restart VoiceComputer AND Dragon.
We start VoiceComputer (vp.exe) from its installation directory (C:\Program Files (x86)\VoiceTeach\VoiceComputer) and we just kill the process to close it and this works without any issues. And if Dragon doesn’t respond, we have to kill that process.
I do not recommend that people use VoiceComputer and KnowBrainer at the same time. The three programs, running concurrently (Dragon, VoiceComputer, KnowBrainer) just take too many resources. And finally, in addition to the Intag technology, VoiceComputer includes many productivity scripts so KnowBrainer isn’t necessary except for those who want scripts for everything.

Hi Ron, thank you for responding. I was worried that if I killed VP.exe outright, all the stuff that it had registered with Dragon would be left hanging in Dragon (as happens with KB). So, I thought I would ask you what was best and available for shutting down VP nicely.

Q. So you would confirm that there is no VP.exe main window that I could send a WM_CLOSE message to, and no COM API that I could send a request to (like CloseDragonBar)?

One thing I do like about killing processes in a brute force way is that 1) it is dead simple and 2) it almost always works unless something is drastically, drastically wrong. The next step is to try to log out so that Windows cleans up the mess, or maybe even rebooting your computer.

I’m totally with you on Dragon+KB being a resource hog. Dragon can be unstable even in the best of times if your session is too long or you leave the mic in the sleep state too long. Throw in KB and it can be much worse.

These days I am seeing that Dragon is excellent for free-form dictation, not bad for scripting, and nowhere for flags and tags. KB (Dragon addon) is better for scripting than Dragon). VC (Dragon addon is excellent at flags and Intags). Talon is excellent for commands (but is definitely not good at free form dictation, and is nowhere for flags and tags). So, each of them has their own strengths. I’m trying to write a little Microphone Helper app to help users easily switch between Dragon and Talon by voice so that they can use the best tools for what they want to do (commands+python vs Dragon dictation+scripts or Intags).

Who knows if anyone else would ever want to do that, but I do, so I’m writing the Helper program. :slight_smile: And part of “switching” is being able to start/stop programs by voice, so that users can completely switching tooling to save resources by turning one system completely off while they use the other system of tools (and vice versa).

At least, that’s my plan for me. I will go forward with simply killing vp.exe and voicecomputer.exe when the need arises.

Best regards, Kevin
(PS. For what it is worth, I like this website better than the old flashy one I saw a few years ago.)

PPS. If I want to just start VP.exe alone, I can do that, right? And if Dragon is already running, VP will integrate with it as normal? Or should I always call voicecomputer.exe to start VC? Thank you.

Hi Kevin,

Killing VP.exe has no negative effects on Dragon at all in my experience and I don’t believe there is a specific main window you need to send a WM_CLOSE message to (there may be a hidden window but killing the VP process appears to not have any negative impact).

Like we do in the SP Dragon and VC Restart© utility, it is recommended to restart (or kill) both Dragon and VC in order to guarantee quick availability of the VC features. If you only kill VC (and not Dragon) it’ll take a little while for the intags to become active again after you relaunched VC.

Ron is right. Using VC in combination with KB is not a good idea. You can get noticeable delays in command recognition! But for most VoiceComputer users it’s quite clear which of these two programs are more important (VC ;-))

Yes, you can simply launch VP.exe directly:

C:\Program Files (x86)\VoiceTeach\VoiceComputer\VP.exe

If Dragon is already running it will silently reenable VoiceComputer (without bringing up the VC Control Center first).

However, if Dragon is not running you will get the following pop-up:


Looks like your Microphone Helper app will be an interesting addition to the voice addon arsenal for many users.


Hi Rob, thank you for your reply! I am far enough along my Helper app so that I can switch between states Dragon only, Dragon+KB, Dragon+VC, Talon, and HelperSleep and HelperManage.

I modified the code so that when I switch to state KB or state VoiceComputer from some other state, I always stop/kill Dragon before starting KB or VC. As far as I can tell, both KB and VC want to bring up Dragon themselves. When KB comes up, it will often block and ask for permission to kill and restart Dragon, so I just stop Dragon in advance to avoid the pause. VC comes up and blocks and gives me a control panel where I say Bring Up Voice Computer. Then it seems to connect okay after a while.

It’s just smoother if I stop Dragon in advance and then let KB and VC start Dragon themselves.

Now, for my next question: With VC running, is there some voice command to tell it to stop/quit/exit? I looked in the documentation and in-app help screens, but could not find such a command. The only command available is Shutdown Speech, which shuts down BOTH Dragon and VC. I just want to shut down VC alone. Is there a voice command to do that, or is killing the vp process the only way?

Hi Kevin,

Yes, I think that killing the VP process is the only way. But Ron will know more about that.

Anyway, killing it never caused any damages or anything on my system.