mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-10-08 11:39:10 +11:00
Preserve clipboard history when disabling activity history (#5035)
* chore(tweaks): clarify Activity History tweak description * fix(tweaks): preserve clipboard history --------- Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
+2
-2
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"WPFTweaksActivity": {
|
"WPFTweaksActivity": {
|
||||||
"Content": "Activity History - Disable",
|
"Content": "Activity History - Disable",
|
||||||
"Description": "Erases recent docs, clipboard, and run history.",
|
"Description": "Stops Windows from publishing or uploading user activities while preserving clipboard history.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||||
"Name": "EnableActivityFeed",
|
"Name": "EnableActivityFeed",
|
||||||
"Value": "0",
|
"Value": "1",
|
||||||
"Type": "DWord",
|
"Type": "DWord",
|
||||||
"OriginalValue": "<RemoveEntry>"
|
"OriginalValue": "<RemoveEntry>"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
Describe "Activity history config" {
|
||||||
|
It "disables activity publishing while preserving clipboard history" {
|
||||||
|
$configPath = Join-Path $PSScriptRoot "..\config\tweaks.json"
|
||||||
|
$tweaks = Get-Content -Path $configPath -Raw | ConvertFrom-Json
|
||||||
|
$activityRegistry = @($tweaks.WPFTweaksActivity.registry)
|
||||||
|
|
||||||
|
$activityFeed = @($activityRegistry | Where-Object Name -eq "EnableActivityFeed")
|
||||||
|
$activityFeed | Should -HaveCount 1
|
||||||
|
$activityFeed[0].Value | Should -Be "1"
|
||||||
|
|
||||||
|
foreach ($policyName in @("PublishUserActivities", "UploadUserActivities")) {
|
||||||
|
$policy = @($activityRegistry | Where-Object Name -eq $policyName)
|
||||||
|
$policy | Should -HaveCount 1
|
||||||
|
$policy[0].Value | Should -Be "0"
|
||||||
|
}
|
||||||
|
|
||||||
|
$activityRegistry.Name | Should -Not -Contain "AllowClipboardHistory"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user