[GPO] Add policies for configuring utilities enabled states (#21411)

* Add GPOWrapper headers and C++/WinRT library

* Check GPO before starting utilities

* Show message on GPO having disabled preview panes.

* Don't generate thumbnails if GPO disabled

* Fix FancyZonesEditor unable to recognize GPOWrapper

* Move settings view models to the settings project

* Use GPO to block enabling utilities in Settings

* Hide context menu entries when gpo disables utilities

* Apply gpo policies when enabling PowerToys on runner

* Add version and metadata to dll

* Add GPOWrapper to the installer

* Fix MSBuild errors on WPF apps by using Projection

* Signing

* Add gpo files and publish them

* Add GPO policies to the bug report tool

* Add some documentation for using GPO

* Mention support to actual lowest supported version of Windows

* Move PowerToys to the root of administrative templates tree

* Save policies on Software\Policies\PowerToys

* Support both machine and user scopes

* Fix documentation to reference computer and user scopes

* Mention incompatibility with outlook in gpo

* Set a better folder structure for gpo assets

* Move PDF Handler warning to the description

* Update doc/gpo/README.md

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* Add actual minimum version of PowerToys to gpo files

* Fix identation

* Remove GPOWrapper Readme

* Add Active Directory instructions to doc

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
This commit is contained in:
Jaime Bernardo
2022-10-26 14:02:31 +01:00
committed by GitHub
parent 1ff5fa8794
commit a63288009a
182 changed files with 3257 additions and 449 deletions

View File

@@ -21,6 +21,8 @@
"PowerToys.ManagedCommon.dll", "PowerToys.ManagedCommon.dll",
"PowerToys.Common.UI.dll", "PowerToys.Common.UI.dll",
"PowerToys.Settings.UI.Lib.dll", "PowerToys.Settings.UI.Lib.dll",
"PowerToys.GPOWrapper.dll",
"PowerToys.GPOWrapperProjection.dll",
"modules\\AlwaysOnTop\\PowerToys.AlwaysOnTop.exe", "modules\\AlwaysOnTop\\PowerToys.AlwaysOnTop.exe",
"modules\\AlwaysOnTop\\PowerToys.AlwaysOnTopModuleInterface.dll", "modules\\AlwaysOnTop\\PowerToys.AlwaysOnTopModuleInterface.dll",

View File

@@ -528,5 +528,11 @@ jobs:
PathtoPublish: $(System.ArtifactsDirectory) PathtoPublish: $(System.ArtifactsDirectory)
ArtifactName: setup-$(BuildPlatform) ArtifactName: setup-$(BuildPlatform)
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: GPO Files'
inputs:
PathtoPublish: doc\gpo\assets
ArtifactName: GroupPolicyObjectsFiles
... ...

View File

@@ -272,6 +272,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{B39DC643
src\common\utils\excluded_apps.h = src\common\utils\excluded_apps.h src\common\utils\excluded_apps.h = src\common\utils\excluded_apps.h
src\common\utils\exec.h = src\common\utils\exec.h src\common\utils\exec.h = src\common\utils\exec.h
src\common\utils\game_mode.h = src\common\utils\game_mode.h src\common\utils\game_mode.h = src\common\utils\game_mode.h
src\common\utils\gpo.h = src\common\utils\gpo.h
src\common\utils\HDropIterator.h = src\common\utils\HDropIterator.h src\common\utils\HDropIterator.h = src\common\utils\HDropIterator.h
src\common\utils\HttpClient.h = src\common\utils\HttpClient.h src\common\utils\HttpClient.h = src\common\utils\HttpClient.h
src\common\utils\json.h = src\common\utils\json.h src\common\utils\json.h = src\common\utils\json.h
@@ -457,6 +458,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hosts.Tests", "src\modules\
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HostsModuleInterface", "src\modules\Hosts\HostsModuleInterface\HostsModuleInterface.vcxproj", "{B41B888C-7DB8-4747-B262-4062E05A230D}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HostsModuleInterface", "src\modules\Hosts\HostsModuleInterface\HostsModuleInterface.vcxproj", "{B41B888C-7DB8-4747-B262-4062E05A230D}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPOWrapper", "src\common\GPOWrapper\GPOWrapper.vcxproj", "{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GPOWrapperProjection", "src\common\GPOWrapperProjection\GPOWrapperProjection.csproj", "{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64 Debug|ARM64 = Debug|ARM64
@@ -1848,6 +1853,30 @@ Global
{B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x64.Build.0 = Release|x64 {B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x64.Build.0 = Release|x64
{B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x86.ActiveCfg = Release|x64 {B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x86.ActiveCfg = Release|x64
{B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x86.Build.0 = Release|x64 {B41B888C-7DB8-4747-B262-4062E05A230D}.Release|x86.Build.0 = Release|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|ARM64.Build.0 = Debug|ARM64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|x64.ActiveCfg = Debug|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|x64.Build.0 = Debug|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|x86.ActiveCfg = Debug|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Debug|x86.Build.0 = Debug|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|ARM64.ActiveCfg = Release|ARM64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|ARM64.Build.0 = Release|ARM64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|x64.ActiveCfg = Release|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|x64.Build.0 = Release|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|x86.ActiveCfg = Release|x64
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788}.Release|x86.Build.0 = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|ARM64.ActiveCfg = Debug|ARM64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|ARM64.Build.0 = Debug|ARM64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|x64.ActiveCfg = Debug|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|x64.Build.0 = Debug|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|x86.ActiveCfg = Debug|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Debug|x86.Build.0 = Debug|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|ARM64.ActiveCfg = Release|ARM64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|ARM64.Build.0 = Release|ARM64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x64.ActiveCfg = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x64.Build.0 = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x86.ActiveCfg = Release|x64
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97}.Release|x86.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -2004,6 +2033,8 @@ Global
{F05E590D-AD46-42BE-9C25-6A63ADD2E3EA} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
{E2D03E0F-7A75-4813-9F4B-D8763D43FD3A} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA} {E2D03E0F-7A75-4813-9F4B-D8763D43FD3A} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
{B41B888C-7DB8-4747-B262-4062E05A230D} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA} {B41B888C-7DB8-4747-B262-4062E05A230D} = {F05E590D-AD46-42BE-9C25-6A63ADD2E3EA}
{E599C30B-9DC8-4E5A-BF27-93D4CCEDE788} = {1AFB6476-670D-4E80-A464-657E01DFF482}
{00EE9BA6-4E8F-43CA-960D-D4882F0FBB97} = {1AFB6476-670D-4E80-A464-657E01DFF482}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0}

33
doc/gpo/README.md Normal file
View File

@@ -0,0 +1,33 @@
# Group Policy Objects
Since version 0.64, PowerToys is released on GitHub with GroupPolicyObject files. You can check these releases on https://github.com/microsoft/PowerToys/releases .
## How to install
### Add the administrative template to an individual computer
1. Copy the "PowerToys.admx" file to your Policy Definition template folder. (Example: C:\Windows\PolicyDefinitions)
2. Copy the "PowerToys.adml" file to the matching language folder in your Policy Definition folder. (Example: C:\Windows\PolicyDefinitions\en-US)
### Add the administrative template to Active Directory
1. On a domain controller or workstation with RSAT, go to the **PolicyDefinition** folder (also known as the *Central Store*) on any domain controller for your domain. For older versions of Windows Server, you might need to create the **PolicyDefinition** folder. For more information, see [How to create and manage the Central Store for Group Policy Administrative Templates in Windows](https://support.microsoft.com/help/3087759/how-to-create-and-manage-the-central-store-for-group-policy-administra).
2. Copy the "PowerToys.admx" file to the PolicyDefinition folder. (Example: %systemroot%\sysvol\domain\policies\PolicyDefinitions)
3. Copy the "PowerToys.adml" file to the matching language folder in the PolicyDefinition folder. Create the folder if it doesn't already exist. (Example: %systemroot%\sysvol\domain\policies\PolicyDefinitions\EN-US)
4. If your domain has more than one domain controller, the new ADMX files will be replicated to them at the next domain replication interval.
### Scope
You will find the policies under "Administrative Templates/Microsoft PowerToys" in both the Computer Configuration and User Configuration folders. If both settings are configured, the setting in Computer Configuration takes precedence over the setting in User Configuration.
## Policies
### Configure enabled state
For each utility shipped with PowerToys, there's a "Configure enabled state" policy, which forces and Enabled state for the utility.
If you enable this setting, the utility will be always enabled and the user won't be able to disable it.
If you disable this setting, the utility will be always disabled and the user won't be able to enable it.
If you don't configure this setting, users are able to disable or enable the utility.

View File

@@ -0,0 +1,281 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyNamespaces>
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
<using prefix="windows" namespace="Microsoft.Policies.Windows" />
</policyNamespaces>
<resources minRequiredRevision="1.0"/>
<supportedOn>
<definitions>
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
</definitions>
</supportedOn>
<categories>
<category name="PowerToys" displayName="$(string.PowerToys)">
</category>
</categories>
<policies>
<policy name="ConfigureEnabledUtilityAlwaysOnTop" class="Both" displayName="$(string.ConfigureEnabledUtilityAlwaysOnTop)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityAlwaysOnTop">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityAwake" class="Both" displayName="$(string.ConfigureEnabledUtilityAwake)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityAwake">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityColorPicker" class="Both" displayName="$(string.ConfigureEnabledUtilityColorPicker)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityColorPicker">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFancyZones" class="Both" displayName="$(string.ConfigureEnabledUtilityFancyZones)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFancyZones">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerSVGPreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerSVGPreview)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerSVGPreview">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerMarkdownPreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerMarkdownPreview)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerMarkdownPreview">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerMonacoPreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerMonacoPreview)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerMonacoPreview">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerPDFPreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerPDFPreview)" explainText="$(string.ConfigureEnabledUtilityDescriptionPDFPreviewHandler)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerPDFPreview">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerGcodePreview" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerGcodePreview)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerGcodePreview">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerSVGThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerSVGThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerSVGThumbnails">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerPDFThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerPDFThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerPDFThumbnails">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerGcodeThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerGcodeThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerGcodeThumbnails">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFileExplorerSTLThumbnails" class="Both" displayName="$(string.ConfigureEnabledUtilityFileExplorerSTLThumbnails)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFileExplorerSTLThumbnails">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityHostsFileEditor" class="Both" displayName="$(string.ConfigureEnabledUtilityHostsFileEditor)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityHostsFileEditor">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityImageResizer" class="Both" displayName="$(string.ConfigureEnabledUtilityImageResizer)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityImageResizer">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityKeyboardManager" class="Both" displayName="$(string.ConfigureEnabledUtilityKeyboardManager)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityKeyboardManager">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityFindMyMouse" class="Both" displayName="$(string.ConfigureEnabledUtilityFindMyMouse)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityFindMyMouse">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityMouseHighlighter" class="Both" displayName="$(string.ConfigureEnabledUtilityMouseHighlighter)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityMouseHighlighter">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityMousePointerCrosshairs" class="Both" displayName="$(string.ConfigureEnabledUtilityMousePointerCrosshairs)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityMousePointerCrosshairs">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityPowerRename" class="Both" displayName="$(string.ConfigureEnabledUtilityPowerRename)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityPowerRename">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityPowerLauncher" class="Both" displayName="$(string.ConfigureEnabledUtilityPowerLauncher)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityPowerLauncher">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityQuickAccent" class="Both" displayName="$(string.ConfigureEnabledUtilityQuickAccent)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityQuickAccent">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityScreenRuler" class="Both" displayName="$(string.ConfigureEnabledUtilityScreenRuler)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityScreenRuler">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityShortcutGuide" class="Both" displayName="$(string.ConfigureEnabledUtilityShortcutGuide)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityShortcutGuide">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityTextExtractor" class="Both" displayName="$(string.ConfigureEnabledUtilityTextExtractor)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityTextExtractor">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
<policy name="ConfigureEnabledUtilityVideoConferenceMute" class="Both" displayName="$(string.ConfigureEnabledUtilityVideoConferenceMute)" explainText="$(string.ConfigureEnabledUtilityDescription)" key="Software\Policies\PowerToys" valueName="ConfigureEnabledUtilityVideoConferenceMute">
<parentCategory ref="PowerToys" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_64_0" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
</policies>
</policyDefinitions>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<displayName>PowerToys</displayName>
<description>PowerToys</description>
<resources>
<stringTable>
<string id="PowerToys">Microsoft PowerToys</string>
<string id="SUPPORTED_POWERTOYS_0_64_0">PowerToys version 0.64.0 or later</string>
<string id="ConfigureEnabledUtilityDescription">This policy configures the enabled state for a PowerToys utility.
If you enable this setting, the utility will be always enabled and the user won't be able to disable it.
If you disable this setting, the utility will be always disabled and the user won't be able to enable it.
If you don't configure this setting, users are able to disable or enable the utility.
</string>
<string id="ConfigureEnabledUtilityDescriptionPDFPreviewHandler">(Note: There have been reports of incompatibility between the PDF Preview Handler and Outlook)
This policy configures the enabled state for a PowerToys utility.
If you enable this setting, the utility will be always enabled and the user won't be able to disable it.
If you disable this setting, the utility will be always disabled and the user won't be able to enable it.
If you don't configure this setting, users are able to disable or enable the utility.
</string>
<string id="ConfigureEnabledUtilityAlwaysOnTop">Always On Top: Configure enabled state</string>
<string id="ConfigureEnabledUtilityAwake">Awake: Configure enabled state</string>
<string id="ConfigureEnabledUtilityColorPicker">Color Picker: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFancyZones">FancyZones: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerSVGPreview">SVG file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerMarkdownPreview">Markdown file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerMonacoPreview">Source code file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerPDFPreview">PDF file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerGcodePreview">Gcode file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerSVGThumbnails">SVG file thumbnail: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerPDFThumbnails">PDF file thumbnail: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerGcodeThumbnails">Gcode file thumbnail: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerSTLThumbnails">STL file thumbnail: Configure enabled state</string>
<string id="ConfigureEnabledUtilityHostsFileEditor">Hosts file editor: Configure enabled state</string>
<string id="ConfigureEnabledUtilityImageResizer">Image Resizer: Configure enabled state</string>
<string id="ConfigureEnabledUtilityKeyboardManager">Keyboard Manager: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFindMyMouse">Find My Mouse: Configure enabled state</string>
<string id="ConfigureEnabledUtilityMouseHighlighter">Mouse Highlighter: Configure enabled state</string>
<string id="ConfigureEnabledUtilityMousePointerCrosshairs">Mouse Pointer Crosshairs: Configure enabled state</string>
<string id="ConfigureEnabledUtilityPowerRename">Power Rename: Configure enabled state</string>
<string id="ConfigureEnabledUtilityPowerLauncher">PowerToys Run: Configure enabled state</string>
<string id="ConfigureEnabledUtilityQuickAccent">Quick Accent: Configure enabled state</string>
<string id="ConfigureEnabledUtilityScreenRuler">Screen Ruler: Configure enabled state</string>
<string id="ConfigureEnabledUtilityShortcutGuide">Shortcut Guide: Configure enabled state</string>
<string id="ConfigureEnabledUtilityTextExtractor">Text Extractor: Configure enabled state</string>
<string id="ConfigureEnabledUtilityVideoConferenceMute">Video Conference Mute: Configure enabled state</string>
</stringTable>
</resources>
</policyDefinitionResources>

View File

@@ -44,13 +44,13 @@
--> -->
<?define ShortcutGuideSvgsFiles=0.svg;1.svg;2.svg;3.svg;4.svg;5.svg;6.svg;7.svg;8.svg;9.svg;no_active_window.svg;overlay.svg;overlay_portrait.svg?> <?define ShortcutGuideSvgsFiles=0.svg;1.svg;2.svg;3.svg;4.svg;5.svg;6.svg;7.svg;8.svg;9.svg;no_active_window.svg;overlay.svg;overlay_portrait.svg?>
<?define FancyZonesFiles=PowerToys.FancyZonesModuleInterface.dll;PowerToys.FancyZonesEditor.dll;PowerToys.FancyZonesEditor.runtimeconfig.json;PowerToys.FancyZonesEditor.deps.json;PowerToys.FancyZonesEditor.exe;PowerToys.FancyZones.exe;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.dll;ModernWpf.Controls.dll;System.Text.Json.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.Common.UI.dll;PowerToys.ManagedTelemetry.dll;System.IO.Abstractions.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;Ijwhost.dll?> <?define FancyZonesFiles=PowerToys.FancyZonesModuleInterface.dll;PowerToys.FancyZonesEditor.dll;PowerToys.FancyZonesEditor.runtimeconfig.json;PowerToys.FancyZonesEditor.deps.json;PowerToys.FancyZonesEditor.exe;PowerToys.FancyZones.exe;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.dll;ModernWpf.Controls.dll;System.Text.Json.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.Common.UI.dll;PowerToys.ManagedTelemetry.dll;System.IO.Abstractions.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;Ijwhost.dll;PowerToys.GPOWrapper.dll;PowerToys.GPOWrapperProjection.dll?>
<?define ImageResizerFiles=ImageResizer.ico;PowerToys.ImageResizer.exe;PowerToys.ImageResizerExt.dll;PowerToys.ImageResizer.dll;PowerToys.ImageResizer.deps.json;PowerToys.ImageResizer.runtimeconfig.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Common.UI.dll;ControlzEx.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.Text.Json.dll;Microsoft.Xaml.Behaviors.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;Ijwhost.dll;ImageResizerContextMenuPackage.msix;PowerToys.ImageResizerContextMenu.dll ?> <?define ImageResizerFiles=ImageResizer.ico;PowerToys.ImageResizer.exe;PowerToys.ImageResizerExt.dll;PowerToys.ImageResizer.dll;PowerToys.ImageResizer.deps.json;PowerToys.ImageResizer.runtimeconfig.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Common.UI.dll;ControlzEx.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.Text.Json.dll;Microsoft.Xaml.Behaviors.dll;System.IO.Abstractions.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;Ijwhost.dll;ImageResizerContextMenuPackage.msix;PowerToys.ImageResizerContextMenu.dll;PowerToys.GPOWrapper.dll;PowerToys.GPOWrapperProjection.dll?>
<?define PowerPreviewFiles=PowerToys.powerpreview.dll;PowerToys.PreviewHandlerCommon.dll;PowerToys.PreviewHandlerCommon.deps.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.SvgPreviewHandler.dll;PowerToys.SvgPreviewHandler.comhost.dll;PowerToys.SvgPreviewHandler.runtimeconfig.json;PowerToys.SvgPreviewHandler.deps.json;PowerToys.SvgThumbnailProvider.dll;PowerToys.SvgThumbnailProvider.comhost.dll;PowerToys.SvgThumbnailProvider.runtimeconfig.json;PowerToys.SvgThumbnailProvider.deps.json;PowerToys.MarkdownPreviewHandler.dll;PowerToys.MarkdownPreviewHandler.comhost.dll;PowerToys.MarkdownPreviewHandler.runtimeconfig.json;PowerToys.MarkdownPreviewHandler.deps.json;Markdig.Signed.dll;HtmlAgilityPack.dll;System.IO.Abstractions.dll;monaco_languages.json;monacoSpecialLanguages.js;PowerToys.Common.UI.dll;PowerToys.Settings.UI.Lib.dll;PowerToys.MonacoPreviewHandler.dll;PowerToys.MonacoPreviewHandler.comhost.dll;PowerToys.MonacoPreviewHandler.runtimeconfig.json;PowerToys.MonacoPreviewHandler.deps.json;ControlzEx.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Web.WebView2.WinForms.dll;Microsoft.Web.WebView2.Wpf.dll;WebView2Loader.dll;System.Runtime.WindowsRuntime.dll;index.html;PowerToys.PdfPreviewHandler.dll;PowerToys.PdfPreviewHandler.comhost.dll;PowerToys.PdfPreviewHandler.runtimeconfig.json;PowerToys.PdfPreviewHandler.deps.json;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.PdfThumbnailProvider.dll;PowerToys.PdfThumbnailProvider.comhost.dll;PowerToys.PdfThumbnailProvider.runtimeconfig.json;PowerToys.PdfThumbnailProvider.deps.json;PowerToys.GcodePreviewHandler.dll;PowerToys.GcodePreviewHandler.comhost.dll;PowerToys.GcodePreviewHandler.runtimeconfig.json;PowerToys.GcodePreviewHandler.deps.json;PowerToys.GcodeThumbnailProvider.dll;PowerToys.GcodeThumbnailProvider.comhost.dll;PowerToys.GcodeThumbnailProvider.runtimeconfig.json;PowerToys.GcodeThumbnailProvider.deps.json;PowerToys.StlThumbnailProvider.dll;PowerToys.StlThumbnailProvider.comhost.dll;PowerToys.StlThumbnailProvider.runtimeconfig.json;PowerToys.StlThumbnailProvider.deps.json;HelixToolkit.dll;HelixToolkit.Core.Wpf.dll;Ijwhost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll?> <?define PowerPreviewFiles=PowerToys.powerpreview.dll;PowerToys.PreviewHandlerCommon.dll;PowerToys.PreviewHandlerCommon.deps.json;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.SvgPreviewHandler.dll;PowerToys.SvgPreviewHandler.comhost.dll;PowerToys.SvgPreviewHandler.runtimeconfig.json;PowerToys.SvgPreviewHandler.deps.json;PowerToys.SvgThumbnailProvider.dll;PowerToys.SvgThumbnailProvider.comhost.dll;PowerToys.SvgThumbnailProvider.runtimeconfig.json;PowerToys.SvgThumbnailProvider.deps.json;PowerToys.MarkdownPreviewHandler.dll;PowerToys.MarkdownPreviewHandler.comhost.dll;PowerToys.MarkdownPreviewHandler.runtimeconfig.json;PowerToys.MarkdownPreviewHandler.deps.json;Markdig.Signed.dll;HtmlAgilityPack.dll;System.IO.Abstractions.dll;monaco_languages.json;monacoSpecialLanguages.js;PowerToys.Common.UI.dll;PowerToys.Settings.UI.Lib.dll;PowerToys.MonacoPreviewHandler.dll;PowerToys.MonacoPreviewHandler.comhost.dll;PowerToys.MonacoPreviewHandler.runtimeconfig.json;PowerToys.MonacoPreviewHandler.deps.json;ControlzEx.dll;Microsoft.Web.WebView2.Core.dll;Microsoft.Web.WebView2.WinForms.dll;Microsoft.Web.WebView2.Wpf.dll;WebView2Loader.dll;System.Runtime.WindowsRuntime.dll;index.html;PowerToys.PdfPreviewHandler.dll;PowerToys.PdfPreviewHandler.comhost.dll;PowerToys.PdfPreviewHandler.runtimeconfig.json;PowerToys.PdfPreviewHandler.deps.json;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.PdfThumbnailProvider.dll;PowerToys.PdfThumbnailProvider.comhost.dll;PowerToys.PdfThumbnailProvider.runtimeconfig.json;PowerToys.PdfThumbnailProvider.deps.json;PowerToys.GcodePreviewHandler.dll;PowerToys.GcodePreviewHandler.comhost.dll;PowerToys.GcodePreviewHandler.runtimeconfig.json;PowerToys.GcodePreviewHandler.deps.json;PowerToys.GcodeThumbnailProvider.dll;PowerToys.GcodeThumbnailProvider.comhost.dll;PowerToys.GcodeThumbnailProvider.runtimeconfig.json;PowerToys.GcodeThumbnailProvider.deps.json;PowerToys.StlThumbnailProvider.dll;PowerToys.StlThumbnailProvider.comhost.dll;PowerToys.StlThumbnailProvider.runtimeconfig.json;PowerToys.StlThumbnailProvider.deps.json;HelixToolkit.dll;HelixToolkit.Core.Wpf.dll;Ijwhost.dll;Microsoft.Xaml.Behaviors.dll;System.Text.Json.dll;PowerToys.GPOWrapper.dll?>
<?define SettingsV2Files=backup_restore_settings.json;Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.CodeDom.dll;System.IO.Abstractions.dll;System.Text.Json.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;System.Management.dll?> <?define SettingsV2Files=backup_restore_settings.json;Ijwhost.dll;ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;icon.ico;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.deps.json;PowerToys.Settings.dll;PowerToys.Settings.exe;PowerToys.Settings.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;resources.pri;System.CodeDom.dll;System.IO.Abstractions.dll;System.Text.Json.dll;WinRT.Runtime.dll;Microsoft.Graphics.Canvas.dll;System.Management.dll;PowerToys.GPOWrapper.dll?>
<?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?> <?define SettingsV2AssetsModulesFiles=ColorPicker.png;FancyZones.png;AlwaysOnTop.png;Awake.png;ImageResizer.png;KBM.png;MouseUtils.png;PowerAccent.png;PowerOCR.png;PowerLauncher.png;PowerPreview.png;PowerRename.png;PT.png;ScreenRuler.png;ShortcutGuide.png;VideoConference.png?>
@@ -120,9 +120,9 @@
<?define ImageResizerSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?> <?define ImageResizerSparsePackageAssets=LargeTile.png;SmallTile.png;SplashScreen.png;Square150x150Logo.png;Square44x44Logo.png;storelogo.png;Wide310x150Logo.png?>
<?define MeasureToolFiles=Ijwhost.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.MeasureToolCore.dll;PowerToys.MeasureToolUI.deps.json;PowerToys.MeasureToolUI.dll;PowerToys.MeasureToolUI.exe;PowerToys.MeasureToolUI.runtimeconfig.json;resources.pri;System.CodeDom.dll;System.Management.dll;WinRT.Runtime.dll;WinUIEx.dll?> <?define MeasureToolFiles=Ijwhost.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.MeasureToolCore.dll;PowerToys.MeasureToolUI.deps.json;PowerToys.MeasureToolUI.dll;PowerToys.MeasureToolUI.exe;PowerToys.MeasureToolUI.runtimeconfig.json;resources.pri;System.CodeDom.dll;System.Management.dll;WinRT.Runtime.dll;WinUIEx.dll;PowerToys.GPOWrapper.dll?>
<?define HostsFiles=ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Mvvm.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.CommandLine.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.Configuration.EnvironmentVariables.dll;Microsoft.Extensions.Configuration.FileExtensions.dll;Microsoft.Extensions.Configuration.Json.dll;Microsoft.Extensions.Configuration.UserSecrets.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.FileProviders.Abstractions.dll;Microsoft.Extensions.FileProviders.Physical.dll;Microsoft.Extensions.FileSystemGlobbing.dll;Microsoft.Extensions.Hosting.Abstractions.dll;Microsoft.Extensions.Hosting.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.Configuration.dll;Microsoft.Extensions.Logging.Console.dll;Microsoft.Extensions.Logging.Debug.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Logging.EventLog.dll;Microsoft.Extensions.Logging.EventSource.dll;Microsoft.Extensions.Options.ConfigurationExtensions.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Behaviors.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.Common.UI.dll;PowerToys.Hosts.deps.json;PowerToys.Hosts.dll;PowerToys.Hosts.exe;PowerToys.Hosts.runtimeconfig.json;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;resources.pri;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;WinRT.Runtime.dll;WinUIEx.dll?> <?define HostsFiles=ColorCode.Core.dll;ColorCode.WinUI.dll;CommunityToolkit.Common.dll;CommunityToolkit.Mvvm.dll;CommunityToolkit.WinUI.dll;CommunityToolkit.WinUI.UI.Controls.Core.dll;CommunityToolkit.WinUI.UI.Controls.DataGrid.dll;CommunityToolkit.WinUI.UI.Controls.Input.dll;CommunityToolkit.WinUI.UI.Controls.Layout.dll;CommunityToolkit.WinUI.UI.Controls.Markdown.dll;CommunityToolkit.WinUI.UI.Controls.Media.dll;CommunityToolkit.WinUI.UI.Controls.Primitives.dll;CommunityToolkit.WinUI.UI.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.Configuration.Binder.dll;Microsoft.Extensions.Configuration.CommandLine.dll;Microsoft.Extensions.Configuration.dll;Microsoft.Extensions.Configuration.EnvironmentVariables.dll;Microsoft.Extensions.Configuration.FileExtensions.dll;Microsoft.Extensions.Configuration.Json.dll;Microsoft.Extensions.Configuration.UserSecrets.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.FileProviders.Abstractions.dll;Microsoft.Extensions.FileProviders.Physical.dll;Microsoft.Extensions.FileSystemGlobbing.dll;Microsoft.Extensions.Hosting.Abstractions.dll;Microsoft.Extensions.Hosting.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.Configuration.dll;Microsoft.Extensions.Logging.Console.dll;Microsoft.Extensions.Logging.Debug.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Logging.EventLog.dll;Microsoft.Extensions.Logging.EventSource.dll;Microsoft.Extensions.Options.ConfigurationExtensions.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;Microsoft.Graphics.Canvas.Interop.dll;Microsoft.InteractiveExperiences.Projection.dll;Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll;Microsoft.Windows.ApplicationModel.Resources.Projection.dll;Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll;Microsoft.Windows.AppLifecycle.Projection.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Windows.System.Power.Projection.dll;Microsoft.WindowsAppRuntime.Bootstrap.Net.dll;Microsoft.WinUI.dll;Microsoft.Xaml.Behaviors.dll;Microsoft.Xaml.Interactions.dll;Microsoft.Xaml.Interactivity.dll;PowerToys.Common.UI.dll;PowerToys.Hosts.deps.json;PowerToys.Hosts.dll;PowerToys.Hosts.exe;PowerToys.Hosts.runtimeconfig.json;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;resources.pri;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;WinRT.Runtime.dll;WinUIEx.dll;PowerToys.GPOWrapper.dll?>
<?define PowerRenameMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?> <?define PowerRenameMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
@@ -134,7 +134,7 @@
<?define HostsMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?> <?define HostsMicrosoftUIXamlAssetsInstallFiles=NoiseAsset_256x256_PNG.png?>
<?define PowerAccentFiles=ControlzEx.dll;GongSolutions.WPF.DragDrop.dll;Ijwhost.dll;MahApps.Metro.dll;Microsoft.Xaml.Behaviors.dll;PowerAccent.Core.dll;PowerAccent.deps.json;PowerAccent.dll;PowerAccent.exe;PowerAccent.runtimeconfig.json;PowerToys.PowerAccentModuleInterface.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerAccent.deps.json;PowerToys.PowerAccent.dll;PowerToys.PowerAccent.exe;PowerToys.PowerAccent.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;Vanara.Core.dll;Vanara.PInvoke.ComCtl32.dll;Vanara.PInvoke.Cryptography.dll;Vanara.PInvoke.Gdi32.dll;Vanara.PInvoke.Kernel32.dll;Vanara.PInvoke.Ole.dll;Vanara.PInvoke.Rpc.dll;Vanara.PInvoke.Security.dll;Vanara.PInvoke.Shared.dll;Vanara.PInvoke.Shell32.dll;Vanara.PInvoke.ShlwApi.dll;Vanara.PInvoke.User32.dll;PowerToys.PowerAccentKeyboardService.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll?> <?define PowerAccentFiles=ControlzEx.dll;GongSolutions.WPF.DragDrop.dll;Ijwhost.dll;MahApps.Metro.dll;Microsoft.Xaml.Behaviors.dll;PowerAccent.Core.dll;PowerAccent.deps.json;PowerAccent.dll;PowerAccent.exe;PowerAccent.runtimeconfig.json;PowerToys.PowerAccentModuleInterface.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerAccent.deps.json;PowerToys.PowerAccent.dll;PowerToys.PowerAccent.exe;PowerToys.PowerAccent.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;Vanara.Core.dll;Vanara.PInvoke.ComCtl32.dll;Vanara.PInvoke.Cryptography.dll;Vanara.PInvoke.Gdi32.dll;Vanara.PInvoke.Kernel32.dll;Vanara.PInvoke.Ole.dll;Vanara.PInvoke.Rpc.dll;Vanara.PInvoke.Security.dll;Vanara.PInvoke.Shared.dll;Vanara.PInvoke.Shell32.dll;Vanara.PInvoke.ShlwApi.dll;Vanara.PInvoke.User32.dll;PowerToys.PowerAccentKeyboardService.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.GPOWrapper.dll?>
<Product Id="*" <Product Id="*"
Name="PowerToys (Preview)" Name="PowerToys (Preview)"
@@ -1002,8 +1002,8 @@
<!-- Color Picker --> <!-- Color Picker -->
<DirectoryRef Id="ColorPickerInstallFolder" FileSource="$(var.BinDir)modules\$(var.ColorPickerProjectName)"> <DirectoryRef Id="ColorPickerInstallFolder" FileSource="$(var.BinDir)modules\$(var.ColorPickerProjectName)">
<!-- !Warning! Make sure to change Component Guid if you update the file list --> <!-- !Warning! Make sure to change Component Guid if you update the file list -->
<Component Id="Module_ColorPicker" Guid="C15076EC-70EE-4CE9-BEA0-665B1EECCAAF" Win64="yes"> <Component Id="Module_ColorPicker" Guid="FA5A6BBA-D3C2-44D8-AF15-ED13FCA508A6" Win64="yes">
<?foreach File in PowerToys.ColorPicker.dll;System.IO.Abstractions.dll;PowerToys.ColorPickerUI.exe;PowerToys.ColorPickerUI.dll;PowerToys.ColorPickerUI.deps.json;PowerToys.ColorPickerUI.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;PowerToys.ManagedTelemetry.dll;PowerToys.ManagedCommon.dll;System.Management.dll;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.ComponentModel.Composition.dll;PowerToys.Common.UI.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Text.Json.dll;Ijwhost.dll?> <?foreach File in PowerToys.ColorPicker.dll;System.IO.Abstractions.dll;PowerToys.ColorPickerUI.exe;PowerToys.ColorPickerUI.dll;PowerToys.ColorPickerUI.deps.json;PowerToys.ColorPickerUI.runtimeconfig.json;PowerToys.Settings.UI.Lib.dll;PowerToys.ManagedTelemetry.dll;PowerToys.ManagedCommon.dll;System.Management.dll;ControlzEx.dll;Microsoft.Xaml.Behaviors.dll;ModernWpf.Controls.dll;ModernWpf.dll;System.ComponentModel.Composition.dll;PowerToys.Common.UI.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Text.Json.dll;Ijwhost.dll;PowerToys.GPOWrapper.dll;PowerToys.GPOWrapperProjection.dll?>
<File Id="ColorPickerFile_$(var.File)" Source="$(var.BinDir)modules\$(var.ColorPickerProjectName)\$(var.File)" /> <File Id="ColorPickerFile_$(var.File)" Source="$(var.BinDir)modules\$(var.ColorPickerProjectName)\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
@@ -1022,8 +1022,8 @@
<!-- PowerOCR Resources --> <!-- PowerOCR Resources -->
<DirectoryRef Id="PowerOCRInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerOCRProjectName)"> <DirectoryRef Id="PowerOCRInstallFolder" FileSource="$(var.BinDir)modules\$(var.PowerOCRProjectName)">
<!-- !Warning! Make sure to change Component Guid if you update the file list --> <!-- !Warning! Make sure to change Component Guid if you update the file list -->
<Component Id="Module_PowerOCR" Guid="5640A7E8-E165-4368-8F08-F8E1E9242BDD" Win64="yes"> <Component Id="Module_PowerOCR" Guid="47A7A947-0677-45A4-973A-322B4CEFA57C" Win64="yes">
<?foreach File in PowerToys.PowerOCR.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Common.UI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerOCR.deps.json;PowerToys.PowerOCR.exe;PowerToys.PowerOCR.runtimeconfig.json;PowerToys.PowerOCRModuleInterface.dll;PowerToys.Settings.UI.Lib.dll;System.ComponentModel.Composition.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;WinRT.Runtime.dll?> <?foreach File in PowerToys.PowerOCR.dll;ControlzEx.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;Microsoft.Xaml.Behaviors.dll;PowerToys.Common.UI.dll;PowerToys.ManagedCommon.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerOCR.deps.json;PowerToys.PowerOCR.exe;PowerToys.PowerOCR.runtimeconfig.json;PowerToys.PowerOCRModuleInterface.dll;PowerToys.Settings.UI.Lib.dll;System.ComponentModel.Composition.dll;System.IO.Abstractions.dll;System.Management.dll;System.Text.Json.dll;WinRT.Runtime.dll;PowerToys.GPOWrapper.dll;PowerToys.GPOWrapperProjection.dll?>
<File Id="PowerOCRFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerOCRProjectName)\$(var.File)" /> <File Id="PowerOCRFile_$(var.File)" Source="$(var.BinDir)modules\$(var.PowerOCRProjectName)\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
@@ -1032,8 +1032,8 @@
<!-- Awake --> <!-- Awake -->
<DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinDir)modules\$(var.AwakeProjectName)"> <DirectoryRef Id="AwakeInstallFolder" FileSource="$(var.BinDir)modules\$(var.AwakeProjectName)">
<!-- !Warning! Make sure to change Component Guid if you update the file list --> <!-- !Warning! Make sure to change Component Guid if you update the file list -->
<Component Id="Module_Awake" Guid="0D571D9A-743B-4CC5-9297-F0289FBE3398" Win64="yes"> <Component Id="Module_Awake" Guid="B82D4206-0B68-418A-B1DB-4DF1361FC065" Win64="yes">
<?foreach File in PowerToys.AwakeModuleInterface.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;NLog.config;NLog.dll;PowerToys.Awake.deps.json;PowerToys.Awake.dll;PowerToys.Awake.exe;PowerToys.Awake.runtimeconfig.json;System.CommandLine.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Text.Json.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll?> <?foreach File in PowerToys.AwakeModuleInterface.dll;PowerToys.ManagedCommon.dll;System.Management.dll;PowerToys.ManagedTelemetry.dll;PowerToys.Settings.UI.Lib.dll;NLog.config;NLog.dll;PowerToys.Awake.deps.json;PowerToys.Awake.dll;PowerToys.Awake.exe;PowerToys.Awake.runtimeconfig.json;System.CommandLine.dll;System.IO.Abstractions.dll;System.Reactive.dll;System.Runtime.Caching.dll;System.Text.Json.dll;Ijwhost.dll;Microsoft.Windows.SDK.NET.dll;WinRT.Runtime.dll;PowerToys.GPOWrapper.dll?>
<File Id="AwakeFile_$(var.File)" Source="$(var.BinDir)modules\$(var.AwakeProjectName)\$(var.File)" /> <File Id="AwakeFile_$(var.File)" Source="$(var.BinDir)modules\$(var.AwakeProjectName)\$(var.File)" />
<?endforeach?> <?endforeach?>
</Component> </Component>
@@ -1991,9 +1991,9 @@
</Component> </Component>
<!-- !Warning! Make sure to change Component Guid if you update the file list --> <!-- !Warning! Make sure to change Component Guid if you update the file list -->
<Component Id="launcherInstallComponent" Guid="ab0d0567-1e41-4da4-9934-dcb74b7048a4" Directory="LauncherInstallFolder" > <Component Id="launcherInstallComponent" Guid="7362E89D-0FC8-4536-940F-F0FDF5735C39" Directory="LauncherInstallFolder" >
<File Source="$(var.BinDir)modules\Launcher\PowerToys.Launcher.dll" /> <File Source="$(var.BinDir)modules\Launcher\PowerToys.Launcher.dll" />
<?foreach File in e_sqlite3.dll;JetBrains.Annotations.dll;Mages.Core.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;NLog.dll;NLog.Extensions.Logging.dll;PowerToys.PowerLauncher.deps.json;PowerToys.PowerLauncher.dll;PowerToys.PowerLauncher.exe;Microsoft.Xaml.Behaviors.dll;PowerToys.PowerLauncher.runtimeconfig.json;System.Data.OleDb.dll;UnitsNet.dll;vcamp140_app.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerLauncher.Telemetry.dll;Microsoft.Data.Sqlite.dll;SQLitePCLRaw.batteries_v2.dll;SQLitePCLRaw.core.dll;SQLitePCLRaw.provider.e_sqlite3.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;ControlzEx.dll;PowerToys.ManagedCommon.dll;System.Management.dll;System.IO.Abstractions.dll;PowerToys.Common.UI.dll;System.ServiceProcess.ServiceController.dll;Microsoft.Toolkit.Uwp.Notifications.dll;ModernWpf.Controls.dll;ModernWpf.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Reactive.dll;System.Text.Json.dll;Ijwhost.dll;ScipBe.Common.Office.OneNote.dll;Interop.Microsoft.Office.Interop.OneNote.dll;LazyCache.dll;Microsoft.Extensions.Caching.Abstractions.dll;Microsoft.Extensions.Caching.Memory.dll?> <?foreach File in e_sqlite3.dll;JetBrains.Annotations.dll;Mages.Core.dll;Mono.Cecil.dll;Mono.Cecil.Mdb.dll;Mono.Cecil.Pdb.dll;Mono.Cecil.Rocks.dll;NLog.dll;NLog.Extensions.Logging.dll;PowerToys.PowerLauncher.deps.json;PowerToys.PowerLauncher.dll;PowerToys.PowerLauncher.exe;Microsoft.Xaml.Behaviors.dll;PowerToys.PowerLauncher.runtimeconfig.json;System.Data.OleDb.dll;UnitsNet.dll;vcamp140_app.dll;Wox.Infrastructure.dll;Wox.Plugin.dll;PowerToys.ManagedTelemetry.dll;PowerToys.PowerLauncher.Telemetry.dll;Microsoft.Data.Sqlite.dll;SQLitePCLRaw.batteries_v2.dll;SQLitePCLRaw.core.dll;SQLitePCLRaw.provider.e_sqlite3.dll;Microsoft.Extensions.Configuration.Abstractions.dll;Microsoft.Extensions.DependencyInjection.Abstractions.dll;Microsoft.Extensions.DependencyInjection.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.dll;Microsoft.Extensions.Options.dll;Microsoft.Extensions.Primitives.dll;ControlzEx.dll;PowerToys.ManagedCommon.dll;System.Management.dll;System.IO.Abstractions.dll;PowerToys.Common.UI.dll;System.ServiceProcess.ServiceController.dll;Microsoft.Toolkit.Uwp.Notifications.dll;ModernWpf.Controls.dll;ModernWpf.dll;WinRT.Runtime.dll;Microsoft.Windows.SDK.NET.dll;System.Reactive.dll;System.Text.Json.dll;Ijwhost.dll;ScipBe.Common.Office.OneNote.dll;Interop.Microsoft.Office.Interop.OneNote.dll;LazyCache.dll;Microsoft.Extensions.Caching.Abstractions.dll;Microsoft.Extensions.Caching.Memory.dll;PowerToys.GPOWrapper.dll;PowerToys.GPOWrapperProjection.dll?>
<File Id="File_$(var.File)" Source="$(var.BinDir)modules\launcher\$(var.File)" /> <File Id="File_$(var.File)" Source="$(var.BinDir)modules\launcher\$(var.File)" />
<?endforeach?> <?endforeach?>
<File Source="$(var.BinDir)Settings\PowerToys.Settings.UI.Lib.dll" /> <File Source="$(var.BinDir)Settings\PowerToys.Settings.UI.Lib.dll" />

View File

@@ -0,0 +1,111 @@
#include "pch.h"
#include "GPOWrapper.h"
#include "GPOWrapper.g.cpp"
namespace winrt::PowerToys::GPOWrapper::implementation
{
GpoRuleConfigured GPOWrapper::GetConfiguredAlwaysOnTopEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredAlwaysOnTopEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredAwakeEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredAwakeEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredColorPickerEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredColorPickerEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredFancyZonesEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredFancyZonesEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredSvgPreviewEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredSvgPreviewEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredMarkdownPreviewEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredMarkdownPreviewEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredMonacoPreviewEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredMonacoPreviewEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredPdfPreviewEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredPdfPreviewEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredGcodePreviewEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredGcodePreviewEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredSvgThumbnailsEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredSvgThumbnailsEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredPdfThumbnailsEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredPdfThumbnailsEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredGcodeThumbnailsEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredGcodeThumbnailsEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredStlThumbnailsEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredStlThumbnailsEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredHostsFileEditorEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredHostsFileEditorEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredImageResizerEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredImageResizerEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredKeyboardManagerEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredKeyboardManagerEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredFindMyMouseEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredFindMyMouseEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredMouseHighlighterEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredMouseHightlighterEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredMousePointerCrosshairsEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredMousePointerCrosshairsEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredPowerRenameEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredPowerRenameEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredPowerLauncherEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredPowerLauncherEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredQuickAccentEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredQuickAccentEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredScreenRulerEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredScreenRulerEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredShortcutGuideEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredShortcutGuideEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredTextExtractorEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredTextExtractorEnabledValue();
}
GpoRuleConfigured GPOWrapper::GetConfiguredVideoConferenceMuteEnabledValue()
{
return (GpoRuleConfigured)powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue();
}
}

