KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Sharing Batch to fully stop KB, Philips Control and Dragon when Dragon Crashes + question "how to quit elevated mode called from this windows batch ?"
Topic Summary:
Created On: 07/28/2021 07:42 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 07/28/2021 07:42 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 297
Joined: 07/31/2014

how to quit elevated mode called from this windows batch ?





@echo off 





rem remove speech recognition software from memory


taskkill /IM natspeak.exe /F /T

taskkill /IM dragonbar.exe /F /T

taskkill /IM dgnsvc.exe /F /T

taskkill /IM dgnuiasvr_64.exe /F /T

taskkill /IM dgnuiasvr.exe /F /T

taskkill /IM dgsspserver.exe /F /T

taskkill /IM dgnria_nmhost.exe /F /T

taskkill /IM loggerservice.exe /F /T

taskkill /IM PDCC.exe /F /T









:: Automatically check & get admin rights V2


REM @echo off


ECHO =============================

ECHO Running Admin shell

ECHO =============================



setlocal DisableDelayedExpansion

set "batchPath=%~0"

for %%k in (%0) do set batchName=%%~nk

set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"

setlocal EnableDelayedExpansion




if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )



if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)


ECHO **************************************

ECHO Invoking UAC for Privilege Escalation

ECHO **************************************


ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"

ECHO args = "ELEV " >> "%vbsGetPrivileges%"

ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"

ECHO args = args ^& strArg ^& " "  >> "%vbsGetPrivileges%"

ECHO Next >> "%vbsGetPrivileges%"

ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"

"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*

exit /B



setlocal & pushd .

cd /d %~dp0

if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul  &  shift /1)







:: Removes Knowbrainer from memory

:: Needs admin rights (elevated mode) set to work



taskkill /IM Dialogue*/F /T

taskkill /IM pcbvWndProc1928 /F /T

taskkill /IM ProcHandler* /F /T

taskkill /IM KBPro* /F /T

taskkill /IM KnowBrainer* /F /T





::RESTART Philips & KB



Start ""  "C:\Program Files (x86)\Philips Speech\Device Control Center\PDCC.exe"


timeout /t 3 /nobreak > NUL




:: However, restarting KB in elevated mode implies KB will start DMPE in elevated mode too, which fails


Start ""  "C:\program files (x86)\KnowBrainer\KnowBrainer Professional 2017\KBPro.exe"




Memory: 16GB Microphone Brand and Model: LFH 4000 & Flexy Mike  Operating System: win 10, latest update; Surface Book 2, Processor (CPU) Type & Speed: I7 8650 Soundcard Brand and Model: none Speech Software: Dragon Medical Practice Edition, french version: 4.2 Using KnowBrainer?:Yes

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

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