A long title but with amazing results. What do you do when you are asked to fulfill these requirements?
- User will be using Epic Hyperspace delivered via XenApp 7.x
- User will be launching Hyperspace from their XenDesktop-delivered Windows 7 desktop
- User will be launching their VDI desktop from a Dell Wyse Xenith endpoint with a Phillips SpeechMike III attached
- User must be able to use their SpeechMike in Hyperspace for partial dictation with all buttons functioning
- First, make sure you are running a recent Dell/Wyse firmware (I tested on ThinOS Lite 2.4_112 and ThinOS 8.4_112).
- Next you will need to set a custom hardware string either in the .ini or your Dell Management Suite group policy->Advamced: Device=vusb ForceRedirect=0x0911,0x0c1c,0x01,0x01,0x00 Type=HDX
- After logging in to your published desktop, you will see the Speechmike in audio devices but notice that the default audio device is Citrix HDX Audio for both speakers and microphone. In order for the SpeechMike to work in a XenApp session, the Speechmike must be default.
- To accomplish this automatically, you can use Powershell and a 3rd-party utility, nircmdc, to make the change during login.
- For the script to work, you must change permissions on
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices by first taking ownership of the key and then giving write permissions for Authenticated Users and propagating them down. - Nircmdc uses the Windows generic name (eg. Microphone) and not the device name (Philips Speechmike III). In many cases there will be multiple devices with the same name (eg. Microphone or Speakers) so we need to run a Powershell script to find the Philips microphone and rename it's generic name to DocMic so we can use Nircmdc to set it as default.
$regcheck = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture"
$soundcheck = Get-ChildItem -path Registry::$regcheck
$enabledDevices = foreach($_ in $soundcheck)
{
$path = $_.'name'
Get-ItemProperty -path Registry::$path | ?{$_.DeviceState -eq "1"} | Select-Object pspath | Get-ChildItem | Get-ItemProperty | ?{$_ -match "SpeechMike III"}
}
if($enabledDevices)
{
$path = $enabledDevices.pspath
$key = ($enabledDevices.psobject.properties | ?{$_.Value -match "Microphone"}).name
set-ItemProperty -path $path -name $key -value DocMic -type string -force
} - You can modify the Powershell script to also kick off Nircmdc but I've left it separate:
Nircmdc.exe -setdefaultsounddevice "DocMic"
- Now just have these run at user logon. You may need to call a sleep function at the beginning of the script to allow time for Windows to complete the new hardware detection.
- If you want to also use the speaker on the dictation mic, you will also need to run a slightly modified version of the above PS script:
$regcheck = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render"
And then modify the nircmdc command to reference "DocSpeaker".
$soundcheck = Get-ChildItem -path Registry::$regcheck
$enabledDevices = foreach($_ in $soundcheck){$path = $_.'name'Get-ItemProperty -path Registry::$path | ?{$_.DeviceState -eq "1"} | Select-Object pspath | Get-ChildItem | Get-ItemProperty | ?{$_ -match "SpeechMike III"}}if($enabledDevices){$path = $enabledDevices.pspath$key = ($enabledDevices.psobject.properties | ?{$_.Value -Match "Speakers"}).nameset-ItemProperty -path $path -name $key -value DocSpeaker -type string -force}
You can obtain the nircmdc utility here.
No comments:
Post a Comment