View File

@@ -0,0 +1,3 @@
EXPORTS
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE

View File

@@ -0,0 +1,44 @@
#pragma once
#include "GPOWrapper.g.h"
#include <common/utils/gpo.h>
namespace winrt::PowerToys::GPOWrapper::implementation
{
struct GPOWrapper : GPOWrapperT<GPOWrapper>
{
GPOWrapper() = default;
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
static GpoRuleConfigured GetConfiguredSvgPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredMarkdownPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredMonacoPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredPdfPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredGcodePreviewEnabledValue();
static GpoRuleConfigured GetConfiguredSvgThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredPdfThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredGcodeThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredStlThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredHostsFileEditorEnabledValue();
static GpoRuleConfigured GetConfiguredImageResizerEnabledValue();
static GpoRuleConfigured GetConfiguredKeyboardManagerEnabledValue();
static GpoRuleConfigured GetConfiguredFindMyMouseEnabledValue();
static GpoRuleConfigured GetConfiguredMouseHighlighterEnabledValue();
static GpoRuleConfigured GetConfiguredMousePointerCrosshairsEnabledValue();
static GpoRuleConfigured GetConfiguredPowerRenameEnabledValue();
static GpoRuleConfigured GetConfiguredPowerLauncherEnabledValue();
static GpoRuleConfigured GetConfiguredQuickAccentEnabledValue();
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
};
}
namespace winrt::PowerToys::GPOWrapper::factory_implementation
{
struct GPOWrapper : GPOWrapperT<GPOWrapper, implementation::GPOWrapper>
{
};
}

