The-Virtual-Desktop-Team / Virtual-Desktop-Optimization-Tool

The script and configuration files in this repository provide an easy method to customize and apply performance related settings to virtual desktop environments.
703 stars 174 forks source link

Some reg entries in DefaultUserSettings.json do not apply #205

Open Lucero7919 opened 7 months ago

Lucero7919 commented 7 months ago

I have been watching the packer logs closely when building an image in Azure Image Builder.

I note that when optimize.ps1 runs through the DefaultUserSettings, some of the entries are not added.

Specifically: { "HivePath": "HKLM:\\VDOT_TEMP\\Software\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy", "KeyName": "01", "PropertyType": "DWORD", "PropertyValue": 0, "SetProperty": "True" }

and

{ "HivePath": "HKLM:\\VDOT_TEMP\\Software\\Microsoft\\Windows\\CurrentVersion\\CPSS\\Store\\InkingAndTypingPersonalization", "KeyName": "Value", "PropertyType": "DWORD", "PropertyValue": 0, "SetProperty": "True" }

Why would this be the case?

robsmi-msfte commented 5 months ago

Hello @Lucero7919,

Both of the settings are still applicable in Windows. I am not sure why they aren't getting set in your environment. The Storage Sense policy does apply in Windows Enterprise version (I did not test Pro). I also looked for it on Windows 11 23H2 Multi-Session and I don't even find Storage Sense to be an option in that SKU.

The "Inking and Typing" privacy setting controls whether or not a typing or inking dictionary is maintained on the local system, in order to improve recognition over time. That setting does apply on Windows 11.

I just tested in a VM, and those settings you cite are successfully written. We have tested extensively with Packer, the engine of AIB, and have had no compatibility problems.

What is the indicator that the two settings above are not successfully written? Do you have some logs?

I tested again just before posting this on a standalone VM of Multi-Session Windows 11 23H2. After running VDOT, I restarted, created a new user, logged in as that user, checked the settings, and those settings are set.

Thanks,

Robert M. Smith

Lucero7919 commented 4 months ago

Thanks for your reply. I've just tried again and captured the logs. Assuming this is in order (it is by the looks of things). Packer Output azure-arm: Found HKLM:\VDOT_TEMP\Control Panel\Desktop - UserPreferencesMask azure-arm: Set HKLM:\VDOT_TEMP\Control Panel\Desktop - UserPreferencesMask azure-arm: Found HKLM:\VDOT_TEMP\Control Panel\Desktop\WindowMetrics - MinAnimate azure-arm: Set HKLM:\VDOT_TEMP\Control Panel\Desktop\WindowMetrics - MinAnimate azure-arm: Found HKLM:\VDOT_TEMP\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager - SystemPaneSuggestionsEnabled azure-arm: Set HKLM:\VDOT_TEMP\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager - SystemPaneSuggestionsEnabled azure-arm: Found HKLM:\VDOT_TEMP\Control Panel\International\User Profile - HttpAcceptLanguageOptOut azure-arm: Set HKLM:\VDOT_TEMP\Control Panel\International\User Profile - HttpAcceptLanguageOptOut

Default User JSON { "HivePath": "HKLM:\\VDOT_TEMP\\Control Panel\\Desktop", "KeyName": "UserPreferencesMask", "PropertyType": "BINARY", "PropertyValue": "0x90,0x32,0x07,0x80,0x10,0x00,0x00,0x00", "SetProperty": "True" }, { "HivePath": "HKLM:\\VDOT_TEMP\\Control Panel\\Desktop\\WindowMetrics", "KeyName": "MinAnimate", "PropertyType": "STRING", "PropertyValue": 0, "SetProperty": "True" }, { "HivePath": "HKLM:\\VDOT_TEMP\\Software\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy", "KeyName": "01", "PropertyType": "DWORD", "PropertyValue": 0, "SetProperty": "True" }, { "HivePath": "HKLM:\\VDOT_TEMP\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", "KeyName": "SystemPaneSuggestionsEnabled", "PropertyType": "DWORD", "PropertyValue": 0, "SetProperty": "True" },

This is for the Storage Sense property (StoragePolicy). You'll see the packer logs just completely ignore it and go from WindowsMetrics to ContentDeliveryManager

I should note, this is Multi-Session Win11. So perhaps these keys aren't valid in Multi-session (which is just glorified Windows Server)

robsmi-msfte commented 4 months ago

Storage Sense is not applicable in Windows 11. I am somewhat surprised that AIB would validate a registry value, if that is what is going on. I would think it would just write it and go on. But since it's not applying in Windows 11, is there even an issue here to worry about?