Release 0.0.6 with usable GUI diagnostics and capture controls
Windows tests / test-and-build (push) Canceled after 0s
Windows tests / test-and-build (push) Canceled after 0s
This commit is contained in:
1 parent
65f302279d
commit
41bb252214
18 files changed
+81
-37
No files matched your search
+12
-6
@@ -40,7 +40,13 @@ Add-WindLabel $network 'Observe changes nothing. Optional telemetry blocks only
|
||||
$netProfile=[Windows.Forms.ComboBox]::new();$netProfile.DropDownStyle='DropDownList';$netProfile.Items.AddRange(@('Observe','BlockOptionalTelemetry','Isolate'));$netProfile.SelectedIndex=0;$netProfile.Location=[Drawing.Point]::new(24,85);$netProfile.Width=280;$network.Controls.Add($netProfile)
|
||||
$rollback=[Windows.Forms.NumericUpDown]::new();$rollback.Minimum=2;$rollback.Maximum=60;$rollback.Value=10;$rollback.Location=[Drawing.Point]::new(330,85);$network.Controls.Add($rollback);Add-WindLabel $network 'minutes to automatic rollback' 460 87 240 28|Out-Null
|
||||
$capture=[Windows.Forms.Button]::new();$capture.Text='Start local packet capture';$capture.Location=[Drawing.Point]::new(24,140);$capture.Size=[Drawing.Size]::new(250,38);$network.Controls.Add($capture)
|
||||
$capture.Add_Click({try{& $invokeWindChild 'Network.ps1' @{Mode='CaptureStart'};[Windows.Forms.MessageBox]::Show('Capture started. Use Network.ps1 -Mode CaptureStop -CaptureDirectory <shown path> to stop and convert it.','ms-private')|Out-Null}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}})
|
||||
$capturePath=[Windows.Forms.TextBox]::new();$capturePath.Location=[Drawing.Point]::new(24,195);$capturePath.Width=720;$network.Controls.Add($capturePath)
|
||||
Add-WindLabel $network 'Capture directory (copy this path to reopen or convert a saved capture)' 24 226 730 30|Out-Null
|
||||
$stopCapture=[Windows.Forms.Button]::new();$stopCapture.Text='Stop and convert';$stopCapture.Location=[Drawing.Point]::new(285,140);$stopCapture.Size=[Drawing.Size]::new(210,38);$network.Controls.Add($stopCapture)
|
||||
$convertCapture=[Windows.Forms.Button]::new();$convertCapture.Text='Convert saved capture';$convertCapture.Location=[Drawing.Point]::new(506,140);$convertCapture.Size=[Drawing.Size]::new(238,38);$network.Controls.Add($convertCapture)
|
||||
$capture.Add_Click({try{$result=& $invokeWindChild 'Network.ps1' @{Mode='CaptureStart'} -PassThru;$captureResult=$result|ConvertFrom-Json;$capturePath.Text=[string]$captureResult.Directory;[Windows.Forms.MessageBox]::Show("Capture started. Use Stop and convert when finished.`r`n`r`n$($capturePath.Text)",'ms-private')|Out-Null}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}})
|
||||
foreach($button in @($stopCapture,$convertCapture)){$button.Tag=if($button-eq$stopCapture){'CaptureStop'}else{'CaptureConvert'};$button.Add_Click({param($sender,$eventArgs)try{if([string]::IsNullOrWhiteSpace($capturePath.Text)){throw 'Enter the capture directory first.'};& $invokeWindChild 'Network.ps1' @{Mode=[string]$sender.Tag;CaptureDirectory=$capturePath.Text};[Windows.Forms.MessageBox]::Show("Saved capture.pcapng in:`r`n$($capturePath.Text)",'ms-private')|Out-Null}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}})}
|
||||
Add-WindLabel $network 'Capture continues until stopped, including after this window closes. Pktmon has one system-wide session; do not use these controls while another tool owns a capture.' 24 270 730 68|Out-Null
|
||||
|
||||
Add-WindLabel $devices 'Select exact hardware devices to disable. Nothing is selected by default.' 20 18 700 28|Out-Null
|
||||
$deviceList=[Windows.Forms.CheckedListBox]::new();$deviceList.Location=[Drawing.Point]::new(24,58);$deviceList.Size=[Drawing.Size]::new(720,340);$deviceList.CheckOnClick=$true;$devices.Controls.Add($deviceList)
|
||||
@@ -52,10 +58,10 @@ $cleanupSchedule=Add-WindCheckBox $maintenance 'Install daily Temp and expired m
|
||||
$lock=Add-WindCheckBox $maintenance 'Install session-lock clipboard clearing' 24 148 $false 650
|
||||
$vc=[Windows.Forms.TextBox]::new();$vc.Location=[Drawing.Point]::new(48,190);$vc.Width=210;$maintenance.Controls.Add($vc);Add-WindLabel $maintenance 'VeraCrypt drive letters, e.g. X:,Y:' 275 192 330 28|Out-Null
|
||||
Add-WindLabel $maintenance 'Optional selected VeraCrypt volumes are unmounted gracefully on lock. Privacy cleanup is ordinary deletion, not guaranteed SSD erasure. Security, Defender, update, firewall and authentication event logs remain protected.' 24 236 700 72|Out-Null
|
||||
$securityAudit=[Windows.Forms.Button]::new();$securityAudit.Text='Audit encryption and security';$securityAudit.Location=[Drawing.Point]::new(24,322);$securityAudit.Size=[Drawing.Size]::new(260,38);$maintenance.Controls.Add($securityAudit);$securityAudit.Add_Click({try{& $invokeWindChild 'Security.ps1' @{};[Windows.Forms.MessageBox]::Show('Security status was written to the PowerShell host. No recovery keys were read.','ms-private')|Out-Null}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}})
|
||||
$securityAudit=[Windows.Forms.Button]::new();$securityAudit.Text='Audit encryption and security';$securityAudit.Location=[Drawing.Point]::new(24,322);$securityAudit.Size=[Drawing.Size]::new(260,38);$maintenance.Controls.Add($securityAudit);$securityAudit.Add_Click({try{$audit=& $invokeWindChild 'Security.ps1' @{Json=$true} -PassThru;Show-WindGuiReview -Text ($audit-join[Environment]::NewLine) -Title 'ms-private security audit'}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}})
|
||||
|
||||
Add-WindLabel $homeTab 'Windows Home does not enforce the same policy CSPs as Pro/Enterprise. These buttons open Microsoft-supported Settings pages; verify each visible toggle before treating it as applied.' 20 18 720 70|Out-Null
|
||||
$pages=@('Location','Camera','Microphone','Diagnostics','Recall','Updates','Apps','DefaultApps');for($i=0;$i-lt$pages.Count;$i++){$p=$pages[$i];$b=[Windows.Forms.Button]::new();$b.Text=$p;$b.Size=[Drawing.Size]::new(165,38);$b.Location=[Drawing.Point]::new(24+(($i%4)*182),105+([Math]::Floor($i/4)*55));$b.Tag=$p;$b.Add_Click({param($s,$e)Start-Process (Join-Path $PSScriptRoot 'Home.ps1') -ArgumentList @('-Page',[string]$s.Tag)});$homeTab.Controls.Add($b)}
|
||||
$pages=@('Location','Camera','Microphone','Diagnostics','Recall','Updates','Apps','DefaultApps');for($i=0;$i-lt$pages.Count;$i++){$p=$pages[$i];$b=[Windows.Forms.Button]::new();$b.Text=$p;$b.Size=[Drawing.Size]::new(165,38);$b.Location=[Drawing.Point]::new(24+(($i%4)*182),105+([Math]::Floor($i/4)*55));$b.Tag=$p;$b.Add_Click({param($s,$e)try{& $invokeWindChild 'Home.ps1' @{Page=[string]$s.Tag}}catch{[Windows.Forms.MessageBox]::Show($_.Exception.Message,'ms-private error')|Out-Null}});$homeTab.Controls.Add($b)}
|
||||
|
||||
function Get-WindGuiAppPlan {
|
||||
$inventory=@(Get-WindAppInventory)
|
||||
@@ -87,10 +93,10 @@ function Get-WindGuiReviewText {
|
||||
$lines -join [Environment]::NewLine
|
||||
}
|
||||
function Show-WindGuiReview {
|
||||
param([string]$Text)
|
||||
$dialog=[Windows.Forms.Form]::new();$dialog.Text='ms-private exact plan';$dialog.Size=[Drawing.Size]::new(820,620);$dialog.StartPosition='CenterParent';$dialog.Font=$form.Font
|
||||
param([string]$Text,[string]$Title='ms-private exact plan')
|
||||
$dialog=[Windows.Forms.Form]::new();$dialog.Text=$Title;$dialog.Size=[Drawing.Size]::new(820,620);$dialog.StartPosition='CenterParent';$dialog.Font=$form.Font
|
||||
$box=[Windows.Forms.TextBox]::new();$box.Multiline=$true;$box.ReadOnly=$true;$box.ScrollBars='Both';$box.WordWrap=$false;$box.Dock='Fill';$box.Text=$Text;$dialog.Controls.Add($box)
|
||||
[void]$dialog.ShowDialog($form)
|
||||
try{[void]$dialog.ShowDialog($form)}finally{$dialog.Dispose()}
|
||||
}
|
||||
$script:applyingPreset=$false
|
||||
$markCustom={if(-not$script:applyingPreset-and[string]$preset.SelectedItem-ne'Custom'){$preset.SelectedItem='Custom'}}
|
||||
|
||||
Reference in new issue
Block a user