View File

@@ -0,0 +1,42 @@
namespace PowerToys
{
namespace GPOWrapper
{
enum GpoRuleConfigured
{
WrongValue = -3,
Unavailable = -2,
NotConfigured = -1,
Disabled = 0,
Enabled = 1
};
[default_interface] static runtimeclass GPOWrapper {
static GpoRuleConfigured GetConfiguredAlwaysOnTopEnabledValue();
static GpoRuleConfigured GetConfiguredAwakeEnabledValue();
static GpoRuleConfigured GetConfiguredColorPickerEnabledValue();
static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue();
static GpoRuleConfigured GetConfiguredSvgPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredMarkdownPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredMonacoPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredPdfPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredGcodePreviewEnabledValue();
static GpoRuleConfigured GetConfiguredSvgThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredPdfThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredGcodeThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredStlThumbnailsEnabledValue();
static GpoRuleConfigured GetConfiguredHostsFileEditorEnabledValue();
static GpoRuleConfigured GetConfiguredImageResizerEnabledValue();
static GpoRuleConfigured GetConfiguredKeyboardManagerEnabledValue();
static GpoRuleConfigured GetConfiguredFindMyMouseEnabledValue();
static GpoRuleConfigured GetConfiguredMouseHighlighterEnabledValue();
static GpoRuleConfigured GetConfiguredMousePointerCrosshairsEnabledValue();
static GpoRuleConfigured GetConfiguredPowerRenameEnabledValue();
static GpoRuleConfigured GetConfiguredPowerLauncherEnabledValue();
static GpoRuleConfigured GetConfiguredQuickAccentEnabledValue();
static GpoRuleConfigured GetConfiguredScreenRulerEnabledValue();
static GpoRuleConfigured GetConfiguredShortcutGuideEnabledValue();
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
}
}
}

