Compare commits

..

18 Commits

Author SHA1 Message Date
Jaime Bernardo
bf051c4693 Don't set latest VCTools version 2024-05-31 15:45:44 +01:00
Jaime Bernardo
4e274776e7 Print all versions 2024-05-31 15:45:44 +01:00
Jaime Bernardo
120ab5ff6d Remove caching 2024-05-31 15:45:43 +01:00
Jaime Bernardo
c101d51f94 TEMP: Test Preview pipelines 2024-05-31 15:45:43 +01:00
Ani
1fb632d4a6 [Installer]Use custom action to copy DSC files on user install (#32799)
* Better fix for installation issues when My Documents on network drive

* Fix spellcheck

* Improved wxs comment

* Created DSCModule folder in install folder; removed DSC modules from resources

* Added back newline
2024-05-31 09:47:31 +01:00
Jan Klass
f859eac18a [QC]Drop outdated sln win-app-driver README.md file reference (#32794)
PR #29453 removed the `src/tests/win-app-driver` folder, but missed removing the sln file reference to the folders `README.md` file.
2024-05-31 09:46:23 +01:00
Heiko
420e097e24 [Hosts]Add horizontal scroll on additional lines dialog (#32790) 2024-05-31 09:45:56 +01:00
Heiko
92e8b06068 [Hosts]Improve Resizing behavior, don't hide host names (#32788)
* ui improvements

* ui improvements

* feedback
2024-05-31 09:45:20 +01:00
HydroH
4c9e18116c [PTRun]Remove full stops in plugin descriptions (#32613) 2024-05-31 09:44:21 +01:00
Stefan Markovic
29ce15bb8a [Deps] Update System.Drawing.Common to 8.0.6 (#33162) 2024-05-30 15:50:42 +02:00
Stefan Markovic
d0d2f3cd9c [GPO][AdvPaste]Online AI models GPO (#33045)
* [Advanced Paste] AI gpo

* address PR comments

* XAML format

* Fix showing Enable Paste with AI with module disabled

* Rename variable in ViewModel for clarity

* Update adml revision

* Move policy registry key around

* Update src/modules/AdvancedPaste/AdvancedPaste/Strings/en-us/Resources.resw

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

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
2024-05-26 12:22:50 +01:00
Jaime Bernardo
8bb5a33572 [PTRun]Fix accent on title bar bleed into UI (#33046)
* [PTRun]Fix accent on title bar bleed into UI

* Fix XAML style
2024-05-26 12:20:41 +01:00
Jaime Bernardo
13b57e32f4 [Settings][AdvPaste]Clarify AI features are optional (#33056) 2024-05-26 12:16:22 +01:00
Jaime Bernardo
59f9785296 [Settings][AdvPaste]Check clibboard history gpo (#32977)
* [Settings][AdvPaste]Check clibboard history gpo

* Fix XAML style

* GPO Infobar below
2024-05-24 00:19:01 +01:00
Stefan Markovic
8fce41da06 [AdvPaste][runner]Fix triggering non-set hotkeys (#32976) 2024-05-23 23:39:52 +01:00
Jaime Bernardo
f3540174cd [ci][Tests]Fix vstest location for VS 17.10 release (#33033) 2024-05-23 22:32:28 +01:00
Clint Rutkas
dc91407625 adjusted readme for clarifying adavnced paste (#33027) 2024-05-23 11:52:53 -07:00
Jaime Bernardo
16e68aff41 0.81 changelog (#32904)
* 0.81 changelog

* Add installer hashes

* Add Advanced Paste mentions
2024-05-21 08:28:47 -07:00
69 changed files with 560 additions and 249 deletions

View File

@@ -39,6 +39,7 @@ nupkg
petabyte
resw
resx
srt
Stereolithography
terabyte
UYVY

View File

@@ -40,6 +40,9 @@
# tabs in c#
\$"\\t
# Hexadecimal character pattern in code
\\x[0-9a-fA-F][0-9a-fA-F]
# windows line breaks in strings
\\r\\n

View File

@@ -23,7 +23,7 @@ jobs:
NUGET_RESTORE_MSBUILD_ARGS: /p:Platform=${{ parameters.platform }} # Required for nuget to work due to self contained
NODE_OPTIONS: --max_old_space_size=16384
pool:
demands: ImageOverride -equals SHINE-VS17-Latest
demands: ImageOverride -equals SHINE-VS17-Preview
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
name: SHINE-OSS-L
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:

View File

@@ -2,7 +2,7 @@
jobs:
- job: Precheck
pool:
demands: ImageOverride -equals SHINE-VS17-Latest
demands: ImageOverride -equals SHINE-VS17-Preview
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
name: SHINE-OSS-L
${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:

View File

@@ -116,7 +116,7 @@ steps:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
${{ if eq(parameters.enableCaching, true) }}:
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -t:Build;Test -graph -reportfileaccesses -p:MSBuildCacheEnabled=true -p:MSBuildCacheLogDirectory=$(Build.ArtifactStagingDirectory)\logs\MSBuildCache -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToys.binlog -ds:false
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -t:Build;Test -graph -reportfileaccesses -p:MSBuildCacheLogDirectory=$(Build.ArtifactStagingDirectory)\logs\MSBuildCache -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToys.binlog -ds:false
${{ else }}:
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -t:Build;Test -graph -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToys.binlog -ds:false
msbuildArchitecture: x64

View File

@@ -60,7 +60,7 @@ jobs:
searchFolder: '$(Pipeline.Workspace)\build-${{ parameters.platform }}-${{ parameters.configuration }}'
vstestLocationMethod: 'location' # otherwise fails to find vstest.console.exe
#vstestLocation: '$(Agent.ToolsDirectory)\VsTest\**\${{ parameters.platform }}\tools\net462\Common7\IDE\Extensions\TestPlatform'
vstestLocation: '$(Agent.ToolsDirectory)\VsTest\17.10.0-release-24177-07\x64\tools\net462\Common7\IDE\Extensions\TestPlatform'
vstestLocation: '$(Agent.ToolsDirectory)\VsTest\17.10.0\x64\tools\net462\Common7\IDE\Extensions\TestPlatform'
uiTests: true
rerunFailedTests: true
testAssemblyVer2: |

View File

@@ -1,5 +1,2 @@
$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.CRT.Source" }).version;
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
Write-Output "Updating VCToolsVersion environment variable for job"
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"
$LatestVersions = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package);
Write-Output $LatestVersions

View File

@@ -75,7 +75,7 @@
<PackageVersion Include="System.Diagnostics.EventLog" Version="8.0.0" />
<!-- Package System.Diagnostics.PerformanceCounter added as a hack for being able to exclude the runtime assets so they don't conflict with 8.0.1. This is a dependency of System.Data.OleDb but the 8.0.1 version wasn't published to nuget. -->
<PackageVersion Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.5" />
<PackageVersion Include="System.Drawing.Common" Version="8.0.6" />
<PackageVersion Include="System.IO.Abstractions" Version="17.2.3" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageVersion Include="System.Management" Version="8.0.0" />

View File

@@ -1355,7 +1355,7 @@ EXHIBIT A -Mozilla Public License.
- System.Data.SqlClient 4.8.6
- System.Diagnostics.EventLog 8.0.0
- System.Diagnostics.PerformanceCounter 8.0.0
- System.Drawing.Common 8.0.5
- System.Drawing.Common 8.0.6
- System.IO.Abstractions 17.2.3
- System.IO.Abstractions.TestingHelpers 17.2.3
- System.Management 8.0.0

View File

@@ -146,11 +146,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerLauncher", "src\module
{FDB3555B-58EF-4AE6-B5F1-904719637AB4} = {FDB3555B-58EF-4AE6-B5F1-904719637AB4}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E775CC2C-24CB-48D6-9C3A-BE4CCE0DB17A}"
ProjectSection(SolutionItems) = preProject
src\tests\win-app-driver\README.md = src\tests\win-app-driver\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "previewpane", "previewpane", "{2F305555-C296-497E-AC20-5FA1B237996A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PreviewHandlerCommon", "src\modules\previewpane\Common\PreviewHandlerCommon.csproj", "{AF2349B8-E5B6-4004-9502-687C1C7730B1}"

199
README.md
View File

@@ -17,14 +17,15 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
| | Current utilities: | |
|--------------|--------------------|--------------|
| [Always on Top](https://aka.ms/PowerToysOverview_AoT) | [PowerToys Awake](https://aka.ms/PowerToysOverview_Awake) | [Command Not Found](https://aka.ms/PowerToysOverview_CmdNotFound) |
| [Color Picker](https://aka.ms/PowerToysOverview_ColorPicker) | [Crop And Lock](https://aka.ms/PowerToysOverview_CropAndLock) | [Environment Variables](https://aka.ms/PowerToysOverview_EnvironmentVariables) |
| [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) | [File Locksmith](https://aka.ms/PowerToysOverview_FileLocksmith) |
| [Hosts File Editor](https://aka.ms/PowerToysOverview_HostsFileEditor) | [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) | [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) |
| [Mouse utilities](https://aka.ms/PowerToysOverview_MouseUtilities) | [Mouse Without Borders](https://aka.ms/PowerToysOverview_MouseWithoutBorders) | [Peek](https://aka.ms/PowerToysOverview_Peek) |
| [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) | [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) |
| [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) | [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) |
| [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) | [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) |
| [Advanced Paste](https://aka.ms/PowerToysOverview_AdvancedPaste) | [Always on Top](https://aka.ms/PowerToysOverview_AoT) | [PowerToys Awake](https://aka.ms/PowerToysOverview_Awake) |
| [Command Not Found](https://aka.ms/PowerToysOverview_CmdNotFound) | [Color Picker](https://aka.ms/PowerToysOverview_ColorPicker) | [Crop And Lock](https://aka.ms/PowerToysOverview_CropAndLock) |
| [Environment Variables](https://aka.ms/PowerToysOverview_EnvironmentVariables) | [FancyZones](https://aka.ms/PowerToysOverview_FancyZones) | [File Explorer Add-ons](https://aka.ms/PowerToysOverview_FileExplorerAddOns) |
| [File Locksmith](https://aka.ms/PowerToysOverview_FileLocksmith) | [Hosts File Editor](https://aka.ms/PowerToysOverview_HostsFileEditor) | [Image Resizer](https://aka.ms/PowerToysOverview_ImageResizer) |
| [Keyboard Manager](https://aka.ms/PowerToysOverview_KeyboardManager) | [Mouse utilities](https://aka.ms/PowerToysOverview_MouseUtilities) | [Mouse Without Borders](https://aka.ms/PowerToysOverview_MouseWithoutBorders) |
| [Peek](https://aka.ms/PowerToysOverview_Peek) | [Paste as Plain Text](https://aka.ms/PowerToysOverview_PastePlain) | [PowerRename](https://aka.ms/PowerToysOverview_PowerRename) |
| [PowerToys Run](https://aka.ms/PowerToysOverview_PowerToysRun) | [Quick Accent](https://aka.ms/PowerToysOverview_QuickAccent) | [Registry Preview](https://aka.ms/PowerToysOverview_RegistryPreview) |
| [Screen Ruler](https://aka.ms/PowerToysOverview_ScreenRuler) | [Shortcut Guide](https://aka.ms/PowerToysOverview_ShortcutGuide) | [Text Extractor](https://aka.ms/PowerToysOverview_TextExtractor) |
| [Video Conference Mute](https://aka.ms/PowerToysOverview_VideoConference) |
## Installing and running Microsoft PowerToys
@@ -40,19 +41,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
<!-- items that need to be updated release to release -->
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F54
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F53
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.80.1/PowerToysUserSetup-0.80.1-x64.exe
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.80.1/PowerToysUserSetup-0.80.1-arm64.exe
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.80.1/PowerToysSetup-0.80.1-x64.exe
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.80.1/PowerToysSetup-0.80.1-arm64.exe
[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.82%22
[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=project%3Amicrosoft%2FPowerToys%2F54
[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.81.0/PowerToysUserSetup-0.81.0-x64.exe
[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.81.0/PowerToysUserSetup-0.81.0-arm64.exe
[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.81.0/PowerToysSetup-0.81.0-x64.exe
[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.81.0/PowerToysSetup-0.81.0-arm64.exe
| Description | Filename | sha256 hash |
|----------------|----------|-------------|
| Per user - x64 | [PowerToysUserSetup-0.80.1-x64.exe][ptUserX64] | 23E35F7B33C6F24237BCA3D5E8EDF9B3BD4802DD656C402B40A4FC82670F8BE3 |
| Per user - ARM64 | [PowerToysUserSetup-0.80.1-arm64.exe][ptUserArm64] | C5EECF0D9D23AB8C14307F91CA28D2CF4DA5932D705F07AE93576C259F74B4D1 |
| Machine wide - x64 | [PowerToysSetup-0.80.1-x64.exe][ptMachineX64] | 62373A08BB8E1C1173D047509F3EA5DCC0BE1845787E07BCDA3F6A09DA2A0C17 |
| Machine wide - ARM64 | [PowerToysSetup-0.80.1-arm64.exe][ptMachineArm64] | 061EF8D1B10D68E69D04F98A2D8E1D8047436174C757770778ED23E01CC3B06C |
| Per user - x64 | [PowerToysUserSetup-0.81.0-x64.exe][ptUserX64] | E62B1EE81954A75355C04E7567B1C9AAD6034AA0C61AD22587F8746D0DC488C8 |
| Per user - ARM64 | [PowerToysUserSetup-0.81.0-arm64.exe][ptUserArm64] | 75330A2DB4F9EF9B548B3B58F8BF3262C8C67E680042639BBBBC87EA244F24E2 |
| Machine wide - x64 | [PowerToysSetup-0.81.0-x64.exe][ptMachineX64] | 29F151B01FE3C94D4FD75F2D6E8F09A6C0F0962385B83A5A733F6717312F639D |
| Machine wide - ARM64 | [PowerToysSetup-0.81.0-arm64.exe][ptMachineArm64] | FCE636220E1FB854771258D9558E07B7532728AD4C722A7920338DEE60DEECF7 |
This is our preferred method.
@@ -98,136 +99,158 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
### 0.80 - March 2024 Update
### 0.81 - Build 2024 Update
In this release, we focused on stability and improvements. The next release is planned to be released during [Microsoft Build 2024](https://build.microsoft.com/) (late May).
In this release, we focused on new features, stability and improvements.
**Highlights**
- New feature: Desired State Configuration support, allowing the use of winget configure for PowerToys. Check the [DSC documentation](https://aka.ms/powertoys-docs-dsc-configure) for more information.
- The Windows App SDK dependency was updated to 1.5.1, fixing many underlying UI issues.
- WebP/WebM files support was added to Peek. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Audio files support was added to Peek. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Automated UI testing for FancyZones Editor was added to CI.
- New utility: Advanced Paste - This is an evolution based on feedback of the Paste As Plain Text utility to do more. It can paste as plain text, markdown, or json directly with the new UX or with a direct keystroke invoke. These are fully locally executed. In addition, it now has an AI powered option as well if you wish with the free form text box. The AI feature is 100% opt-in and requires an Open AI key. This new system will allow us to have more freedom in the future to quickly add in new features like pasting an image directly to a file or handle additional meta data types past just text.
- Thanks [@craigloewen-msft](https://github.com/craigloewen-msft) for the core functionality and [@niels9001](https://github.com/niels9001) for the UI/UX design!
- Command Not Found now uses the PowerShell Gallery release and now supports ARM64. Thanks [@carlos-zamora](https://github.com/carlos-zamora)!
- Fixed most accessibility issues opened after the latest accessibility review.
- Refactored, packaged and released the main Environment Variables Editor, Hosts File Editor and Registry Preview utilities functionality as controls to be integrated into DevHome. Thanks [@dabhattimsft](https://github.com/dabhattimsft) for validating and integrating into DevHome!
### General
- Added a Quick Access entry to access the flyout from PowerToys' tray icon right click menu. Thanks [@pekvasnovsky](https://github.com/pekvasnovsky)!
- Added support for Desired State Configuration in PowerToys, allowing the use of winget configure to configure many settings.
- Fixed crashes on older CPUS by updating .NET to 8.0.4. (This was a hotfix for 0.80)
### Awake
### Advanced Paste
- Fix an issue causing the "Keep screen on" option to disable after Awake deactivated itself.
- New utility: Advanced Paste - This is an evolution based on feedback of the Paste As Plain Text utility to do more. It can paste as plain text, markdown, or json directly with the new UX or with a direct keystroke invoke. These are fully locally executed. In addition, it now has an AI powered option as well if you wish with the free form text box. The AI feature is 100% opt-in and requires an Open AI key. This new system will allow us to have more freedom in the future to quickly add in new features like pasting an image directly to a file or handle additional meta data types past just text.
- Thanks [@craigloewen-msft](https://github.com/craigloewen-msft) for the core functionality and [@niels9001](https://github.com/niels9001) for the UI/UX design!
### AlwaysOnTop
- Enable border anti-aliasing. Thanks [@ewancg](https://github.com/ewancg)!
### Color Picker
- Fixed a UI issue causing the color picker modal to hide part of the color bar. Thanks [@TheChilledBuffalo](https://github.com/TheChilledBuffalo)!
- Improved accessibility by making the Settings and Copy to clipboard buttons focusable.
- Improved accessibility by supporting picking a color using the keyboard.
### Command Not Found
- Now tries to find a preview version of PowerShell if no stable version is found.
- Upgraded the Command Not Found to use the new PowerShell Gallery release and support ARM64. Thanks [@carlos-zamora](https://github.com/carlos-zamora)!
### Environment Variables Editor
- Refactored, packaged and released the main Environment Variables Editor functionality as a control to be integrated into DevHome. Thanks [@dabhattimsft](https://github.com/dabhattimsft) for validating and integrating into DevHome!
### FancyZones
- Fixed a crash loading the editor when there's a layout with an empty name in the configuration file.
- Refactored layout internal data structures and common code to allow for automated testing.
- The pressing of the shift key is now detected through raw input to fix an issue causing the shift key to be locked for some users.
- Fixed window wrap around behavior when overriding Windows key and arrow shortcuts on single monitor scenarios. Thanks [@DanRosenberry](https://github.com/DanRosenberry)!
- Improved accessibility of the editor by listing the keyboard shortcuts in the Canvas Editor.
### File Explorer add-ons
- Fixed a crash occurring in the Monaco previewer when a file being previewed isn't found by the code behind.
- Fixed an issue in the Markdown previewer adding a leading space to code blocks. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
- Fixed wrong location and scaling of preview results on screens with different DPIs.
- Added better clean up code to thumbnail handlers to prevent locking files.
- Updated Monaco to 0.47 and added the new sticky scroll setting for DevFiles viewer. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
- Added the new font size setting for DevFiles viewer. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
- Added support for .srt (subtitle) file previewing in DevFiles viewer. Thanks [@PesBandi](https://github.com/PesBandi)!
### File Locksmith
### Hosts File Editor
- Allow multiple lines to wrap when viewing the modal with selected file paths. Thanks [@sanidhyas3s](https://github.com/sanidhyas3s)!
- Refactored, packaged and released the main Hosts File Editor functionality as a control to be integrated into DevHome. Thanks [@dabhattimsft](https://github.com/dabhattimsft) for validating and integrating into DevHome!
### Image Resizer
- Supported narrator announcing the checkboxes in the UI and the sizes combobox. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Improved accessibility by increasing contrast in the text color of combobox items.
### Installer
- Fixed the final directory name of the PowerToys Run VSCode Workspaces plugin in the installation directory to match the plugin name. Thanks [@zetaloop](https://github.com/zetaloop)!
- Used more generic names for the bootstrap steps, so that "Installing PowerToys" is not shown when uninstalling.
- Fixed some install failures when the folders the DSC module is to be installed in isn't accessible by the WiX installer. (This was a hotfix for 0.80)
- Detecting install location for DSC now uses registry instead of WMI to improve performance. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed an error causing the machine scope installer to not install correctly in machines where the documents folder is in a UNC network path. We're still working in a fix for the user scope installer.
### Keyboard Manager
- Fixed an issue that would clear out KBM mappings when certain numpad keys were used as the second key of a chord.
- Added a comment in localization files so that translators won't translate "Text" as "SMS".
- Fixed startup crashes in the editor when the Visual C++ Redistributable wasn't installed. (This was a hotfix for 0.80)
- Fixed an accessibility issue where the first button wasn't focused after adding a new row in the editor.
- Environment Variables are now expanded in arguments of programs started through a shortcut. Thanks [@HydroH](https://github.com/HydroH)!
### Paste as Plain Text
- Paste as Plain Text was removed as a separate utility, since its functionality is now part of the Advanced Paste utility.
### Peek
- Added support to .WebP/.WebM files in the image/video previewer. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Added support for audio files. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed an issue causing the open file button in the title bar to be un-clickable. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed an issue when previewing a folder with a dot in the name that caused Peek to try to preview it as a file. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Updated icons, tweaked UI and refactored internal code. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)!
- Updated Monaco to 0.47 and added the new sticky scroll setting for DevFiles viewer. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
- Added the new font size setting for DevFiles viewer. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
- Upgrade the SharpCompress dependency to 0.37.2 and fixed archive parsing. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed aliasing in the image viewer.
- Added support for .srt (subtitle) file previewing in DevFiles viewer. Thanks [@PesBandi](https://github.com/PesBandi)!
### Power Rename
- Fixed the descriptions that were mixed up in the regex helper (\S and \w).
### PowerToys Run
- Added a setting to the Windows Search plugin to exclude files and patterns from the results. Thanks [@HydroH](https://github.com/HydroH)!
- Fixed an issue showing thumbnails caused by a hash collision between similar images.
- Added the "checkbox and multiline text box" additional property type for plugins and improved multiline text handling. Thanks [@htcfreek](https://github.com/htcfreek)!
- Added support for UNC paths starting with // in the Folder plugin. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed the plugin load failed message to list the failed plugins. Thanks [@belkiss](https://github.com/belkiss)!
- Icons for MSIX packages are now updated when a package update is detected. Thanks [@HydroH](https://github.com/HydroH)!
- Use Mica backdrop instead of Acrylic to fix random crashes caused by the Windows composition being momentarily turned off.
- Improved accessibility in the results list action buttons by improving contrast of hovered/focused buttons.
### Quick Accent
- Added the Schwa character to the Italian character set. Thanks [@damantioworks](https://github.com/damantioworks)!
- Added support for the Esperanto character set. Thanks [@salutontalk](https://github.com/salutontalk) and [@ccmywish](https://github.com/ccmywish)!
- Added the ǽ and ϑ characters. Thanks [@PesBandi](https://github.com/PesBandi)!
### Registry Preview
- Allow alternative valid names for the root keys. Thanks [@e-t-l](https://github.com/e-t-l)!
- Fixed an issue causing many pick file windows to be opened simultaneously. Thanks [@randyrants](https://github.com/randyrants)!
### Screen Ruler
- Updated the measure icons for clarity. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker) and [@niels9001](https://github.com/niels9001)!
### Shortcut Guide
- Updated the Emoji shortcut that is shown to the new Windows key + period (.) hotkey.
- Refactored, packaged and released the main Registry Preview functionality as a control to be integrated into DevHome. Thanks [@dabhattimsft](https://github.com/dabhattimsft) for validating and integrating into DevHome!
### Text Extractor
- Fixed issues creating the extract layout on certain monitor configurations.
### Video Conference Mute
- Added enable/disable telemetry to get usage data.
- Fixed an issue causing the Settings page to not be opened when clicking the Settings button in Text Extractor's overlay. (This was a hotfix for 0.80)
### Settings
- Added locks to some terms (like the name of some utilities) so that they aren't localized.
- Fixed some shortcuts not being shown properly in the Flyout and Dashboard. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Updated image for Color Picker and outdated animations for utilities in OOBE. Thanks [@niels9001](https://github.com/niels9001)!
- Improved UI ordering of the File Explorer add-ons. Thanks [@niels9001](https://github.com/niels9001)!
- Applied fixes to theme overriding and cleaned up unneeded code. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed misspells in references to the Hosts File Editor utility. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Improved accessibility of the Select Folder button in the Settings Backup UI.
- Improved accessibility by improving focus and tab navigation in the ColorPicker page. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Added a description to the fallback encoder setting in the Image Resizer page. Thanks [@Kissaki](https://github.com/Kissaki)!
- Refactored and improved performance in the PowerToys Run plugins UI in the Settings page. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- Fixed a crash when a user cleared the contents of a Number Box in the PowerToys Run plugins additional options. Thanks [@htcfreek](https://github.com/htcfreek)!
- Update the PATH environment variables with the user scope PATH when entering the Command Not Found page to improve PowerShell detection.
### Documentation
- Added FastWeb plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@CCcat8059](https://github.com/CCcat8059)!
- Removed the old security link to MSRC from the create new issue page, since security.md is already linked there.
- Added clarity regarding unofficial plugins to the PowerToys Run thirdPartyRunPlugins.md docs.
- Added the WebSearchShortcut plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@Daydreamer-riri](https://github.com/Daydreamer-riri)!
- Updated COMMUNITY.md with the project managers that are part of the core team.
- Improved the DSC samples.
- Added the 1Password plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@KairuDeibisu](https://github.com/KairuDeibisu)!
- Added the UnicodeInput plugin to PowerToys Run thirdPartyRunPlugins.md docs. Thanks [@nathancartlidge](https://github.com/nathancartlidge)!
### Development
- Updated System.Drawing.Common to 8.0.3 to fix CI builds after the .NET 8.0.3 upgrade was released.
- Adjusted the GitHub action names for releasing to winget and Microsoft Store so they're clearer in the UI.
- Upgraded WinAppSDK to 1.5.1, fixing many related issues.
- Consolidate the WebView2 version used by WinUI 2 in the Keyboard Manager Editor.
- Unified the use of Precompiled Headers when building on CI. Thanks [@dfederm](https://github.com/dfederm)!
- Added UI tests for FancyZones Editor in CI.
- Added a GitHub bot to identify possible duplicates when a new issue is created. Thanks [@craigloewen-msft](https://github.com/craigloewen-msft)!
- Updated the WiX installer dependency to 3.14.1 to fix possible security issues.
- Changed the pipelines to use pipeline artifacts instead of build artifacts. Thanks [@dfederm](https://github.com/dfederm)!
- Added the -graph parameter for pipelines. Thanks [@dfederm](https://github.com/dfederm)!
- Tests in the pipelines now run as part of the build step to save on CI time. Thanks [@dfederm](https://github.com/dfederm)!
- Updated System.Drawing.Common to 8.0.5 to fix CI builds after the .NET 8.0.5 upgrade was released.
- Fixed file permissions when doing a build using cache on PR CI. Thanks [@dfederm](https://github.com/dfederm)!
- Removed the Test SDK reference on ARM64 to fix local building for ARM64. Thanks [@dfederm](https://github.com/dfederm)!
- Replaced make_pair with RemapBufferRow in Keyboard Manager internal code. Thanks [@masaru-iritani](https://github.com/masaru-iritani)!
- Added CODEOWNERS file to protect sensitive parts of the repo. Thanks [@htcfreek](https://github.com/htcfreek) for the help in figuring out how to make the spellcheck folder an exception!
- Added comments in code. to make it clear what the error badge in PowerToys Run plugin list in Settings means. Thanks [@Jay-o-Way](https://github.com/Jay-o-Way)!
- Enabled caching by default in the PR CI pipelines. Thanks [@dfederm](https://github.com/dfederm)!
- Disabled caching for PR started from forks, since those were failing. Thanks [@dfederm](https://github.com/dfederm)!
- Removed baseline files for policy checking and turned on the "TSA" process in the release pipelines instead.
- Added caching of nuget packages in the PR CI pipelines. Thanks [@dfederm](https://github.com/dfederm)!
- Updated the release CI pipelines TouchdownBuildTask to v3.
- Moved the release CI pipelines to ESRPv5.
- Added a policy for GitHub Copilot Workspaces for the repo on GitHub. Thanks [@Aaron-Junker](https://github.com/Aaron-Junker)!
#### What is being planned for version 0.81
#### What is being planned for version 0.82
For [v0.81][github-next-release-work], we'll work on the items below:
For [v0.82][github-next-release-work], we'll work on the items below:
- Stability / bug fixes
- Language selection
- New module: File Actions Menu
The next release is planned to be released during Microsoft Build 2024.
## PowerToys Community
The PowerToys team is extremely grateful to have the [support of an amazing active community][community-link]. The work you do is incredibly important. PowerToys wouldnt be nearly what it is today without your help filing bugs, updating documentation, guiding the design, or writing features. We want to say thank you and take time to recognize your work. Month by month, you directly help make PowerToys a better piece of software.

View File

@@ -8,7 +8,7 @@
<DirectoryRef Id="INSTALLFOLDER" FileSource="$(var.BinDir)">
<Component Id="powertoys_per_machine_comp" Win64="yes">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys">
<RegistryValue Type="string" Name="InstallScope" Value="$(var.InstallScope)" />
<RegistryValue Type="string" Name="InstallScope" Value="$(var.InstallScope)" />
</RegistryKey>
</Component>
<Component Id="powertoys_toast_clsid" Win64="yes">
@@ -46,34 +46,19 @@
</Component>
</DirectoryRef>
<?if $(var.PerUser) = "true" ?>
<DirectoryRef Id="PersonalFolder">
<Directory Id="WindowsPowerShellFolder" Name="PowerShell">
<Directory Id="PowerShellModulesFolder" Name="Modules">
<Directory Id="PowerToysDscFolder" Name="Microsoft.PowerToys.Configure">
<Directory Id="PowerToysDscVerFolder" Name="$(var.Version)">
<Component Id="PowerToysDSC" Win64="yes" Guid="4A033E3B-6590-43FD-8FBD-27F9DF557F7F">
<RegistryValue Root="HKCU"
Key="Software\[Manufacturer]\[ProductName]"
Name="DSCInstalled"
Type="integer"
Value="1"
KeyPath="yes"/>
<!-- Don't fail installation because of DSC. Files are marked as not vital. -->
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psd1" Id="PTConf.psd1" />
<File Vital="no" Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psm1" Id="PTConf.psm1" />
<RemoveFolder Id="RemoveThisFolder" On="uninstall" />
<RemoveFolder Id="RemovePowerToysDscVerFolder" Directory="PowerToysDscVerFolder" On="uninstall" />
<RemoveFolder Id="RemovePowerToysDscFolder" Directory="PowerToysDscFolder" On="uninstall" />
<RemoveFolder Id="RemovePowerShellModulesFolder" Directory="PowerShellModulesFolder" On="uninstall" />
<RemoveFolder Id="RemoveWindowsPowerShellFolder" Directory="WindowsPowerShellFolder" On="uninstall" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<DirectoryRef Id="DSCModulesReferenceFolder">
<Component Id="PowerToysDSCReference" Win64="yes" Guid="40869ACB-0BEB-4911-AE41-5E73BC1586A9">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="DSCModulesReference" Value="" KeyPath="yes"/>
</RegistryKey>
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psd1" Id="PTConfReference.psd1" />
<File Source="$(var.RepoDir)\src\dsc\Microsoft.PowerToys.Configure\Generated\Microsoft.PowerToys.Configure\$(var.Version)\Microsoft.PowerToys.Configure.psm1" Id="PTConfReference.psm1" />
</Component>
</DirectoryRef>
<?else?>
<?if $(var.PerUser) = "true" ?>
<!-- DSC module files for PerUser handled in InstallDSCModule custom action. -->
<?else?>
<DirectoryRef Id="ProgramFiles64Folder">
<Directory Id="WindowsPowerShellFolder" Name="WindowsPowerShell">
<Directory Id="PowerShellModulesFolder" Name="Modules">
@@ -89,7 +74,7 @@
</Directory>
</Directory>
</DirectoryRef>
<?endif?>
<?endif?>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="PowerToysStartMenuShortcut" >
@@ -130,23 +115,27 @@
</Fragment>
<Fragment>
<ComponentGroup Id="CoreComponents">
<Component Id="RemoveCoreFolder" Guid="9330BD69-2D12-4D98-B0C7-66C99564D619" Directory="INSTALLFOLDER" >
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveCoreFolder" Value="" KeyPath="yes"/>
</RegistryKey>
<RemoveFolder Id="RemoveBaseApplicationsAssetsFolder" Directory="BaseApplicationsAssetsFolder" On="uninstall"/>
<RemoveFolder Id="RemoveWinUI3AppsInstallFolder" Directory="WinUI3AppsInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveWinUI3AppsAssetsFolder" Directory="WinUI3AppsAssetsFolder" On="uninstall"/>
<RemoveFolder Id="RemoveINSTALLFOLDER" Directory="INSTALLFOLDER" On="uninstall"/>
</Component>
<ComponentRef Id="powertoys_exe" />
<ComponentRef Id="PowerToysStartMenuShortcut"/>
<ComponentRef Id="powertoys_per_machine_comp" />
<ComponentRef Id="powertoys_toast_clsid" />
<ComponentRef Id="License_rtf" />
<ComponentRef Id="Notice_md" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="PowerToysDSC" />
<Component Id="RemoveCoreFolder" Guid="9330BD69-2D12-4D98-B0C7-66C99564D619" Directory="INSTALLFOLDER" >
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveCoreFolder" Value="" KeyPath="yes"/>
</RegistryKey>
<RemoveFolder Id="RemoveBaseApplicationsAssetsFolder" Directory="BaseApplicationsAssetsFolder" On="uninstall"/>
<RemoveFolder Id="RemoveDSCModulesReferenceFolder" Directory="DSCModulesReferenceFolder" On="uninstall"/>
<RemoveFolder Id="RemoveWinUI3AppsInstallFolder" Directory="WinUI3AppsInstallFolder" On="uninstall"/>
<RemoveFolder Id="RemoveWinUI3AppsAssetsFolder" Directory="WinUI3AppsAssetsFolder" On="uninstall"/>
<RemoveFolder Id="RemoveINSTALLFOLDER" Directory="INSTALLFOLDER" On="uninstall"/>
</Component>
<ComponentRef Id="powertoys_exe" />
<ComponentRef Id="PowerToysStartMenuShortcut"/>
<ComponentRef Id="powertoys_per_machine_comp" />
<ComponentRef Id="powertoys_toast_clsid" />
<ComponentRef Id="License_rtf" />
<ComponentRef Id="Notice_md" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="PowerToysDSCReference" />
<?if $(var.PerUser) = "false" ?>
<ComponentRef Id="PowerToysDSC" />
<?endif?>
</ComponentGroup>
</Fragment>
</Wix>

View File

@@ -136,6 +136,11 @@
<Custom Action="SetUninstallCommandNotFoundParam" Before="UninstallCommandNotFound" />
<Custom Action="SetUpgradeCommandNotFoundParam" Before="UpgradeCommandNotFound" />
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
<?if $(var.PerUser) = "true" ?>
<Custom Action="SetInstallDSCModuleParam" Before="InstallDSCModule" />
<?endif?>
<Custom Action="SetUnApplyModulesRegistryChangeSetsParam" Before="UnApplyModulesRegistryChangeSets" />
<Custom Action="CheckGPO" After="InstallInitialize">
NOT Installed
@@ -149,7 +154,10 @@
<!--<Custom Action="InstallEmbeddedMSIXTask" After="InstallFinalize">
NOT Installed
</Custom>-->
<Custom Action="TelemetryLogInstallSuccess" After="InstallFinalize">
<?if $(var.PerUser) = "true" ?>
<Custom Action="InstallDSCModule" After="InstallFiles"/>
<?endif?>
<Custom Action="TelemetryLogInstallSuccess" After="InstallFinalize">
NOT Installed
</Custom>
<Custom Action="TelemetryLogUninstallSuccess" After="InstallFinalize">
@@ -177,8 +185,12 @@
<!--<Custom Action="UninstallEmbeddedMSIXTask" After="InstallFinalize">
Installed AND (REMOVE="ALL")
</Custom>-->
<?if $(var.PerUser) = "true" ?>
<Custom Action="UninstallDSCModule" After="InstallFinalize">
Installed AND (REMOVE="ALL")
</Custom>
<?endif?>
<Custom Action="TerminateProcesses" Before="InstallValidate" />
<Custom Action="LaunchPowerToys" Before="InstallFinalize">NOT Installed</Custom>
</InstallExecuteSequence>
@@ -211,6 +223,10 @@
Property="UnApplyModulesRegistryChangeSets"
Value="[INSTALLFOLDER]" />
<CustomAction Id="SetInstallDSCModuleParam"
Property="InstallDSCModule"
Value="[INSTALLFOLDER]" />
<CustomAction Id="SetUninstallCommandNotFoundParam"
Property="UninstallCommandNotFound"
Value="[INSTALLFOLDER]" />
@@ -265,6 +281,21 @@
DllEntry="UninstallEmbeddedMSIXCA"
/>
<CustomAction Id="InstallDSCModule"
Return="ignore"
Impersonate="yes"
Execute="deferred"
BinaryKey="PTCustomActions"
DllEntry="InstallDSCModuleCA"
/>
<CustomAction Id="UninstallDSCModule"
Return="ignore"
Impersonate="yes"
BinaryKey="PTCustomActions"
DllEntry="UninstallDSCModuleCA"
/>
<CustomAction Id="UninstallServicesTask"
Return="ignore"
Impersonate="yes"
@@ -407,6 +438,7 @@
<Directory Id="INSTALLFOLDER" Name="PowerToys">
<Directory Id="BaseApplicationsAssetsFolder" Name="Assets">
</Directory>
<Directory Id="DSCModulesReferenceFolder" Name="DSCModules" />
<Directory Id="WinUI3AppsInstallFolder" Name="WinUI3Apps">
<Directory Id="WinUI3AppsMicrosoftUIXamlInstallFolder" Name="Microsoft.UI.Xaml">
<Directory Id="WinUI3AppsMicrosoftUIXamlAssetsInstallFolder" Name="Assets" />
@@ -421,9 +453,6 @@
<Directory Id="ApplicationProgramsFolder" Name="PowerToys (Preview)"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
<?if $(var.PerUser) = "true" ?>
<Directory Id="PersonalFolder" Name="UserHomeDocuments" />
<?endif?>
</Directory>
</Fragment>
</Wix>

View File

@@ -139,6 +139,23 @@ LExit:
return SUCCEEDED(hr);
}
static std::filesystem::path GetUserPowerShellModulesPath()
{
PWSTR myDocumentsBlockPtr;
if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, NULL, &myDocumentsBlockPtr)))
{
const std::wstring myDocuments{ myDocumentsBlockPtr };
CoTaskMemFree(myDocumentsBlockPtr);
return std::filesystem::path(myDocuments) / "PowerShell" / "Modules";
}
else
{
CoTaskMemFree(myDocumentsBlockPtr);
return {};
}
}
UINT __stdcall LaunchPowerToysCA(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
@@ -162,7 +179,7 @@ UINT __stdcall LaunchPowerToysCA(MSIHANDLE hInstall)
BOOL isSystemUser = IsLocalSystem();
if (isSystemUser) {
auto action = [&commandLine](HANDLE userToken) {
STARTUPINFO startupInfo{ .cb = sizeof(STARTUPINFO), .wShowWindow = SW_SHOWNORMAL };
PROCESS_INFORMATION processInformation;
@@ -317,6 +334,125 @@ LExit:
return WcaFinalize(er);
}
const wchar_t* DSC_CONFIGURE_PSD1_NAME = L"Microsoft.PowerToys.Configure.psd1";
const wchar_t* DSC_CONFIGURE_PSM1_NAME = L"Microsoft.PowerToys.Configure.psm1";
UINT __stdcall InstallDSCModuleCA(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
std::wstring installationFolder;
hr = WcaInitialize(hInstall, "InstallDSCModuleCA");
ExitOnFailure(hr, "Failed to initialize");
hr = getInstallFolder(hInstall, installationFolder);
ExitOnFailure(hr, "Failed to get installFolder.");
{
const auto baseModulesPath = GetUserPowerShellModulesPath();
if (baseModulesPath.empty())
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to determine Powershell modules path");
}
const auto modulesPath = baseModulesPath / L"Microsoft.PowerToys.Configure" / get_product_version();
std::error_code errorCode;
fs::create_directories(modulesPath, errorCode);
if (errorCode)
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to create Powershell modules folder");
}
for (const auto* filename : { DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME })
{
fs::copy_file(fs::path(installationFolder) / "DSCModules" / filename, modulesPath / filename, fs::copy_options::overwrite_existing, errorCode);
if (errorCode)
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to copy Powershell modules file");
}
}
}
LExit:
if (SUCCEEDED(hr))
{
er = ERROR_SUCCESS;
Logger::info(L"DSC module was installed!");
}
else
{
er = ERROR_INSTALL_FAILURE;
Logger::error(L"Couldn't install DSC module!");
}
return WcaFinalize(er);
}
UINT __stdcall UninstallDSCModuleCA(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "UninstallDSCModuleCA");
ExitOnFailure(hr, "Failed to initialize");
{
const auto baseModulesPath = GetUserPowerShellModulesPath();
if (baseModulesPath.empty())
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to determine Powershell modules path");
}
const auto powerToysModulePath = baseModulesPath / L"Microsoft.PowerToys.Configure";
const auto versionedModulePath = powerToysModulePath / get_product_version();
std::error_code errorCode;
for (const auto* filename : { DSC_CONFIGURE_PSD1_NAME, DSC_CONFIGURE_PSM1_NAME })
{
fs::remove(versionedModulePath / filename, errorCode);
if (errorCode)
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to delete DSC file");
}
}
for (const auto* modulePath : { &versionedModulePath, &powerToysModulePath })
{
fs::remove(*modulePath, errorCode);
if (errorCode)
{
hr = E_FAIL;
ExitOnFailure(hr, "Unable to delete DSC folder");
}
}
}
LExit:
if (SUCCEEDED(hr))
{
er = ERROR_SUCCESS;
Logger::info(L"DSC module was uninstalled!");
}
else
{
er = ERROR_INSTALL_FAILURE;
Logger::error(L"Couldn't uninstall DSC module!");
}
return WcaFinalize(er);
}
UINT __stdcall InstallEmbeddedMSIXCA(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;

View File

@@ -18,10 +18,12 @@ EXPORTS
CertifyVirtualCameraDriverCA
InstallVirtualCameraDriverCA
InstallEmbeddedMSIXCA
InstallDSCModuleCA
UnApplyModulesRegistryChangeSetsCA
UninstallVirtualCameraDriverCA
UnRegisterContextMenuPackagesCA
UninstallEmbeddedMSIXCA
UninstallDSCModuleCA
UninstallServicesCA
UninstallCommandNotFoundModuleCA
UpgradeCommandNotFoundModuleCA

View File

@@ -172,4 +172,8 @@ namespace winrt::PowerToys::GPOWrapper::implementation
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetAllowedAdvancedPasteOnlineAIModelsValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getAllowedAdvancedPasteOnlineAIModelsValue());
}
}

View File

@@ -49,6 +49,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredEnvironmentVariablesEnabledValue();
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
static GpoRuleConfigured GetAllowedAdvancedPasteOnlineAIModelsValue();
};
}

View File

@@ -53,6 +53,7 @@ namespace PowerToys
static GpoRuleConfigured GetConfiguredEnvironmentVariablesEnabledValue();
static GpoRuleConfigured GetConfiguredQoiPreviewEnabledValue();
static GpoRuleConfigured GetConfiguredQoiThumbnailsEnabledValue();
static GpoRuleConfigured GetAllowedAdvancedPasteOnlineAIModelsValue();
}
}
}

View File

@@ -70,7 +70,7 @@ namespace powertoys_gpo {
// The registry value names for other PowerToys policies.
const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation";
const std::wstring POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS = L"PowerLauncherAllPluginsEnabledState";
const std::wstring POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS = L"AllowPowerToysAdvancedPasteOnlineAIModels";
inline std::optional<std::wstring> readRegistryStringValue(HKEY hRootKey, const std::wstring& subKey, const std::wstring& value_name)
{
@@ -470,4 +470,9 @@ namespace powertoys_gpo {
{
return getUtilityEnabledValue(POLICY_CONFIGURE_ENABLED_QOI_THUMBNAILS);
}
inline gpo_rule_configured_t getAllowedAdvancedPasteOnlineAIModelsValue()
{
return getUtilityEnabledValue(POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS);
}
}

View File

@@ -1,11 +1,11 @@
<?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.9" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyDefinitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.10" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyNamespaces>
<target prefix="powertoys" namespace="Microsoft.Policies.PowerToys" />
</policyNamespaces>
<resources minRequiredRevision="1.9"/><!-- Last changed with PowerToys v0.81.0 -->
<resources minRequiredRevision="1.10"/><!-- Last changed with PowerToys v0.81.1 -->
<supportedOn>
<definitions>
<definition name="SUPPORTED_POWERTOYS_0_64_0" displayName="$(string.SUPPORTED_POWERTOYS_0_64_0)"/>
@@ -18,6 +18,7 @@
<definition name="SUPPORTED_POWERTOYS_0_77_0" displayName="$(string.SUPPORTED_POWERTOYS_0_77_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_78_0" displayName="$(string.SUPPORTED_POWERTOYS_0_78_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_81_0" displayName="$(string.SUPPORTED_POWERTOYS_0_81_0)"/>
<definition name="SUPPORTED_POWERTOYS_0_81_1" displayName="$(string.SUPPORTED_POWERTOYS_0_81_1)"/>
</definitions>
</supportedOn>
<categories>
@@ -28,6 +29,9 @@
<category name="PowerToysRun" displayName="$(string.PowerToysRun)">
<parentCategory ref="PowerToys" />
</category>
<category name="AdvancedPaste" displayName="$(string.AdvancedPaste)">
<parentCategory ref="PowerToys" />
</category>
</categories>
<policies>
@@ -489,5 +493,15 @@
<list id="PowerToysRunIndividualPluginEnabledList" explicitValue="true" />
</elements>
</policy>
<policy name="AllowPowerToysAdvancedPasteOnlineAIModels" class="Both" displayName="$(string.AllowPowerToysAdvancedPasteOnlineAIModels)" explainText="$(string.AllowPowerToysAdvancedPasteOnlineAIModelsDescription)" key="Software\Policies\PowerToys" valueName="AllowPowerToysAdvancedPasteOnlineAIModels">
<parentCategory ref="AdvancedPaste" />
<supportedOn ref="SUPPORTED_POWERTOYS_0_81_1" />
<enabledValue>
<decimal value="1" />
</enabledValue>
<disabledValue>
<decimal value="0" />
</disabledValue>
</policy>
</policies>
</policyDefinitions>

View File

@@ -1,7 +1,7 @@
<?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.9" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<policyDefinitionResources xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" revision="1.10" schemaVersion="1.0" xmlns="http://schemas.microsoft.com/GroupPolicy/2006/07/PolicyDefinitions">
<displayName>PowerToys</displayName>
<description>PowerToys</description>
<resources>
@@ -9,6 +9,7 @@
<string id="PowerToys">Microsoft PowerToys</string>
<string id="InstallerUpdates">Installer and Updates</string>
<string id="PowerToysRun">PowerToys Run</string>
<string id="AdvancedPaste">Advanced Paste</string>
<string id="SUPPORTED_POWERTOYS_0_64_0">PowerToys version 0.64.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_68_0">PowerToys version 0.68.0 or later</string>
@@ -20,6 +21,7 @@
<string id="SUPPORTED_POWERTOYS_0_77_0">PowerToys version 0.77.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_78_0">PowerToys version 0.78.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_81_0">PowerToys version 0.81.0 or later</string>
<string id="SUPPORTED_POWERTOYS_0_81_1">PowerToys version 0.81.1 or later</string>
<string id="ConfigureGlobalUtilityEnabledStateDescription">This policy configures the enabled state for all PowerToys utilities.
@@ -118,6 +120,12 @@ If you disable or don't configure this policy, either the user or the policy "Co
You can set the enabled state for all plugins not configured by this policy using the policy "Configure enabled state for all plugins".
Note: Changes require a restart of PowerToys Run.
</string>
<string id="AllowPowerToysAdvancedPasteOnlineAIModelsDescription">This policy configures the enabled disable state for using Advanced Paste online AI models.
If you enable or don't configure this policy, the user takes control over the enabled state of the Enable paste with AI Advanced Paste setting.
If you disable this policy, the user won't be able to enable Enable paste with AI Advanced Paste setting and use Advanced Paste AI prompt nor set up the Open AI key in PowerToys Settings.
</string>
<string id="ConfigureGlobalUtilityEnabledState">Configure global utility enabled state</string>
<string id="ConfigureEnabledUtilityAdvancedPaste">Advanced Paste: Configure enabled state</string>
@@ -165,6 +173,7 @@ Note: Changes require a restart of PowerToys Run.
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
<string id="ConfigureEnabledUtilityFileExplorerQOIPreview">QOI file preview: Configure enabled state</string>
<string id="ConfigureEnabledUtilityFileExplorerQOIThumbnails">QOI file thumbnail: Configure enabled state</string>
<string id="AllowPowerToysAdvancedPasteOnlineAIModels">Advanced Paste: Allow using online AI models</string>
</stringTable>
<presentationTable>

View File

@@ -225,4 +225,7 @@
<data name="TermsLink.Text" xml:space="preserve">
<value>OpenAI Terms</value>
</data>
<data name="OpenAIGpoDisabled" xml:space="preserve">
<value>To custom with AI is disabled by your organization</value>
</data>
</root>

View File

@@ -16,7 +16,6 @@ using CommunityToolkit.Mvvm.Input;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.Win32;
using Windows.ApplicationModel.DataTransfer;
using WinUIEx;
@@ -81,32 +80,40 @@ namespace AdvancedPaste.ViewModels
{
GetClipboardData();
var openAIKey = AICompletionsHelper.LoadOpenAIKey();
var currentKey = aiHelper.GetKey();
bool keyChanged = openAIKey != currentKey;
if (keyChanged)
if (PowerToys.GPOWrapper.GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
app.GetMainWindow().StartLoading();
Task.Run(() =>
{
aiHelper.SetOpenAIKey(openAIKey);
}).ContinueWith(
(t) =>
{
_dispatcherQueue.TryEnqueue(() =>
{
app.GetMainWindow().FinishLoading(aiHelper.IsAIEnabled);
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
});
},
TaskScheduler.Default);
IsCustomAIEnabled = false;
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
}
else
{
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
var openAIKey = AICompletionsHelper.LoadOpenAIKey();
var currentKey = aiHelper.GetKey();
bool keyChanged = openAIKey != currentKey;
if (keyChanged)
{
app.GetMainWindow().StartLoading();
Task.Run(() =>
{
aiHelper.SetOpenAIKey(openAIKey);
}).ContinueWith(
(t) =>
{
_dispatcherQueue.TryEnqueue(() =>
{
app.GetMainWindow().FinishLoading(aiHelper.IsAIEnabled);
OnPropertyChanged(nameof(InputTxtBoxPlaceholderText));
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
});
},
TaskScheduler.Default);
}
else
{
IsCustomAIEnabled = IsClipboardDataText && aiHelper.IsAIEnabled;
}
}
ClipboardHistoryEnabled = IsClipboardHistoryEnabled();
@@ -146,7 +153,11 @@ namespace AdvancedPaste.ViewModels
{
app.GetMainWindow().ClearInputText();
if (!aiHelper.IsAIEnabled)
if (PowerToys.GPOWrapper.GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled)
{
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAIGpoDisabled");
}
else if (!aiHelper.IsAIEnabled)
{
return ResourceLoaderInstance.ResourceLoader.GetString("OpenAINotConfigured");
}

View File

@@ -8,7 +8,7 @@
xmlns:winuiex="using:WinUIEx"
x:Uid="Window"
Width="680"
MinWidth="480"
MinWidth="520"
MinHeight="320"
mc:Ignorable="d">
<Window.SystemBackdrop>

View File

@@ -412,23 +412,23 @@
<ListView.ItemTemplate>
<DataTemplate x:DataType="models:Entry">
<Grid
Margin="0"
AutomationProperties.Name="{x:Bind Address, Mode=OneWay}"
Background="Transparent"
ColumnSpacing="8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="256" />
<ColumnDefinition Width="*" MinWidth="150" />
<!-- Address -->
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" MinWidth="120" />
<!-- Comment -->
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="20" />
<!-- Status -->
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="20" />
<!-- Duplicate -->
<ColumnDefinition Width="Auto" />
<!-- ToggleSwitch -->
<ColumnDefinition Width="Auto" />
<!-- DeleteEntry -->
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Column="0"
@@ -511,7 +511,7 @@
Grid.Column="4"
Width="40"
MinWidth="0"
HorizontalAlignment="Right"
HorizontalAlignment="Center"
GotFocus="Entries_GotFocus"
IsOn="{x:Bind Active, Mode=TwoWay}"
OffContent=""
@@ -705,10 +705,13 @@
Padding="16,0"
HorizontalAlignment="Stretch"
AcceptsReturn="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollMode="Auto"
ScrollViewer.IsHorizontalRailEnabled="True"
ScrollViewer.IsVerticalRailEnabled="True"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollMode="Enabled"
TextWrapping="Wrap" />
TextWrapping="NoWrap" />
</ContentDialog>
<TeachingTip

View File

@@ -88,7 +88,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter.Properties {
}
/// <summary>
/// Looks up a localized string similar to Provides unit conversion (e.g. 10 ft in m)..
/// Looks up a localized string similar to Provides unit conversion (e.g. 10 ft in m).
/// </summary>
public static string plugin_description {
get {

View File

@@ -127,7 +127,7 @@
<value>Copy {0} to clipboard</value>
</data>
<data name="plugin_description" xml:space="preserve">
<value>Provides unit conversion (e.g. 10 ft in m).</value>
<value>Provides unit conversion (e.g. 10 ft in m)</value>
</data>
<data name="plugin_name" xml:space="preserve">
<value>Unit Converter</value>

View File

@@ -70,7 +70,7 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.Properties {
}
/// <summary>
/// Looks up a localized string similar to Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code..
/// Looks up a localized string similar to Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code. The VS Code instance needs to be in PATH.
/// </summary>
internal static string PluginDescription {
get {

View File

@@ -125,7 +125,7 @@
<comment>Used to indicate the location where something is</comment>
</data>
<data name="PluginDescription" xml:space="preserve">
<value>Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code. The VS Code instance needs to be in PATH.</value>
<value>Opens workspaces, remote machines (SSH or Codespaces) and containers, previously opened in VS Code. The VS Code instance needs to be in PATH</value>
<comment>VS Code is the name of a product. PATH is the name of an environment variable. Don't translate it.</comment>
</data>
<data name="SSHRemoteMachine" xml:space="preserve">

View File

@@ -88,7 +88,7 @@ namespace Community.PowerToys.Run.Plugin.ValueGenerator.Properties {
}
/// <summary>
/// Looks up a localized string similar to Calculates hashes and generate values..
/// Looks up a localized string similar to Calculates hashes and generate values.
/// </summary>
public static string plugin_description {
get {

View File

@@ -127,7 +127,7 @@
<value>Value Generator Error</value>
</data>
<data name="plugin_description" xml:space="preserve">
<value>Calculates hashes and generate values.</value>
<value>Calculates hashes and generate values</value>
</data>
<data name="plugin_name" xml:space="preserve">
<value>Value Generator</value>

View File

@@ -70,7 +70,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch.Properties {
}
/// <summary>
/// Looks up a localized string similar to Searches the web with your default search engine..
/// Looks up a localized string similar to Searches the web with your default search engine.
/// </summary>
public static string plugin_description {
get {

View File

@@ -121,7 +121,7 @@
<value>the default browser</value>
</data>
<data name="plugin_description" xml:space="preserve">
<value>Searches the web with your default search engine.</value>
<value>Searches the web with your default search engine</value>
</data>
<data name="plugin_global_if_uri" xml:space="preserve">
<value>Don't include in global results on queries that are URIs</value>

View File

@@ -124,7 +124,7 @@ namespace Microsoft.Plugin.Folder.Properties {
}
/// <summary>
/// Looks up a localized string similar to Navigates folders starting from a drive letter &apos;C:\&apos; or from the user home &apos;~&apos;..
/// Looks up a localized string similar to Navigates folders starting from a drive letter &apos;C:\&apos; or from the user home &apos;~&apos;.
/// </summary>
public static string wox_plugin_folder_plugin_description {
get {

View File

@@ -121,7 +121,7 @@
<value>Folder</value>
</data>
<data name="wox_plugin_folder_plugin_description" xml:space="preserve">
<value>Navigates folders starting from a drive letter 'C:\' or from the user home '~'.</value>
<value>Navigates folders starting from a drive letter 'C:\' or from the user home '~'</value>
</data>
<data name="Microsoft_plugin_folder_copy_path" xml:space="preserve">
<value>Copy path (Ctrl+C)</value>

View File

@@ -187,7 +187,7 @@ namespace Microsoft.Plugin.Indexer.Properties {
}
/// <summary>
/// Looks up a localized string similar to Searches files and folders..
/// Looks up a localized string similar to Searches files and folders.
/// </summary>
public static string Microsoft_plugin_indexer_plugin_description {
get {

View File

@@ -151,7 +151,7 @@
<value>Fail to open folder at</value>
</data>
<data name="Microsoft_plugin_indexer_plugin_description" xml:space="preserve">
<value>Searches files and folders.</value>
<value>Searches files and folders</value>
</data>
<data name="Microsoft_plugin_indexer_plugin_name" xml:space="preserve">
<value>Windows Search</value>

View File

@@ -178,7 +178,7 @@ namespace Microsoft.Plugin.Program.Properties {
}
/// <summary>
/// Looks up a localized string similar to Searches programs..
/// Looks up a localized string similar to Searches programs.
/// </summary>
public static string wox_plugin_program_plugin_description {
get {

View File

@@ -130,7 +130,7 @@
<value>Program</value>
</data>
<data name="wox_plugin_program_plugin_description" xml:space="preserve">
<value>Searches programs.</value>
<value>Searches programs</value>
</data>
<data name="powertoys_run_plugin_program_win32_application" xml:space="preserve">
<value>Application</value>

View File

@@ -178,7 +178,7 @@ namespace Microsoft.Plugin.Shell.Properties {
}
/// <summary>
/// Looks up a localized string similar to Executes commands (e.g. &apos;ping&apos;, &apos;cmd&apos;)..
/// Looks up a localized string similar to Executes commands (e.g. &apos;ping&apos;, &apos;cmd&apos;).
/// </summary>
public static string wox_plugin_cmd_plugin_description {
get {

View File

@@ -121,7 +121,7 @@
<value>Shell</value>
</data>
<data name="wox_plugin_cmd_plugin_description" xml:space="preserve">
<value>Executes commands (e.g. 'ping', 'cmd').</value>
<value>Executes commands (e.g. 'ping', 'cmd')</value>
</data>
<data name="wox_plugin_cmd_cmd_has_been_executed_times" xml:space="preserve">
<value>this command has been executed {0} times</value>

View File

@@ -19,7 +19,7 @@ namespace Microsoft.Plugin.Uri.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -97,7 +97,7 @@ namespace Microsoft.Plugin.Uri.Properties {
}
/// <summary>
/// Looks up a localized string similar to Opens URLs and UNC network shares..
/// Looks up a localized string similar to Opens URLs and UNC network shares.
/// </summary>
public static string Microsoft_plugin_uri_plugin_description {
get {

View File

@@ -130,7 +130,7 @@
<value>Failed to open URI</value>
</data>
<data name="Microsoft_plugin_uri_plugin_description" xml:space="preserve">
<value>Opens URLs and UNC network shares.</value>
<value>Opens URLs and UNC network shares</value>
</data>
<data name="Microsoft_plugin_uri_plugin_name" xml:space="preserve">
<value>URI Handler</value>

View File

@@ -79,7 +79,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
}
/// <summary>
/// Looks up a localized string similar to Folder windows doesn&apos;t run in separate processes. (Click to open Explorer properties.).
/// Looks up a localized string similar to Folder windows do not run in separate processes. (Click to open Explorer properties.).
/// </summary>
public static string wox_plugin_windowwalker_ExplorerInfoSubTitle {
get {
@@ -151,7 +151,7 @@ namespace Microsoft.Plugin.WindowWalker.Properties {
}
/// <summary>
/// Looks up a localized string similar to Switches between open windows..
/// Looks up a localized string similar to Switches between open windows.
/// </summary>
public static string wox_plugin_windowwalker_plugin_description {
get {

View File

@@ -121,7 +121,7 @@
<value>Window Walker</value>
</data>
<data name="wox_plugin_windowwalker_plugin_description" xml:space="preserve">
<value>Switches between open windows.</value>
<value>Switches between open windows</value>
</data>
<data name="wox_plugin_windowwalker_Running" xml:space="preserve">
<value>Running</value>
@@ -202,4 +202,4 @@
<data name="wox_plugin_windowwalker_SettingSubtitleDesktopName_Description" xml:space="preserve">
<value>This information is only shown in subtitle and tool tip, if you have at least two desktops.</value>
</data>
</root>
</root>

View File

@@ -169,7 +169,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
}
/// <summary>
/// Looks up a localized string similar to Calculates mathematical equations (e.g. 5*3-2)..
/// Looks up a localized string similar to Calculates mathematical equations (e.g. 5*3-2).
/// </summary>
public static string wox_plugin_calculator_plugin_description {
get {
@@ -187,7 +187,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
}
/// <summary>
/// Looks up a localized string similar to Replace input appending &apos;=&apos;.
/// Looks up a localized string similar to Replace input if query ends with &apos;=&apos;.
/// </summary>
public static string wox_plugin_calculator_replace_input {
get {
@@ -196,7 +196,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.Properties {
}
/// <summary>
/// Looks up a localized string similar to When using direct activation, appending &apos;=&apos; to the expression will replace the input with the calculated result (e.g. =5*3-2=)..
/// Looks up a localized string similar to When using direct activation, appending &apos;=&apos; to the expression will replace the input with the calculated result (e.g. &apos;=5*3-2=&apos; will change the query to &apos;=13&apos;)..
/// </summary>
public static string wox_plugin_calculator_replace_input_description {
get {

View File

@@ -121,7 +121,7 @@
<value>Calculator</value>
</data>
<data name="wox_plugin_calculator_plugin_description" xml:space="preserve">
<value>Calculates mathematical equations (e.g. 5*3-2).</value>
<value>Calculates mathematical equations (e.g. 5*3-2)</value>
</data>
<data name="wox_plugin_calculator_not_a_number" xml:space="preserve">
<value>Calculation result is not a valid number (NaN)</value>

View File

@@ -61,7 +61,7 @@ namespace Microsoft.PowerToys.Run.Plugin.History.Properties {
}
/// <summary>
/// Looks up a localized string similar to Accesses previously selected results..
/// Looks up a localized string similar to Accesses previously selected results.
/// </summary>
public static string wox_plugin_history_plugin_description {
get {

View File

@@ -121,7 +121,7 @@
<value>History</value>
</data>
<data name="wox_plugin_history_plugin_description" xml:space="preserve">
<value>Accesses previously selected results.</value>
<value>Accesses previously selected results</value>
</data>
<data name="wox_plugin_history_processing_failed" xml:space="preserve">
<value>Failed to process the input</value>

View File

@@ -61,7 +61,7 @@ namespace Microsoft.PowerToys.Run.Plugin.OneNote.Properties {
}
/// <summary>
/// Looks up a localized string similar to Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office..
/// Looks up a localized string similar to Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office.
/// </summary>
internal static string PluginDescription {
get {

View File

@@ -121,6 +121,6 @@
<value>OneNote</value>
</data>
<data name="PluginDescription" xml:space="preserve">
<value>Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office.</value>
<value>Searches your local OneNote notebooks. This plugin requires the OneNote desktop app which is included in Microsoft Office</value>
</data>
</root>

View File

@@ -133,7 +133,7 @@ namespace Microsoft.PowerToys.Run.Plugin.PowerToys.Properties {
}
/// <summary>
/// Looks up a localized string similar to Opens PowerToys utilities and settings..
/// Looks up a localized string similar to Opens PowerToys utilities and settings.
/// </summary>
internal static string Plugin_Description {
get {

View File

@@ -148,7 +148,7 @@
<comment>"Hosts File Editor" is the name of the utility</comment>
</data>
<data name="Plugin_Description" xml:space="preserve">
<value>Opens PowerToys utilities and settings.</value>
<value>Opens PowerToys utilities and settings</value>
</data>
<data name="Plugin_Name" xml:space="preserve">
<value>PowerToys</value>

View File

@@ -19,7 +19,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -133,7 +133,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.Properties {
}
/// <summary>
/// Looks up a localized string similar to Navigates inside the Windows Registry..
/// Looks up a localized string similar to Navigates inside the Windows Registry.
/// </summary>
internal static string PluginDescription {
get {

View File

@@ -121,7 +121,7 @@
<value>Registry Plugin</value>
</data>
<data name="PluginDescription" xml:space="preserve">
<value>Navigates inside the Windows Registry.</value>
<value>Navigates inside the Windows Registry</value>
<comment>"this built into Windows the OS. translate accordingly, https://learn.microsoft.com/troubleshoot/windows-server/performance/windows-registry-advanced-users is an example of it translated in German"</comment>
</data>
<data name="CopyKeyNamePath" xml:space="preserve">

View File

@@ -106,7 +106,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Service.Properties {
}
/// <summary>
/// Looks up a localized string similar to Manages Windows services..
/// Looks up a localized string similar to Manages Windows services.
/// </summary>
internal static string wox_plugin_service_plugin_description {
get {

View File

@@ -133,7 +133,7 @@
<value>Pausing</value>
</data>
<data name="wox_plugin_service_plugin_description" xml:space="preserve">
<value>Manages Windows services.</value>
<value>Manages Windows services</value>
</data>
<data name="wox_plugin_service_plugin_name" xml:space="preserve">
<value>Service</value>

View File

@@ -367,7 +367,7 @@ namespace Microsoft.PowerToys.Run.Plugin.System.Properties {
}
/// <summary>
/// Looks up a localized string similar to Executes system commands (e.g. &apos;shutdown&apos;, &apos;lock&apos;, &apos;sleep&apos;)..
/// Looks up a localized string similar to Executes system commands (e.g. &apos;shutdown&apos;, &apos;lock&apos;, &apos;sleep&apos;).
/// </summary>
internal static string Microsoft_plugin_sys_plugin_description {
get {

View File

@@ -233,7 +233,7 @@
<value>Physical address (MAC)</value>
</data>
<data name="Microsoft_plugin_sys_plugin_description" xml:space="preserve">
<value>Executes system commands (e.g. 'shutdown', 'lock', 'sleep').</value>
<value>Executes system commands (e.g. 'shutdown', 'lock', 'sleep')</value>
<comment>This should align to the actions in Windows relating to shutting down, signing out, locking, sleeping, restarting, emptying the recycle bin, and hibernating your computer. </comment>
</data>
<data name="Microsoft_plugin_sys_plugin_name" xml:space="preserve">

View File

@@ -295,7 +295,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate.Properties {
}
/// <summary>
/// Looks up a localized string similar to Provides time and date values for the system time or a custom time stamp (Examples: &apos;{0}&apos;, &apos;{1}&apos;, &apos;{2}&apos;, &apos;{3}&apos;).
/// Looks up a localized string similar to Provides time and date values for the system time or a custom time stamp (e.g.&apos;{0}&apos;, &apos;{1}&apos;, &apos;{2}&apos;, &apos;{3}&apos;).
/// </summary>
internal static string Microsoft_plugin_timedate_plugin_description {
get {

View File

@@ -202,7 +202,7 @@
<comment>'UTC' means here 'Universal Time Convention'</comment>
</data>
<data name="Microsoft_plugin_timedate_plugin_description" xml:space="preserve">
<value>Provides time and date values for the system time or a custom time stamp (Examples: '{0}', '{1}', '{2}', '{3}')</value>
<value>Provides time and date values for the system time or a custom time stamp (e.g.'{0}', '{1}', '{2}', '{3}')</value>
<comment>Do not translate the placeholders like '{0}' because it will be replaced in code.</comment>
</data>
<data name="Microsoft_plugin_timedate_plugin_description_example_calendarWeek" xml:space="preserve">

View File

@@ -88,7 +88,7 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsTerminal.Properties {
}
/// <summary>
/// Looks up a localized string similar to Opens Windows Terminal profiles..
/// Looks up a localized string similar to Opens Windows Terminal profiles.
/// </summary>
internal static string plugin_description {
get {

View File

@@ -129,7 +129,7 @@
<comment>Quake is a well-known computer game. Don't localize. See https://en.wikipedia.org/wiki/Quake_(video_game)</comment>
</data>
<data name="plugin_description" xml:space="preserve">
<value>Opens Windows Terminal profiles.</value>
<value>Opens Windows Terminal profiles</value>
</data>
<data name="plugin_name" xml:space="preserve">
<value>Windows Terminal</value>

View File

@@ -45,6 +45,11 @@
Grid.Row="0"
Padding="12,4,12,3">
<local:LauncherControl x:Name="SearchBox" />
<Border.Background>
<!-- Setting the background of the search bar to fix https://github.com/microsoft/PowerToys/issues/30206 -->
<!-- The title bar accent would bleed if the option to "Show accent color on title bars and windows borders" is enabled on Windows -->
<SolidColorBrush Opacity="1" Color="{DynamicResource ApplicationBackgroundColor}" />
</Border.Background>
</Border>
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->

View File

@@ -151,6 +151,11 @@ namespace CentralizedKeyboardHook
.key = static_cast<unsigned char>(keyPressInfo.vkCode)
};
if (hotkey == Hotkey{})
{
return CallNextHookEx(hHook, nCode, wParam, lParam);
}
std::function<bool()> action;
{
// Hold the lock for the shortest possible duration

View File

@@ -45,7 +45,7 @@
Severity="Informational" />
<controls:SettingsGroup x:Uid="AdvancedPaste_EnableAISettingsGroup" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="AdvancedPaste_EnableAISettingsCard">
<tkcontrols:SettingsCard x:Uid="AdvancedPaste_EnableAISettingsCard" IsEnabled="{x:Bind ViewModel.IsOnlineAIModelsDisallowedByGPO, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
<tkcontrols:SettingsCard.HeaderIcon>
<PathIcon Data="M128 766q0-42 24-77t65-48l178-57q32-11 61-30t52-42q50-50 71-114l58-179q13-40 48-65t78-26q42 0 77 24t50 65l58 177q21 66 72 117 49 50 117 72l176 58q43 14 69 48t26 80q0 41-25 76t-64 49l-178 58q-66 21-117 72-32 32-51 73t-33 84-26 83-30 73-45 51-71 20q-42 0-77-24t-49-65l-58-178q-8-25-19-47t-28-43q-34-43-77-68t-89-41-89-27-78-29-55-45-21-75zm1149 7q-76-29-145-53t-129-60-104-88-73-138l-57-176-67 176q-18 48-42 89t-60 78q-34 34-76 61t-89 43l-177 57q75 29 144 53t127 60 103 89 73 137l57 176 67-176q37-97 103-168t168-103l177-57zm-125 759q0-31 20-57t49-36l99-32q34-11 53-34t30-51 20-59 20-54 33-41 58-16q32 0 59 19t38 50q6 20 11 40t13 40 17 38 25 34q16 17 39 26t48 18 49 16 44 20 31 32 12 50q0 33-18 60t-51 38q-19 6-39 11t-41 13-39 17-34 25q-24 25-35 62t-24 73-35 61-68 25q-32 0-59-19t-38-50q-6-18-11-39t-13-41-17-40-24-33q-18-17-41-27t-47-17-49-15-43-20-30-33-12-54zm583 4q-43-13-74-30t-55-41-40-55-32-74q-12 41-29 72t-42 55-55 42-71 31q81 23 128 71t71 129q15-43 31-74t40-54 53-40 75-32z" />
</tkcontrols:SettingsCard.HeaderIcon>
@@ -73,12 +73,27 @@
IsEnabled="{x:Bind ViewModel.IsOpenAIEnabled, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind ViewModel.ShowCustomPreview, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
<InfoBar
x:Uid="GPO_SettingIsManaged"
IsClosable="False"
IsOpen="{x:Bind ViewModel.ShowOnlineAIModelsGpoConfiguredInfoBar, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ShowOnlineAIModelsGpoConfiguredInfoBar, Mode=OneWay}"
Severity="Informational" />
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="AdvancedPaste_ClipboardHistorySettingsGroup" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
<tkcontrols:SettingsCard x:Uid="AdvancedPaste_Clipboard_History_Enabled_SettingsCard" HeaderIcon="{ui:FontIcon Glyph=&#xF0E3;}">
<tkcontrols:SettingsCard
x:Uid="AdvancedPaste_Clipboard_History_Enabled_SettingsCard"
HeaderIcon="{ui:FontIcon Glyph=&#xF0E3;}"
IsEnabled="{x:Bind ViewModel.ClipboardHistoryDisabledByGPO, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}">
<ToggleSwitch IsOn="{x:Bind ViewModel.ClipboardHistoryEnabled, Mode=TwoWay}" />
</tkcontrols:SettingsCard>
<InfoBar
x:Uid="GPO_SettingIsManaged"
IsClosable="False"
IsOpen="{x:Bind ViewModel.ClipboardHistoryDisabledByGPO, Mode=OneWay}"
IsTabStop="{x:Bind ViewModel.ClipboardHistoryDisabledByGPO, Mode=OneWay}"
Severity="Informational" />
</controls:SettingsGroup>
<controls:SettingsGroup x:Uid="AdvancedPaste_Direct_Access_Hotkeys_GroupSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">

View File

@@ -3738,7 +3738,7 @@ Activate by holding the key for the character you want to add an accent to, then
<comment>Product name: Navigation view item name for Advanced Paste</comment>
</data>
<data name="AdvancedPaste.ModuleDescription" xml:space="preserve">
<value>Advanced Paste is an AI powered tool to put your clipboard content into any format you need</value>
<value>Advanced Paste is a tool to put your clipboard content into any format you need. It can paste as plain text, markdown, or json directly with the UX or with a direct keystroke invoke. These are fully locally executed. In addition, it has an AI powered option that is 100% opt-in and requires an Open AI key.</value>
</data>
<data name="AdvancedPaste.ModuleTitle" xml:space="preserve">
<value>Advanced Paste</value>
@@ -3762,7 +3762,7 @@ Activate by holding the key for the character you want to add an accent to, then
<value>Preview the output of the custom format before pasting</value>
</data>
<data name="Oobe_AdvancedPaste.Description" xml:space="preserve">
<value>Advanced Paste is An AI powered tool to put your clipboard content into any format you need, focused towards developer workflows. Note: this will replace the formatted text in your clipboard with the selected format.</value>
<value>Advanced Paste is a tool to put your clipboard content into any format you need, focused towards developer workflows. It can paste as plain text, markdown, or json directly with the UX or with a direct keystroke invoke. These are fully locally executed. In addition, it has an AI powered option that is 100% opt-in and requires an Open AI key. Note: this will replace the formatted text in your clipboard with the selected format.</value>
</data>
<data name="Oobe_AdvancedPaste.Title" xml:space="preserve">
<value>Advanced Paste</value>

View File

@@ -32,6 +32,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private GpoRuleConfigured _enabledGpoRuleConfiguration;
private bool _enabledStateIsGPOConfigured;
private GpoRuleConfigured _onlineAIModelsGpoRuleConfiguration;
private bool _onlineAIModelsDisallowedByGPO;
private bool _isEnabled;
private Func<string, int> SendConfigMSG { get; }
@@ -80,6 +82,15 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
_isEnabled = GeneralSettingsConfig.Enabled.AdvancedPaste;
}
_onlineAIModelsGpoRuleConfiguration = GPOWrapper.GetAllowedAdvancedPasteOnlineAIModelsValue();
if (_onlineAIModelsGpoRuleConfiguration == GpoRuleConfigured.Disabled)
{
_onlineAIModelsDisallowedByGPO = true;
// disable AI if it was enabled
DisableAI();
}
}
public bool IsEnabled
@@ -124,13 +135,23 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
return cred is not null;
}
public bool IsOpenAIEnabled => OpenAIKeyExists();
public bool IsOpenAIEnabled => OpenAIKeyExists() && !IsOnlineAIModelsDisallowedByGPO;
public bool IsEnabledGpoConfigured
{
get => _enabledStateIsGPOConfigured;
}
public bool IsOnlineAIModelsDisallowedByGPO
{
get => _onlineAIModelsDisallowedByGPO || _enabledGpoRuleConfiguration == GpoRuleConfigured.Disabled;
}
public bool ShowOnlineAIModelsGpoConfiguredInfoBar
{
get => _onlineAIModelsDisallowedByGPO && _enabledGpoRuleConfiguration != GpoRuleConfigured.Disabled;
}
private bool IsClipboardHistoryEnabled()
{
string registryKey = @"HKEY_CURRENT_USER\Software\Microsoft\Clipboard\";
@@ -145,6 +166,27 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
private bool IsClipboardHistoryDisabledByGPO()
{
string registryKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System\";
try
{
object allowClipboardHistory = Registry.GetValue(registryKey, "AllowClipboardHistory", null);
if (allowClipboardHistory != null)
{
return (int)allowClipboardHistory == 0;
}
else
{
return false;
}
}
catch (Exception)
{
return false;
}
}
private void SetClipboardHistoryEnabled(bool value)
{
string registryKey = @"HKEY_CURRENT_USER\Software\Microsoft\Clipboard\";
@@ -169,6 +211,11 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public bool ClipboardHistoryDisabledByGPO
{
get => IsClipboardHistoryDisabledByGPO();
}
public HotkeySettings AdvancedPasteUIShortcut
{
get => _advancedPasteSettings.Properties.AdvancedPasteUIShortcut;
@@ -308,18 +355,30 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
internal void DisableAI()
{
PasswordVault vault = new PasswordVault();
PasswordCredential cred = vault.Retrieve("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey");
vault.Remove(cred);
OnPropertyChanged(nameof(IsOpenAIEnabled));
try
{
PasswordVault vault = new PasswordVault();
PasswordCredential cred = vault.Retrieve("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey");
vault.Remove(cred);
OnPropertyChanged(nameof(IsOpenAIEnabled));
}
catch (Exception)
{
}
}
internal void EnableAI(string password)
{
PasswordVault vault = new PasswordVault();
PasswordCredential cred = new PasswordCredential("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey", password);
vault.Add(cred);
OnPropertyChanged(nameof(IsOpenAIEnabled));
try
{
PasswordVault vault = new PasswordVault();
PasswordCredential cred = new PasswordCredential("https://platform.openai.com/api-keys", "PowerToys_AdvancedPaste_OpenAIKey", password);
vault.Add(cred);
OnPropertyChanged(nameof(IsOpenAIEnabled));
}
catch (Exception)
{
}
}
}
}

View File

@@ -67,4 +67,5 @@ void ReportGPOValues(const std::filesystem::path& tmpDir)
report << "getAllowExperimentationValue: " << gpo_rule_configured_to_string(powertoys_gpo::getAllowExperimentationValue()) << std::endl;
report << "getConfiguredQoiPreviewEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiPreviewEnabledValue()) << std::endl;
report << "getConfiguredQoiThumbnailsEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue()) << std::endl;
report << "getAllowedAdvancedPasteOnlineAIModelsValue: " << gpo_rule_configured_to_string(powertoys_gpo::getAllowedAdvancedPasteOnlineAIModelsValue()) << std::endl;
}