KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Autohotkey Script to Close Dragon without Saving the User Profile and Restarts
Topic Summary:
Created On: 12/10/2019 12:39 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 12/11/2019 11:43 AM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 2164
Joined: 03/21/2007

You might consider closing DragonBar.exe too separately. And even the logging service or UI automation servers (dgnuiasvr.exe and _64), etc. Someone here wrote a batch file which works well (and can be run directly or executed by a script).



Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.

 12/11/2019 07:13 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 1176
Joined: 04/03/2009

With recent changes to KnowBrainer the batch file had to be "run as administrator" (at least on my Windows 10 machine). I started exploring workarounds. One version is to create a shortcut to the batch file on the Desktop and change the shortcut’s property so that it runs as administrator. I did not have great success with this although it sometimes work. I finally wrote a tiny C# application in Visual Studio 2017:

using System.Diagnostics;

using System.Threading;


namespace KillDragon {

   class Program {

      static void Main(string[] args) {       // PIDs  

         EndProcessTree("KBPro.exe");       //5264  

         Thread.Sleep(2000);//sleep 2 seconds

         EndProcessTree("ProcHandler.exe");  //9864



         Thread.Sleep(1000);//sleep 1 second

         EndProcessTree("dragonbar.exe");   //18008

         EndProcessTree("dgnuiasvr.exe");   //12644

         EndProcessTree("dgnuiasvr_x64.exe");  //700

         EndProcessTree("dgnsvc.exe");      //10500

         EndProcessTree("natspeak.exe");     //18088    




         //the commented out trees are from older versions and helpers



      private static void EndProcessTree(string imageName) {

         Process.Start(new ProcessStartInfo {

            FileName = "taskkill",

            Arguments = $"/im {imageName} /f /t",

            CreateNoWindow = true,

            UseShellExecute = false






As with the batch file it has a tendency to leave the icons in the tray (a minor irritation but no impediment to restarting KnowBrainer and/or Dragon). I've experimented around with solutions for clearing these icons from the tray and I suspect that I am fairly close to a solution but the visual irritation is not enough to spur me on to finding a solution.


DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

 12/11/2019 08:07 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 1393
Joined: 08/16/2010

SP Pro performs all necessary operations including cleaning up the Dragon/KB/VC/SS+ ghost icons with one single Hotkey (Ctrl+Alt+Down). If speech is still available you can also use a voice command. 


No need to create any scripts. However cleaning up the ghost icons will only work of course if you have the "Always show icons in the notification area" set to On. Which is recommended anyway if you want to see what's going on on your computer.


Here's an example of quickly restarting Dragon + VC.


 12/12/2019 01:36 PM
User is offline View Users Profile Print this message

Senior Member

Posts: 108
Joined: 12/12/2007

With respect to SP Pro, does the process close the user profile or simply kill the process?  I don't want the user profile to be damaged, and so I prefer closing and not saving to minimize the chance of damage to the profile. 

 12/12/2019 04:43 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 1393
Joined: 08/16/2010



The Dragon and VC (+KB + SS+) Restart utility kills these processes, cleans up orphan icons and (optionally) relaunches these add-ons. It's mostly meant if Dragon has become unresponsive/unstable and voice commands don't work anymore. In these cases you probably don't want to save your user profile anyway  


You can also use the tool if you are in a lazy mood ;-). If none of the above add-ons are currently running it will restart just Dragon (so it's not a condition to have these add-ons installed in order to run the utility).


The user can choose one of the following combinations: Dragon + VC Restart or Dragon + KB + SS+ Restart

I could combine all into one but that wouldn't make much sense since those who use VC usually don't use SS+ and combining VC with KB is not always a good idea.


32106 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 407 guests browsing this forum, which makes a total of 408 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.