Keyboard Layouts–cleanup the languagebar

Want to get rid of excess language settings? In an European environment it can be quite nasty and if your organization truly spans across the globe – multiple settings can conflict. Here is to set the record straight and cleanup things properly from a default / mandatory profile along with some major HKLM cleanup to smoothly offer the right keyboard layout for users.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{0000897b-83df-4b96-be07-0fb58b01c4a4}\LanguageProfile\0x00000000\{0001bea3-ed56-483d-a2e2-aeae25577436}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{03B5835F-F03C-411B-9CE2-AA23E1171E36}\LanguageProfile\0x00000411\{A76C93D9-5523-4E90-AAFA-4DB112F9AC76}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{241A9AFE-5045-43a8-9F86-1B5E3814095C}\LanguageProfile\0x00000404\{0AEC109C-7E96-11D4-B2EF-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{241A9AFE-5045-43a8-9F86-1B5E3814095C}\LanguageProfile\0x00000404\{0B883BA0-C1C7-11D4-87F9-0080C882687E}]

“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{241A9AFE-5045-43a8-9F86-1B5E3814095C}\LanguageProfile\0x00000404\{B2F9C502-1742-11D4-9790-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{241A9AFE-5045-43a8-9F86-1B5E3814095C}\LanguageProfile\0x00000404\{F3BA907A-6C7E-11D4-97FA-0080C882687E}]

“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{3FC47A08-E5C9-4BCA-A2C7-BC9A282AED14}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{3FC47A08-E5C9-4BCA-A2C7-BC9A282AED14}\LanguageProfile\0x00000804\{F3BA9077-6C7E-11D4-97FA-0080C882687E}]

“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{3FC47A08-E5C9-4BCA-A2C7-BC9A282AED14}\LanguageProfile\0x00000804\{FA550B04-5AD7-411f-A5AC-CA038EC515D7}]

“Enable”=dword:00000000

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{4518B9B5-7112-4855-B64F-2EC0DD2831E6}\LanguageProfile\0x00000411\{54EDCC94-1524-4bb1-9FB7-7BABE4F4CA64}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{0B883BA0-C1C7-11D4-87F9-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{4BDF9F03-C7D3-11D4-B2AB-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{6024B45F-5C54-11D4-B921-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{761309DE-317A-11D4-9B5D-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{B2F9C502-1742-11D4-9790-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{531FDEBF-9B4C-4A43-A2AA-960E8FCDC732}\LanguageProfile\0x00000404\{F3BA907A-6C7E-11D4-97FA-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}\LanguageProfile\0x00000804\{F3BA9077-6C7E-11D4-97FA-0080C882687E}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}\LanguageProfile\0x00000804\{FCA121D2-8C6D-41fb-B2DE-A2AD110D4820}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{A028AE76-01B1-46C2-99C4-ACD9858AE02F}\LanguageProfile\0x00000412\{B5FE1F02-D5F2-4445-9C03-C568F23C99A1}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{AE43355F-D71A-4E19-BB94-C23CCBF88F74}\LanguageProfile\0x00000412\{48878C45-93F9-4aaf-A6A1-272CD863C4F5}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000404\{037B2C25-480C-4D7F-B027-D6CA6B69788A}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000404\{D38EFF65-AA46-4FD5-91A7-67845FB02F5B}]

“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x0000045e]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x0000045e\{8F96574E-C86C-4bd6-9666-3F7327D4CBE8}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000478\{409C8376-007B-4357-AE8E-26316EE3FB0D}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000804]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000804\{54FC610E-6ABD-4685-9DDD-A130BDF1B170}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000804\{733B4D81-3BC3-4132-B91A-E9CDD5E2BFC9}]
“Enable”=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CTF\TIP\{E429B25A-E5D3-4D1F-9BE3-0C608477E3A1}\LanguageProfile\0x00000804\{EF63706D-31C4-490E-9DBB-BD150ADC454B}]
“Enable”=dword:00000000

 

Looking at the user profile there can be several places in which configuration can be found.

Primary key for keyboard settings;

image

The language bar configuration can be seen under HKCU\Software\Microsoft\CTF and three places below this registry key contains configuration relating to what will be seen in the actual language bar. They are all expanded below.

image

RemoteFX Performance Counters

This is a pure copy-and-paste article from a Spanish blog about Performance Counters regarding the RemoteFX protocol within Windows Server 2012. Took me a long time to google it – so saving it here for use later on.

 

