The latest Citrix Optimizer release could be also called the community edition. In this release, we’ve focused on all the issues and problems reported by you, our awesome community, and tried to fix everything you reported in last few months. So, first, a big THANK YOU to everyone who has helped us make Optimizer better with each release. We really appreciate your help, support, and feedback.

In this blog post, I’m also adding a new, recurring section – You’ve Asked. With each release, I’ll answer some of the most common questions I hear about Optimizer. So if there’s anything you want answered, contact me on Twitter, on our channel at the World of EUC workspace, or in the comments below.

For Template Users

Support for Windows 10 Build 1909

This is the most important change in this release. We’ve added a new template for Windows 10 build 1909, bringing the total number of supported operating systems/builds to 13. If you’re interested in support for multi-user Windows 10, make sure to read our You’ve Asked section at the end. It’s a hot topic.

Added Status Reporting to Registry

Since version 1.0, Optimizer has done a really good job at reporting and logging — from troubleshooting (transcription logs for engine and UI) and machine-friendly logs (XML reports) to human-friendly logs (HTML reports).

There was only one problem: All log files were part of the Citrix Optimizer folder (.\Logs folder), and they could be anywhere on a disk (or even a remote share). This made it really hard to identify if an image had been already optimized, especially if you were trying to do this centrally.

We’ve added a new option for reporting that always uses a predictable location and can be easily accessed remotely. We’re using the registry to provide information about the last optimization.

This registry information can be found in key HKLM\Software\Citrix\Optimizer\<Template Category>. For example, for all official templates, the template category is “OS Optimizations”. This means that for future use, you can identify what kind of optimization has been performed (e.g. security analysis). This also supports custom templates (if you are using your own templates, you can read their status here).

Reporting is different based on the mode you’re using. Only the last status is saved, and there is no concept of history (use .\Logs folder for that purpose).

  • Analyze – do nothing
  • Execute – create a new report
  • Rollback – delete last report

This new reporting location contains information from template <metadata /> (e.g. name of template, author, version etc.) and <run_status /> (summary of execution). An extra key called “log_path” is created to point you to the history file used to generate this report:

Expanded Reports

If you’re an Optimizer veteran and had a careful look at previous picture, you might have noticed there are few new entries now for both XML and HTML reports.

We have added information about Optimizer version (“optimizerversion”), target OS build (“targeros”), and target computer (“targetcomputer”). These new additions are located in the <run_status /> report section. Also, in the HTML report, we have included information about skipped entries, as a lot of people have been asking us why success + failed does not equal total.

For Template Builders

Hamburger Menu in the Template Builder

As we added more features to the Template Builder, it got bit crowded. In this release, we’ve made a few small changes to the UI. Now, moving entries is simpler (only two arrows on the right side), and all other actions have been moved to a hamburger menu next to each entry. This allows us to add more options to UI and keep it consistent.

Added Support for Per-User Services

We have added support to disable/enable per-users services. To disable per-user services, you must use its template name. Per-user services names consist of two parts: services name and unique identifier (different for each running instance). For example, to disable the following service, you’ll need to use service name “BcastDVRUserService”.

Fixed bugs

  • Fixed case sensitivity for HKDU handling
  • Deleting registry value no longer fails if ValueType is not specified
  • Fixed issue where conditions can crash the engine
  • Fixed issue where PowerShell module can crash the engine
  • …and much, much more

Found bugs in the Citrix Optimizer 2.7 release? Let us know.

You’ve Asked

When should I run Optimizer? Only when new image is built? Or on a regular basis?
This depends on your environment, but my general suggestion is to run Optimizer whenever you make changes to your image (patching, installing a new app, etc.).

A lot of people have also asked when the best time is to optimize an image when building a new one. I typically recommend running it after all software has been installed and let the OS sit idle (ideally overnight) after optimizing it. Windows performs a lot of tasks during idle time, and it’s always a good idea to let it cool down before using it as a master image.

When will you add support for Windows 10 Enterprise for Virtual Desktops (also known as multi-user Windows 10)?
This is a very popular question and answer is, we already support it in this release with 1909 template!

Multi-user Windows 10 is effectively a regular 1909 build with Office added, as well as a few very minor differences (see comparison below):

This is valid information as of April 2020, but the situation can change, and single-user and multi-user Windows 10 builds can start to differentiate. If that happens in the future, we’ll reconsider our decision to have a dedicated template for Windows 10 for Virtual Desktops.

How do I deal with REG_BINARY registry keys?
This isn’t a common question, and it’s a complicated topic. REG_BINARY key is an array of byte values and different tools, and APIs in Windows can read it differently. Optimizer has an engine that was written by an Eastern European — me (in other words, it’s skeptical and doesn’t trust anyone or anything). That means that instead of setting some value and moving on to next item, Optimizer performs multiple checks before making a change (Do I need to change it or is it already OK?) and after making the change (Was I successful in changing it?). This is a more robust method of scripting but requires a lot of testing. One of the best examples is comparing values in different formats, like an XML definition using decimal format and a registry key using hexadecimal format.

Optimizer supports REG_BINARY keys and uses output that can be collected from PowerShell (an array of decimal numbers). Here’s the easiest way to add REG_BINARY support in your template:

  1. Create the desired target registry value (using RegEdit, .reg file, script or any other method)
  2. Execute the following command in PowerShell:
    $(Get-ItemProperty -Path HKLM:\<Path> | Select-Object -ExpandProperty <AttributeName>) -Join “,” (change path and attribute name accordingly)
  3. Copy and paste output to your template (this is array of decimal values delimited by “,”):

You can see an example in screenshot below (PowerShell as the source of format, the new entry in Template Builder, and the final result in Regedit):

Summary

Citrix Optimizer 2.7 doesn’t have a ton of new features, but there are a lot of bug fixes and improvements to support stability. As always, we want to hear about your experience and learn how we can make Optimizer better. Help us to spread the word on social media or contact us through this web form.

Your Optimizer Team,

Martin Zugec, Xiao Zhang, Luis Salinas, and Zhipan Liu


Citrix Tech Bytes – Created by Citrix Experts, made for Citrix Technologists! Learn from passionate Citrix Experts and gain technical insights into the latest Citrix Technologies.

Click here for more Tech Bytes and subscribe.

Want specific Tech Bytes? Let us know! tech-content-feedback@citrix.com.