mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-10-08 11:39:10 +11:00
chore: Update generated dev docs and JSON links (#5125)
This commit is contained in:
@@ -10,7 +10,8 @@ This page is generated from [`functions/public/Invoke-WPFPanelAutologin.ps1`](ht
|
||||
|
||||
```powershell title="functions/public/Invoke-WPFPanelAutologin.ps1"
|
||||
function Invoke-WPFPanelAutologin {
|
||||
Invoke-WebRequest -Uri https://live.sysinternals.com/Autologon.exe -OutFile "$winutildir\autologin.exe"
|
||||
Start-Process -FilePath "$winutildir\autologin.exe" -ArgumentList /accepteula
|
||||
$autologonPath = Join-Path $sync.winutildir "autologin.exe"
|
||||
Invoke-WebRequest -Uri https://live.sysinternals.com/Autologon.exe -OutFile $autologonPath
|
||||
Start-Process -FilePath $autologonPath -ArgumentList /accepteula
|
||||
}
|
||||
```
|
||||
|
||||
@@ -21,11 +21,54 @@ function Invoke-WPFSystemRepair {
|
||||
3. DISM - Repair a corrupted Windows operating system image
|
||||
#>
|
||||
|
||||
Start-Process cmd.exe -ArgumentList "/c chkdsk /scan /perf" -NoNewWindow -Wait
|
||||
Start-Process cmd.exe -ArgumentList "/c sfc /scannow" -NoNewWindow -Wait
|
||||
Start-Process cmd.exe -ArgumentList "/c dism /online /cleanup-image /restorehealth" -NoNewWindow -Wait
|
||||
# SuccessCodes maps the non-zero exits a step treats as success to what they mean. The codes
|
||||
# are per step because the same number means different things: 1 and 2 are ordinary chkdsk
|
||||
# outcomes, while 1 from sfc is a failure, and 3010 is a repaired image from DISM only.
|
||||
$steps = @(
|
||||
@{
|
||||
Label = "Checking the disk for errors"
|
||||
Arguments = "/c chkdsk /scan /perf"
|
||||
# 3 is left out: the disk could not be checked, or has errors an online scan cannot
|
||||
# fix, and the steps after this one are not worth running on a disk in that state.
|
||||
SuccessCodes = @{
|
||||
1 = "errors were found and fixed"
|
||||
2 = "cleanup was performed, or was skipped because /f was not given"
|
||||
}
|
||||
},
|
||||
@{
|
||||
Label = "Scanning protected system files"
|
||||
Arguments = "/c sfc /scannow"
|
||||
SuccessCodes = @{}
|
||||
},
|
||||
@{
|
||||
Label = "Repairing the Windows image"
|
||||
Arguments = "/c dism /online /cleanup-image /restorehealth"
|
||||
SuccessCodes = @{
|
||||
3010 = "a restart is needed for the repair to take effect"
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Write-Host "==> Finished System Repair"
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
$completed = 0
|
||||
foreach ($step in $steps) {
|
||||
Step-WinUtilJob -Status "$($step.Label) ($($completed + 1)/$($steps.Count))" -Percent ([int](($completed / $steps.Count) * 100))
|
||||
Write-WinUtilLog -Component "SystemRepair" -Message $step.Label
|
||||
# Start-Process does not throw on a nonzero exit, so without this a failed chkdsk, sfc
|
||||
# or dism run would still be reported as a completed repair
|
||||
$process = Start-Process cmd.exe -ArgumentList $step.Arguments -NoNewWindow -Wait -PassThru
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
if ($step.SuccessCodes.ContainsKey($exitCode)) {
|
||||
# Start-WinUtilJob records WarningRecord output in both the session log and the
|
||||
# job result, so accepted nonzero outcomes cannot finish with a green checkmark.
|
||||
Write-Warning "$($step.Label) finished: $($step.SuccessCodes[$exitCode])."
|
||||
} else {
|
||||
throw "$($step.Label) failed with exit code $exitCode."
|
||||
}
|
||||
}
|
||||
|
||||
$completed++
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -25,8 +25,5 @@ function Invoke-WPFFixesNTPPool {
|
||||
Restart-Service w32time
|
||||
w32tm /resync
|
||||
|
||||
Write-Host "================================="
|
||||
Write-Host "-- NTP Configuration Complete ---"
|
||||
Write-Host "================================="
|
||||
}
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ function Invoke-WPFFixesUpdate {
|
||||
param($Aggressive = $false)
|
||||
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Step-WinUtilJob -State "Indeterminate"
|
||||
Write-Host "Starting Windows Update Repair..."
|
||||
# Wait for the first progress bar to show, otherwise the second one won't show
|
||||
Start-Sleep -Milliseconds 200
|
||||
@@ -203,24 +203,14 @@ function Invoke-WPFFixesUpdate {
|
||||
try {
|
||||
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()
|
||||
} catch {
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
Write-WinUtilLog -Level "ERROR" -Component "Updates" -Message "Failed to create Windows Update COM object: $_"
|
||||
Write-Warning "Failed to create Windows Update COM object: $_"
|
||||
}
|
||||
Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow"
|
||||
Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100
|
||||
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
|
||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||
$MessageboxTitle = "Reset Windows Update "
|
||||
$Messageboxbody = ("Stock settings loaded.`n Please reboot your computer")
|
||||
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||
|
||||
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||
Write-Host "==============================================="
|
||||
Write-Host "-- Reset All Windows Update Settings to Stock -"
|
||||
Write-Host "==============================================="
|
||||
Show-WinUtilMessage -Message "Stock settings loaded.`n Please reboot your computer" -Title "Reset Windows Update" -Button "OK" -Icon "Information" | Out-Null
|
||||
|
||||
# Remove the progress bars
|
||||
Write-Progress -Id 0 -Activity "Repairing Windows Update" -Completed
|
||||
|
||||
@@ -18,18 +18,8 @@ function Invoke-WPFFixesWinget {
|
||||
.DESCRIPTION
|
||||
BravoNorris for the fantastic idea of a button to reinstall WinGet
|
||||
#>
|
||||
# Install Choco if not already present
|
||||
try {
|
||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
||||
Write-Host "==> Starting WinGet Repair"
|
||||
Install-WinUtilWinget
|
||||
} catch {
|
||||
Write-Error "Failed to install WinGet: $_"
|
||||
Set-WinUtilTaskbaritem -state "Error" -overlay "warning"
|
||||
} finally {
|
||||
Write-Host "==> Finished WinGet Repair"
|
||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
||||
}
|
||||
|
||||
Step-WinUtilJob -Status "Repairing WinGet" -State "Indeterminate"
|
||||
Install-WinUtilWinget -Force
|
||||
}
|
||||
```
|
||||
|
||||
+61
-8
@@ -9,19 +9,72 @@ This page is generated from [`functions/private/Invoke-WinUtilInstallPSProfile.p
|
||||
:::
|
||||
|
||||
```powershell title="functions/private/Invoke-WinUtilInstallPSProfile.ps1"
|
||||
function Get-WinUtilPowerShell7Path {
|
||||
$command = Get-Command pwsh -CommandType Application -ErrorAction SilentlyContinue
|
||||
if ($command) { return $command.Source }
|
||||
|
||||
foreach ($candidate in @(
|
||||
"$env:ProgramFiles\PowerShell\7\pwsh.exe",
|
||||
"$env:LOCALAPPDATA\Microsoft\WindowsApps\pwsh.exe")) {
|
||||
if (Test-Path -LiteralPath $candidate) { return $candidate }
|
||||
}
|
||||
|
||||
return $null
|
||||
}
|
||||
|
||||
function Invoke-WinUtilInstallPSProfile {
|
||||
if (-not (Get-Command wt)) {
|
||||
Write-Host "Windows Terminal not found. Installing..."
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs the CTT PowerShell profile
|
||||
|
||||
.DESCRIPTION
|
||||
The profile targets PowerShell 7, so its setup script has to run under pwsh rather than
|
||||
the runspace this job is on. It runs as a child process with its output captured, so the
|
||||
job log records what happened instead of it scrolling past in a terminal nobody kept.
|
||||
#>
|
||||
|
||||
$pwshPath = Get-WinUtilPowerShell7Path
|
||||
if (-not $pwshPath) {
|
||||
Step-WinUtilJob -Status "Installing PowerShell 7" -State "Indeterminate"
|
||||
Write-WinUtilLog -Component "Feature" -Message "PowerShell 7 not found, installing it first."
|
||||
|
||||
Install-WinUtilWinget
|
||||
winget install Microsoft.WindowsTerminal --source winget --silent
|
||||
Install-WinUtilProgramWinget -Action Install -Programs @("Microsoft.PowerShell") | Out-Null
|
||||
|
||||
# WinGet updates the persisted PATH, not this already-running process. Resolve the
|
||||
# standard install locations as well as the current PATH before deciding it failed.
|
||||
$pwshPath = Get-WinUtilPowerShell7Path
|
||||
if (-not $pwshPath) {
|
||||
throw "PowerShell 7 could not be installed, so the profile cannot be set up."
|
||||
}
|
||||
}
|
||||
|
||||
if (-not (Get-Command pwsh)) {
|
||||
Write-Host "PowerShell 7 not found. Installing..."
|
||||
Install-WinUtilWinget
|
||||
winget install Microsoft.PowerShell --source winget --installer-type wix --silent
|
||||
Step-WinUtilJob -Status "Running the profile setup" -State "Indeterminate"
|
||||
|
||||
$setupUrl = "https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1"
|
||||
# Stop in the child, so a setup failure is a nonzero exit rather than a logged error and a
|
||||
# exit code of zero
|
||||
$output = & $pwshPath -NoProfile -NonInteractive -Command "`$ErrorActionPreference = 'Stop'; irm '$setupUrl' | iex" 2>&1
|
||||
$exitCode = $LASTEXITCODE
|
||||
|
||||
$failures = 0
|
||||
foreach ($line in @($output)) {
|
||||
if ($line -is [System.Management.Automation.ErrorRecord]) {
|
||||
$failures++
|
||||
Write-WinUtilErrorRecord -ErrorRecord $line -Component "Feature" -Context "PowerShell profile setup"
|
||||
} elseif (-not [string]::IsNullOrWhiteSpace($line)) {
|
||||
Write-WinUtilLog -Component "Feature" -Message ([string]$line).Trim()
|
||||
}
|
||||
}
|
||||
|
||||
wt new-tab pwsh -NoExit -Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"
|
||||
if ($exitCode -ne 0) {
|
||||
throw "The profile setup script exited with code $exitCode."
|
||||
}
|
||||
|
||||
if ($failures -gt 0) {
|
||||
throw "The profile setup script reported $failures error(s); see the log."
|
||||
}
|
||||
|
||||
Write-WinUtilLog -Component "Feature" -Message "CTT PowerShell profile installed. Open a new PowerShell 7 session to use it."
|
||||
}
|
||||
```
|
||||
|
||||
+31
-5
@@ -10,13 +10,39 @@ This page is generated from [`functions/private/Invoke-WinUtilUninstallPSProfile
|
||||
|
||||
```powershell title="functions/private/Invoke-WinUtilUninstallPSProfile.ps1"
|
||||
function Invoke-WinUtilUninstallPSProfile {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Restores the PowerShell 7 profile the CTT profile replaced
|
||||
|
||||
if (Test-Path ($Profile + ".bak")) {
|
||||
Move-Item -Path ($Profile + ".bak") -Destination $Profile
|
||||
} else {
|
||||
Remove-Item -Path $Profile
|
||||
.DESCRIPTION
|
||||
The profile path has to come from pwsh itself. $PROFILE inside this job is the worker's
|
||||
own Windows PowerShell profile, which is not the file the install wrote.
|
||||
#>
|
||||
|
||||
$pwshPath = Get-WinUtilPowerShell7Path
|
||||
if (-not $pwshPath) {
|
||||
throw "PowerShell 7 is not installed, so there is no CTT profile to remove."
|
||||
}
|
||||
|
||||
Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green
|
||||
$profilePath = (& $pwshPath -NoProfile -NonInteractive -Command '$PROFILE' | Select-Object -First 1)
|
||||
if ([string]::IsNullOrWhiteSpace($profilePath)) {
|
||||
throw "Could not determine the PowerShell 7 profile path."
|
||||
}
|
||||
$profilePath = $profilePath.Trim()
|
||||
$backupPath = "$profilePath.bak"
|
||||
|
||||
if (Test-Path $backupPath) {
|
||||
Move-Item -Path $backupPath -Destination $profilePath -Force
|
||||
Write-WinUtilLog -Component "Feature" -Message "Restored the profile that was in place before: $profilePath"
|
||||
return
|
||||
}
|
||||
|
||||
if (Test-Path $profilePath) {
|
||||
Remove-Item -Path $profilePath -Force
|
||||
Write-WinUtilLog -Component "Feature" -Message "Removed the CTT PowerShell profile: $profilePath"
|
||||
return
|
||||
}
|
||||
|
||||
Write-WinUtilLog -Level "WARN" -Component "Feature" -Message "No PowerShell 7 profile found at $profilePath, nothing to remove."
|
||||
}
|
||||
```
|
||||
|
||||
@@ -13,17 +13,10 @@ function Invoke-WPFSSHServer {
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Invokes the OpenSSH Server install in a runspace
|
||||
Installs and starts the OpenSSH Server
|
||||
|
||||
#>
|
||||
|
||||
Invoke-WPFRunspace -ScriptBlock {
|
||||
|
||||
Invoke-WinUtilSSHServer
|
||||
|
||||
Write-Host "======================================="
|
||||
Write-Host "-- OpenSSH Server installed! ---"
|
||||
Write-Host "======================================="
|
||||
}
|
||||
Invoke-WinUtilSSHServer
|
||||
}
|
||||
```
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
:::
|
||||
|
||||
```json title="config/tweaks.json"
|
||||
"WPFTweaksDisableLockscreen": {
|
||||
"WPFToggleDisableLockscreen": {
|
||||
"Content": "Lock Screen - Disable",
|
||||
"Description": "Skips the lock screen entirely and goes directly to the sign-in screen on boot and wake.",
|
||||
"category": "Customize Preferences",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Microsoft Outlook New Version"
|
||||
description: "This will ensures the classic Outlook application is used."
|
||||
description: "This will ensure the new Outlook application is used."
|
||||
editUrl: false
|
||||
---
|
||||
|
||||
@@ -11,7 +11,7 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
```json title="config/tweaks.json"
|
||||
"WPFToggleNewOutlook": {
|
||||
"Content": "Microsoft Outlook New Version",
|
||||
"Description": "This will ensures the classic Outlook application is used.",
|
||||
"Description": "This will ensure the new Outlook application is used.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Type": "Toggle",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "Activity History - Disable"
|
||||
description: "Erases recent docs, clipboard, and run history."
|
||||
description: "Stops Windows from publishing or uploading user activities while preserving clipboard history."
|
||||
editUrl: false
|
||||
---
|
||||
|
||||
@@ -11,14 +11,14 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
```json title="config/tweaks.json"
|
||||
"WPFTweaksActivity": {
|
||||
"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",
|
||||
"panel": "1",
|
||||
"registry": [
|
||||
{
|
||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||
"Name": "EnableActivityFeed",
|
||||
"Value": "0",
|
||||
"Value": "1",
|
||||
"Type": "DWord",
|
||||
"OriginalValue": "<RemoveEntry>"
|
||||
},
|
||||
|
||||
@@ -16,8 +16,10 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force
|
||||
Remove-Item -Path \"$Env:SystemRoot\\Temp\\*\" -Recurse -Force
|
||||
# A temp folder always holds files something has open, including this run's own, and
|
||||
# the job layer counts a logged error as a failed step
|
||||
Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path \"$Env:SystemRoot\\Temp\\*\" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
"
|
||||
],
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /deny Everyone:F"
|
||||
"icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /deny *S-1-1-0:F"
|
||||
],
|
||||
"UndoScript": [
|
||||
"icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /grant Everyone:F"
|
||||
"icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /grant *S-1-1-0:F"
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: "End Task With Right Click - Enable"
|
||||
description: "Enables option to end task when right clicking a program in the taskbar."
|
||||
description: "Enables option to end task when right-clicking a program in the taskbar."
|
||||
editUrl: false
|
||||
---
|
||||
|
||||
@@ -11,7 +11,7 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
```json title="config/tweaks.json"
|
||||
"WPFTweaksEndTaskOnTaskbar": {
|
||||
"Content": "End Task With Right Click - Enable",
|
||||
"Description": "Enables option to end task when right clicking a program in the taskbar.",
|
||||
"Description": "Enables option to end task when right-clicking a program in the taskbar.",
|
||||
"category": "Essential Tweaks",
|
||||
"panel": "1",
|
||||
"registry": [
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: "Logitech Download Assistant Auto-Install - Disable"
|
||||
description: "Blocks the Logi Download Assistant that Windows Update keeps reinstalling with Logitech device drivers. Logitech hardware keeps working without it."
|
||||
editUrl: false
|
||||
---
|
||||
|
||||
:::note
|
||||
This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitusTech/winutil/blob/main/config/tweaks.json). Do not edit this page directly.
|
||||
:::
|
||||
|
||||
```json title="config/tweaks.json"
|
||||
"WPFTweaksLogiBlock": {
|
||||
"Content": "Logitech Download Assistant Auto-Install - Disable",
|
||||
"Description": "Blocks the Logi Download Assistant that Windows Update keeps reinstalling with Logitech device drivers. Logitech hardware keeps working without it.",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"InvokeScript": [
|
||||
"
|
||||
Stop-Process -Name \"logi_download_assistant\" -Force -ErrorAction SilentlyContinue
|
||||
|
||||
$ProgramFiles64 = if ($Env:ProgramW6432) { $Env:ProgramW6432 } else { $Env:ProgramFiles }
|
||||
$LogiPath = \"$ProgramFiles64\\LogiDownloadAssistant\"
|
||||
|
||||
if (Test-Path $LogiPath) {
|
||||
Remove-Item $LogiPath\\* -Recurse -Force
|
||||
} else {
|
||||
New-Item -Path $LogiPath -ItemType Directory
|
||||
}
|
||||
|
||||
icacls $LogiPath /deny \"*S-1-1-0:(W)\"
|
||||
if ($LASTEXITCODE -ne 0) { throw \"icacls failed to deny write access on $LogiPath (exit code $LASTEXITCODE)\" }
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
$ProgramFiles64 = if ($Env:ProgramW6432) { $Env:ProgramW6432 } else { $Env:ProgramFiles }
|
||||
$LogiPath = \"$ProgramFiles64\\LogiDownloadAssistant\"
|
||||
|
||||
if (Test-Path $LogiPath) {
|
||||
icacls $LogiPath /remove:d \"*S-1-1-0\"
|
||||
if ($LASTEXITCODE -ne 0) { throw \"icacls failed to remove the write-deny rule on $LogiPath (exit code $LASTEXITCODE)\" }
|
||||
}
|
||||
"
|
||||
],
|
||||
}
|
||||
```
|
||||
+12
-44
@@ -10,53 +10,21 @@ This page is generated from [`functions/public/Invoke-WPFOOSU.ps1`](https://gith
|
||||
|
||||
```powershell title="functions/public/Invoke-WPFOOSU.ps1"
|
||||
function Invoke-WPFOOSU {
|
||||
if ($sync.ProcessRunning) {
|
||||
Show-WinUtilMessage -Message "Another process is currently running." -Title "WinUtil" -Button "OK" -Icon "Warning"
|
||||
return
|
||||
}
|
||||
Start-WinUtilJob -Name "OOSU" -Description "Downloading O&O ShutUp10++" -Parameters @{
|
||||
DownloadPath = Join-Path $sync.winutildir "ooshutup10.exe"
|
||||
} -ScriptBlock {
|
||||
param($DownloadPath)
|
||||
|
||||
$downloadPath = Join-Path $sync.winutildir "ooshutup10.exe"
|
||||
$sync.ProcessRunning = $true
|
||||
Write-WinUtilLog -Component "OOSU" -Message "Downloading O&O ShutUp10++."
|
||||
|
||||
Invoke-WPFRunspace -ParameterList @(,("downloadPath", $downloadPath)) -ScriptBlock {
|
||||
param($downloadPath)
|
||||
|
||||
$hasUI = $null -ne $sync.Form -and $null -ne $sync.Form.Dispatcher
|
||||
|
||||
try {
|
||||
Write-WinUtilLog -Component "OOSU" -Message "Downloading O&O ShutUp10++."
|
||||
if ($hasUI) {
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Downloading O&O ShutUp10++ (0%)" -Percent 0
|
||||
}
|
||||
|
||||
Save-WinUtilFile -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -DestinationPath $downloadPath -ProgressCallback {
|
||||
param($percent)
|
||||
|
||||
if ($hasUI) {
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Downloading O&O ShutUp10++ ($percent%)" -Percent $percent
|
||||
}
|
||||
}
|
||||
|
||||
if ($hasUI) {
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "Launching O&O ShutUp10++" -Percent 100
|
||||
}
|
||||
Start-Process -FilePath $downloadPath
|
||||
|
||||
Write-WinUtilLog -Component "OOSU" -Message "O&O ShutUp10++ launched."
|
||||
if ($hasUI) {
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "O&O ShutUp10++ launched" -Percent 100
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-WinUtilLog -Level "ERROR" -Component "OOSU" -Message "O&O ShutUp10++ download failed: $($_.Exception.Message)"
|
||||
if ($hasUI) {
|
||||
Set-WinUtilTweaksProgressIndicator -Visible $true -Label "O&O ShutUp10++ download failed" -Percent 100
|
||||
}
|
||||
Write-Error "Couldn't download O&O ShutUp10. Please make sure you have an active Internet connection."
|
||||
}
|
||||
finally {
|
||||
$sync.ProcessRunning = $false
|
||||
Save-WinUtilFile -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -DestinationPath $DownloadPath -ProgressCallback {
|
||||
param($percent)
|
||||
Step-WinUtilJob -Status "Downloading O&O ShutUp10++ ($percent%)" -Percent $percent
|
||||
}
|
||||
|
||||
Step-WinUtilJob -Status "Launching O&O ShutUp10++" -Percent 100
|
||||
Start-Process -FilePath $DownloadPath
|
||||
Write-WinUtilLog -Component "OOSU" -Message "O&O ShutUp10++ launched."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
+2
-2
@@ -40,12 +40,12 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
New-Item -Path $RazerPath -ItemType Directory
|
||||
}
|
||||
|
||||
icacls $RazerPath /deny \"Everyone:(W)\"
|
||||
icacls $RazerPath /deny \"*S-1-1-0:(W)\"
|
||||
"
|
||||
],
|
||||
"UndoScript": [
|
||||
"
|
||||
icacls \"$Env:SystemRoot\\Installer\\Razer\" /remove:d Everyone
|
||||
icacls \"$Env:SystemRoot\\Installer\\Razer\" /remove:d *S-1-1-0
|
||||
"
|
||||
],
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
"InvokeScript": [
|
||||
"
|
||||
# Deny permission to remove OneDrive folder
|
||||
icacls $Env:OneDrive /deny \"Administrators:(D,DC)\"
|
||||
icacls $Env:OneDrive /deny \"*S-1-5-32-544:(D,DC)\"
|
||||
|
||||
Write-Host \"Uninstalling OneDrive...\"
|
||||
Start-Process -FilePath (Join-Path $Env:SystemRoot \"System32\\OneDriveSetup.exe\") -ArgumentList '/uninstall' -Wait
|
||||
@@ -31,7 +31,7 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
Remove-Item \"$Env:ProgramData\\Microsoft OneDrive\" -Recurse -Force
|
||||
|
||||
# Grant back permission to access OneDrive folder
|
||||
icacls $Env:OneDrive /grant \"Administrators:(D,DC)\"
|
||||
icacls $Env:OneDrive /grant \"*S-1-5-32-544:(D,DC)\"
|
||||
|
||||
if (-not (Get-ChildItem -Path $Env:OneDrive)) {
|
||||
Remove-Item -Path $Env:OneDrive -Recurse
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ This page is generated from [`config/tweaks.json`](https://github.com/ChrisTitus
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Type": "Combobox",
|
||||
"ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult Mullvad Mullvad_Ads_Trackers Mullvad_Ads_Trackers_Malware Mullvad_Ads_Trackers_Malware_Social Mullvad_Ads_Trackers_Malware_Adult_Gambling Mullvad_Ads_Trackers_Malware_Adult_Gambling_Social",
|
||||
"ComboItems": "Default DHCP Fastest Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult",
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user