View File

@@ -0,0 +1,40 @@
#include <windows.h>
#include "resource.h"
#include "../../../common/version/version.h"
#define APSTUDIO_READONLY_SYMBOLS
#include "winres.h"
#undef APSTUDIO_READONLY_SYMBOLS
1 VERSIONINFO
FILEVERSION FILE_VERSION
PRODUCTVERSION PRODUCT_VERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset
BEGIN
VALUE "CompanyName", COMPANY_NAME
VALUE "FileDescription", FILE_DESCRIPTION
VALUE "FileVersion", FILE_VERSION_STRING
VALUE "InternalName", INTERNAL_NAME
VALUE "LegalCopyright", COPYRIGHT_NOTE
VALUE "OriginalFilename", ORIGINAL_FILENAME
VALUE "ProductName", PRODUCT_NAME
VALUE "ProductVersion", PRODUCT_VERSION_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset
END
END

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
<MinimalCoreWin>true</MinimalCoreWin>
<ProjectGuid>{e599c30b-9dc8-4e5a-bf27-93d4ccede788}</ProjectGuid>
<ProjectName>GPOWrapper</ProjectName>
<RootNamespace>PowerToys.GPOWrapper</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>false</AppContainerApplication>
<AppxPackage>false</AppxPackage>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.20348.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<GenerateManifest>false</GenerateManifest>
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="PropertySheet.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<TargetName>PowerToys.GPOWrapper</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
<WarningLevel>Level4</WarningLevel>
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
<PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<ModuleDefinitionFile>GPOWrapper.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="GPOWrapper.h">
<DependentUpon>GPOWrapper.idl</DependentUpon>
</ClInclude>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="GPOWrapper.cpp">
<DependentUpon>GPOWrapper.idl</DependentUpon>
</ClCompile>
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<Midl Include="GPOWrapper.idl" />
</ItemGroup>
<ItemGroup>
<None Include="GPOWrapper.def" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="PropertySheet.props" />
<Text Include="readme.txt">
<DeploymentContent>false</DeploymentContent>
</Text>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="GPOWrapper.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Windows.CppWinRT.2.0.220929.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
</Target>
</Project>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resources">
<UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{926ab91d-31b4-48c3-b9a4-e681349f27f0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp" />
<ClCompile Include="GPOWrapper.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<Midl Include="GPOWrapper.idl" />
</ItemGroup>
<ItemGroup>
<None Include="GPOWrapper.def" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="PropertySheet.props" />
</ItemGroup>
<ItemGroup>
<Text Include="readme.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="GPOWrapper.rc">
<Filter>Resources</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<!--
To customize common C++/WinRT project properties:
* right-click the project node
* expand the Common Properties item
* select the C++/WinRT property page
For more advanced scenarios, and complete documentation, please see:
https://github.com/Microsoft/cppwinrt/tree/master/nuget
-->
<PropertyGroup />
<ItemDefinitionGroup />
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.220929.3" targetFramework="native" />
</packages>

View File

@@ -0,0 +1 @@
#include "pch.h"

View File

@@ -0,0 +1,4 @@
#pragma once
#include <unknwn.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Foundation.Collections.h>

View File

@@ -0,0 +1,13 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by PowerToys.MeasureToolCore.rc
//////////////////////////////
// Non-localizable
#define FILE_DESCRIPTION "PowerToys GPOWrapper"
#define INTERNAL_NAME "PowerToys.GPOWrapper"
#define ORIGINAL_FILENAME "PowerToys.GPOWrapper.dll"
// Non-localizable
//////////////////////////////

View File

@@ -0,0 +1,45 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace PowerToys.GPOWrapperProjection
{
public enum GpoRuleConfigured : int
{
WrongValue = PowerToys.GPOWrapper.GpoRuleConfigured.WrongValue,
Unavailable = PowerToys.GPOWrapper.GpoRuleConfigured.Unavailable,
NotConfigured = PowerToys.GPOWrapper.GpoRuleConfigured.NotConfigured,
Disabled = PowerToys.GPOWrapper.GpoRuleConfigured.Disabled,
Enabled = PowerToys.GPOWrapper.GpoRuleConfigured.Enabled,
}
// Some WPF applications have trouble consuming WinRT/C++ projections, because WPF makes an intermediary _wpftmp.csproj which doesn't build projections correctly on MSBUILD.
// This is a workaround to give access to GPOWrapper for WPF applications.
public static class GPOWrapper
{
public static GpoRuleConfigured GetConfiguredPowerLauncherEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPowerLauncherEnabledValue();
}
public static GpoRuleConfigured GetConfiguredFancyZonesEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredFancyZonesEnabledValue();
}
public static GpoRuleConfigured GetConfiguredColorPickerEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredColorPickerEnabledValue();
}
public static GpoRuleConfigured GetConfiguredImageResizerEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredImageResizerEnabledValue();
}
public static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue()
{
return (GpoRuleConfigured)PowerToys.GPOWrapper.GPOWrapper.GetConfiguredTextExtractorEnabledValue();
}
}
}

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" />
<PropertyGroup>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TargetName>PowerToys.GPOWrapperProjection</TargetName>
<RootNamespace>PowerToys.GPOWrapperProjection</RootNamespace>
<AssemblyName>PowerToys.GPOWrapperProjection</AssemblyName>
</PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GPOWrapper\GPOWrapper.vcxproj">
</ProjectReference>
</ItemGroup>
</Project>