RemoteFX Graphics

  • Average Encoding Time: Average frame encoding time
  • Frame Quality: Quality of the output frame expressed as a percentage of the quality of the source frame
  • Frames Skipped/second – Insufficient Client Resources: Number of frames skipped per second due to insufficient client resources
  • Frames Skipped/second – Insufficient Network Resources: Number of frames skipped per second due to insufficient network resources
  • Frames Skipped/second – Insufficient Server Resources: Number of frames skipped per second due to insufficient server resources
  • Grphics Compression Ratio: Ratio of the number of bytes encoded to the number of bytes input
  • Input Frames/second: Number of sources frames provided as input to RemoteFX graphics per second
  • Output Frames/second: Number of frames sent to the client per second
  • Source Frames/second: Number of frames composed by the source (DWM) per second

RemoteFX Network

  • Base TCP RTT: Base TCP round-trip time (RTT) detected in milliseconds
  • Base UDP RTT: Base UDP round-trip time (RTT) detected in milliseconds
  • Current TCP Bandwidth: TCP Bandwidth detected in bits per second (bps)
  • Current TCP RTT: Average TCP round-trip time (RTT) detected in milliseconds
  • Current UDP Bandwidth: TCP Bandwidth detected in bits per second (bps)
  • Current UDP RTT: Average TCP round-trip time (RTT) detected in milliseconds
  • FEC Rate: Forward Error Correction (FEC) percentage
  • Loss Rate: Loss percentage
  • Retransmission Rate: Percentage of packets that have been retransmitted
  • Set Rate P0: Rate in bits per second (bps) at which data is sent with priority 0
  • Set Rate P1: Rate in bits per second (bps) at which data is sent with priority 1
  • Set Rate P2: Rate in bits per second (bps) at which data is sent with priority 2
  • Set Rate P3: Rate in bits per second (bps) at which data is sent with priority 3
  • TCP Received Rate: Rate in bits per second (bps) at which data is received over TCP
  • TCP Send Rate: Rate in bits per second (bps) at which data is sent over TCP
  • Total Received Rate: Rate in bits per second (bps) at which data is received
  • Total Send Rate: Rate in bits per second (bps) at which data is sent
  • UDP Packets/Received/sec: Rate in packets per second at which packets are received over UDP
  • UDP Packets/Send/sec: Rate in packets per second at which packets are sent over UDP
  • UDP received Rate: Rate in bits per second (bps) at which data is received over UDP
  • UDP Send Rate: Rate in bits per second (bps) at which data is sent over UDP

App-V 5 and sequencing platform

Microsoft best practice states that you should match your sequencing platform to your target platform. App-V has always given us an extremely well working platform to avoid that and still does. However, we have a game changer; Extension Points

What are extension points? More integration into the operating system to allow users to use their virtual applications in a manner they expect that it should simply work.

Did you just pop-in a music CD (not really ?) and had the default media player virtualized?

In App-V 4.X that would cause an issue due to the fact that the operating system had no awareness that you had a media player. Autoplay was not a supported extension point within App-V 4.

image

As you can see there are several possible choices in the above list on what todo when an Audio CD is inserted. If the application is virtualized – in an App-V 4.X environment it would not be visible in the above list.

App-V 5 changed the game and extended the list to support this scenario and much more. However, there is a new found reason of actually doing what Microsoft has been telling us todo all along.

Your sequencing platform should match your target platform.

For Windows 7 64-bit, you should sequence on Windows 7 64-bit.

In App-V 5 this is even more valid as several extension points are not following along if you attempt to sequence on a 32-bit platform and deploy to a 64-bit platform.

App-V 5 Modify a shortcut

When you create a new package and deploy it, there usually are some things that might resurface after the initial testing of a package. Such details might be the placement and name of a shortcut.

If you open an existing package in the sequencer you have three options;

image

Select Update Application in Existing Package will present you with a stripped version of the sequencing wizard. Aiming for the Edit Package will head you straight to tab-based part of the wizard where we can review and edit the package on a more detailed level;

image

Ponder this image above for a few seconds and lets continue with the Add New Application option.

Selecting the Add New Application is the route of upgrading packages that I personally recommend. The reason are simple;

There are no options removed while performing the updated sequence.

The Edit Package route (obviously) takes us to the tab-based edit mode and doesn’t allow us to capture any additional installers.

