diff --git a/deps/cziplib b/deps/cziplib index f9e0959eb2..7a57414261 160000 --- a/deps/cziplib +++ b/deps/cziplib @@ -1 +1 @@ -Subproject commit f9e0959eb212262aff67e8425aceb62d7a518f62 +Subproject commit 7a57414261361ca991ff8053881343eb6bb6f205 diff --git a/deps/expected-lite b/deps/expected-lite index 076e96f683..95b9cb015f 160000 --- a/deps/expected-lite +++ b/deps/expected-lite @@ -1 +1 @@ -Subproject commit 076e96f6832923ea56b67e37d77806c5d01a343f +Subproject commit 95b9cb015fa17baa749c2b396b335906e1596a9e diff --git a/deps/spdlog b/deps/spdlog index cbe9448650..616866fcf4 160000 --- a/deps/spdlog +++ b/deps/spdlog @@ -1 +1 @@ -Subproject commit cbe9448650176797739dbab13961ef4c07f4290f +Subproject commit 616866fcf40340ea25a8f218369bad810ef58e72 diff --git a/doc/releases/0.89.0/tests-checklist-mengyuan.md b/doc/releases/0.89.0/tests-checklist-mengyuan.md new file mode 100644 index 0000000000..79759ee73f --- /dev/null +++ b/doc/releases/0.89.0/tests-checklist-mengyuan.md @@ -0,0 +1,39 @@ +## Telemetry Prologue + * Before starting your tests, go to General settings, enable "Diagnostic data" and "Enable viewing" and restart PowerToys. + +## Telemetry Epilogue + * After finishing your tests, go to General settings, press Diagnostic data viewer and check if you have xml files for the utilities you've tested and if it looks like the events in those xml files were generated by the actions you did with the utilities you've tested. + +## Localization + Change the Windows language to a language different than English. Then verify if the following screens change their language: + - [x] Hosts File Editor + - [x] FileLocksmith + +## Hosts File Editor + * Launch Host File Editor: + - [x] Verify the application exits if "Quit" is clicked on the initial warning. + - [x] Launch Host File Editor again and click "Accept". The module should not close. Open the hosts file (`%WinDir%\System32\Drivers\Etc`) in a text editor that auto-refreshes so you can see the changes applied by the editor in real time. (VSCode is an editor like this, for example) + - [x] Enable and disable lines and verify they are applied to the file. + - [x] Add a new entry and verify it's applied. + - [x] Add manually an entry with more than 9 hosts in hosts file (Windows limitation) and verify it is split correctly on loading and the info bar is shown. + - [x] Try to filter for lines and verify you can find them. + - [x] Click the "Open hosts file" button and verify it opens in your default editor. (likely Notepad) + * Test the different settings and verify they are applied: + - [x] Launch as Administrator. + - [x] Show a warning at startup. + - [x] Additional lines position. + +## File Locksmith + * Start the PowerToys installer executable and let it stay in the initial screen. + - [ ] Right-click the executable file, select "Unlock with File Locksmith" and verify it shows up. (2 entries will show, since the installer starts two processes) + - [x] End the tasks in File Locksmith UI and verify that closes the installer. + - [x] Start the installer executable again and press the Refresh button in File Locksmith UI. It should find new processes using the files. + - [x] Close the installer window and verify the processes are delisted from the File Locksmith UI. Close the window + * Start the PowerToys installer executable again and let it stay in the initial screen. + - [x] Right click the directory where the executable is located, select "Unlock with File Locksmith?" and verify it shows up. + - [x] Right click the drive where the executable is located, select "Unlock with File Locksmith?" and verify it shows up. You can close the PowerToys installer now. + * Restart PowerToys as admin. + - [x] Right click "Program Files", select "Unlock with File Locksmith?" and verify "PowerToys.exe" doesn't show up. + - [x] Press the File Locksmith "Restart as an administrator" button and verify "PowerToys.exe" shows up. + - [x] Right-click the drive where Windows is installed, select "Unlock with File Locksmith?" and scroll down and up, verify File Locksmith doesn't crash with all those entries being shown. Repeat after clicking the File Locksmith "Restart as an administrator" button. + - [x] Disable File Locksmith in Settings and verify the context menu entry no longer appears. \ No newline at end of file diff --git a/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psd1 b/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psd1 new file mode 100644 index 0000000000..2e6c9440bb --- /dev/null +++ b/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psd1 @@ -0,0 +1,83 @@ +# +# Module manifest for module 'Microsoft.PowerToys.Configure' +# +# Generated by: Microsoft Corporation +# +# Generated on: 27.02.2025 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'Microsoft.PowerToys.Configure.psm1' + +# Version number of this module. +ModuleVersion = '0.0.1.0' + +# ID used to uniquely identify this module +GUID = '778ed7a1-489d-4dc9-b0f2-2da3b1fe14cb' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft' + +# Copyright statement for this module +Copyright = '(c) Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'The module enables settings configuration for an installed PowerToys application.' + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = '*' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = @() + +# DSC resources to export from this module +DscResourcesToExport = @( + 'PowerToysConfigure' +) + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + # Tags = @() + + # A URL to the license for this module. + # LicenseUri = '' + + # A URL to the main website for this project. + # ProjectUri = '' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +} + diff --git a/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psm1 b/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psm1 new file mode 100644 index 0000000000..5514f7ff62 --- /dev/null +++ b/src/dsc/Microsoft.PowerToys.Configure/Generated/Microsoft.PowerToys.Configure/0.0.1.0/Microsoft.PowerToys.Configure.psm1 @@ -0,0 +1,2418 @@ +#region enums +enum PowerToysConfigureEnsure { + Absent + Present +} + +enum AwakeMode { + PASSIVE = 1 + INDEFINITE + TIMED + EXPIRABLE +} + +enum ColorPickerActivationAction { + OpenEditor = 1 + OpenColorPickerAndThenEditor + OpenOnlyColorPicker +} + +enum HostsAdditionalLinesPosition { + Top = 1 + Bottom +} + +enum HostsEncoding { + Utf8 = 1 + Utf8Bom +} + +enum PowerAccentActivationKey { + LeftRightArrow = 1 + Space + Both +} + +enum Theme { + System = 1 + Light + Dark + HighContrastOne + HighContrastTwo + HighContrastBlack + HighContrastWhite +} + +enum StartupPosition { + Cursor = 1 + PrimaryMonitor + Focus +} + +enum SortByProperty { + LastLaunched = 1 + Created + Name +} +#endregion enums + +#region DscResources +class AdvancedPaste { + [DscProperty()] [Nullable[bool]] + $IsAdvancedAIEnabled = $null + + [DscProperty()] [Nullable[bool]] + $ShowCustomPreview = $null + + [DscProperty()] [Nullable[bool]] + $CloseAfterLosingFocus = $null + + [DscProperty()] [string] + $AdvancedPasteUIShortcut = $null + + [DscProperty()] [string] + $PasteAsPlainTextShortcut = $null + + [DscProperty()] [string] + $PasteAsMarkdownShortcut = $null + + [DscProperty()] [string] + $PasteAsJsonShortcut = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.IsAdvancedAIEnabled -ne $null) { + $Changes.Value += "set AdvancedPaste.IsAdvancedAIEnabled `"$($this.IsAdvancedAIEnabled)`"" + } + + if ($this.ShowCustomPreview -ne $null) { + $Changes.Value += "set AdvancedPaste.ShowCustomPreview `"$($this.ShowCustomPreview)`"" + } + + if ($this.CloseAfterLosingFocus -ne $null) { + $Changes.Value += "set AdvancedPaste.CloseAfterLosingFocus `"$($this.CloseAfterLosingFocus)`"" + } + + if ($this.AdvancedPasteUIShortcut -notlike '') { + $Changes.Value += "set AdvancedPaste.AdvancedPasteUIShortcut `"$($this.AdvancedPasteUIShortcut)`"" + } + + if ($this.PasteAsPlainTextShortcut -notlike '') { + $Changes.Value += "set AdvancedPaste.PasteAsPlainTextShortcut `"$($this.PasteAsPlainTextShortcut)`"" + } + + if ($this.PasteAsMarkdownShortcut -notlike '') { + $Changes.Value += "set AdvancedPaste.PasteAsMarkdownShortcut `"$($this.PasteAsMarkdownShortcut)`"" + } + + if ($this.PasteAsJsonShortcut -notlike '') { + $Changes.Value += "set AdvancedPaste.PasteAsJsonShortcut `"$($this.PasteAsJsonShortcut)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.AdvancedPaste `"$($this.Enabled)`"" + } + + + } +} +class AlwaysOnTop { + [DscProperty()] [string] + $Hotkey = $null + + [DscProperty()] [string] + $FrameEnabled = $null + + [DscProperty()] [Nullable[int]] + $FrameThickness = $null + + [DscProperty()] [string] + $FrameColor = $null + + [DscProperty()] [Nullable[int]] + $FrameOpacity = $null + + [DscProperty()] [string] + $FrameAccentColor = $null + + [DscProperty()] [string] + $SoundEnabled = $null + + [DscProperty()] [string] + $DoNotActivateOnGameMode = $null + + [DscProperty()] [string] + $ExcludedApps = $null + + [DscProperty()] [string] + $RoundCornersEnabled = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.Hotkey -notlike '') { + $Changes.Value += "set AlwaysOnTop.Hotkey `"$($this.Hotkey)`"" + } + + if ($this.FrameEnabled -notlike '') { + $Changes.Value += "set AlwaysOnTop.FrameEnabled `"$($this.FrameEnabled)`"" + } + + if ($this.FrameThickness -ne $null) { + $Changes.Value += "set AlwaysOnTop.FrameThickness `"$($this.FrameThickness)`"" + } + + if ($this.FrameColor -notlike '') { + $Changes.Value += "set AlwaysOnTop.FrameColor `"$($this.FrameColor)`"" + } + + if ($this.FrameOpacity -ne $null) { + $Changes.Value += "set AlwaysOnTop.FrameOpacity `"$($this.FrameOpacity)`"" + } + + if ($this.FrameAccentColor -notlike '') { + $Changes.Value += "set AlwaysOnTop.FrameAccentColor `"$($this.FrameAccentColor)`"" + } + + if ($this.SoundEnabled -notlike '') { + $Changes.Value += "set AlwaysOnTop.SoundEnabled `"$($this.SoundEnabled)`"" + } + + if ($this.DoNotActivateOnGameMode -notlike '') { + $Changes.Value += "set AlwaysOnTop.DoNotActivateOnGameMode `"$($this.DoNotActivateOnGameMode)`"" + } + + if ($this.ExcludedApps -notlike '') { + $Changes.Value += "set AlwaysOnTop.ExcludedApps `"$($this.ExcludedApps)`"" + } + + if ($this.RoundCornersEnabled -notlike '') { + $Changes.Value += "set AlwaysOnTop.RoundCornersEnabled `"$($this.RoundCornersEnabled)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.AlwaysOnTop `"$($this.Enabled)`"" + } + + + } +} +class Awake { + [DscProperty()] [Nullable[bool]] + $KeepDisplayOn = $null + + [DscProperty()] [AwakeMode] + $Mode + + [DscProperty()] [Nullable[int]] + $IntervalHours = $null + + [DscProperty()] [Nullable[int]] + $IntervalMinutes = $null + + [DscProperty()] [string] + $ExpirationDateTime = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.KeepDisplayOn -ne $null) { + $Changes.Value += "set Awake.KeepDisplayOn `"$($this.KeepDisplayOn)`"" + } + + if ($this.Mode -ne 0) { + $Changes.Value += "set Awake.Mode `"$($this.Mode)`"" + } + + if ($this.IntervalHours -ne $null) { + $Changes.Value += "set Awake.IntervalHours `"$($this.IntervalHours)`"" + } + + if ($this.IntervalMinutes -ne $null) { + $Changes.Value += "set Awake.IntervalMinutes `"$($this.IntervalMinutes)`"" + } + + if ($this.ExpirationDateTime -notlike '') { + $Changes.Value += "set Awake.ExpirationDateTime `"$($this.ExpirationDateTime)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.Awake `"$($this.Enabled)`"" + } + + + } +} +class ColorPicker { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $CopiedColorRepresentation = $null + + [DscProperty()] [ColorPickerActivationAction] + $ActivationAction + + [DscProperty()] [Nullable[bool]] + $ShowColorName = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set ColorPicker.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.CopiedColorRepresentation -notlike '') { + $Changes.Value += "set ColorPicker.CopiedColorRepresentation `"$($this.CopiedColorRepresentation)`"" + } + + if ($this.ActivationAction -ne 0) { + $Changes.Value += "set ColorPicker.ActivationAction `"$($this.ActivationAction)`"" + } + + if ($this.ShowColorName -ne $null) { + $Changes.Value += "set ColorPicker.ShowColorName `"$($this.ShowColorName)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.ColorPicker `"$($this.Enabled)`"" + } + + + } +} +class CropAndLock { + [DscProperty()] [string] + $ReparentHotkey = $null + + [DscProperty()] [string] + $ThumbnailHotkey = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ReparentHotkey -notlike '') { + $Changes.Value += "set CropAndLock.ReparentHotkey `"$($this.ReparentHotkey)`"" + } + + if ($this.ThumbnailHotkey -notlike '') { + $Changes.Value += "set CropAndLock.ThumbnailHotkey `"$($this.ThumbnailHotkey)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.CropAndLock `"$($this.Enabled)`"" + } + + + } +} +class EnvironmentVariables { + [DscProperty()] [Nullable[bool]] + $LaunchAdministrator = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.LaunchAdministrator -ne $null) { + $Changes.Value += "set EnvironmentVariables.LaunchAdministrator `"$($this.LaunchAdministrator)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.EnvironmentVariables `"$($this.Enabled)`"" + } + + + } +} +class FancyZones { + [DscProperty()] [string] + $FancyzonesShiftDrag = $null + + [DscProperty()] [string] + $FancyzonesMouseSwitch = $null + + [DscProperty()] [string] + $FancyzonesMouseMiddleClickSpanningMultipleZones = $null + + [DscProperty()] [string] + $FancyzonesOverrideSnapHotkeys = $null + + [DscProperty()] [string] + $FancyzonesMoveWindowsAcrossMonitors = $null + + [DscProperty()] [string] + $FancyzonesMoveWindowsBasedOnPosition = $null + + [DscProperty()] [Nullable[int]] + $FancyzonesOverlappingZonesAlgorithm = $null + + [DscProperty()] [string] + $FancyzonesDisplayOrWorkAreaChangeMoveWindows = $null + + [DscProperty()] [string] + $FancyzonesZoneSetChangeMoveWindows = $null + + [DscProperty()] [string] + $FancyzonesAppLastZoneMoveWindows = $null + + [DscProperty()] [string] + $FancyzonesOpenWindowOnActiveMonitor = $null + + [DscProperty()] [string] + $FancyzonesRestoreSize = $null + + [DscProperty()] [string] + $FancyzonesQuickLayoutSwitch = $null + + [DscProperty()] [string] + $FancyzonesFlashZonesOnQuickSwitch = $null + + [DscProperty()] [string] + $UseCursorposEditorStartupscreen = $null + + [DscProperty()] [string] + $FancyzonesShowOnAllMonitors = $null + + [DscProperty()] [string] + $FancyzonesSpanZonesAcrossMonitors = $null + + [DscProperty()] [string] + $FancyzonesMakeDraggedWindowTransparent = $null + + [DscProperty()] [string] + $FancyzonesAllowChildWindowSnap = $null + + [DscProperty()] [string] + $FancyzonesDisableRoundCornersOnSnap = $null + + [DscProperty()] [string] + $FancyzonesZoneHighlightColor = $null + + [DscProperty()] [Nullable[int]] + $FancyzonesHighlightOpacity = $null + + [DscProperty()] [string] + $FancyzonesEditorHotkey = $null + + [DscProperty()] [string] + $FancyzonesWindowSwitching = $null + + [DscProperty()] [string] + $FancyzonesNextTabHotkey = $null + + [DscProperty()] [string] + $FancyzonesPrevTabHotkey = $null + + [DscProperty()] [string] + $FancyzonesExcludedApps = $null + + [DscProperty()] [string] + $FancyzonesBorderColor = $null + + [DscProperty()] [string] + $FancyzonesInActiveColor = $null + + [DscProperty()] [string] + $FancyzonesNumberColor = $null + + [DscProperty()] [string] + $FancyzonesSystemTheme = $null + + [DscProperty()] [string] + $FancyzonesShowZoneNumber = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.FancyzonesShiftDrag -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesShiftDrag `"$($this.FancyzonesShiftDrag)`"" + } + + if ($this.FancyzonesMouseSwitch -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesMouseSwitch `"$($this.FancyzonesMouseSwitch)`"" + } + + if ($this.FancyzonesMouseMiddleClickSpanningMultipleZones -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesMouseMiddleClickSpanningMultipleZones `"$($this.FancyzonesMouseMiddleClickSpanningMultipleZones)`"" + } + + if ($this.FancyzonesOverrideSnapHotkeys -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesOverrideSnapHotkeys `"$($this.FancyzonesOverrideSnapHotkeys)`"" + } + + if ($this.FancyzonesMoveWindowsAcrossMonitors -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesMoveWindowsAcrossMonitors `"$($this.FancyzonesMoveWindowsAcrossMonitors)`"" + } + + if ($this.FancyzonesMoveWindowsBasedOnPosition -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesMoveWindowsBasedOnPosition `"$($this.FancyzonesMoveWindowsBasedOnPosition)`"" + } + + if ($this.FancyzonesOverlappingZonesAlgorithm -ne $null) { + $Changes.Value += "set FancyZones.FancyzonesOverlappingZonesAlgorithm `"$($this.FancyzonesOverlappingZonesAlgorithm)`"" + } + + if ($this.FancyzonesDisplayOrWorkAreaChangeMoveWindows -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesDisplayOrWorkAreaChangeMoveWindows `"$($this.FancyzonesDisplayOrWorkAreaChangeMoveWindows)`"" + } + + if ($this.FancyzonesZoneSetChangeMoveWindows -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesZoneSetChangeMoveWindows `"$($this.FancyzonesZoneSetChangeMoveWindows)`"" + } + + if ($this.FancyzonesAppLastZoneMoveWindows -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesAppLastZoneMoveWindows `"$($this.FancyzonesAppLastZoneMoveWindows)`"" + } + + if ($this.FancyzonesOpenWindowOnActiveMonitor -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesOpenWindowOnActiveMonitor `"$($this.FancyzonesOpenWindowOnActiveMonitor)`"" + } + + if ($this.FancyzonesRestoreSize -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesRestoreSize `"$($this.FancyzonesRestoreSize)`"" + } + + if ($this.FancyzonesQuickLayoutSwitch -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesQuickLayoutSwitch `"$($this.FancyzonesQuickLayoutSwitch)`"" + } + + if ($this.FancyzonesFlashZonesOnQuickSwitch -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesFlashZonesOnQuickSwitch `"$($this.FancyzonesFlashZonesOnQuickSwitch)`"" + } + + if ($this.UseCursorposEditorStartupscreen -notlike '') { + $Changes.Value += "set FancyZones.UseCursorposEditorStartupscreen `"$($this.UseCursorposEditorStartupscreen)`"" + } + + if ($this.FancyzonesShowOnAllMonitors -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesShowOnAllMonitors `"$($this.FancyzonesShowOnAllMonitors)`"" + } + + if ($this.FancyzonesSpanZonesAcrossMonitors -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesSpanZonesAcrossMonitors `"$($this.FancyzonesSpanZonesAcrossMonitors)`"" + } + + if ($this.FancyzonesMakeDraggedWindowTransparent -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesMakeDraggedWindowTransparent `"$($this.FancyzonesMakeDraggedWindowTransparent)`"" + } + + if ($this.FancyzonesAllowChildWindowSnap -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesAllowChildWindowSnap `"$($this.FancyzonesAllowChildWindowSnap)`"" + } + + if ($this.FancyzonesDisableRoundCornersOnSnap -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesDisableRoundCornersOnSnap `"$($this.FancyzonesDisableRoundCornersOnSnap)`"" + } + + if ($this.FancyzonesZoneHighlightColor -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesZoneHighlightColor `"$($this.FancyzonesZoneHighlightColor)`"" + } + + if ($this.FancyzonesHighlightOpacity -ne $null) { + $Changes.Value += "set FancyZones.FancyzonesHighlightOpacity `"$($this.FancyzonesHighlightOpacity)`"" + } + + if ($this.FancyzonesEditorHotkey -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesEditorHotkey `"$($this.FancyzonesEditorHotkey)`"" + } + + if ($this.FancyzonesWindowSwitching -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesWindowSwitching `"$($this.FancyzonesWindowSwitching)`"" + } + + if ($this.FancyzonesNextTabHotkey -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesNextTabHotkey `"$($this.FancyzonesNextTabHotkey)`"" + } + + if ($this.FancyzonesPrevTabHotkey -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesPrevTabHotkey `"$($this.FancyzonesPrevTabHotkey)`"" + } + + if ($this.FancyzonesExcludedApps -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesExcludedApps `"$($this.FancyzonesExcludedApps)`"" + } + + if ($this.FancyzonesBorderColor -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesBorderColor `"$($this.FancyzonesBorderColor)`"" + } + + if ($this.FancyzonesInActiveColor -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesInActiveColor `"$($this.FancyzonesInActiveColor)`"" + } + + if ($this.FancyzonesNumberColor -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesNumberColor `"$($this.FancyzonesNumberColor)`"" + } + + if ($this.FancyzonesSystemTheme -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesSystemTheme `"$($this.FancyzonesSystemTheme)`"" + } + + if ($this.FancyzonesShowZoneNumber -notlike '') { + $Changes.Value += "set FancyZones.FancyzonesShowZoneNumber `"$($this.FancyzonesShowZoneNumber)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.FancyZones `"$($this.Enabled)`"" + } + + + } +} +class FileLocksmith { + [DscProperty()] [string] + $ExtendedContextMenuOnly = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ExtendedContextMenuOnly -notlike '') { + $Changes.Value += "set FileLocksmith.ExtendedContextMenuOnly `"$($this.ExtendedContextMenuOnly)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.FileLocksmith `"$($this.Enabled)`"" + } + + + } +} +class FindMyMouse { + [DscProperty()] [Nullable[int]] + $ActivationMethod = $null + + [DscProperty()] [string] + $IncludeWinKey = $null + + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $DoNotActivateOnGameMode = $null + + [DscProperty()] [string] + $BackgroundColor = $null + + [DscProperty()] [string] + $SpotlightColor = $null + + [DscProperty()] [Nullable[int]] + $OverlayOpacity = $null + + [DscProperty()] [Nullable[int]] + $SpotlightRadius = $null + + [DscProperty()] [Nullable[int]] + $AnimationDurationMs = $null + + [DscProperty()] [Nullable[int]] + $SpotlightInitialZoom = $null + + [DscProperty()] [string] + $ExcludedApps = $null + + [DscProperty()] [Nullable[int]] + $ShakingMinimumDistance = $null + + [DscProperty()] [Nullable[int]] + $ShakingIntervalMs = $null + + [DscProperty()] [Nullable[int]] + $ShakingFactor = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationMethod -ne $null) { + $Changes.Value += "set FindMyMouse.ActivationMethod `"$($this.ActivationMethod)`"" + } + + if ($this.IncludeWinKey -notlike '') { + $Changes.Value += "set FindMyMouse.IncludeWinKey `"$($this.IncludeWinKey)`"" + } + + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set FindMyMouse.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.DoNotActivateOnGameMode -notlike '') { + $Changes.Value += "set FindMyMouse.DoNotActivateOnGameMode `"$($this.DoNotActivateOnGameMode)`"" + } + + if ($this.BackgroundColor -notlike '') { + $Changes.Value += "set FindMyMouse.BackgroundColor `"$($this.BackgroundColor)`"" + } + + if ($this.SpotlightColor -notlike '') { + $Changes.Value += "set FindMyMouse.SpotlightColor `"$($this.SpotlightColor)`"" + } + + if ($this.OverlayOpacity -ne $null) { + $Changes.Value += "set FindMyMouse.OverlayOpacity `"$($this.OverlayOpacity)`"" + } + + if ($this.SpotlightRadius -ne $null) { + $Changes.Value += "set FindMyMouse.SpotlightRadius `"$($this.SpotlightRadius)`"" + } + + if ($this.AnimationDurationMs -ne $null) { + $Changes.Value += "set FindMyMouse.AnimationDurationMs `"$($this.AnimationDurationMs)`"" + } + + if ($this.SpotlightInitialZoom -ne $null) { + $Changes.Value += "set FindMyMouse.SpotlightInitialZoom `"$($this.SpotlightInitialZoom)`"" + } + + if ($this.ExcludedApps -notlike '') { + $Changes.Value += "set FindMyMouse.ExcludedApps `"$($this.ExcludedApps)`"" + } + + if ($this.ShakingMinimumDistance -ne $null) { + $Changes.Value += "set FindMyMouse.ShakingMinimumDistance `"$($this.ShakingMinimumDistance)`"" + } + + if ($this.ShakingIntervalMs -ne $null) { + $Changes.Value += "set FindMyMouse.ShakingIntervalMs `"$($this.ShakingIntervalMs)`"" + } + + if ($this.ShakingFactor -ne $null) { + $Changes.Value += "set FindMyMouse.ShakingFactor `"$($this.ShakingFactor)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.FindMyMouse `"$($this.Enabled)`"" + } + + + } +} +class Hosts { + [DscProperty()] [Nullable[bool]] + $ShowStartupWarning = $null + + [DscProperty()] [Nullable[bool]] + $LaunchAdministrator = $null + + [DscProperty()] [Nullable[bool]] + $LoopbackDuplicates = $null + + [DscProperty()] [HostsAdditionalLinesPosition] + $AdditionalLinesPosition + + [DscProperty()] [HostsEncoding] + $Encoding + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ShowStartupWarning -ne $null) { + $Changes.Value += "set Hosts.ShowStartupWarning `"$($this.ShowStartupWarning)`"" + } + + if ($this.LaunchAdministrator -ne $null) { + $Changes.Value += "set Hosts.LaunchAdministrator `"$($this.LaunchAdministrator)`"" + } + + if ($this.LoopbackDuplicates -ne $null) { + $Changes.Value += "set Hosts.LoopbackDuplicates `"$($this.LoopbackDuplicates)`"" + } + + if ($this.AdditionalLinesPosition -ne 0) { + $Changes.Value += "set Hosts.AdditionalLinesPosition `"$($this.AdditionalLinesPosition)`"" + } + + if ($this.Encoding -ne 0) { + $Changes.Value += "set Hosts.Encoding `"$($this.Encoding)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.Hosts `"$($this.Enabled)`"" + } + + + } +} +class ImageResizer { + [DscProperty()] [Nullable[int]] + $ImageresizerSelectedSizeIndex = $null + + [DscProperty()] [string] + $ImageresizerShrinkOnly = $null + + [DscProperty()] [string] + $ImageresizerReplace = $null + + [DscProperty()] [string] + $ImageresizerIgnoreOrientation = $null + + [DscProperty()] [Nullable[int]] + $ImageresizerJpegQualityLevel = $null + + [DscProperty()] [Nullable[int]] + $ImageresizerPngInterlaceOption = $null + + [DscProperty()] [Nullable[int]] + $ImageresizerTiffCompressOption = $null + + [DscProperty()] [string] + $ImageresizerFileName = $null + + [DscProperty()] [string] + $ImageresizerKeepDateModified = $null + + [DscProperty()] [string] + $ImageresizerFallbackEncoder = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + + [DscProperty()] [Hashtable[]] + $ImageresizerSizes = @() + + ApplyChanges([ref]$Changes) { + if ($this.ImageresizerSelectedSizeIndex -ne $null) { + $Changes.Value += "set ImageResizer.ImageresizerSelectedSizeIndex `"$($this.ImageresizerSelectedSizeIndex)`"" + } + + if ($this.ImageresizerShrinkOnly -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerShrinkOnly `"$($this.ImageresizerShrinkOnly)`"" + } + + if ($this.ImageresizerReplace -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerReplace `"$($this.ImageresizerReplace)`"" + } + + if ($this.ImageresizerIgnoreOrientation -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerIgnoreOrientation `"$($this.ImageresizerIgnoreOrientation)`"" + } + + if ($this.ImageresizerJpegQualityLevel -ne $null) { + $Changes.Value += "set ImageResizer.ImageresizerJpegQualityLevel `"$($this.ImageresizerJpegQualityLevel)`"" + } + + if ($this.ImageresizerPngInterlaceOption -ne $null) { + $Changes.Value += "set ImageResizer.ImageresizerPngInterlaceOption `"$($this.ImageresizerPngInterlaceOption)`"" + } + + if ($this.ImageresizerTiffCompressOption -ne $null) { + $Changes.Value += "set ImageResizer.ImageresizerTiffCompressOption `"$($this.ImageresizerTiffCompressOption)`"" + } + + if ($this.ImageresizerFileName -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerFileName `"$($this.ImageresizerFileName)`"" + } + + if ($this.ImageresizerKeepDateModified -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerKeepDateModified `"$($this.ImageresizerKeepDateModified)`"" + } + + if ($this.ImageresizerFallbackEncoder -notlike '') { + $Changes.Value += "set ImageResizer.ImageresizerFallbackEncoder `"$($this.ImageresizerFallbackEncoder)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.ImageResizer `"$($this.Enabled)`"" + } + + if ($this.ImageresizerSizes.Count -gt 0) { + $AdditionalPropertiesTmpPath = [System.IO.Path]::GetTempFileName() + $this.ImageresizerSizes | ConvertTo-Json | Set-Content -Path $AdditionalPropertiesTmpPath + $Changes.Value += "setAdditional ImageResizer `"$AdditionalPropertiesTmpPath`"" + } + } +} +class KeyboardManager { + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.KeyboardManager `"$($this.Enabled)`"" + } + + + } +} +class MeasureTool { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [Nullable[bool]] + $ContinuousCapture = $null + + [DscProperty()] [Nullable[bool]] + $DrawFeetOnCross = $null + + [DscProperty()] [Nullable[bool]] + $PerColorChannelEdgeDetection = $null + + [DscProperty()] [Nullable[int]] + $UnitsOfMeasure = $null + + [DscProperty()] [Nullable[int]] + $PixelTolerance = $null + + [DscProperty()] [string] + $MeasureCrossColor = $null + + [DscProperty()] [Nullable[int]] + $DefaultMeasureStyle = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set MeasureTool.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.ContinuousCapture -ne $null) { + $Changes.Value += "set MeasureTool.ContinuousCapture `"$($this.ContinuousCapture)`"" + } + + if ($this.DrawFeetOnCross -ne $null) { + $Changes.Value += "set MeasureTool.DrawFeetOnCross `"$($this.DrawFeetOnCross)`"" + } + + if ($this.PerColorChannelEdgeDetection -ne $null) { + $Changes.Value += "set MeasureTool.PerColorChannelEdgeDetection `"$($this.PerColorChannelEdgeDetection)`"" + } + + if ($this.UnitsOfMeasure -ne $null) { + $Changes.Value += "set MeasureTool.UnitsOfMeasure `"$($this.UnitsOfMeasure)`"" + } + + if ($this.PixelTolerance -ne $null) { + $Changes.Value += "set MeasureTool.PixelTolerance `"$($this.PixelTolerance)`"" + } + + if ($this.MeasureCrossColor -notlike '') { + $Changes.Value += "set MeasureTool.MeasureCrossColor `"$($this.MeasureCrossColor)`"" + } + + if ($this.DefaultMeasureStyle -ne $null) { + $Changes.Value += "set MeasureTool.DefaultMeasureStyle `"$($this.DefaultMeasureStyle)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.MeasureTool `"$($this.Enabled)`"" + } + + + } +} +class MouseHighlighter { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $LeftButtonClickColor = $null + + [DscProperty()] [string] + $RightButtonClickColor = $null + + [DscProperty()] [string] + $AlwaysColor = $null + + [DscProperty()] [Nullable[int]] + $HighlightRadius = $null + + [DscProperty()] [Nullable[int]] + $HighlightFadeDelayMs = $null + + [DscProperty()] [Nullable[int]] + $HighlightFadeDurationMs = $null + + [DscProperty()] [string] + $AutoActivate = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set MouseHighlighter.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.LeftButtonClickColor -notlike '') { + $Changes.Value += "set MouseHighlighter.LeftButtonClickColor `"$($this.LeftButtonClickColor)`"" + } + + if ($this.RightButtonClickColor -notlike '') { + $Changes.Value += "set MouseHighlighter.RightButtonClickColor `"$($this.RightButtonClickColor)`"" + } + + if ($this.AlwaysColor -notlike '') { + $Changes.Value += "set MouseHighlighter.AlwaysColor `"$($this.AlwaysColor)`"" + } + + if ($this.HighlightRadius -ne $null) { + $Changes.Value += "set MouseHighlighter.HighlightRadius `"$($this.HighlightRadius)`"" + } + + if ($this.HighlightFadeDelayMs -ne $null) { + $Changes.Value += "set MouseHighlighter.HighlightFadeDelayMs `"$($this.HighlightFadeDelayMs)`"" + } + + if ($this.HighlightFadeDurationMs -ne $null) { + $Changes.Value += "set MouseHighlighter.HighlightFadeDurationMs `"$($this.HighlightFadeDurationMs)`"" + } + + if ($this.AutoActivate -notlike '') { + $Changes.Value += "set MouseHighlighter.AutoActivate `"$($this.AutoActivate)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.MouseHighlighter `"$($this.Enabled)`"" + } + + + } +} +class MouseJump { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $ThumbnailSize = $null + + [DscProperty()] [string] + $PreviewType = $null + + [DscProperty()] [string] + $BackgroundColor1 = $null + + [DscProperty()] [string] + $BackgroundColor2 = $null + + [DscProperty()] [Nullable[int]] + $BorderThickness = $null + + [DscProperty()] [string] + $BorderColor = $null + + [DscProperty()] [Nullable[int]] + $Border3dDepth = $null + + [DscProperty()] [Nullable[int]] + $BorderPadding = $null + + [DscProperty()] [Nullable[int]] + $BezelThickness = $null + + [DscProperty()] [string] + $BezelColor = $null + + [DscProperty()] [Nullable[int]] + $Bezel3dDepth = $null + + [DscProperty()] [Nullable[int]] + $ScreenMargin = $null + + [DscProperty()] [string] + $ScreenColor1 = $null + + [DscProperty()] [string] + $ScreenColor2 = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set MouseJump.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.ThumbnailSize -notlike '') { + $Changes.Value += "set MouseJump.ThumbnailSize `"$($this.ThumbnailSize)`"" + } + + if ($this.PreviewType -notlike '') { + $Changes.Value += "set MouseJump.PreviewType `"$($this.PreviewType)`"" + } + + if ($this.BackgroundColor1 -notlike '') { + $Changes.Value += "set MouseJump.BackgroundColor1 `"$($this.BackgroundColor1)`"" + } + + if ($this.BackgroundColor2 -notlike '') { + $Changes.Value += "set MouseJump.BackgroundColor2 `"$($this.BackgroundColor2)`"" + } + + if ($this.BorderThickness -ne $null) { + $Changes.Value += "set MouseJump.BorderThickness `"$($this.BorderThickness)`"" + } + + if ($this.BorderColor -notlike '') { + $Changes.Value += "set MouseJump.BorderColor `"$($this.BorderColor)`"" + } + + if ($this.Border3dDepth -ne $null) { + $Changes.Value += "set MouseJump.Border3dDepth `"$($this.Border3dDepth)`"" + } + + if ($this.BorderPadding -ne $null) { + $Changes.Value += "set MouseJump.BorderPadding `"$($this.BorderPadding)`"" + } + + if ($this.BezelThickness -ne $null) { + $Changes.Value += "set MouseJump.BezelThickness `"$($this.BezelThickness)`"" + } + + if ($this.BezelColor -notlike '') { + $Changes.Value += "set MouseJump.BezelColor `"$($this.BezelColor)`"" + } + + if ($this.Bezel3dDepth -ne $null) { + $Changes.Value += "set MouseJump.Bezel3dDepth `"$($this.Bezel3dDepth)`"" + } + + if ($this.ScreenMargin -ne $null) { + $Changes.Value += "set MouseJump.ScreenMargin `"$($this.ScreenMargin)`"" + } + + if ($this.ScreenColor1 -notlike '') { + $Changes.Value += "set MouseJump.ScreenColor1 `"$($this.ScreenColor1)`"" + } + + if ($this.ScreenColor2 -notlike '') { + $Changes.Value += "set MouseJump.ScreenColor2 `"$($this.ScreenColor2)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.MouseJump `"$($this.Enabled)`"" + } + + + } +} +class MousePointerCrosshairs { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $CrosshairsColor = $null + + [DscProperty()] [Nullable[int]] + $CrosshairsOpacity = $null + + [DscProperty()] [Nullable[int]] + $CrosshairsRadius = $null + + [DscProperty()] [Nullable[int]] + $CrosshairsThickness = $null + + [DscProperty()] [string] + $CrosshairsBorderColor = $null + + [DscProperty()] [Nullable[int]] + $CrosshairsBorderSize = $null + + [DscProperty()] [string] + $CrosshairsAutoHide = $null + + [DscProperty()] [string] + $CrosshairsIsFixedLengthEnabled = $null + + [DscProperty()] [Nullable[int]] + $CrosshairsFixedLength = $null + + [DscProperty()] [string] + $AutoActivate = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.CrosshairsColor -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsColor `"$($this.CrosshairsColor)`"" + } + + if ($this.CrosshairsOpacity -ne $null) { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsOpacity `"$($this.CrosshairsOpacity)`"" + } + + if ($this.CrosshairsRadius -ne $null) { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsRadius `"$($this.CrosshairsRadius)`"" + } + + if ($this.CrosshairsThickness -ne $null) { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsThickness `"$($this.CrosshairsThickness)`"" + } + + if ($this.CrosshairsBorderColor -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsBorderColor `"$($this.CrosshairsBorderColor)`"" + } + + if ($this.CrosshairsBorderSize -ne $null) { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsBorderSize `"$($this.CrosshairsBorderSize)`"" + } + + if ($this.CrosshairsAutoHide -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsAutoHide `"$($this.CrosshairsAutoHide)`"" + } + + if ($this.CrosshairsIsFixedLengthEnabled -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsIsFixedLengthEnabled `"$($this.CrosshairsIsFixedLengthEnabled)`"" + } + + if ($this.CrosshairsFixedLength -ne $null) { + $Changes.Value += "set MousePointerCrosshairs.CrosshairsFixedLength `"$($this.CrosshairsFixedLength)`"" + } + + if ($this.AutoActivate -notlike '') { + $Changes.Value += "set MousePointerCrosshairs.AutoActivate `"$($this.AutoActivate)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.MousePointerCrosshairs `"$($this.Enabled)`"" + } + + + } +} +class MouseWithoutBorders { + [DscProperty()] [Nullable[bool]] + $ShowOriginalUI = $null + + [DscProperty()] [Nullable[bool]] + $WrapMouse = $null + + [DscProperty()] [Nullable[bool]] + $ShareClipboard = $null + + [DscProperty()] [Nullable[bool]] + $TransferFile = $null + + [DscProperty()] [Nullable[bool]] + $HideMouseAtScreenEdge = $null + + [DscProperty()] [Nullable[bool]] + $DrawMouseCursor = $null + + [DscProperty()] [Nullable[bool]] + $ValidateRemoteMachineIP = $null + + [DscProperty()] [Nullable[bool]] + $SameSubnetOnly = $null + + [DscProperty()] [Nullable[bool]] + $BlockScreenSaverOnOtherMachines = $null + + [DscProperty()] [Nullable[bool]] + $MoveMouseRelatively = $null + + [DscProperty()] [Nullable[bool]] + $BlockMouseAtScreenCorners = $null + + [DscProperty()] [Nullable[bool]] + $ShowClipboardAndNetworkStatusMessages = $null + + [DscProperty()] [Nullable[int]] + $EasyMouse = $null + + [DscProperty()] [Nullable[int]] + $HotKeySwitchMachine = $null + + [DscProperty()] [string] + $ToggleEasyMouseShortcut = $null + + [DscProperty()] [string] + $LockMachineShortcut = $null + + [DscProperty()] [string] + $ReconnectShortcut = $null + + [DscProperty()] [string] + $Switch2AllPCShortcut = $null + + [DscProperty()] [Nullable[bool]] + $DrawMouseEx = $null + + [DscProperty()] [string] + $Name2IP = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ShowOriginalUI -ne $null) { + $Changes.Value += "set MouseWithoutBorders.ShowOriginalUI `"$($this.ShowOriginalUI)`"" + } + + if ($this.WrapMouse -ne $null) { + $Changes.Value += "set MouseWithoutBorders.WrapMouse `"$($this.WrapMouse)`"" + } + + if ($this.ShareClipboard -ne $null) { + $Changes.Value += "set MouseWithoutBorders.ShareClipboard `"$($this.ShareClipboard)`"" + } + + if ($this.TransferFile -ne $null) { + $Changes.Value += "set MouseWithoutBorders.TransferFile `"$($this.TransferFile)`"" + } + + if ($this.HideMouseAtScreenEdge -ne $null) { + $Changes.Value += "set MouseWithoutBorders.HideMouseAtScreenEdge `"$($this.HideMouseAtScreenEdge)`"" + } + + if ($this.DrawMouseCursor -ne $null) { + $Changes.Value += "set MouseWithoutBorders.DrawMouseCursor `"$($this.DrawMouseCursor)`"" + } + + if ($this.ValidateRemoteMachineIP -ne $null) { + $Changes.Value += "set MouseWithoutBorders.ValidateRemoteMachineIP `"$($this.ValidateRemoteMachineIP)`"" + } + + if ($this.SameSubnetOnly -ne $null) { + $Changes.Value += "set MouseWithoutBorders.SameSubnetOnly `"$($this.SameSubnetOnly)`"" + } + + if ($this.BlockScreenSaverOnOtherMachines -ne $null) { + $Changes.Value += "set MouseWithoutBorders.BlockScreenSaverOnOtherMachines `"$($this.BlockScreenSaverOnOtherMachines)`"" + } + + if ($this.MoveMouseRelatively -ne $null) { + $Changes.Value += "set MouseWithoutBorders.MoveMouseRelatively `"$($this.MoveMouseRelatively)`"" + } + + if ($this.BlockMouseAtScreenCorners -ne $null) { + $Changes.Value += "set MouseWithoutBorders.BlockMouseAtScreenCorners `"$($this.BlockMouseAtScreenCorners)`"" + } + + if ($this.ShowClipboardAndNetworkStatusMessages -ne $null) { + $Changes.Value += "set MouseWithoutBorders.ShowClipboardAndNetworkStatusMessages `"$($this.ShowClipboardAndNetworkStatusMessages)`"" + } + + if ($this.EasyMouse -ne $null) { + $Changes.Value += "set MouseWithoutBorders.EasyMouse `"$($this.EasyMouse)`"" + } + + if ($this.HotKeySwitchMachine -ne $null) { + $Changes.Value += "set MouseWithoutBorders.HotKeySwitchMachine `"$($this.HotKeySwitchMachine)`"" + } + + if ($this.ToggleEasyMouseShortcut -notlike '') { + $Changes.Value += "set MouseWithoutBorders.ToggleEasyMouseShortcut `"$($this.ToggleEasyMouseShortcut)`"" + } + + if ($this.LockMachineShortcut -notlike '') { + $Changes.Value += "set MouseWithoutBorders.LockMachineShortcut `"$($this.LockMachineShortcut)`"" + } + + if ($this.ReconnectShortcut -notlike '') { + $Changes.Value += "set MouseWithoutBorders.ReconnectShortcut `"$($this.ReconnectShortcut)`"" + } + + if ($this.Switch2AllPCShortcut -notlike '') { + $Changes.Value += "set MouseWithoutBorders.Switch2AllPCShortcut `"$($this.Switch2AllPCShortcut)`"" + } + + if ($this.DrawMouseEx -ne $null) { + $Changes.Value += "set MouseWithoutBorders.DrawMouseEx `"$($this.DrawMouseEx)`"" + } + + if ($this.Name2IP -notlike '') { + $Changes.Value += "set MouseWithoutBorders.Name2IP `"$($this.Name2IP)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.MouseWithoutBorders `"$($this.Enabled)`"" + } + + + } +} +class NewPlus { + [DscProperty()] [string] + $HideFileExtension = $null + + [DscProperty()] [string] + $HideStartingDigits = $null + + [DscProperty()] [string] + $TemplateLocation = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.HideFileExtension -notlike '') { + $Changes.Value += "set NewPlus.HideFileExtension `"$($this.HideFileExtension)`"" + } + + if ($this.HideStartingDigits -notlike '') { + $Changes.Value += "set NewPlus.HideStartingDigits `"$($this.HideStartingDigits)`"" + } + + if ($this.TemplateLocation -notlike '') { + $Changes.Value += "set NewPlus.TemplateLocation `"$($this.TemplateLocation)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.NewPlus `"$($this.Enabled)`"" + } + + + } +} +class Peek { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $AlwaysRunNotElevated = $null + + [DscProperty()] [string] + $CloseAfterLosingFocus = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set Peek.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.AlwaysRunNotElevated -notlike '') { + $Changes.Value += "set Peek.AlwaysRunNotElevated `"$($this.AlwaysRunNotElevated)`"" + } + + if ($this.CloseAfterLosingFocus -notlike '') { + $Changes.Value += "set Peek.CloseAfterLosingFocus `"$($this.CloseAfterLosingFocus)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.Peek `"$($this.Enabled)`"" + } + + + } +} +class PowerAccent { + [DscProperty()] [PowerAccentActivationKey] + $ActivationKey + + [DscProperty()] [Nullable[bool]] + $DoNotActivateOnGameMode = $null + + [DscProperty()] [string] + $ToolbarPosition = $null + + [DscProperty()] [Nullable[int]] + $InputTime = $null + + [DscProperty()] [string] + $SelectedLang = $null + + [DscProperty()] [string] + $ExcludedApps = $null + + [DscProperty()] [Nullable[bool]] + $ShowUnicodeDescription = $null + + [DscProperty()] [Nullable[bool]] + $SortByUsageFrequency = $null + + [DscProperty()] [Nullable[bool]] + $StartSelectionFromTheLeft = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationKey -ne 0) { + $Changes.Value += "set PowerAccent.ActivationKey `"$($this.ActivationKey)`"" + } + + if ($this.DoNotActivateOnGameMode -ne $null) { + $Changes.Value += "set PowerAccent.DoNotActivateOnGameMode `"$($this.DoNotActivateOnGameMode)`"" + } + + if ($this.ToolbarPosition -notlike '') { + $Changes.Value += "set PowerAccent.ToolbarPosition `"$($this.ToolbarPosition)`"" + } + + if ($this.InputTime -ne $null) { + $Changes.Value += "set PowerAccent.InputTime `"$($this.InputTime)`"" + } + + if ($this.SelectedLang -notlike '') { + $Changes.Value += "set PowerAccent.SelectedLang `"$($this.SelectedLang)`"" + } + + if ($this.ExcludedApps -notlike '') { + $Changes.Value += "set PowerAccent.ExcludedApps `"$($this.ExcludedApps)`"" + } + + if ($this.ShowUnicodeDescription -ne $null) { + $Changes.Value += "set PowerAccent.ShowUnicodeDescription `"$($this.ShowUnicodeDescription)`"" + } + + if ($this.SortByUsageFrequency -ne $null) { + $Changes.Value += "set PowerAccent.SortByUsageFrequency `"$($this.SortByUsageFrequency)`"" + } + + if ($this.StartSelectionFromTheLeft -ne $null) { + $Changes.Value += "set PowerAccent.StartSelectionFromTheLeft `"$($this.StartSelectionFromTheLeft)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.PowerAccent `"$($this.Enabled)`"" + } + + + } +} +class PowerLauncher { + [DscProperty()] [Nullable[int]] + $MaximumNumberOfResults = $null + + [DscProperty()] [string] + $OpenPowerLauncher = $null + + [DscProperty()] [Nullable[bool]] + $IgnoreHotkeysInFullscreen = $null + + [DscProperty()] [Nullable[bool]] + $ClearInputOnLaunch = $null + + [DscProperty()] [Nullable[bool]] + $TabSelectsContextButtons = $null + + [DscProperty()] [Theme] + $Theme + + [DscProperty()] [Nullable[int]] + $TitleFontSize = $null + + [DscProperty()] [StartupPosition] + $Position + + [DscProperty()] [Nullable[bool]] + $UseCentralizedKeyboardHook = $null + + [DscProperty()] [Nullable[bool]] + $SearchQueryResultsWithDelay = $null + + [DscProperty()] [Nullable[int]] + $SearchInputDelay = $null + + [DscProperty()] [Nullable[int]] + $SearchInputDelayFast = $null + + [DscProperty()] [Nullable[int]] + $SearchClickedItemWeight = $null + + [DscProperty()] [Nullable[bool]] + $SearchQueryTuningEnabled = $null + + [DscProperty()] [Nullable[bool]] + $SearchWaitForSlowResults = $null + + [DscProperty()] [Nullable[bool]] + $UsePinyin = $null + + [DscProperty()] [Nullable[bool]] + $GenerateThumbnailsFromFiles = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + + [DscProperty()] [Hashtable[]] + $Plugins = @() + + ApplyChanges([ref]$Changes) { + if ($this.MaximumNumberOfResults -ne $null) { + $Changes.Value += "set PowerLauncher.MaximumNumberOfResults `"$($this.MaximumNumberOfResults)`"" + } + + if ($this.OpenPowerLauncher -notlike '') { + $Changes.Value += "set PowerLauncher.OpenPowerLauncher `"$($this.OpenPowerLauncher)`"" + } + + if ($this.IgnoreHotkeysInFullscreen -ne $null) { + $Changes.Value += "set PowerLauncher.IgnoreHotkeysInFullscreen `"$($this.IgnoreHotkeysInFullscreen)`"" + } + + if ($this.ClearInputOnLaunch -ne $null) { + $Changes.Value += "set PowerLauncher.ClearInputOnLaunch `"$($this.ClearInputOnLaunch)`"" + } + + if ($this.TabSelectsContextButtons -ne $null) { + $Changes.Value += "set PowerLauncher.TabSelectsContextButtons `"$($this.TabSelectsContextButtons)`"" + } + + if ($this.Theme -ne 0) { + $Changes.Value += "set PowerLauncher.Theme `"$($this.Theme)`"" + } + + if ($this.TitleFontSize -ne $null) { + $Changes.Value += "set PowerLauncher.TitleFontSize `"$($this.TitleFontSize)`"" + } + + if ($this.Position -ne 0) { + $Changes.Value += "set PowerLauncher.Position `"$($this.Position)`"" + } + + if ($this.UseCentralizedKeyboardHook -ne $null) { + $Changes.Value += "set PowerLauncher.UseCentralizedKeyboardHook `"$($this.UseCentralizedKeyboardHook)`"" + } + + if ($this.SearchQueryResultsWithDelay -ne $null) { + $Changes.Value += "set PowerLauncher.SearchQueryResultsWithDelay `"$($this.SearchQueryResultsWithDelay)`"" + } + + if ($this.SearchInputDelay -ne $null) { + $Changes.Value += "set PowerLauncher.SearchInputDelay `"$($this.SearchInputDelay)`"" + } + + if ($this.SearchInputDelayFast -ne $null) { + $Changes.Value += "set PowerLauncher.SearchInputDelayFast `"$($this.SearchInputDelayFast)`"" + } + + if ($this.SearchClickedItemWeight -ne $null) { + $Changes.Value += "set PowerLauncher.SearchClickedItemWeight `"$($this.SearchClickedItemWeight)`"" + } + + if ($this.SearchQueryTuningEnabled -ne $null) { + $Changes.Value += "set PowerLauncher.SearchQueryTuningEnabled `"$($this.SearchQueryTuningEnabled)`"" + } + + if ($this.SearchWaitForSlowResults -ne $null) { + $Changes.Value += "set PowerLauncher.SearchWaitForSlowResults `"$($this.SearchWaitForSlowResults)`"" + } + + if ($this.UsePinyin -ne $null) { + $Changes.Value += "set PowerLauncher.UsePinyin `"$($this.UsePinyin)`"" + } + + if ($this.GenerateThumbnailsFromFiles -ne $null) { + $Changes.Value += "set PowerLauncher.GenerateThumbnailsFromFiles `"$($this.GenerateThumbnailsFromFiles)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.PowerLauncher `"$($this.Enabled)`"" + } + + if ($this.Plugins.Count -gt 0) { + $AdditionalPropertiesTmpPath = [System.IO.Path]::GetTempFileName() + $this.Plugins | ConvertTo-Json | Set-Content -Path $AdditionalPropertiesTmpPath + $Changes.Value += "setAdditional PowerLauncher `"$AdditionalPropertiesTmpPath`"" + } + } +} +class PowerOcr { + [DscProperty()] [string] + $ActivationShortcut = $null + + [DscProperty()] [string] + $PreferredLanguage = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ActivationShortcut -notlike '') { + $Changes.Value += "set PowerOcr.ActivationShortcut `"$($this.ActivationShortcut)`"" + } + + if ($this.PreferredLanguage -notlike '') { + $Changes.Value += "set PowerOcr.PreferredLanguage `"$($this.PreferredLanguage)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.PowerOcr `"$($this.Enabled)`"" + } + + + } +} +class PowerPreview { + [DscProperty()] [Nullable[bool]] + $EnableSvgPreview = $null + + [DscProperty()] [Nullable[int]] + $SvgBackgroundColorMode = $null + + [DscProperty()] [string] + $SvgBackgroundSolidColor = $null + + [DscProperty()] [Nullable[int]] + $SvgBackgroundCheckeredShade = $null + + [DscProperty()] [Nullable[bool]] + $EnableSvgThumbnail = $null + + [DscProperty()] [Nullable[bool]] + $EnableMdPreview = $null + + [DscProperty()] [Nullable[bool]] + $EnableMonacoPreview = $null + + [DscProperty()] [Nullable[bool]] + $EnableMonacoPreviewWordWrap = $null + + [DscProperty()] [Nullable[bool]] + $MonacoPreviewTryFormat = $null + + [DscProperty()] [Nullable[int]] + $MonacoPreviewMaxFileSize = $null + + [DscProperty()] [Nullable[int]] + $MonacoPreviewFontSize = $null + + [DscProperty()] [Nullable[bool]] + $MonacoPreviewStickyScroll = $null + + [DscProperty()] [Nullable[bool]] + $MonacoPreviewMinimap = $null + + [DscProperty()] [Nullable[bool]] + $EnablePdfPreview = $null + + [DscProperty()] [Nullable[bool]] + $EnablePdfThumbnail = $null + + [DscProperty()] [Nullable[bool]] + $EnableGcodePreview = $null + + [DscProperty()] [Nullable[bool]] + $EnableGcodeThumbnail = $null + + [DscProperty()] [Nullable[bool]] + $EnableStlThumbnail = $null + + [DscProperty()] [string] + $StlThumbnailColor = $null + + [DscProperty()] [Nullable[bool]] + $EnableQoiPreview = $null + + [DscProperty()] [Nullable[bool]] + $EnableQoiThumbnail = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.EnableSvgPreview -ne $null) { + $Changes.Value += "set PowerPreview.EnableSvgPreview `"$($this.EnableSvgPreview)`"" + } + + if ($this.SvgBackgroundColorMode -ne $null) { + $Changes.Value += "set PowerPreview.SvgBackgroundColorMode `"$($this.SvgBackgroundColorMode)`"" + } + + if ($this.SvgBackgroundSolidColor -notlike '') { + $Changes.Value += "set PowerPreview.SvgBackgroundSolidColor `"$($this.SvgBackgroundSolidColor)`"" + } + + if ($this.SvgBackgroundCheckeredShade -ne $null) { + $Changes.Value += "set PowerPreview.SvgBackgroundCheckeredShade `"$($this.SvgBackgroundCheckeredShade)`"" + } + + if ($this.EnableSvgThumbnail -ne $null) { + $Changes.Value += "set PowerPreview.EnableSvgThumbnail `"$($this.EnableSvgThumbnail)`"" + } + + if ($this.EnableMdPreview -ne $null) { + $Changes.Value += "set PowerPreview.EnableMdPreview `"$($this.EnableMdPreview)`"" + } + + if ($this.EnableMonacoPreview -ne $null) { + $Changes.Value += "set PowerPreview.EnableMonacoPreview `"$($this.EnableMonacoPreview)`"" + } + + if ($this.EnableMonacoPreviewWordWrap -ne $null) { + $Changes.Value += "set PowerPreview.EnableMonacoPreviewWordWrap `"$($this.EnableMonacoPreviewWordWrap)`"" + } + + if ($this.MonacoPreviewTryFormat -ne $null) { + $Changes.Value += "set PowerPreview.MonacoPreviewTryFormat `"$($this.MonacoPreviewTryFormat)`"" + } + + if ($this.MonacoPreviewMaxFileSize -ne $null) { + $Changes.Value += "set PowerPreview.MonacoPreviewMaxFileSize `"$($this.MonacoPreviewMaxFileSize)`"" + } + + if ($this.MonacoPreviewFontSize -ne $null) { + $Changes.Value += "set PowerPreview.MonacoPreviewFontSize `"$($this.MonacoPreviewFontSize)`"" + } + + if ($this.MonacoPreviewStickyScroll -ne $null) { + $Changes.Value += "set PowerPreview.MonacoPreviewStickyScroll `"$($this.MonacoPreviewStickyScroll)`"" + } + + if ($this.MonacoPreviewMinimap -ne $null) { + $Changes.Value += "set PowerPreview.MonacoPreviewMinimap `"$($this.MonacoPreviewMinimap)`"" + } + + if ($this.EnablePdfPreview -ne $null) { + $Changes.Value += "set PowerPreview.EnablePdfPreview `"$($this.EnablePdfPreview)`"" + } + + if ($this.EnablePdfThumbnail -ne $null) { + $Changes.Value += "set PowerPreview.EnablePdfThumbnail `"$($this.EnablePdfThumbnail)`"" + } + + if ($this.EnableGcodePreview -ne $null) { + $Changes.Value += "set PowerPreview.EnableGcodePreview `"$($this.EnableGcodePreview)`"" + } + + if ($this.EnableGcodeThumbnail -ne $null) { + $Changes.Value += "set PowerPreview.EnableGcodeThumbnail `"$($this.EnableGcodeThumbnail)`"" + } + + if ($this.EnableStlThumbnail -ne $null) { + $Changes.Value += "set PowerPreview.EnableStlThumbnail `"$($this.EnableStlThumbnail)`"" + } + + if ($this.StlThumbnailColor -notlike '') { + $Changes.Value += "set PowerPreview.StlThumbnailColor `"$($this.StlThumbnailColor)`"" + } + + if ($this.EnableQoiPreview -ne $null) { + $Changes.Value += "set PowerPreview.EnableQoiPreview `"$($this.EnableQoiPreview)`"" + } + + if ($this.EnableQoiThumbnail -ne $null) { + $Changes.Value += "set PowerPreview.EnableQoiThumbnail `"$($this.EnableQoiThumbnail)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.PowerPreview `"$($this.Enabled)`"" + } + + + } +} +class PowerRename { + [DscProperty()] [string] + $MRUEnabled = $null + + [DscProperty()] [Nullable[int]] + $MaxMRUSize = $null + + [DscProperty()] [string] + $ExtendedContextMenuOnly = $null + + [DscProperty()] [string] + $UseBoostLib = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.MRUEnabled -notlike '') { + $Changes.Value += "set PowerRename.MRUEnabled `"$($this.MRUEnabled)`"" + } + + if ($this.MaxMRUSize -ne $null) { + $Changes.Value += "set PowerRename.MaxMRUSize `"$($this.MaxMRUSize)`"" + } + + if ($this.ExtendedContextMenuOnly -notlike '') { + $Changes.Value += "set PowerRename.ExtendedContextMenuOnly `"$($this.ExtendedContextMenuOnly)`"" + } + + if ($this.UseBoostLib -notlike '') { + $Changes.Value += "set PowerRename.UseBoostLib `"$($this.UseBoostLib)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.PowerRename `"$($this.Enabled)`"" + } + + + } +} +class RegistryPreview { + [DscProperty()] [Nullable[bool]] + $DefaultRegApp = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.DefaultRegApp -ne $null) { + $Changes.Value += "set RegistryPreview.DefaultRegApp `"$($this.DefaultRegApp)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.RegistryPreview `"$($this.Enabled)`"" + } + + + } +} +class ShortcutGuide { + [DscProperty()] [string] + $OpenShortcutGuide = $null + + [DscProperty()] [Nullable[int]] + $OverlayOpacity = $null + + [DscProperty()] [string] + $UseLegacyPressWinKeyBehavior = $null + + [DscProperty()] [Nullable[int]] + $PressTimeForGlobalWindowsShortcuts = $null + + [DscProperty()] [Nullable[int]] + $PressTimeForTaskbarIconShortcuts = $null + + [DscProperty()] [string] + $Theme = $null + + [DscProperty()] [string] + $DisabledApps = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.OpenShortcutGuide -notlike '') { + $Changes.Value += "set ShortcutGuide.OpenShortcutGuide `"$($this.OpenShortcutGuide)`"" + } + + if ($this.OverlayOpacity -ne $null) { + $Changes.Value += "set ShortcutGuide.OverlayOpacity `"$($this.OverlayOpacity)`"" + } + + if ($this.UseLegacyPressWinKeyBehavior -notlike '') { + $Changes.Value += "set ShortcutGuide.UseLegacyPressWinKeyBehavior `"$($this.UseLegacyPressWinKeyBehavior)`"" + } + + if ($this.PressTimeForGlobalWindowsShortcuts -ne $null) { + $Changes.Value += "set ShortcutGuide.PressTimeForGlobalWindowsShortcuts `"$($this.PressTimeForGlobalWindowsShortcuts)`"" + } + + if ($this.PressTimeForTaskbarIconShortcuts -ne $null) { + $Changes.Value += "set ShortcutGuide.PressTimeForTaskbarIconShortcuts `"$($this.PressTimeForTaskbarIconShortcuts)`"" + } + + if ($this.Theme -notlike '') { + $Changes.Value += "set ShortcutGuide.Theme `"$($this.Theme)`"" + } + + if ($this.DisabledApps -notlike '') { + $Changes.Value += "set ShortcutGuide.DisabledApps `"$($this.DisabledApps)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.ShortcutGuide `"$($this.Enabled)`"" + } + + + } +} +class Workspaces { + [DscProperty()] [string] + $Hotkey = $null + + [DscProperty()] [SortByProperty] + $SortBy + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.Hotkey -notlike '') { + $Changes.Value += "set Workspaces.Hotkey `"$($this.Hotkey)`"" + } + + if ($this.SortBy -ne 0) { + $Changes.Value += "set Workspaces.SortBy `"$($this.SortBy)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.Workspaces `"$($this.Enabled)`"" + } + + + } +} +class ZoomIt { + [DscProperty()] [string] + $ToggleKey = $null + + [DscProperty()] [string] + $LiveZoomToggleKey = $null + + [DscProperty()] [string] + $DrawToggleKey = $null + + [DscProperty()] [string] + $RecordToggleKey = $null + + [DscProperty()] [string] + $SnipToggleKey = $null + + [DscProperty()] [string] + $BreakTimerKey = $null + + [DscProperty()] [string] + $Font = $null + + [DscProperty()] [string] + $DemoTypeToggleKey = $null + + [DscProperty()] [string] + $DemoTypeFile = $null + + [DscProperty()] [Nullable[int]] + $DemoTypeSpeedSlider = $null + + [DscProperty()] [string] + $DemoTypeUserDrivenMode = $null + + [DscProperty()] [Nullable[int]] + $BreakTimeout = $null + + [DscProperty()] [Nullable[int]] + $BreakOpacity = $null + + [DscProperty()] [string] + $BreakPlaySoundFile = $null + + [DscProperty()] [string] + $BreakSoundFile = $null + + [DscProperty()] [string] + $BreakShowBackgroundFile = $null + + [DscProperty()] [string] + $BreakBackgroundStretch = $null + + [DscProperty()] [string] + $BreakBackgroundFile = $null + + [DscProperty()] [Nullable[int]] + $BreakTimerPosition = $null + + [DscProperty()] [string] + $BreakShowDesktop = $null + + [DscProperty()] [string] + $ShowExpiredTime = $null + + [DscProperty()] [string] + $ShowTrayIcon = $null + + [DscProperty()] [string] + $AnimnateZoom = $null + + [DscProperty()] [Nullable[int]] + $ZoominSliderLevel = $null + + [DscProperty()] [Nullable[int]] + $RecordScaling = $null + + [DscProperty()] [string] + $CaptureAudio = $null + + [DscProperty()] [string] + $MicrophoneDeviceId = $null + + [DscProperty(Key)] [Nullable[bool]] + $Enabled = $null + ApplyChanges([ref]$Changes) { + if ($this.ToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.ToggleKey `"$($this.ToggleKey)`"" + } + + if ($this.LiveZoomToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.LiveZoomToggleKey `"$($this.LiveZoomToggleKey)`"" + } + + if ($this.DrawToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.DrawToggleKey `"$($this.DrawToggleKey)`"" + } + + if ($this.RecordToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.RecordToggleKey `"$($this.RecordToggleKey)`"" + } + + if ($this.SnipToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.SnipToggleKey `"$($this.SnipToggleKey)`"" + } + + if ($this.BreakTimerKey -notlike '') { + $Changes.Value += "set ZoomIt.BreakTimerKey `"$($this.BreakTimerKey)`"" + } + + if ($this.Font -notlike '') { + $Changes.Value += "set ZoomIt.Font `"$($this.Font)`"" + } + + if ($this.DemoTypeToggleKey -notlike '') { + $Changes.Value += "set ZoomIt.DemoTypeToggleKey `"$($this.DemoTypeToggleKey)`"" + } + + if ($this.DemoTypeFile -notlike '') { + $Changes.Value += "set ZoomIt.DemoTypeFile `"$($this.DemoTypeFile)`"" + } + + if ($this.DemoTypeSpeedSlider -ne $null) { + $Changes.Value += "set ZoomIt.DemoTypeSpeedSlider `"$($this.DemoTypeSpeedSlider)`"" + } + + if ($this.DemoTypeUserDrivenMode -notlike '') { + $Changes.Value += "set ZoomIt.DemoTypeUserDrivenMode `"$($this.DemoTypeUserDrivenMode)`"" + } + + if ($this.BreakTimeout -ne $null) { + $Changes.Value += "set ZoomIt.BreakTimeout `"$($this.BreakTimeout)`"" + } + + if ($this.BreakOpacity -ne $null) { + $Changes.Value += "set ZoomIt.BreakOpacity `"$($this.BreakOpacity)`"" + } + + if ($this.BreakPlaySoundFile -notlike '') { + $Changes.Value += "set ZoomIt.BreakPlaySoundFile `"$($this.BreakPlaySoundFile)`"" + } + + if ($this.BreakSoundFile -notlike '') { + $Changes.Value += "set ZoomIt.BreakSoundFile `"$($this.BreakSoundFile)`"" + } + + if ($this.BreakShowBackgroundFile -notlike '') { + $Changes.Value += "set ZoomIt.BreakShowBackgroundFile `"$($this.BreakShowBackgroundFile)`"" + } + + if ($this.BreakBackgroundStretch -notlike '') { + $Changes.Value += "set ZoomIt.BreakBackgroundStretch `"$($this.BreakBackgroundStretch)`"" + } + + if ($this.BreakBackgroundFile -notlike '') { + $Changes.Value += "set ZoomIt.BreakBackgroundFile `"$($this.BreakBackgroundFile)`"" + } + + if ($this.BreakTimerPosition -ne $null) { + $Changes.Value += "set ZoomIt.BreakTimerPosition `"$($this.BreakTimerPosition)`"" + } + + if ($this.BreakShowDesktop -notlike '') { + $Changes.Value += "set ZoomIt.BreakShowDesktop `"$($this.BreakShowDesktop)`"" + } + + if ($this.ShowExpiredTime -notlike '') { + $Changes.Value += "set ZoomIt.ShowExpiredTime `"$($this.ShowExpiredTime)`"" + } + + if ($this.ShowTrayIcon -notlike '') { + $Changes.Value += "set ZoomIt.ShowTrayIcon `"$($this.ShowTrayIcon)`"" + } + + if ($this.AnimnateZoom -notlike '') { + $Changes.Value += "set ZoomIt.AnimnateZoom `"$($this.AnimnateZoom)`"" + } + + if ($this.ZoominSliderLevel -ne $null) { + $Changes.Value += "set ZoomIt.ZoominSliderLevel `"$($this.ZoominSliderLevel)`"" + } + + if ($this.RecordScaling -ne $null) { + $Changes.Value += "set ZoomIt.RecordScaling `"$($this.RecordScaling)`"" + } + + if ($this.CaptureAudio -notlike '') { + $Changes.Value += "set ZoomIt.CaptureAudio `"$($this.CaptureAudio)`"" + } + + if ($this.MicrophoneDeviceId -notlike '') { + $Changes.Value += "set ZoomIt.MicrophoneDeviceId `"$($this.MicrophoneDeviceId)`"" + } + + if ($this.Enabled -ne $null) { + $Changes.Value += "set General.Enabled.ZoomIt `"$($this.Enabled)`"" + } + + + } +} +class GeneralSettings { + [DscProperty()] [Nullable[bool]] + $Startup = $null + + [DscProperty()] [Nullable[bool]] + $EnableWarningsElevatedApps = $null + + [DscProperty()] [string] + $Theme = $null + + [DscProperty()] [Nullable[bool]] + $ShowNewUpdatesToastNotification = $null + + [DscProperty()] [Nullable[bool]] + $AutoDownloadUpdates = $null + + [DscProperty()] [Nullable[bool]] + $ShowWhatsNewAfterUpdates = $null + + [DscProperty()] [Nullable[bool]] + $EnableExperimentation = $null + + ApplyChanges([ref]$Changes) { + if ($this.Startup -ne $null) { + $Changes.Value += "set GeneralSettings.Startup `"$($this.Startup)`"" + } + + if ($this.EnableWarningsElevatedApps -ne $null) { + $Changes.Value += "set GeneralSettings.EnableWarningsElevatedApps `"$($this.EnableWarningsElevatedApps)`"" + } + + if ($this.Theme -notlike '') { + $Changes.Value += "set GeneralSettings.Theme `"$($this.Theme)`"" + } + + if ($this.ShowNewUpdatesToastNotification -ne $null) { + $Changes.Value += "set GeneralSettings.ShowNewUpdatesToastNotification `"$($this.ShowNewUpdatesToastNotification)`"" + } + + if ($this.AutoDownloadUpdates -ne $null) { + $Changes.Value += "set GeneralSettings.AutoDownloadUpdates `"$($this.AutoDownloadUpdates)`"" + } + + if ($this.ShowWhatsNewAfterUpdates -ne $null) { + $Changes.Value += "set GeneralSettings.ShowWhatsNewAfterUpdates `"$($this.ShowWhatsNewAfterUpdates)`"" + } + + if ($this.EnableExperimentation -ne $null) { + $Changes.Value += "set GeneralSettings.EnableExperimentation `"$($this.EnableExperimentation)`"" + } + + + + + } +} + +[DscResource()] +class PowerToysConfigure { + [DscProperty(Key)] [PowerToysConfigureEnsure] + $Ensure = [PowerToysConfigureEnsure]::Present + + [bool] $Debug = $false + + [DscProperty()] + [AdvancedPaste]$AdvancedPaste = [AdvancedPaste]::new() + + [DscProperty()] + [AlwaysOnTop]$AlwaysOnTop = [AlwaysOnTop]::new() + + [DscProperty()] + [Awake]$Awake = [Awake]::new() + + [DscProperty()] + [ColorPicker]$ColorPicker = [ColorPicker]::new() + + [DscProperty()] + [CropAndLock]$CropAndLock = [CropAndLock]::new() + + [DscProperty()] + [EnvironmentVariables]$EnvironmentVariables = [EnvironmentVariables]::new() + + [DscProperty()] + [FancyZones]$FancyZones = [FancyZones]::new() + + [DscProperty()] + [FileLocksmith]$FileLocksmith = [FileLocksmith]::new() + + [DscProperty()] + [FindMyMouse]$FindMyMouse = [FindMyMouse]::new() + + [DscProperty()] + [Hosts]$Hosts = [Hosts]::new() + + [DscProperty()] + [ImageResizer]$ImageResizer = [ImageResizer]::new() + + [DscProperty()] + [KeyboardManager]$KeyboardManager = [KeyboardManager]::new() + + [DscProperty()] + [MeasureTool]$MeasureTool = [MeasureTool]::new() + + [DscProperty()] + [MouseHighlighter]$MouseHighlighter = [MouseHighlighter]::new() + + [DscProperty()] + [MouseJump]$MouseJump = [MouseJump]::new() + + [DscProperty()] + [MousePointerCrosshairs]$MousePointerCrosshairs = [MousePointerCrosshairs]::new() + + [DscProperty()] + [MouseWithoutBorders]$MouseWithoutBorders = [MouseWithoutBorders]::new() + + [DscProperty()] + [NewPlus]$NewPlus = [NewPlus]::new() + + [DscProperty()] + [Peek]$Peek = [Peek]::new() + + [DscProperty()] + [PowerAccent]$PowerAccent = [PowerAccent]::new() + + [DscProperty()] + [PowerLauncher]$PowerLauncher = [PowerLauncher]::new() + + [DscProperty()] + [PowerOcr]$PowerOcr = [PowerOcr]::new() + + [DscProperty()] + [PowerPreview]$PowerPreview = [PowerPreview]::new() + + [DscProperty()] + [PowerRename]$PowerRename = [PowerRename]::new() + + [DscProperty()] + [RegistryPreview]$RegistryPreview = [RegistryPreview]::new() + + [DscProperty()] + [ShortcutGuide]$ShortcutGuide = [ShortcutGuide]::new() + + [DscProperty()] + [Workspaces]$Workspaces = [Workspaces]::new() + + [DscProperty()] + [ZoomIt]$ZoomIt = [ZoomIt]::new() + + [DscProperty()] + [GeneralSettings]$GeneralSettings = [GeneralSettings]::new() + + + [string] GetPowerToysSettingsPath() { + if ($this.Debug -eq $true) { + $SettingsExePath = "Q:\source\PowerToys\x64\Debug\WinUI3Apps\PowerToys.Settings.exe" + } else { + $installation = Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | ForEach-Object { Get-ItemProperty $_.PsPath } | Where-Object { $_.DisplayName -eq "PowerToys (Preview)" -and $_.DisplayVersion -eq "0.0.1" } + + if (-not $installation) + { + $installation = Get-ChildItem HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | ForEach-Object { Get-ItemProperty $_.PsPath } | Where-Object { $_.DisplayName -eq "PowerToys (Preview)" -and $_.DisplayVersion -eq "0.0.1" } + } + + if ($installation) { + $SettingsExePath = Join-Path (Join-Path $installation.InstallLocation WinUI3Apps) PowerToys.Settings.exe + $SettingsExePath = "`"$SettingsExePath`"" + } else { + throw "PowerToys installation wasn't found." + } + } + + return $SettingsExePath + } + + [PowerToysConfigure] Get() { + $CurrentState = [PowerToysConfigure]::new() + $SettingsExePath = $this.GetPowerToysSettingsPath() + $SettingsTmpFilePath = [System.IO.Path]::GetTempFileName() + + $SettingsToRequest = @{} + foreach ($module in $CurrentState.PSObject.Properties) { + $moduleName = $module.Name + # Skip utility properties + if ($moduleName -eq "Ensure" -or $moduleName -eq "Debug") { + continue + } + + $moduleProperties = $module.Value + $propertiesArray = @() + foreach ($property in $moduleProperties.PSObject.Properties) { + $propertyName = $property.Name + # Skip Enabled properties - they should be requested from GeneralSettings + if ($propertyName -eq "Enabled") { + continue + } + + $propertiesArray += $propertyName + } + + $SettingsToRequest[$moduleName] = $propertiesArray + } + + $settingsJson = $SettingsToRequest | ConvertTo-Json + $settingsJson | Set-Content -Path $SettingsTmpFilePath + + Start-Process -FilePath $SettingsExePath -Wait -Args "get `"$SettingsTmpFilePath`"" + $SettingsValues = Get-Content -Path $SettingsTmpFilePath -Raw + + if ($this.Debug -eq $true) { + $TempFilePath = Join-Path -Path $env:TEMP -ChildPath "PowerToys.DSC.TestConfigure.txt" + Set-Content -Path "$TempFilePath" -Value ("Requested:`r`n" + $settingsJson + "`r`n" + "Got:`r`n" + $SettingsValues + "`r`n" + (Get-Date -Format "o")) -Force + } + + $SettingsValues = $SettingsValues | ConvertFrom-Json + foreach ($module in $SettingsValues.PSObject.Properties) { + $moduleName = $module.Name + $obtainedModuleSettings = $module.Value + $moduleRef = $CurrentState.$moduleName + foreach ($property in $obtainedModuleSettings.PSObject.Properties) { + $propertyName = $property.Name + $moduleRef.$propertyName = $property.Value + } + } + + Remove-Item -Path $SettingsTmpFilePath + + return $CurrentState + } + + [bool] Test() { + # NB: we must always assume that the configuration isn't applied, because changing some settings produce external side-effects + return $false + } + + [void] Set() { + $SettingsExePath = $this.GetPowerToysSettingsPath() + $ChangesToApply = @() + + $this.AdvancedPaste.ApplyChanges([ref]$ChangesToApply) + $this.AlwaysOnTop.ApplyChanges([ref]$ChangesToApply) + $this.Awake.ApplyChanges([ref]$ChangesToApply) + $this.ColorPicker.ApplyChanges([ref]$ChangesToApply) + $this.CropAndLock.ApplyChanges([ref]$ChangesToApply) + $this.EnvironmentVariables.ApplyChanges([ref]$ChangesToApply) + $this.FancyZones.ApplyChanges([ref]$ChangesToApply) + $this.FileLocksmith.ApplyChanges([ref]$ChangesToApply) + $this.FindMyMouse.ApplyChanges([ref]$ChangesToApply) + $this.Hosts.ApplyChanges([ref]$ChangesToApply) + $this.ImageResizer.ApplyChanges([ref]$ChangesToApply) + $this.KeyboardManager.ApplyChanges([ref]$ChangesToApply) + $this.MeasureTool.ApplyChanges([ref]$ChangesToApply) + $this.MouseHighlighter.ApplyChanges([ref]$ChangesToApply) + $this.MouseJump.ApplyChanges([ref]$ChangesToApply) + $this.MousePointerCrosshairs.ApplyChanges([ref]$ChangesToApply) + $this.MouseWithoutBorders.ApplyChanges([ref]$ChangesToApply) + $this.NewPlus.ApplyChanges([ref]$ChangesToApply) + $this.Peek.ApplyChanges([ref]$ChangesToApply) + $this.PowerAccent.ApplyChanges([ref]$ChangesToApply) + $this.PowerLauncher.ApplyChanges([ref]$ChangesToApply) + $this.PowerOcr.ApplyChanges([ref]$ChangesToApply) + $this.PowerPreview.ApplyChanges([ref]$ChangesToApply) + $this.PowerRename.ApplyChanges([ref]$ChangesToApply) + $this.RegistryPreview.ApplyChanges([ref]$ChangesToApply) + $this.ShortcutGuide.ApplyChanges([ref]$ChangesToApply) + $this.Workspaces.ApplyChanges([ref]$ChangesToApply) + $this.ZoomIt.ApplyChanges([ref]$ChangesToApply) + $this.GeneralSettings.ApplyChanges([ref]$ChangesToApply) + + if ($this.Debug -eq $true) { + $tmp_info = $ChangesToApply + # $tmp_info = $this | ConvertTo-Json -Depth 10 + + $TempFilePath = Join-Path -Path $env:TEMP -ChildPath "PowerToys.DSC.TestConfigure.txt" + Set-Content -Path "$TempFilePath" -Value ($tmp_info + "`r`n" + (Get-Date -Format "o")) -Force + } + + # Stop any running PowerToys instances + Stop-Process -Name "PowerToys.Settings" -Force -PassThru | Wait-Process + $PowerToysProcessStopped = Stop-Process -Name "PowerToys" -Force -PassThru + $PowerToysProcessStopped | Wait-Process + + foreach ($change in $ChangesToApply) { + Start-Process -FilePath $SettingsExePath -Wait -Args "$change" + } + + # If the PowerToys process was stopped, restart it. + if ($PowerToysProcessStopped -ne $null) { + Start-Process -FilePath $SettingsExePath + } + } +} +#endregion DscResources \ No newline at end of file