232
src/common/utils/gpo.h Normal file
View File

@@ -0,0 +1,232 @@
#pragma once
#include <Windows.h>
namespace powertoys_gpo {
enum gpo_rule_configured_t {
gpo_rule_configured_wrong_value = -3, // The policy is set to an unrecognized value
gpo_rule_configured_unavailable = -2, // Couldn't access registry
gpo_rule_configured_not_configured = -1, // Policy is not configured
gpo_rule_configured_disabled = 0, // Policy is disabled
gpo_rule_configured_enabled = 1, // Policy is enabled
};
// Registry path where gpo policy values are stored.
const std::wstring POLICIES_PATH = L"SOFTWARE\\Policies\\PowerToys";
// Registry scope where gpo policy values are stored.
const HKEY POLICIES_SCOPE_MACHINE = HKEY_LOCAL_MACHINE;
const HKEY POLICIES_SCOPE_USER = HKEY_CURRENT_USER;
// The registry value names for PowerToys utilities enabled and disabled policies.
const std::wstring POLICY_CONFIGURE_ENABLED_ALWAYS_ON_TOP = L"ConfigureEnabledUtilityAlwaysOnTop";
const std::wstring POLICY_CONFIGURE_ENABLED_AWAKE = L"ConfigureEnabledUtilityAwake";
const std::wstring POLICY_CONFIGURE_ENABLED_COLOR_PICKER = L"ConfigureEnabledUtilityColorPicker";
const std::wstring POLICY_CONFIGURE_ENABLED_FANCYZONES = L"ConfigureEnabledUtilityFancyZones";
const std::wstring POLICY_CONFIGURE_ENABLED_SVG_PREVIEW = L"ConfigureEnabledUtilityFileExplorerSVGPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_MARKDOWN_PREVIEW = L"ConfigureEnabledUtilityFileExplorerMarkdownPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_MONACO_PREVIEW = L"ConfigureEnabledUtilityFileExplorerMonacoPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_PDF_PREVIEW = L"ConfigureEnabledUtilityFileExplorerPDFPreview";
const std::wstring POLICY_CONFIGURE_ENABLED_GCODE_PREVIEW = L"ConfigureEnabledUtilityFileExplorerGcodePreview";
const std::wstring POLICY_CONFIGURE_ENABLED_SVG_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerSVGThumbnails";
const std::wstring POLICY_CONFIGURE_ENABLED_PDF_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerPDFThumbnails";
const std::wstring POLICY_CONFIGURE_ENABLED_GCODE_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerGcodeThumbnails";
const std::wstring POLICY_CONFIGURE_ENABLED_STL_THUMBNAILS = L"ConfigureEnabledUtilityFileExplorerSTLThumbnails";
const std::wstring POLICY_CONFIGURE_ENABLED_HOSTS_FILE_EDITOR = L"ConfigureEnabledUtilityHostsFileEditor";
const std::wstring POLICY_CONFIGURE_ENABLED_IMAGE_RESIZER = L"ConfigureEnabledUtilityImageResizer";
const std::wstring POLICY_CONFIGURE_ENABLED_KEYBOARD_MANAGER = L"ConfigureEnabledUtilityKeyboardManager";
const std::wstring POLICY_CONFIGURE_ENABLED_FIND_MY_MOUSE = L"ConfigureEnabledUtilityFindMyMouse";
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_HIGHLIGHTER = L"ConfigureEnabledUtilityMouseHighlighter";
const std::wstring POLICY_CONFIGURE_ENABLED_MOUSE_POINTER_CROSSHAIRS = L"ConfigureEnabledUtilityMousePointerCrosshairs";
const std::wstring POLICY_CONFIGURE_ENABLED_POWER_RENAME = L"ConfigureEnabledUtilityPowerRename";
const std::wstring POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER = L"ConfigureEnabledUtilityPowerLauncher";
const std::wstring POLICY_CONFIGURE_ENABLED_QUICK_ACCENT = L"ConfigureEnabledUtilityQuickAccent";
const std::wstring POLICY_CONFIGURE_ENABLED_SCREEN_RULER = L"ConfigureEnabledUtilityScreenRuler";
const std::wstring POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE = L"ConfigureEnabledUtilityShortcutGuide";
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
const std::wstring POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE = L"ConfigureEnabledUtilityVideoConferenceMute";
inline gpo_rule_configured_t getConfiguredValue(const std::wstring& registry_value_name)
{
HKEY key{};
DWORD value = (DWORD) -2;
DWORD valueSize = sizeof(value);
bool machine_key_found = true;
if (auto res = RegOpenKeyExW(POLICIES_SCOPE_MACHINE, POLICIES_PATH.c_str(), 0, KEY_READ, &key); res != ERROR_SUCCESS)
{
machine_key_found = false;
}
if(machine_key_found)
{
// If the path was found in the machine, we need to check if the value for the policy exists.
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, (LPBYTE)&value, &valueSize);
RegCloseKey(key);
if (res != ERROR_SUCCESS) {
// Value not found on the path.
machine_key_found=false;
}
}
if (!machine_key_found)
{
// If there's no value found on the machine scope, try to get it from the user scope.
if (auto res = RegOpenKeyExW(POLICIES_SCOPE_USER, POLICIES_PATH.c_str(), 0, KEY_READ, &key); res != ERROR_SUCCESS)
{
if (res == ERROR_FILE_NOT_FOUND) {
return gpo_rule_configured_not_configured;
}
return gpo_rule_configured_unavailable;
}
auto res = RegQueryValueExW(key, registry_value_name.c_str(), nullptr, nullptr, (LPBYTE)&value, &valueSize);
RegCloseKey(key);
if (res != ERROR_SUCCESS) {
return gpo_rule_configured_not_configured;
}
}
switch (value)
{
case 0:
return gpo_rule_configured_disabled;
case 1:
return gpo_rule_configured_enabled;
default:
return gpo_rule_configured_wrong_value;
}
}
inline gpo_rule_configured_t getConfiguredAlwaysOnTopEnabledValue() {
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_ALWAYS_ON_TOP);
}
inline gpo_rule_configured_t getConfiguredAwakeEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_AWAKE);
}
inline gpo_rule_configured_t getConfiguredColorPickerEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_COLOR_PICKER);
}
inline gpo_rule_configured_t getConfiguredFancyZonesEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_FANCYZONES);
}
inline gpo_rule_configured_t getConfiguredSvgPreviewEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_SVG_PREVIEW);
}
inline gpo_rule_configured_t getConfiguredMarkdownPreviewEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_MARKDOWN_PREVIEW);
}
inline gpo_rule_configured_t getConfiguredMonacoPreviewEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_MONACO_PREVIEW);
}
inline gpo_rule_configured_t getConfiguredPdfPreviewEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_PDF_PREVIEW);
}
inline gpo_rule_configured_t getConfiguredGcodePreviewEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_GCODE_PREVIEW);
}
inline gpo_rule_configured_t getConfiguredSvgThumbnailsEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_SVG_THUMBNAILS);
}
inline gpo_rule_configured_t getConfiguredPdfThumbnailsEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_PDF_THUMBNAILS);
}
inline gpo_rule_configured_t getConfiguredGcodeThumbnailsEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_GCODE_THUMBNAILS);
}
inline gpo_rule_configured_t getConfiguredStlThumbnailsEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_STL_THUMBNAILS);
}
inline gpo_rule_configured_t getConfiguredHostsFileEditorEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_HOSTS_FILE_EDITOR);
}
inline gpo_rule_configured_t getConfiguredImageResizerEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_IMAGE_RESIZER);
}
inline gpo_rule_configured_t getConfiguredKeyboardManagerEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_KEYBOARD_MANAGER);
}
inline gpo_rule_configured_t getConfiguredFindMyMouseEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_FIND_MY_MOUSE);
}
inline gpo_rule_configured_t getConfiguredMouseHightlighterEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_MOUSE_HIGHLIGHTER);
}
inline gpo_rule_configured_t getConfiguredMousePointerCrosshairsEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_MOUSE_POINTER_CROSSHAIRS);
}
inline gpo_rule_configured_t getConfiguredPowerRenameEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_POWER_RENAME);
}
inline gpo_rule_configured_t getConfiguredPowerLauncherEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER);
}
inline gpo_rule_configured_t getConfiguredQuickAccentEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_QUICK_ACCENT);
}
inline gpo_rule_configured_t getConfiguredScreenRulerEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_SCREEN_RULER);
}
inline gpo_rule_configured_t getConfiguredShortcutGuideEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_SHORTCUT_GUIDE);
}
inline gpo_rule_configured_t getConfiguredTextExtractorEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR);
}
inline gpo_rule_configured_t getConfiguredVideoConferenceMuteEnabledValue()
{
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE);
}
}

View File

@@ -14,6 +14,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Moq" Version="4.16.1" /> <PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />

View File