What might havechanged in the App-V 5 sequencer as the ability to edit and alter shortcuts actually shows up in the Edit-mode after you have finished either Update Application in Existing Package or Add New Application and choose Customize. The below tabs can be seen. For some reason – Shortcuts and FTAs isn’t visible when selecting Edit, but for the rest of the possible routes the full view of tabs is visible.

image

There seems to be “light” Edit and “advanced” Edit. Advanced Edit seems to only be available by strolling along the two wizard-based routes, where as light Edit can be directly accessed when opening a package. Light Edit does not allow you to alter shortcuts and file type associations.

Deploy the App-V 5 client with SCCM 2012

Application Virtualization 5 can be deployed with SCCM 2012 quite easily, but there are some prerequisites that needs to be sorted out and as a good practice several Visual C++ needs to be natively deployed. First of all – we need to collect all the prerequisites

Windows Management Framework 3.0
Visual C++ 2005 SP1 ATL Security Update
Visual C++ 2005 SP1 MFC Security Update
Visual C++ 2008 SP1
Visual C++ 2008 SP1 ATL Security Update
Visual C++ 2008 SP1 MFC Security Update
Visual C++ 2010 SP1
Visual C++ 2012
.NET Framework 4.5
Microsoft Security Advisor: Insecure library loading could allow remote execution

Next step is to extract all MSIs and / or any MSU files. Using 7zip most of the above executable files can be extracted by simply opening it in 7zip. Others might require a switch. See this as an example for VC++ 20;
Extract MSI from Visual C++ 2012 Redistributable

Next is to download the exported SCCM Application;
AppV5.zip

Within SCCM 2012 you simply open the applications node, right-click and choose Import Application;
image

After that you locate the downloaded ZIP-file;

image

After some workloads – all the applications will be defined.

Some words before you get started;

You need to test this within your environment. Your computers may reboot. It may not be the desired configuration. There may be specific configurations which aren’t tested. Test this and do it thoroughly within a lab-environment.

App-V 5 Client Reporting–Client Setup

App-V 5 provided the option to separate the reporting that the App-V Client enables from both SCCM and App-V Management server, and it even makes it possible to use with a standalone deployment using Powershell and MSI.

I will not provide a guide on howto setup the server components, it’s a separate topic and shouldn’t be to complex. However, configuring the client can be a bit tricky, at the same time it is very easy to verify that it is setup properly.

Configure it through Powershell;

After you have imported the App-V Client Powershell module;

Set-ExecutionPolicy RemoteSigned
Import-Module AppVClient

You can access the current configuration of the App-V Client;

Get-AppVClientConfiguration

You can see that per default – all configuration relating to reporting is blank. Use the below command-line to setup the functionality;

Set-AppvClientConfiguration -ReportingEnabled 1 -ReportingServerURL urlforyourserver -ReportingStartTime 0 -ReportingRandomDelay 10 -ReportingInterval 1

The above will enable reporting at 00:00 with a 10 minute randomized interval to not overload the server and update the server every 1 day. The server-url is as provided for –ReportingServerUrl (urlforyourserver).

This will actually setup a Scheduled task – which you can easily verify (apart from getting the set configuration using the Powershell example above);
image

I assume that you can tweak the time-intervals on your own.

This is quite easy and is very well documented at Technet.

You can also use Group Policy to provide the above configuration; ADMX-template

App-V 5 Powershell Sequencing

Yeah – its pretty cool. Create a folder with the installation file named c:\source. As sample media VLC will be used. The installation-file is called; vlc-2.0.2-win32.exe

Run the following from Powershell to setup the sequencer cmdlets.

Set-Executionpolicy RemoteSigned
Import-module appvsequencer

Run the below to create two directories and then run through the installer.

$package = 'VLC'
new-item c:\source\$package -type directory
new-item c:\$package -type directory
New-AppvSequencerPackage -Name $package -Path c:\source\$package -Installer C:\source\vlc-2.0.2-win32.exe -PrimaryVirtualApplicationDirectory C:\$package –FullLoad

The final package gets created within c:\source\VLC

App-V 5 and Drivers

Virtualizing applications using App-V 4.X and even App-V 5 does not allow to virtualize drivers, as they are injected directly into the Windows kernel (simplified, of course). Using App-V 5 there has been new progress in easing the delivery of both driver and the application. With a few exceptions, drivers can often be easily extracted from the source-files or the installed application itself. Looking at Dymo Label Writer – you can see that there is a sub-folder within the installation directory called drivers.

image

Reviewing the contents you can see that there is an executable file named dpinst.exe and if you run dpinst.exe /?, the following help is shown.