@@ -21,7 +21,13 @@
<DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants> <DefineConstants>DISABLE_XAML_GENERATED_MAIN,TRACE</DefineConstants>
<ApplicationIcon>Assets/Hosts.ico</ApplicationIcon> <ApplicationIcon>Assets/Hosts.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="Assets\AppList.scale-100.png" /> <None Remove="Assets\AppList.scale-100.png" />
<None Remove="Assets\AppList.scale-125.png" /> <None Remove="Assets\AppList.scale-125.png" />
@@ -31,6 +37,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" /> <PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
@@ -47,6 +54,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -16,6 +16,13 @@ namespace Hosts
public static void Main(string[] args) public static void Main(string[] args)
{ {
WinRT.ComWrappersSupport.InitializeComWrappers(); WinRT.ComWrappersSupport.InitializeComWrappers();
if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredHostsFileEditorEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return;
}
var instanceKey = AppInstance.FindOrRegisterForKey("PowerToys_Hosts_Instance"); var instanceKey = AppInstance.FindOrRegisterForKey("PowerToys_Hosts_Instance");
if (instanceKey.IsCurrent) if (instanceKey.IsCurrent)

View File

@@ -135,6 +135,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredHostsFileEditorEnabledValue();
}
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {
return false; return false;

View File

@@ -174,6 +174,12 @@ public:
return MODULE_NAME; return MODULE_NAME;
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredScreenRulerEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -32,6 +32,13 @@ namespace MeasureToolUI
/// <param name="args">Details about the launch request and process.</param> /// <param name="args">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs args) protected override void OnLaunched(LaunchActivatedEventArgs args)
{ {
if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredScreenRulerEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
Environment.Exit(0); // Current.Exit won't work until there's a window opened.
return;
}
var cmdArgs = Environment.GetCommandLineArgs(); var cmdArgs = Environment.GetCommandLineArgs();
if (cmdArgs?.Length > 1) if (cmdArgs?.Length > 1)
{ {

View File

@@ -26,7 +26,7 @@
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup> <PropertyGroup>
<CsWinRTIncludes>PowerToys.MeasureToolCore</CsWinRTIncludes> <CsWinRTIncludes>PowerToys.MeasureToolCore;PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir> <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup> </PropertyGroup>
@@ -79,6 +79,7 @@
<Folder Include="Assets\Icons\" /> <Folder Include="Assets\Icons\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" /> <ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\MeasureToolCore\PowerToys.MeasureToolCore.vcxproj" /> <ProjectReference Include="..\MeasureToolCore\PowerToys.MeasureToolCore.vcxproj" />

View File

@@ -93,6 +93,12 @@ public:
return MODULE_NAME; return MODULE_NAME;
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredFindMyMouseEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -84,6 +84,12 @@ public:
return MODULE_NAME; return MODULE_NAME;
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredMouseHightlighterEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -85,6 +85,12 @@ public:
return MODULE_NAME; return MODULE_NAME;
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredMousePointerCrosshairsEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -37,6 +37,13 @@ public partial class App : Application, IDisposable
private void Application_Startup(object sender, StartupEventArgs e) private void Application_Startup(object sender, StartupEventArgs e)
{ {
if (PowerToys.GPOWrapperProjection.GPOWrapper.GetConfiguredTextExtractorEnabledValue() == PowerToys.GPOWrapperProjection.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
Shutdown();
return;
}
// allow only one instance of PowerOCR // allow only one instance of PowerOCR
_instanceMutex = new Mutex(true, @"Local\PowerToys_PowerOCR_InstanceMutex", out bool createdNew); _instanceMutex = new Mutex(true, @"Local\PowerToys_PowerOCR_InstanceMutex", out bool createdNew);
if (!createdNew) if (!createdNew)

View File

@@ -39,11 +39,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" /> <PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" /> <PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -188,6 +188,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredTextExtractorEnabledValue();
}
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase); HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);

View File

@@ -7,6 +7,7 @@
#include <common/utils/UnhandledExceptionHandler.h> #include <common/utils/UnhandledExceptionHandler.h>
#include <common/utils/logger_helper.h> #include <common/utils/logger_helper.h>
#include <common/utils/EventWaiter.h> #include <common/utils/EventWaiter.h>
#include <common/utils/gpo.h>
#include "shortcut_guide.h" #include "shortcut_guide.h"
#include "target_state.h" #include "target_state.h"
@@ -46,6 +47,13 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
{ {
winrt::init_apartment(); winrt::init_apartment();
LoggerHelpers::init_logger(ShortcutGuideConstants::ModuleKey, L"ShortcutGuide", LogSettings::shortcutGuideLoggerName); LoggerHelpers::init_logger(ShortcutGuideConstants::ModuleKey, L"ShortcutGuide", LogSettings::shortcutGuideLoggerName);
if (powertoys_gpo::getConfiguredShortcutGuideEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 0;
}
InitUnhandledExceptionHandler(); InitUnhandledExceptionHandler();
Logger::trace("Starting Shortcut Guide"); Logger::trace("Starting Shortcut Guide");

View File

@@ -48,6 +48,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredShortcutGuideEnabledValue();
}
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase); HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);

View File

@@ -3,6 +3,7 @@
#include <common/utils/ProcessWaiter.h> #include <common/utils/ProcessWaiter.h>
#include <common/utils/window.h> #include <common/utils/window.h>
#include <common/utils/UnhandledExceptionHandler.h> #include <common/utils/UnhandledExceptionHandler.h>
#include <common/utils/gpo.h>
#include <common/utils/logger_helper.h> #include <common/utils/logger_helper.h>
@@ -18,7 +19,14 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
{ {
winrt::init_apartment(); winrt::init_apartment();
LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::alwaysOnTopLoggerName); LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::alwaysOnTopLoggerName);
InitUnhandledExceptionHandler();
if (powertoys_gpo::getConfiguredAlwaysOnTopEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 0;
}
InitUnhandledExceptionHandler();
auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str()); auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str());
if (mutex == nullptr) if (mutex == nullptr)

View File

@@ -64,6 +64,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredAlwaysOnTopEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
// These are the settings shown on the settings page along with their current values. // These are the settings shown on the settings page along with their current values.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override

View File

@@ -21,6 +21,13 @@
<AnalysisMode>Recommended</AnalysisMode> <AnalysisMode>Recommended</AnalysisMode>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
@@ -42,6 +49,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" /> <PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta"> <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
@@ -53,6 +61,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -61,6 +61,12 @@ namespace Awake
// only one instance of Awake is running. // only one instance of Awake is running.
_log = LogManager.GetCurrentClassLogger(); _log = LogManager.GetCurrentClassLogger();
if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredAwakeEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
Exit("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.", 1, _exitSignal, true);
return 0;
}
LockMutex = new Mutex(true, InternalConstants.AppName, out bool instantiated); LockMutex = new Mutex(true, InternalConstants.AppName, out bool instantiated);
if (!instantiated) if (!instantiated)

View File