dpinst.exe: installs and uninst alls driver packages. By default, the tool searches the current directory and tries to install all dri ver packages found.&lt;/pre&gt;<br />Usage: dpinst.exe [/U INF-file] [/S | /Q][/LM][/P][/F][/SH][/SA][/A][/PATH Path][/EL][/L LanguageID][/C][/D][/Lo gTitle Title][/SW][/? | /h | /help]<br /><br />/U INF-file    Uninstall a driver package (INF-file).<br /><br />/S | /Q        Silent (Quiet) mode. Suppresses the Device Installation Wizard and any dialogs popped-up by the operating system.<br /><br />/LM    Legacy mode. Accepts unsigned driver packages and packages with missing  files. These packages won't install on the latest version of Windows.<br /><br />/P     Prompt if the driver package to be installed is not better than the cur rent one.<br /><br />/F     Force install if the driver package is not better than the current one.<br /><br />/SH    Scans hardware for matching devices and only copies and installs those drivers for which a device is present. Only valid for Plug and Play drivers.<br /><br />/SA    Suppress the Add/Remove Programs entry normally created for each driver  package.<br /><br />/A     Install all or none.<br /><br />/PATH Path     Search for driver packages under the given path.<br /><br />/EL    Enables all languages not explicitly listed in the XML file.<br /><br />/L LanguageID          Tries to use the given language in all UI. Useful for l ocalization tests.<br /><br />/SE    Suppress the EULA.<br /><br />/C     Dump logging output to attached Console (Windows XP and above).<br /><br />/D     Delete driver binaries on uninstall.<br /><br />/SW    Suppresses the Device Installation Wizard, the operating system might s till pop-up user dialogs.<br /><br />/? | /h | /help        Shows this help.

Once you wrap up your App-V 5 package you can see that there is a file called DymoLabel Writer 8.4_DeploymentConfig.xml. This contains the setup for a package once its added to a computer and can be used to provide an elevated way of performing actions when deploying a package. Using Powershell or SCCM 2012 this deployment file can be used to provide additional configuration when deployed.

Lets leave the file intact for the most part – it contains any options that were set during sequencing as a standard sample file. Find the section;
<!– Machine Scripts Example – customize and uncomment to use machine scripts –>

Adding this;

&lt;!-- Machine Scripts Example - customize and uncomment to use machine scripts --&gt;&lt;/pre&gt;<br />&lt;MachineScripts&gt;<br /><br />&lt;AddPackage&gt;<br /><br />&lt;Path&gt;C:\media\Drivers\dpinst.exe&lt;/Path&gt;<br /><br />&lt;Arguments&gt;/s&lt;/Arguments&gt;<br /><br />&lt;Wait RollbackOnError="false" Timeout="30"/&gt;<br /><br />&lt;/AddPackage&gt;<br /><br />&lt;/MachineScripts&gt;

The script explains itself. When the package is added – it will be executed. The timeout is 30 seconds and it will not rollback the package deployment if it fails.

To add it using Powershell (SCCM does this automatically for you), fire up a Powershell console and start coding. First, allowed remotely signed scripts to run

Set-ExecutionPolicy RemoteSigned

Import the App-V Client module

Import-Module AppVClient

Add the package with the configuration file and then publish it in a globla-context

Add-AppvClientPackage '.\DymoLabel Writer 8.4.appv' -DynamicDeploymentConfiguration '.\DymoLabel Writer 8.4_DeploymentConfig.xml' | Publish-AppvClientPackage –Global

If you haven’t enabled package scripts to run, you will get this error in the App-V Operational Log;

Log Name:      Microsoft-AppV-Client/Operational<br />Source:        Microsoft-AppV-Client<br />Date:          10/15/2012 11:05:18 PM<br />Event ID:      4004<br />Task Category: Execute Embedded Scripts<br />Level:         Information<br />Keywords:      Embedded Scripting<br />User:          APPVCLIENT\AppV Win7 x86 Client<br />Computer:      appvclient<br />Description: Running machine script defined in package {2b838582-4925-4a53-99a2-0aaf216df77d} for event AddPackage. Script execution was initiated by User Account: 'S-1-5-21-1739582198-759874057-429165515-1000'; command line: 'C:\media\Drivers\dpinst.exe /s'.

You can enable scripts to run for the App-V Client via Powershell;

Set-AppVClientConfiguration –EnablePackageScripts 1

This shows up under Programs and Features once we are done;

image