@@ -85,6 +85,12 @@ public:
Logger::info("Launcher object is constructing"); Logger::info("Launcher object is constructing");
}; };
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredAwakeEnabledValue();
}
virtual void destroy() override virtual void destroy() override
{ {
delete this; delete this;

View File

@@ -189,6 +189,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredColorPickerEnabledValue();
}
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {
HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase); HINSTANCE hinstance = reinterpret_cast<HINSTANCE>(&__ImageBase);

View File

@@ -39,6 +39,7 @@
<Resource Include="Shaders\GridShader.cso" /> <Resource Include="Shaders\GridShader.cso" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" /> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.6" /> <PackageReference Include="ModernWpfUI" Version="0.9.6" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" /> <PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
@@ -60,6 +61,7 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />

View File

@@ -18,6 +18,13 @@ namespace ColorPicker
{ {
_args = args; _args = args;
Logger.LogInfo($"Color Picker started with pid={Environment.ProcessId}"); Logger.LogInfo($"Color Picker started with pid={Environment.ProcessId}");
if (PowerToys.GPOWrapperProjection.GPOWrapper.GetConfiguredColorPickerEnabledValue() == PowerToys.GPOWrapperProjection.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return;
}
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
try try
{ {

View File

@@ -16,6 +16,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="coverlet.collector" Version="3.1.2"> <PackageReference Include="coverlet.collector" Version="3.1.2">

View File

@@ -3,6 +3,7 @@
#include <common/utils/ProcessWaiter.h> #include <common/utils/ProcessWaiter.h>
#include <common/utils/window.h> #include <common/utils/window.h>
#include <common/utils/UnhandledExceptionHandler.h> #include <common/utils/UnhandledExceptionHandler.h>
#include <common/utils/gpo.h>
#include <FancyZonesLib/trace.h> #include <FancyZonesLib/trace.h>
#include <FancyZonesLib/Generated Files/resource.h> #include <FancyZonesLib/Generated Files/resource.h>
@@ -26,6 +27,13 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
{ {
winrt::init_apartment(); winrt::init_apartment();
LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::fancyZonesLoggerName); LoggerHelpers::init_logger(moduleName, internalPath, LogSettings::fancyZonesLoggerName);
if (powertoys_gpo::getConfiguredFancyZonesEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 0;
}
InitUnhandledExceptionHandler(); InitUnhandledExceptionHandler();
auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str()); auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str());

View File

@@ -51,6 +51,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredFancyZonesEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
// These are the settings shown on the settings page along with their current values. // These are the settings shown on the settings page along with their current values.
virtual bool get_config(_Out_ PWSTR buffer, _Out_ int* buffer_size) override virtual bool get_config(_Out_ PWSTR buffer, _Out_ int* buffer_size) override

View File

@@ -66,6 +66,13 @@ namespace FancyZonesEditor
private void OnStartup(object sender, StartupEventArgs e) private void OnStartup(object sender, StartupEventArgs e)
{ {
if (PowerToys.GPOWrapperProjection.GPOWrapper.GetConfiguredFancyZonesEnabledValue() == PowerToys.GPOWrapperProjection.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
Shutdown(0);
return;
}
AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
_themeManager = new ThemeManager(this); _themeManager = new ThemeManager(this);

View File

@@ -19,7 +19,6 @@
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IntermediateOutputPath>$(SolutionDir)$(Platform)\$(Configuration)\obj\$(AssemblyName)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'"> <PropertyGroup Condition="'$(Configuration)'=='Release'">
@@ -29,7 +28,7 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<Optimize>false</Optimize> <Optimize>false</Optimize>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>images\FancyZonesEditor.ico</ApplicationIcon> <ApplicationIcon>images\FancyZonesEditor.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
@@ -47,6 +46,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.6" /> <PackageReference Include="ModernWpfUI" Version="0.9.6" />
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" /> <PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
<PackageReference Include="System.Text.Json" Version="6.0.2" /> <PackageReference Include="System.Text.Json" Version="6.0.2" />
@@ -55,6 +55,7 @@
<Resource Include="images\FancyZonesEditor.ico" /> <Resource Include="images\FancyZonesEditor.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\..\common\interop\PowerToys.Interop.vcxproj" /> <ProjectReference Include="..\..\..\..\common\interop\PowerToys.Interop.vcxproj" />
<ProjectReference Include="..\..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\..\common\Common.UI\Common.UI.csproj" />

View File

@@ -1,5 +1,7 @@
#pragma once #pragma once
#include <common/utils/gpo.h>
class CSettings class CSettings
{ {
public: public:
@@ -7,6 +9,11 @@ public:
inline bool GetEnabled() inline bool GetEnabled()
{ {
auto gpoSetting = powertoys_gpo::getConfiguredImageResizerEnabledValue();
if (gpoSetting == powertoys_gpo::gpo_rule_configured_enabled)
return true;
if (gpoSetting == powertoys_gpo::gpo_rule_configured_disabled)
return false;
Reload(); Reload();
return settings.enabled; return settings.enabled;
} }

View File

@@ -70,6 +70,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredImageResizerEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -49,6 +49,7 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Moq" Version="4.16.1" /> <PackageReference Include="Moq" Version="4.16.1" />

View File

@@ -28,6 +28,16 @@ namespace ImageResizer
{ {
// Fix for .net 3.1.19 making Image Resizer not adapt to DPI changes. // Fix for .net 3.1.19 making Image Resizer not adapt to DPI changes.
NativeMethods.SetProcessDPIAware(); NativeMethods.SetProcessDPIAware();
if (PowerToys.GPOWrapperProjection.GPOWrapper.GetConfiguredImageResizerEnabledValue() == PowerToys.GPOWrapperProjection.GpoRuleConfigured.Disabled)
{
/* TODO: Add logs to ImageResizer.
* Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
*/
Environment.Exit(0); // Current.Exit won't work until there's a window opened.
return;
}
var batch = ResizeBatch.FromCommandLine(Console.In, e?.Args); var batch = ResizeBatch.FromCommandLine(Console.In, e?.Args);
// TODO: Add command-line parameters that can be used in lieu of the input page (issue #14) // TODO: Add command-line parameters that can be used in lieu of the input page (issue #14)

View File

@@ -30,7 +30,6 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> <PropertyGroup Condition="'$(Configuration)'=='Debug'">
<Optimize>false</Optimize> <Optimize>false</Optimize>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx"> <EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
@@ -45,6 +44,7 @@
<Resource Include="Resources\ImageResizer.png" /> <Resource Include="Resources\ImageResizer.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" /> <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
<PackageReference Include="ModernWpfUI" Version="0.9.6" /> <PackageReference Include="ModernWpfUI" Version="0.9.6" />
<PackageReference Include="System.IO.Abstractions"> <PackageReference Include="System.IO.Abstractions">
@@ -53,6 +53,7 @@
<PackageReference Include="System.Text.Json" Version="6.0.2" /> <PackageReference Include="System.Text.Json" Version="6.0.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" /> <ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -1,6 +1,7 @@
#pragma once #pragma once
#include <compare> #include <compare>
#include <common/utils/gpo.h>
/* /*
DLL Interface for PowerToys. The powertoy_create() (see below) must return DLL Interface for PowerToys. The powertoy_create() (see below) must return
@@ -112,6 +113,11 @@ public:
virtual bool is_enabled_by_default() const { return true; } virtual bool is_enabled_by_default() const { return true; }
/* Provides the GPO configuration value for the module. This should be overriden by the module interface to get the proper gpo policy setting. */
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() {
return powertoys_gpo::gpo_rule_configured_not_configured;
}
protected: protected:
HANDLE CreateDefaultEvent(const wchar_t* eventName) HANDLE CreateDefaultEvent(const wchar_t* eventName)
{ {

View File

@@ -8,6 +8,7 @@
#include <common/utils/logger_helper.h> #include <common/utils/logger_helper.h>
#include <common/utils/ProcessWaiter.h> #include <common/utils/ProcessWaiter.h>
#include <common/utils/UnhandledExceptionHandler.h> #include <common/utils/UnhandledExceptionHandler.h>
#include <common/utils/gpo.h>
#include <trace.h> #include <trace.h>
@@ -28,6 +29,13 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(hPrevInstance);
LoggerHelpers::init_logger(KeyboardManagerConstants::ModuleName, L"Editor", LogSettings::keyboardManagerLoggerName); LoggerHelpers::init_logger(KeyboardManagerConstants::ModuleName, L"Editor", LogSettings::keyboardManagerLoggerName);
if (powertoys_gpo::getConfiguredKeyboardManagerEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 0;
}
InitUnhandledExceptionHandler(); InitUnhandledExceptionHandler();
Trace::RegisterProvider(); Trace::RegisterProvider();

View File

@@ -4,6 +4,7 @@
#include <common/utils/winapi_error.h> #include <common/utils/winapi_error.h>
#include <common/utils/logger_helper.h> #include <common/utils/logger_helper.h>
#include <common/utils/UnhandledExceptionHandler.h> #include <common/utils/UnhandledExceptionHandler.h>
#include <common/utils/gpo.h>
#include <keyboardmanager/common/KeyboardManagerConstants.h> #include <keyboardmanager/common/KeyboardManagerConstants.h>
#include <keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManager.h> #include <keyboardmanager/KeyboardManagerEngineLibrary/KeyboardManager.h>
#include <keyboardmanager/KeyboardManagerEngineLibrary/trace.h> #include <keyboardmanager/KeyboardManagerEngineLibrary/trace.h>
@@ -14,7 +15,13 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
{ {
winrt::init_apartment(); winrt::init_apartment();
LoggerHelpers::init_logger(KeyboardManagerConstants::ModuleName, L"Engine", LogSettings::keyboardManagerLoggerName); LoggerHelpers::init_logger(KeyboardManagerConstants::ModuleName, L"Engine", LogSettings::keyboardManagerLoggerName);
if (powertoys_gpo::getConfiguredKeyboardManagerEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return 0;
}
InitUnhandledExceptionHandler(); InitUnhandledExceptionHandler();
auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str()); auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str());

View File

@@ -69,6 +69,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredKeyboardManagerEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -152,6 +152,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredPowerLauncherEnabledValue();
}
// Return JSON with the configuration options. // Return JSON with the configuration options.
virtual bool get_config(wchar_t* buffer, int* buffer_size) override virtual bool get_config(wchar_t* buffer, int* buffer_size) override
{ {

View File

@@ -48,6 +48,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" /> <PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
<PackageReference Include="Mages" Version="2.0.1" /> <PackageReference Include="Mages" Version="2.0.1" />
<PackageReference Include="System.Runtime" Version="4.3.1" /> <PackageReference Include="System.Runtime" Version="4.3.1" />

View File

@@ -52,6 +52,12 @@ namespace PowerLauncher
NativeThreadCTS = new CancellationTokenSource(); NativeThreadCTS = new CancellationTokenSource();
Log.Info($"Starting PowerToys Run with PID={Environment.ProcessId}", typeof(App)); Log.Info($"Starting PowerToys Run with PID={Environment.ProcessId}", typeof(App));
if (PowerToys.GPOWrapperProjection.GPOWrapper.GetConfiguredPowerLauncherEnabledValue() == PowerToys.GPOWrapperProjection.GpoRuleConfigured.Disabled)
{
Log.Warn("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.", typeof(App));
return;
}
int powerToysPid = GetPowerToysPId(); int powerToysPid = GetPowerToysPId();
if (powerToysPid != 0) if (powerToysPid != 0)
{ {

View File

@@ -76,6 +76,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" /> <PackageReference Include="Interop.Microsoft.Office.Interop.OneNote" Version="1.1.0.2" />
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" /> <PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
<PackageReference Include="Mages" Version="2.0.1" /> <PackageReference Include="Mages" Version="2.0.1" />
@@ -94,6 +95,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" /> <ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" /> <ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />

View File

@@ -47,6 +47,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Moq" Version="4.16.1" /> <PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" /> <PackageReference Include="MSTest.TestFramework" Version="2.2.3" />

View File

@@ -10,7 +10,7 @@
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<CsWinRTIncludes>PowerToys.PowerAccentKeyboardService</CsWinRTIncludes> <CsWinRTIncludes>PowerToys.GPOWrapper;PowerToys.PowerAccentKeyboardService</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir> <CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles> <ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup> </PropertyGroup>
@@ -23,6 +23,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
<ProjectReference Include="..\PowerAccentKeyboardService\PowerAccentKeyboardService.vcxproj" /> <ProjectReference Include="..\PowerAccentKeyboardService\PowerAccentKeyboardService.vcxproj" />
</ItemGroup> </ItemGroup>

View File

@@ -28,6 +28,12 @@ internal static class Program
{ {
_ = new Mutex(true, PROGRAM_APP_NAME, out bool instantiated); _ = new Mutex(true, PROGRAM_APP_NAME, out bool instantiated);
if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredQuickAccentEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
return;
}
if (instantiated) if (instantiated)
{ {
Arguments(args); Arguments(args);

View File

@@ -108,6 +108,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredQuickAccentEnabledValue();
}
virtual void set_config(const wchar_t* config) override virtual void set_config(const wchar_t* config) override
{ {
try try

View File

@@ -9,6 +9,7 @@
#include <common/logger/logger.h> #include <common/logger/logger.h>
#include <common/logger/logger_settings.h> #include <common/logger/logger_settings.h>
#include <common/utils/logger_helper.h> #include <common/utils/logger_helper.h>
#include <common/utils/gpo.h>
using namespace winrt; using namespace winrt;
using namespace winrt::Microsoft::UI::Xaml; using namespace winrt::Microsoft::UI::Xaml;
@@ -53,6 +54,12 @@ void App::OnLaunched(LaunchActivatedEventArgs const&)
{ {
LoggerHelpers::init_logger(moduleName, L"", LogSettings::powerRenameLoggerName); LoggerHelpers::init_logger(moduleName, L"", LogSettings::powerRenameLoggerName);
if (powertoys_gpo::getConfiguredPowerRenameEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.");
ExitProcess(0);
}
auto args = std::wstring{ GetCommandLine() }; auto args = std::wstring{ GetCommandLine() };
size_t pos{ args.rfind(L"\\\\.\\pipe\\") }; size_t pos{ args.rfind(L"\\\\.\\pipe\\") };

View File

@@ -182,6 +182,12 @@ public:
return app_key.c_str(); return app_key.c_str();
} }
// Return the configured status for the gpo policy for the module
virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override
{
return powertoys_gpo::getConfiguredPowerRenameEnabledValue();
}
// Enable the powertoy // Enable the powertoy
virtual void enable() virtual void enable()
{ {

View File

@@ -1,6 +1,7 @@
#pragma once #pragma once
#include <common/utils/json.h> #include <common/utils/json.h>
#include <common/utils/gpo.h>
class CSettings class CSettings
{ {
@@ -9,6 +10,11 @@ public:
inline bool GetEnabled() inline bool GetEnabled()
{ {
auto gpoSetting = powertoys_gpo::getConfiguredPowerRenameEnabledValue();
if (gpoSetting == powertoys_gpo::gpo_rule_configured_enabled)
return true;
if (gpoSetting == powertoys_gpo::gpo_rule_configured_disabled)
return false;
Reload(); Reload();
return settings.enabled; return settings.enabled;
} }

View File

@@ -31,12 +31,25 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" /> <PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.7.0" /> <PackageReference Include="System.Runtime.WindowsRuntime" Version="4.7.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -43,6 +43,20 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
/// <param name="dataSource">Stream reference to access source file.</param> /// <param name="dataSource">Stream reference to access source file.</param>
public override void DoPreview<T>(T dataSource) public override void DoPreview<T>(T dataSource)
{ {
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredGcodePreviewEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility. Show an error message instead.
InvokeOnControlThread(() =>
{
_infoBarAdded = true;
AddTextBoxControl(Properties.Resource.GpoDisabledErrorText);
Resize += FormResized;
base.DoPreview(dataSource);
});
return;
}
InvokeOnControlThread(() => InvokeOnControlThread(() =>
{ {
try try

View File

@@ -77,5 +77,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode.Properties {
return ResourceManager.GetString("GcodeWithoutEmbeddedThumbnails", resourceCulture); return ResourceManager.GetString("GcodeWithoutEmbeddedThumbnails", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string for an error when Gpo has the utility disabled.
/// </summary>
internal static string GpoDisabledErrorText {
get {
return ResourceManager.GetString("GpoDisabledErrorText", resourceCulture);
}
}
} }
} }

View File

@@ -124,4 +124,8 @@
<data name="GcodeWithoutEmbeddedThumbnails" xml:space="preserve"> <data name="GcodeWithoutEmbeddedThumbnails" xml:space="preserve">
<value>This G-code does not contain any embedded thumbnails.</value> <value>This G-code does not contain any embedded thumbnails.</value>
</data> </data>
<data name="GpoDisabledErrorText" xml:space="preserve">
<value>Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.</value>
<comment>GPO stands for the Windows Group Policy Object feature.</comment>
</data>
</root> </root>

View File

@@ -158,6 +158,12 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Gcode
return; return;
} }
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredGcodeThumbnailsEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility.
return;
}
using (var stream = new ReadonlyStream(this.Stream as IStream)) using (var stream = new ReadonlyStream(this.Stream as IStream))
{ {
using (var reader = new StreamReader(stream)) using (var reader = new StreamReader(stream))

View File

@@ -6,7 +6,7 @@
<AssemblyName>PowerToys.GcodeThumbnailProvider</AssemblyName> <AssemblyName>PowerToys.GcodeThumbnailProvider</AssemblyName>
<AssemblyTitle>PowerToys.GcodeThumbnailProvider</AssemblyTitle> <AssemblyTitle>PowerToys.GcodeThumbnailProvider</AssemblyTitle>
<AssemblyDescription>PowerToys GcodePreviewHandler</AssemblyDescription> <AssemblyDescription>PowerToys GcodePreviewHandler</AssemblyDescription>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<EnableComHosting>true</EnableComHosting> <EnableComHosting>true</EnableComHosting>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Description>PowerToys GcodePreviewHandler</Description> <Description>PowerToys GcodePreviewHandler</Description>
@@ -18,7 +18,23 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -37,7 +37,19 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.42" /> <PackageReference Include="HtmlAgilityPack" Version="1.11.42" />
<PackageReference Include="Markdig.Signed" Version="0.27.0" /> <PackageReference Include="Markdig.Signed" Version="0.27.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" />
@@ -45,6 +57,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />

View File

@@ -130,6 +130,21 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
/// <param name="dataSource">Path to the file.</param> /// <param name="dataSource">Path to the file.</param>
public override void DoPreview<T>(T dataSource) public override void DoPreview<T>(T dataSource)
{ {
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredMarkdownPreviewEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility. Show an error message instead.
InvokeOnControlThread(() =>
{
_infoBarDisplayed = true;
_infoBar = GetTextBoxControl(Resources.GpoDisabledErrorText);
Resize += FormResized;
Controls.Add(_infoBar);
base.DoPreview(dataSource);
});
return;
}
CleanupWebView2UserDataFolder(); CleanupWebView2UserDataFolder();
_infoBarDisplayed = false; _infoBarDisplayed = false;

View File

@@ -77,5 +77,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown.Properties {
return ResourceManager.GetString("MarkdownNotPreviewedError", resourceCulture); return ResourceManager.GetString("MarkdownNotPreviewedError", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string for an error when Gpo has the utility disabled.
/// </summary>
internal static string GpoDisabledErrorText {
get {
return ResourceManager.GetString("GpoDisabledErrorText", resourceCulture);
}
}
} }
} }

View File

@@ -125,4 +125,8 @@
<value>The markdown could not be preview due to an internal error.</value> <value>The markdown could not be preview due to an internal error.</value>
<comment>This text is displayed if markdown fails to preview</comment> <comment>This text is displayed if markdown fails to preview</comment>
</data> </data>
<data name="GpoDisabledErrorText" xml:space="preserve">
<value>Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.</value>
<comment>GPO stands for the Windows Group Policy Object feature.</comment>
</data>
</root> </root>

View File

@@ -26,7 +26,19 @@
<NoWarn>1701;1702</NoWarn> <NoWarn>1701;1702</NoWarn>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" />
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" /> <PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
</ItemGroup> </ItemGroup>
@@ -41,6 +53,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" /> <ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />

View File

@@ -37,6 +37,16 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
new XmlFormatter(), new XmlFormatter(),
}.AsReadOnly(); }.AsReadOnly();
/// <summary>
/// Text box to display the information about blocked elements from Svg.
/// </summary>
private RichTextBox _textBox;
/// <summary>
/// Represent if an text box info bar is added for showing message.
/// </summary>
private bool _infoBarAdded;
/// <summary> /// <summary>
/// Saves if the user already navigated to the index page /// Saves if the user already navigated to the index page
/// </summary> /// </summary>
@@ -94,6 +104,20 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
{ {
Logger.LogTrace(); Logger.LogTrace();
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredMonacoPreviewEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility. Show an error message instead.
InvokeOnControlThread(() =>
{
_infoBarAdded = true;
AddTextBoxControl(Properties.Resources.GpoDisabledErrorText);
Resize += FormResized;
base.DoPreview(dataSource);
});
return;
}
base.DoPreview(dataSource); base.DoPreview(dataSource);
// Sets background color // Sets background color
@@ -421,5 +445,47 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
await Launcher.LaunchUriAsync(new Uri("https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section")); await Launcher.LaunchUriAsync(new Uri("https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section"));
Logger.LogTrace(); Logger.LogTrace();
} }
/// <summary>
/// Occurs when RichtextBox is resized.
/// </summary>
/// <param name="sender">Reference to resized control.</param>
/// <param name="e">Provides data for the ContentsResized event.</param>
private void RTBContentsResized(object sender, ContentsResizedEventArgs e)
{
var richTextBox = sender as RichTextBox;
richTextBox.Height = e.NewRectangle.Height + 5;
}
/// <summary>
/// Occurs when form is resized.
/// </summary>
/// <param name="sender">Reference to resized control.</param>
/// <param name="e">Provides data for the resize event.</param>
private void FormResized(object sender, EventArgs e)
{
if (_infoBarAdded)
{
_textBox.Width = Width;
}
}
/// <summary>
/// Adds a Text Box in Controls for showing information about blocked elements.
/// </summary>
/// <param name="message">Message to be displayed in textbox.</param>
private void AddTextBoxControl(string message)
{
_textBox = new RichTextBox();
_textBox.Text = message;
_textBox.BackColor = Color.LightYellow;
_textBox.Multiline = true;
_textBox.Dock = DockStyle.Top;
_textBox.ReadOnly = true;
_textBox.ContentsResized += RTBContentsResized;
_textBox.ScrollBars = RichTextBoxScrollBars.None;
_textBox.BorderStyle = BorderStyle.None;
Controls.Add(_textBox);
}
} }
} }

View File

@@ -106,5 +106,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco.Properties {
return ResourceManager.GetString("WebView2_Not_Installed_Message", resourceCulture); return ResourceManager.GetString("WebView2_Not_Installed_Message", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string for an error when Gpo has the utility disabled.
/// </summary>
internal static string GpoDisabledErrorText {
get {
return ResourceManager.GetString("GpoDisabledErrorText", resourceCulture);
}
}
} }
} }

View File

@@ -136,4 +136,8 @@ Max file size: %1KB</value>
<data name="Download_WebView2" xml:space="preserve"> <data name="Download_WebView2" xml:space="preserve">
<value>Download WebView2 to display this file.</value> <value>Download WebView2 to display this file.</value>
</data> </data>
<data name="GpoDisabledErrorText" xml:space="preserve">
<value>Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.</value>
<comment>GPO stands for the Windows Group Policy Object feature.</comment>
</data>
</root> </root>

View File

@@ -31,11 +31,24 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="17.2.3" /> <PackageReference Include="System.IO.Abstractions" Version="17.2.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -52,6 +52,19 @@ namespace Microsoft.PowerToys.PreviewHandler.Pdf
/// <param name="dataSource">Stream reference to access source file.</param> /// <param name="dataSource">Stream reference to access source file.</param>
public override void DoPreview<T>(T dataSource) public override void DoPreview<T>(T dataSource)
{ {
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPdfPreviewEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility. Show an error message instead.
InvokeOnControlThread(() =>
{
_infoBar = GetTextBoxControl(Resources.GpoDisabledErrorText);
Controls.Add(_infoBar);
base.DoPreview(dataSource);
});
return;
}
this.SuspendLayout(); this.SuspendLayout();
try try

View File

@@ -100,5 +100,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Pdf.Properties
return ResourceManager.GetString("PdfMorePagesMessage", resourceCulture); return ResourceManager.GetString("PdfMorePagesMessage", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string for an error when Gpo has the utility disabled.
/// </summary>
internal static string GpoDisabledErrorText {
get {
return ResourceManager.GetString("GpoDisabledErrorText", resourceCulture);
}
}
} }
} }

View File

@@ -129,4 +129,8 @@
<value>Can't preview file. This PDF is password protected.</value> <value>Can't preview file. This PDF is password protected.</value>
<comment>This text is displayed if PDF is password protected.</comment> <comment>This text is displayed if PDF is password protected.</comment>
</data> </data>
<data name="GpoDisabledErrorText" xml:space="preserve">
<value>Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.</value>
<comment>GPO stands for the Windows Group Policy Object feature.</comment>
</data>
</root> </root>

View File

@@ -49,6 +49,12 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Pdf
return; return;
} }
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredPdfThumbnailsEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility.
return;
}
using var dataStream = new ReadonlyStream(this.Stream as IStream); using var dataStream = new ReadonlyStream(this.Stream as IStream);
using var memStream = new MemoryStream(); using var memStream = new MemoryStream();

View File

@@ -17,7 +17,23 @@
</PropertyGroup> </PropertyGroup>
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -123,6 +123,12 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Stl
return; return;
} }
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredStlThumbnailsEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility.
return;
}
using (var stream = new ReadonlyStream(this.Stream as IStream)) using (var stream = new ReadonlyStream(this.Stream as IStream))
{ {
using (var memStream = new MemoryStream()) using (var memStream = new MemoryStream())

View File

@@ -6,7 +6,7 @@
<AssemblyName>PowerToys.StlThumbnailProvider</AssemblyName> <AssemblyName>PowerToys.StlThumbnailProvider</AssemblyName>
<AssemblyTitle>PowerToys.StlThumbnailProvider</AssemblyTitle> <AssemblyTitle>PowerToys.StlThumbnailProvider</AssemblyTitle>
<AssemblyDescription>PowerToys StlPreviewHandler</AssemblyDescription> <AssemblyDescription>PowerToys StlPreviewHandler</AssemblyDescription>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
<EnableComHosting>true</EnableComHosting> <EnableComHosting>true</EnableComHosting>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Description>PowerToys StlPreviewHandler</Description> <Description>PowerToys StlPreviewHandler</Description>
@@ -18,12 +18,25 @@
</PropertyGroup> </PropertyGroup>
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="HelixToolkit" Version="2.20.2" /> <PackageReference Include="HelixToolkit" Version="2.20.2" />
<PackageReference Include="HelixToolkit.Core.Wpf" Version="2.20.2" /> <PackageReference Include="HelixToolkit.Core.Wpf" Version="2.20.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" /> <ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />

View File

@@ -77,5 +77,14 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg.Properties {
return ResourceManager.GetString("SvgNotPreviewedError", resourceCulture); return ResourceManager.GetString("SvgNotPreviewedError", resourceCulture);
} }
} }
/// <summary>
/// Looks up a localized string for an error when Gpo has the utility disabled.
/// </summary>
internal static string GpoDisabledErrorText {
get {
return ResourceManager.GetString("GpoDisabledErrorText", resourceCulture);
}
}
} }
} }

View File

@@ -123,4 +123,8 @@
<data name="SvgNotPreviewedError" xml:space="preserve"> <data name="SvgNotPreviewedError" xml:space="preserve">
<value>The Svg could not be preview due to an internal error in Svg Preview Handler.</value> <value>The Svg could not be preview due to an internal error in Svg Preview Handler.</value>
</data> </data>
<data name="GpoDisabledErrorText" xml:space="preserve">
<value>Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator.</value>
<comment>GPO stands for the Windows Group Policy Object feature.</comment>
</data>
</root> </root>

View File

@@ -11,6 +11,7 @@ using System.Runtime.InteropServices.ComTypes;
using System.Windows.Forms; using System.Windows.Forms;
using Common; using Common;
using Common.Utilities; using Common.Utilities;
using Microsoft.PowerToys.PreviewHandler.Svg.Properties;
using Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events; using Microsoft.PowerToys.PreviewHandler.Svg.Telemetry.Events;
using Microsoft.PowerToys.Telemetry; using Microsoft.PowerToys.Telemetry;
using Microsoft.Web.WebView2.Core; using Microsoft.Web.WebView2.Core;
@@ -82,6 +83,20 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg
/// <param name="dataSource">Stream reference to access source file.</param> /// <param name="dataSource">Stream reference to access source file.</param>
public override void DoPreview<T>(T dataSource) public override void DoPreview<T>(T dataSource)
{ {
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredSvgPreviewEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility. Show an error message instead.
InvokeOnControlThread(() =>
{
_infoBarAdded = true;
AddTextBoxControl(Properties.Resource.GpoDisabledErrorText);
Resize += FormResized;
base.DoPreview(dataSource);
});
return;
}
CleanupWebView2UserDataFolder(); CleanupWebView2UserDataFolder();
string svgData = null; string svgData = null;

View File

@@ -32,12 +32,25 @@
<Compile Update="SvgPreviewControl.cs" /> <Compile Update="SvgPreviewControl.cs" />
</ItemGroup> </ItemGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" />
</ItemGroup> </ItemGroup>

View File

@@ -272,6 +272,12 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
return; return;
} }
if (global::PowerToys.GPOWrapper.GPOWrapper.GetConfiguredSvgThumbnailsEnabledValue() == global::PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
// GPO is disabling this utility.
return;
}
string svgData = null; string svgData = null;
using (var stream = new ReadonlyStream(this.Stream as IStream)) using (var stream = new ReadonlyStream(this.Stream as IStream))
{ {

View File

@@ -20,10 +20,24 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->
<PropertyGroup>
<CsWinRTIncludes>PowerToys.GPOWrapper</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
<PropertyGroup>
<!-- Disable missing comment warning. WinRT/C++ libraries added won't have comments on thier reflections. -->
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1343.22" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" /> <ProjectReference Include="..\..\..\common\ManagedTelemetry\Telemetry\ManagedTelemetry.csproj" />
<ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" /> <ProjectReference Include="..\Common\PreviewHandlerCommon.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -23,6 +23,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup> </ItemGroup>

View File

@@ -24,6 +24,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
<PackageReference Include="Moq" Version="4.16.1" /> <PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" /> <PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" /> <PackageReference Include="MSTest.TestFramework" Version="2.2.3" />

Some files were not shown because too many files have changed in this diff Show More