mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 18:42:35 -05:00
Compare commits
100 Commits
Author | SHA1 | Date | |
---|---|---|---|
a5fbff142b | |||
e830894819 | |||
d4dc9aec9b | |||
e4d0e16b26 | |||
d6102e8954 | |||
227cb21c24 | |||
1891ea7966 | |||
6c49a8f2c9 | |||
ab384029f1 | |||
0c32d016b4 | |||
45818fd80c | |||
d08954945c | |||
a7ab24e3c9 | |||
a924d91d65 | |||
676e46f59f | |||
37b9c552df | |||
2e12176b2d | |||
7d1e4a8d82 | |||
4f8e7a8ea7 | |||
6c4c24b26d | |||
d205e75030 | |||
12561aba2c | |||
84fd1bc71c | |||
b9cd563915 | |||
58df438b92 | |||
9086b30a75 | |||
b268f98b91 | |||
25a4ebe062 | |||
60f5ef1f8e | |||
491b0b534c | |||
a59a30f905 | |||
227babe0e8 | |||
a0c4b33483 | |||
b831901967 | |||
d0427403f1 | |||
312f42f39a | |||
f68c9bf213 | |||
7b6a624ec6 | |||
43304808a9 | |||
ad0ed09940 | |||
b9813f86b9 | |||
2c5707e18f | |||
b646b139b8 | |||
5b369250b6 | |||
9274c683a2 | |||
f559de3a8c | |||
1e71020757 | |||
83ef15ccaf | |||
c2938f9339 | |||
b2be290be2 | |||
b6723bebf0 | |||
42c1ef434c | |||
a6ad919f16 | |||
52fd667ef9 | |||
04130231ff | |||
a510b52acb | |||
48581d6aad | |||
c3a77e71ad | |||
3d7b232248 | |||
b6d1dc50cb | |||
f6af93afbd | |||
0c841f98e8 | |||
e4c44e4878 | |||
8a78c960ea | |||
cb3b64e195 | |||
83f93ceba4 | |||
9ac93fd2dc | |||
13712b4c77 | |||
8d65f3bcf8 | |||
5c937efa9b | |||
ade1c3b830 | |||
8ded42a3ce | |||
65b91330ed | |||
98f8b07951 | |||
acaad991a7 | |||
e00bc5f723 | |||
a5fd8e355d | |||
8a2e1391e0 | |||
81c3722881 | |||
279e707a7a | |||
e894613f68 | |||
be08211cdc | |||
118c3e3964 | |||
3f4e353d13 | |||
a09ae3e251 | |||
f9c09495fc | |||
de424ce636 | |||
c28760e11a | |||
53090a6164 | |||
4661bf31ba | |||
5c687c98c6 | |||
495e08db05 | |||
a23d63613f | |||
acbabd4962 | |||
45a18b335f | |||
c23ea45e61 | |||
1f01933cc0 | |||
4958c5efe9 | |||
5dd3bb492f | |||
9d6d21bd40 |
9
.gitattributes
vendored
9
.gitattributes
vendored
@ -1,3 +1,12 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.ps1 text eol=crlf
|
||||||
|
*.json text eol=crlf
|
||||||
|
*.cfg text eol=crlf
|
||||||
|
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
|
||||||
config/* diff
|
config/* diff
|
||||||
config/applications.json diff
|
config/applications.json diff
|
||||||
*.json diff
|
*.json diff
|
18
.github/workflows/close-old-issues.yaml
vendored
18
.github/workflows/close-old-issues.yaml
vendored
@ -16,8 +16,20 @@ jobs:
|
|||||||
- name: Close inactive issues
|
- name: Close inactive issues
|
||||||
uses: actions/stale@v9.0.0
|
uses: actions/stale@v9.0.0
|
||||||
with:
|
with:
|
||||||
|
# A list of labels to reference when looking through issues,
|
||||||
|
# and only when one (or even more) of these labels are found..
|
||||||
|
# then skip this issue, and never try to stale and/or close it.
|
||||||
exempt-issue-labels: "Keep Issue Open"
|
exempt-issue-labels: "Keep Issue Open"
|
||||||
days-before-issue-close: 14
|
# Split it into two weeks, after one week the issue will be marked as stale,
|
||||||
close-issue-message: "This issue was closed because it has been inactive for 14 days"
|
# after another week have pasted without any update.. the issue will then be closed.
|
||||||
debug-only: false # Make this field equal true if you want to test your configuration if it works or not
|
days-before-issue-stale: 7
|
||||||
|
days-before-issue-close: 7
|
||||||
|
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
||||||
|
days-before-pr-stale: -1
|
||||||
|
days-before-pr-close: -1
|
||||||
|
# Sends a message for both the Stale and Close events of an issue.
|
||||||
|
stale-issue-message: "This issue was marked as stale because it has been inactive for 7 days"
|
||||||
|
close-issue-message: "This issue was closed because it has been inactive for 7 days since it was marked as stale"
|
||||||
|
# Make this field equal true if you want to test your configuration if it works correctly or not
|
||||||
|
debug-only: false
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
46
.github/workflows/pre-release.yaml
vendored
Normal file
46
.github/workflows/pre-release.yaml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: Pre-Release WinUtil
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
workflow_dispatch: # Manual trigger added
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-runspace:
|
||||||
|
runs-on: windows-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.extract_version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract Version from winutil.ps1
|
||||||
|
id: extract_version
|
||||||
|
run: |
|
||||||
|
$version = ''
|
||||||
|
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object {
|
||||||
|
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
|
||||||
|
$version = $matches[1]
|
||||||
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
|
echo "::set-output name=version::$version"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-not $version) {
|
||||||
|
Write-Error "Version not found in winutil.ps1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Create and Upload Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
|
name: Pre-Release ${{ steps.extract_version.outputs.version }}
|
||||||
|
files: ./winutil.ps1
|
||||||
|
prerelease: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
5
.github/workflows/release.yaml
vendored
5
.github/workflows/release.yaml
vendored
@ -1,10 +1,6 @@
|
|||||||
name: Release WinUtil
|
name: Release WinUtil
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
|
||||||
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
workflow_dispatch: # Manual trigger added
|
workflow_dispatch: # Manual trigger added
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -41,5 +37,6 @@ jobs:
|
|||||||
tag_name: ${{ steps.extract_version.outputs.version }}
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
name: Release ${{ steps.extract_version.outputs.version }}
|
name: Release ${{ steps.extract_version.outputs.version }}
|
||||||
files: ./winutil.ps1
|
files: ./winutil.ps1
|
||||||
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
80
Compile.ps1
80
Compile.ps1
@ -1,5 +1,6 @@
|
|||||||
param (
|
param (
|
||||||
[switch]$Debug
|
[switch]$Debug,
|
||||||
|
[switch]$Run
|
||||||
)
|
)
|
||||||
$OFS = "`r`n"
|
$OFS = "`r`n"
|
||||||
$scriptname = "winutil.ps1"
|
$scriptname = "winutil.ps1"
|
||||||
@ -9,6 +10,22 @@ $sync = [Hashtable]::Synchronized(@{})
|
|||||||
$sync.PSScriptRoot = $PSScriptRoot
|
$sync.PSScriptRoot = $PSScriptRoot
|
||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
|
|
||||||
|
function Update-Progress {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$StatusMessage,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[ValidateRange(0,100)]
|
||||||
|
[int]$Percent,
|
||||||
|
|
||||||
|
[Parameter(position=2)]
|
||||||
|
[string]$Activity = "Compiling"
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
|
||||||
|
}
|
||||||
|
|
||||||
$header = @"
|
$header = @"
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
### ###
|
### ###
|
||||||
@ -17,20 +34,22 @@ $header = @"
|
|||||||
################################################################################################################
|
################################################################################################################
|
||||||
"@
|
"@
|
||||||
|
|
||||||
|
|
||||||
# Create the script in memory.
|
# Create the script in memory.
|
||||||
|
Update-Progress "Pre-req: Allocating Memory" 0
|
||||||
$script_content = [System.Collections.Generic.List[string]]::new()
|
$script_content = [System.Collections.Generic.List[string]]::new()
|
||||||
|
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Header" -PercentComplete 5
|
Update-Progress "Adding: Header" 5
|
||||||
$script_content.Add($header)
|
$script_content.Add($header)
|
||||||
|
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Version" -PercentComplete 10
|
Update-Progress "Adding: Version" 10
|
||||||
$script_content.Add($(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
$script_content.Add($(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
||||||
|
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Functions" -PercentComplete 20
|
Update-Progress "Adding: Functions" 20
|
||||||
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||||||
$script_content.Add($(Get-Content $psitem.FullName))
|
$script_content.Add($(Get-Content $psitem.FullName))
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Config *.json" -PercentComplete 40
|
Update-Progress "Adding: Config *.json" 40
|
||||||
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||||
|
|
||||||
$json = (Get-Content $psitem.FullName).replace("'","''")
|
$json = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
@ -43,46 +62,53 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-
|
|||||||
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Note:
|
||||||
|
# Avoid using HTML Entity Codes, for example '”' (stands for "Right Double Quotation Mark"),
|
||||||
|
# Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
||||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||||
$firstLevelName = $firstLevelJsonList[$i]
|
$firstLevelName = $firstLevelJsonList[$i]
|
||||||
# Note: Avoid using HTML Entity Codes (for example '”' (stands for "Right Double Quotation Mark")), and use HTML decimal/hex codes instead.
|
|
||||||
# as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
|
||||||
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||||
}
|
}
|
||||||
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# The replace at the end is required, as without it the output of converto-json will be somewhat weird for Multiline String
|
|
||||||
# Most Notably is the scripts in json files, making it harder for users who want to review these scripts that are found in the final compiled script
|
# Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file
|
||||||
|
if ($psitem.Name -eq "applications.json") {
|
||||||
|
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||||
|
$appEntryName = $firstLevelJsonList[$i]
|
||||||
|
$appEntryContent = $jsonAsObject.$appEntryName
|
||||||
|
# Remove the entire app entry, so we could add it later with a different name
|
||||||
|
$jsonAsObject.PSObject.Properties.Remove($appEntryName)
|
||||||
|
# Add the app entry, but with a different name (WPFInstall + The App Entry Name)
|
||||||
|
$jsonAsObject | Add-Member -MemberType NoteProperty -Name "WPFInstall$appEntryName" -Value $appEntryContent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# The replace at the end is required, as without it the output of 'converto-json' will be somewhat weird for Multiline Strings
|
||||||
|
# Most Notably is the scripts in some json files, making it harder for users who want to review these scripts, which're found in the compiled script
|
||||||
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
||||||
|
|
||||||
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
||||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Config *.cfg" -PercentComplete 45
|
|
||||||
Get-ChildItem .\config | Where-Object {$PSItem.Extension -eq ".cfg"} | ForEach-Object {
|
|
||||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$(Get-Content $PSItem.FullName)'"))
|
|
||||||
}
|
|
||||||
Get-ChildItem .\config | Where-Object {$PSItem.Extension -eq ".cfg"} | ForEach-Object {
|
|
||||||
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$(Get-Content $PSItem.FullName)'"))
|
|
||||||
}
|
|
||||||
|
|
||||||
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
||||||
|
|
||||||
# Dot-source the Get-TabXaml function
|
# Dot-source the Get-TabXaml function
|
||||||
. .\functions\private\Get-TabXaml.ps1
|
. .\functions\private\Get-TabXaml.ps1
|
||||||
|
|
||||||
Write-Progress -Activity "Compiling" -Status "Building: Xaml " -PercentComplete 75
|
Update-Progress "Building: Xaml " 75
|
||||||
$appXamlContent = Get-TabXaml "applications" 5
|
$appXamlContent = Get-TabXaml "applications" 5
|
||||||
$tweaksXamlContent = Get-TabXaml "tweaks"
|
$tweaksXamlContent = Get-TabXaml "tweaks"
|
||||||
$featuresXamlContent = Get-TabXaml "feature"
|
$featuresXamlContent = Get-TabXaml "feature"
|
||||||
|
|
||||||
|
|
||||||
Write-Progress -Activity "Compiling" -Status "Adding: Xaml " -PercentComplete 90
|
Update-Progress "Adding: Xaml " 90
|
||||||
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
||||||
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
||||||
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
||||||
@ -93,13 +119,13 @@ $script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
|||||||
$script_content.Add($(Get-Content .\scripts\main.ps1))
|
$script_content.Add($(Get-Content .\scripts\main.ps1))
|
||||||
|
|
||||||
if ($Debug){
|
if ($Debug){
|
||||||
Write-Progress -Activity "Compiling" -Status "Writing debug files" -PercentComplete 95
|
Update-Progress "Writing debug files" 95
|
||||||
$appXamlContent | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
$appXamlContent | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
||||||
$tweaksXamlContent | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
$tweaksXamlContent | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
||||||
$featuresXamlContent | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
$featuresXamlContent | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Progress -Activity "Compiling" -Status "Removing temporary files" -PercentComplete 99
|
Update-Progress "Removing temporary files" 99
|
||||||
Remove-Item ".\xaml\inputApp.xaml" -ErrorAction SilentlyContinue
|
Remove-Item ".\xaml\inputApp.xaml" -ErrorAction SilentlyContinue
|
||||||
Remove-Item ".\xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue
|
Remove-Item ".\xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue
|
||||||
Remove-Item ".\xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue
|
Remove-Item ".\xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue
|
||||||
@ -107,3 +133,13 @@ else {
|
|||||||
|
|
||||||
Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding ascii
|
Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding ascii
|
||||||
Write-Progress -Activity "Compiling" -Completed
|
Write-Progress -Activity "Compiling" -Completed
|
||||||
|
|
||||||
|
if ($run){
|
||||||
|
try {
|
||||||
|
Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -13,14 +13,9 @@
|
|||||||
```
|
```
|
||||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||||
```
|
```
|
||||||
- Windows Insider Builds not installing: Telemetry needs to be enabled
|
|
||||||
```
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
|
||||||
```
|
|
||||||
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
||||||
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
|
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
|
||||||
- Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'.
|
|
||||||
- Script doesn't run/PowerShell crashes:
|
- Script doesn't run/PowerShell crashes:
|
||||||
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
||||||
2. Run:
|
2. Run:
|
||||||
|
21
README.md
21
README.md
@ -1,5 +1,7 @@
|
|||||||
# Chris Titus Tech's Windows Utility
|
# Chris Titus Tech's Windows Utility
|
||||||
|
|
||||||
|
[](https://github.com/ChrisTitusTech/winutil/releases/latest)
|
||||||
|
|
||||||
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
|
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
|
||||||
|
|
||||||

|

|
||||||
@ -22,24 +24,19 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach
|
|||||||
|
|
||||||
#### Simple way
|
#### Simple way
|
||||||
|
|
||||||
|
```ps1
|
||||||
|
irm "https://christitus.com/win" | iex
|
||||||
```
|
```
|
||||||
irm https://christitus.com/win | iex
|
Courtesy of the issue: [#144](/../../issues/144)
|
||||||
```
|
|
||||||
Courtesy of the issue raised at: [#144](/../../issues/144)
|
|
||||||
|
|
||||||
or by executing:
|
If this site is not reachable from your country, please try running it directly from GitHub.
|
||||||
```
|
```ps1
|
||||||
iwr -useb https://christitus.com/win | iex
|
irm "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1" | iex
|
||||||
```
|
|
||||||
|
|
||||||
if for some reason this site is not reachable from your country please try running it directly from github (replace `RELEASE_TAG` with current release that you are interested in, for example `v2024.06.05`)
|
|
||||||
```
|
|
||||||
irm "https://github.com/ChrisTitusTech/winutil/releases/download/RELEASE_TAG/winutil.ps1" | iex
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Automation
|
#### Automation
|
||||||
|
|
||||||
Some features are avaliable through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
||||||
|
|
||||||
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
||||||

|

|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,227 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# This file was created with O&O ShutUp10++ V1.9.1436
|
|
||||||
# and can be imported onto another computer.
|
|
||||||
#
|
|
||||||
# Download the application at https://www.oo-software.com/shutup10
|
|
||||||
# You can then import the file from within the program.
|
|
||||||
#
|
|
||||||
# Alternatively you can import it automatically over a command line.
|
|
||||||
# Simply use the following parameter:
|
|
||||||
# OOSU10.exe <path to file>
|
|
||||||
#
|
|
||||||
# Selecting the Option /quiet ends the app right after the import and the
|
|
||||||
# user does not get any feedback about the import.
|
|
||||||
#
|
|
||||||
# We are always happy to answer any questions you may have!
|
|
||||||
# © 2015-2023 O&O Software GmbH, Berlin. All rights reserved.
|
|
||||||
# https://www.oo-software.com/
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
P001 -
|
|
||||||
P002 -
|
|
||||||
P003 -
|
|
||||||
P004 -
|
|
||||||
P005 -
|
|
||||||
P006 -
|
|
||||||
P008 -
|
|
||||||
P026 -
|
|
||||||
P027 -
|
|
||||||
P028 -
|
|
||||||
P064 -
|
|
||||||
P065 -
|
|
||||||
P066 -
|
|
||||||
P067 -
|
|
||||||
P070 -
|
|
||||||
P069 -
|
|
||||||
P009 -
|
|
||||||
P010 -
|
|
||||||
P015 -
|
|
||||||
P068 -
|
|
||||||
P016 -
|
|
||||||
A001 -
|
|
||||||
A002 -
|
|
||||||
A003 -
|
|
||||||
A004 -
|
|
||||||
A006 -
|
|
||||||
A005 -
|
|
||||||
P007 -
|
|
||||||
P036 -
|
|
||||||
P025 -
|
|
||||||
P033 -
|
|
||||||
P023 -
|
|
||||||
P056 -
|
|
||||||
P057 -
|
|
||||||
P012 -
|
|
||||||
P034 -
|
|
||||||
P013 -
|
|
||||||
P035 -
|
|
||||||
P062 -
|
|
||||||
P063 -
|
|
||||||
P081 -
|
|
||||||
P047 -
|
|
||||||
P019 -
|
|
||||||
P048 -
|
|
||||||
P049 -
|
|
||||||
P020 -
|
|
||||||
P037 -
|
|
||||||
P011 -
|
|
||||||
P038 -
|
|
||||||
P050 -
|
|
||||||
P051 -
|
|
||||||
P018 -
|
|
||||||
P039 -
|
|
||||||
P021 -
|
|
||||||
P040 -
|
|
||||||
P022 -
|
|
||||||
P041 -
|
|
||||||
P014 -
|
|
||||||
P042 -
|
|
||||||
P052 -
|
|
||||||
P053 -
|
|
||||||
P054 -
|
|
||||||
P055 -
|
|
||||||
P029 -
|
|
||||||
P043 -
|
|
||||||
P030 -
|
|
||||||
P044 -
|
|
||||||
P031 -
|
|
||||||
P045 -
|
|
||||||
P032 -
|
|
||||||
P046 -
|
|
||||||
P058 -
|
|
||||||
P059 -
|
|
||||||
P060 -
|
|
||||||
P061 -
|
|
||||||
P071 -
|
|
||||||
P072 -
|
|
||||||
P073 -
|
|
||||||
P074 -
|
|
||||||
P075 -
|
|
||||||
P076 -
|
|
||||||
P077 -
|
|
||||||
P078 -
|
|
||||||
P079 -
|
|
||||||
P080 -
|
|
||||||
P024 -
|
|
||||||
S001 -
|
|
||||||
S002 -
|
|
||||||
S003 -
|
|
||||||
S008 -
|
|
||||||
E101 -
|
|
||||||
E201 -
|
|
||||||
E115 -
|
|
||||||
E215 -
|
|
||||||
E118 -
|
|
||||||
E218 -
|
|
||||||
E107 -
|
|
||||||
E207 -
|
|
||||||
E111 -
|
|
||||||
E211 -
|
|
||||||
E112 -
|
|
||||||
E212 -
|
|
||||||
E109 -
|
|
||||||
E209 -
|
|
||||||
E121 -
|
|
||||||
E221 -
|
|
||||||
E103 -
|
|
||||||
E203 -
|
|
||||||
E123 -
|
|
||||||
E223 -
|
|
||||||
E124 -
|
|
||||||
E224 -
|
|
||||||
E128 -
|
|
||||||
E228 -
|
|
||||||
E119 -
|
|
||||||
E219 -
|
|
||||||
E120 -
|
|
||||||
E220 -
|
|
||||||
E122 -
|
|
||||||
E222 -
|
|
||||||
E125 -
|
|
||||||
E225 -
|
|
||||||
E126 -
|
|
||||||
E226 -
|
|
||||||
E106 -
|
|
||||||
E206 -
|
|
||||||
E127 -
|
|
||||||
E227 -
|
|
||||||
E001 -
|
|
||||||
E002 -
|
|
||||||
E003 -
|
|
||||||
E008 -
|
|
||||||
E007 -
|
|
||||||
E010 -
|
|
||||||
E011 +
|
|
||||||
E012 +
|
|
||||||
E009 -
|
|
||||||
E004 -
|
|
||||||
E005 -
|
|
||||||
E013 -
|
|
||||||
E014 -
|
|
||||||
E006 -
|
|
||||||
Y001 -
|
|
||||||
Y002 -
|
|
||||||
Y003 -
|
|
||||||
Y004 -
|
|
||||||
Y005 -
|
|
||||||
Y006 -
|
|
||||||
Y007 -
|
|
||||||
C012 -
|
|
||||||
C002 -
|
|
||||||
C013 -
|
|
||||||
C007 -
|
|
||||||
C008 -
|
|
||||||
C009 -
|
|
||||||
C010 -
|
|
||||||
C011 -
|
|
||||||
C014 -
|
|
||||||
C015 -
|
|
||||||
C101 -
|
|
||||||
C201 -
|
|
||||||
C102 -
|
|
||||||
L001 -
|
|
||||||
L003 -
|
|
||||||
L004 -
|
|
||||||
L005 -
|
|
||||||
U001 -
|
|
||||||
U004 -
|
|
||||||
U005 -
|
|
||||||
U006 -
|
|
||||||
U007 -
|
|
||||||
W001 -
|
|
||||||
W011 -
|
|
||||||
W004 -
|
|
||||||
W005 -
|
|
||||||
W010 -
|
|
||||||
W009 -
|
|
||||||
P017 -
|
|
||||||
W006 -
|
|
||||||
W008 -
|
|
||||||
M006 -
|
|
||||||
M011 -
|
|
||||||
M010 -
|
|
||||||
O003 -
|
|
||||||
O001 -
|
|
||||||
S012 -
|
|
||||||
S013 -
|
|
||||||
S014 -
|
|
||||||
K001 -
|
|
||||||
K002 -
|
|
||||||
K005 -
|
|
||||||
M003 -
|
|
||||||
M015 -
|
|
||||||
M016 -
|
|
||||||
M017 -
|
|
||||||
M018 -
|
|
||||||
M019 -
|
|
||||||
M020 -
|
|
||||||
M021 -
|
|
||||||
M022 -
|
|
||||||
M001 -
|
|
||||||
M004 -
|
|
||||||
M005 -
|
|
||||||
M024 -
|
|
||||||
M012 -
|
|
||||||
M013 -
|
|
||||||
M014 -
|
|
||||||
N001 -
|
|
@ -1,231 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# This file was created with O&O ShutUp10++ V1.9.1438
|
|
||||||
# and can be imported onto another computer.
|
|
||||||
#
|
|
||||||
# Download the application at https://www.oo-software.com/shutup10
|
|
||||||
# You can then import the file from within the program.
|
|
||||||
#
|
|
||||||
# Alternatively you can import it automatically over a command line.
|
|
||||||
# Simply use the following parameter:
|
|
||||||
# OOSU10.exe <path to file>
|
|
||||||
#
|
|
||||||
# Selecting the Option /quiet ends the app right after the import and the
|
|
||||||
# user does not get any feedback about the import.
|
|
||||||
#
|
|
||||||
# We are always happy to answer any questions you may have!
|
|
||||||
# © 2015-2024 O&O Software GmbH, Berlin. All rights reserved.
|
|
||||||
# https://www.oo-software.com/
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
P001 +
|
|
||||||
P002 +
|
|
||||||
P003 +
|
|
||||||
P004 +
|
|
||||||
P005 +
|
|
||||||
P006 +
|
|
||||||
P008 +
|
|
||||||
P026 +
|
|
||||||
P027 +
|
|
||||||
P028 +
|
|
||||||
P064 +
|
|
||||||
P065 +
|
|
||||||
P066 +
|
|
||||||
P067 +
|
|
||||||
P070 +
|
|
||||||
P069 +
|
|
||||||
P009 -
|
|
||||||
P010 +
|
|
||||||
P015 +
|
|
||||||
P068 -
|
|
||||||
P016 -
|
|
||||||
A001 +
|
|
||||||
A002 +
|
|
||||||
A003 +
|
|
||||||
A004 +
|
|
||||||
A006 +
|
|
||||||
A005 +
|
|
||||||
P007 +
|
|
||||||
P036 +
|
|
||||||
P025 +
|
|
||||||
P033 +
|
|
||||||
P023 +
|
|
||||||
P056 +
|
|
||||||
P057 -
|
|
||||||
P012 -
|
|
||||||
P034 -
|
|
||||||
P013 -
|
|
||||||
P035 -
|
|
||||||
P062 -
|
|
||||||
P063 -
|
|
||||||
P081 -
|
|
||||||
P047 -
|
|
||||||
P019 -
|
|
||||||
P048 -
|
|
||||||
P049 -
|
|
||||||
P020 -
|
|
||||||
P037 -
|
|
||||||
P011 -
|
|
||||||
P038 -
|
|
||||||
P050 -
|
|
||||||
P051 -
|
|
||||||
P018 -
|
|
||||||
P039 -
|
|
||||||
P021 -
|
|
||||||
P040 -
|
|
||||||
P022 -
|
|
||||||
P041 -
|
|
||||||
P014 -
|
|
||||||
P042 -
|
|
||||||
P052 -
|
|
||||||
P053 -
|
|
||||||
P054 -
|
|
||||||
P055 -
|
|
||||||
P029 -
|
|
||||||
P043 -
|
|
||||||
P030 -
|
|
||||||
P044 -
|
|
||||||
P031 -
|
|
||||||
P045 -
|
|
||||||
P032 -
|
|
||||||
P046 -
|
|
||||||
P058 -
|
|
||||||
P059 -
|
|
||||||
P060 -
|
|
||||||
P061 -
|
|
||||||
P071 -
|
|
||||||
P072 -
|
|
||||||
P073 -
|
|
||||||
P074 -
|
|
||||||
P075 -
|
|
||||||
P076 -
|
|
||||||
P077 -
|
|
||||||
P078 -
|
|
||||||
P079 -
|
|
||||||
P080 -
|
|
||||||
P024 +
|
|
||||||
S001 +
|
|
||||||
S002 +
|
|
||||||
S003 +
|
|
||||||
S008 -
|
|
||||||
E101 +
|
|
||||||
E201 +
|
|
||||||
E115 +
|
|
||||||
E215 +
|
|
||||||
E118 +
|
|
||||||
E218 +
|
|
||||||
E107 +
|
|
||||||
E207 +
|
|
||||||
E111 +
|
|
||||||
E211 +
|
|
||||||
E112 +
|
|
||||||
E212 +
|
|
||||||
E109 +
|
|
||||||
E209 +
|
|
||||||
E121 +
|
|
||||||
E221 +
|
|
||||||
E103 +
|
|
||||||
E203 +
|
|
||||||
E123 +
|
|
||||||
E223 +
|
|
||||||
E124 +
|
|
||||||
E224 +
|
|
||||||
E128 +
|
|
||||||
E228 +
|
|
||||||
E119 -
|
|
||||||
E219 -
|
|
||||||
E120 -
|
|
||||||
E220 -
|
|
||||||
E122 -
|
|
||||||
E222 -
|
|
||||||
E125 -
|
|
||||||
E225 -
|
|
||||||
E126 -
|
|
||||||
E226 -
|
|
||||||
E106 -
|
|
||||||
E206 -
|
|
||||||
E127 -
|
|
||||||
E227 -
|
|
||||||
E001 +
|
|
||||||
E002 +
|
|
||||||
E003 +
|
|
||||||
E008 +
|
|
||||||
E007 +
|
|
||||||
E010 +
|
|
||||||
E011 +
|
|
||||||
E012 +
|
|
||||||
E009 -
|
|
||||||
E004 -
|
|
||||||
E005 -
|
|
||||||
E013 -
|
|
||||||
E014 -
|
|
||||||
E006 -
|
|
||||||
Y001 +
|
|
||||||
Y002 +
|
|
||||||
Y003 +
|
|
||||||
Y004 +
|
|
||||||
Y005 +
|
|
||||||
Y006 +
|
|
||||||
Y007 +
|
|
||||||
C012 +
|
|
||||||
C002 +
|
|
||||||
C013 +
|
|
||||||
C007 +
|
|
||||||
C008 +
|
|
||||||
C009 +
|
|
||||||
C010 +
|
|
||||||
C011 +
|
|
||||||
C014 +
|
|
||||||
C015 +
|
|
||||||
C101 +
|
|
||||||
C201 +
|
|
||||||
C102 +
|
|
||||||
C103 +
|
|
||||||
C203 +
|
|
||||||
L001 +
|
|
||||||
L003 +
|
|
||||||
L004 -
|
|
||||||
L005 -
|
|
||||||
U001 +
|
|
||||||
U004 +
|
|
||||||
U005 +
|
|
||||||
U006 +
|
|
||||||
U007 +
|
|
||||||
W001 +
|
|
||||||
W011 +
|
|
||||||
W004 -
|
|
||||||
W005 -
|
|
||||||
W010 -
|
|
||||||
W009 -
|
|
||||||
P017 +
|
|
||||||
W006 -
|
|
||||||
W008 -
|
|
||||||
M006 +
|
|
||||||
M011 -
|
|
||||||
M010 +
|
|
||||||
O003 -
|
|
||||||
O001 -
|
|
||||||
S012 -
|
|
||||||
S013 -
|
|
||||||
S014 -
|
|
||||||
K001 +
|
|
||||||
K002 +
|
|
||||||
K005 +
|
|
||||||
M003 +
|
|
||||||
M015 +
|
|
||||||
M016 +
|
|
||||||
M017 -
|
|
||||||
M018 +
|
|
||||||
M019 -
|
|
||||||
M020 +
|
|
||||||
M021 +
|
|
||||||
M022 +
|
|
||||||
M001 +
|
|
||||||
M004 +
|
|
||||||
M005 +
|
|
||||||
M024 +
|
|
||||||
M026 +
|
|
||||||
M027 +
|
|
||||||
M012 -
|
|
||||||
M013 -
|
|
||||||
M014 -
|
|
||||||
N001 -
|
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"Standard": [
|
"Standard": [
|
||||||
"WPFTweaksAH",
|
"WPFTweaksAH",
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksDVR",
|
"WPFTweaksDVR",
|
||||||
"WPFTweaksHiber",
|
"WPFTweaksHiber",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksLoc",
|
"WPFTweaksLoc",
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksStorage",
|
"WPFTweaksStorage",
|
||||||
"WPFTweaksTele",
|
"WPFTweaksTele",
|
||||||
@ -17,8 +17,8 @@
|
|||||||
"WPFTweaksTeredo"
|
"WPFTweaksTeredo"
|
||||||
],
|
],
|
||||||
"Minimal": [
|
"Minimal": [
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksTele"
|
"WPFTweaksTele"
|
||||||
]
|
]
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
"powercfg.exe /hibernate on"
|
"powercfg.exe /hibernate on"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFToggleTweaksLaptopHybernation": {
|
"WPFTweaksLaptopHibernation": {
|
||||||
"Content": "Set Hibernation as default (good for laptops)",
|
"Content": "Set Hibernation as default (good for laptops)",
|
||||||
"Description": "Most modern laptops have connected stadby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399",
|
"Description": "Most modern laptops have connected stadby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
@ -1223,11 +1223,6 @@
|
|||||||
"StartupType": "Automatic",
|
"StartupType": "Automatic",
|
||||||
"OriginalType": "Automatic"
|
"OriginalType": "Automatic"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Name": "WwanSvc",
|
|
||||||
"StartupType": "Manual",
|
|
||||||
"OriginalType": "Manual"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "XblAuthManager",
|
"Name": "XblAuthManager",
|
||||||
"StartupType": "Manual",
|
"StartupType": "Manual",
|
||||||
@ -1585,6 +1580,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"WPFTweaksConsumerFeatures":{
|
||||||
|
"Content": "Disable ConsumerFeatures",
|
||||||
|
"Description": "Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a003_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Name": "DisableWindowsConsumerFeatures",
|
||||||
|
"Value": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"WPFTweaksTele": {
|
"WPFTweaksTele": {
|
||||||
"Content": "Disable Telemetry",
|
"Content": "Disable Telemetry",
|
||||||
"Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.",
|
"Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.",
|
||||||
@ -1743,13 +1754,6 @@
|
|||||||
"Value": "0",
|
"Value": "0",
|
||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"Name": "DisableWindowsConsumerFeatures",
|
|
||||||
"Value": "1",
|
|
||||||
"Type": "DWord"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
||||||
"OriginalValue": "0",
|
"OriginalValue": "0",
|
||||||
@ -2313,20 +2317,6 @@
|
|||||||
"Invoke-WPFTweakPS7 -action \"PS5\""
|
"Invoke-WPFTweakPS7 -action \"PS5\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksOO": {
|
|
||||||
"Content": "Run OO Shutup",
|
|
||||||
"Description": "Runs OO Shutup and applies the recommended Tweaks. https://www.oo-software.com/en/shutup10",
|
|
||||||
"category": "Essential Tweaks",
|
|
||||||
"panel": "1",
|
|
||||||
"Order": "a009_",
|
|
||||||
"ToolTip": "Runs OO Shutup and applies the recommended Tweaks https://www.oo-software.com/en/shutup10",
|
|
||||||
"InvokeScript": [
|
|
||||||
"Invoke-WPFOOSU -action \"recommended\""
|
|
||||||
],
|
|
||||||
"UndoScript": [
|
|
||||||
"Invoke-WPFOOSU -action \"undo\""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"WPFTweaksStorage": {
|
"WPFTweaksStorage": {
|
||||||
"Content": "Disable Storage Sense",
|
"Content": "Disable Storage Sense",
|
||||||
"Description": "Storage Sense deletes temp files automatically.",
|
"Description": "Storage Sense deletes temp files automatically.",
|
||||||
@ -2342,17 +2332,15 @@
|
|||||||
},
|
},
|
||||||
"WPFTweaksRemoveEdge": {
|
"WPFTweaksRemoveEdge": {
|
||||||
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
||||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: AveYo",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a029_",
|
"Order": "a029_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||||
|
Invoke-WebRequest -Uri \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -OutFile \"$ENV:TEMP\\edgeremoval.bat\"
|
||||||
curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -o $ENV:temp\\edgeremoval.bat
|
|
||||||
Start-Process $ENV:temp\\edgeremoval.bat
|
Start-Process $ENV:temp\\edgeremoval.bat
|
||||||
|
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
@ -2408,12 +2396,12 @@
|
|||||||
"WPFTweaksDisableLMS1": {
|
"WPFTweaksDisableLMS1": {
|
||||||
"Content": "Disable Intel MM (vPro LMS)",
|
"Content": "Disable Intel MM (vPro LMS)",
|
||||||
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
||||||
"category": "Essential Tweaks",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a0015_",
|
"Order": "a026_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"Kill OneDrive process\"
|
Write-Host \"Kill LMS\"
|
||||||
$serviceName = \"LMS\"
|
$serviceName = \"LMS\"
|
||||||
Write-Host \"Stopping and disabling service: $serviceName\"
|
Write-Host \"Stopping and disabling service: $serviceName\"
|
||||||
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
||||||
@ -2457,39 +2445,45 @@
|
|||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"Install Microsoft Edge\"
|
Write-Host \"LMS vPro needs to be redownloaded from intel.com\"
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
|
||||||
|
|
||||||
"
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksRemoveOnedrive": {
|
"WPFTweaksRemoveOnedrive": {
|
||||||
"Content": "Remove OneDrive",
|
"Content": "Remove OneDrive",
|
||||||
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
"Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a030_",
|
"Order": "a030_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
|
$OneDrivePath = $($env:OneDrive)
|
||||||
Write-Host \"Kill OneDrive process\"
|
Write-Host \"Removing OneDrive\"
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
||||||
taskkill.exe /F /IM \"explorer.exe\"
|
if (Test-Path $regPath){
|
||||||
|
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
||||||
Write-Host \"Copy all OneDrive to Root UserProfile\"
|
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
||||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($env:USERPROFILE.TrimEnd())\\OneDrive' '$($env:USERPROFILE.TrimEnd())\\' /e /xj\" -NoNewWindow -Wait
|
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
||||||
|
}
|
||||||
Write-Host \"Remove OneDrive\"
|
else{
|
||||||
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --force --silent Microsoft.OneDrive \" -NoNewWindow -Wait
|
Write-Host \"Onedrive dosn't seem to be installed anymore\" -ForegroundColor Red
|
||||||
|
return
|
||||||
|
}
|
||||||
|
# Check if OneDrive got Uninstalled
|
||||||
|
if (-not (Test-Path $regPath)){
|
||||||
|
Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\"
|
||||||
|
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait
|
||||||
|
|
||||||
Write-Host \"Removing OneDrive leftovers\"
|
Write-Host \"Removing OneDrive leftovers\"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\"
|
||||||
|
reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f
|
||||||
# check if directory is empty before removing:
|
# check if directory is empty before removing:
|
||||||
If ((Get-ChildItem \"$env:userprofile\\OneDrive\" -Recurse | Measure-Object).Count -eq 0) {
|
If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) {
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:userprofile\\OneDrive\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||||
@ -2532,11 +2526,17 @@
|
|||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
||||||
Write-Host \"Restarting explorer\"
|
Write-Host \"Restarting explorer\"
|
||||||
|
taskkill.exe /F /IM \"explorer.exe\"
|
||||||
Start-Process \"explorer.exe\"
|
Start-Process \"explorer.exe\"
|
||||||
|
|
||||||
Write-Host \"Waiting for explorer to complete loading\"
|
Write-Host \"Waiting for explorer to complete loading\"
|
||||||
Write-Host \"Please Note - OneDrive folder may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||||
|
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
||||||
Start-Sleep 5
|
Start-Sleep 5
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red
|
||||||
|
}
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
@ -2719,7 +2719,7 @@
|
|||||||
},
|
},
|
||||||
"WPFTweaksBlockAdobeNet": {
|
"WPFTweaksBlockAdobeNet": {
|
||||||
"Content": "Adobe Network Block",
|
"Content": "Adobe Network Block",
|
||||||
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. ",
|
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a021_",
|
"Order": "a021_",
|
||||||
@ -2982,28 +2982,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksEnableipsix": {
|
|
||||||
"Content": "Enable IPv6",
|
|
||||||
"Description": "Enables IPv6.",
|
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
|
||||||
"panel": "1",
|
|
||||||
"Order": "a023_",
|
|
||||||
"registry": [
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
|
||||||
"Name": "DisabledComponents",
|
|
||||||
"Value": "0",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"Type": "DWord"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"InvokeScript": [
|
|
||||||
"Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
|
||||||
],
|
|
||||||
"UndoScript": [
|
|
||||||
"Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"WPFToggleDarkMode": {
|
"WPFToggleDarkMode": {
|
||||||
"Content": "Dark Theme",
|
"Content": "Dark Theme",
|
||||||
"Description": "Enable/Disable Dark Mode.",
|
"Description": "Enable/Disable Dark Mode.",
|
||||||
@ -3081,11 +3059,19 @@
|
|||||||
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a069_",
|
"Order": "a070_",
|
||||||
|
"Type": "Toggle"
|
||||||
|
},
|
||||||
|
"WPFToggleTaskbarSearch": {
|
||||||
|
"Content": "Taskbar Search",
|
||||||
|
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a068_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFOOSUbutton": {
|
"WPFOOSUbutton": {
|
||||||
"Content": "Customize OO Shutup Tweaks",
|
"Content": "Run OO Shutup 10",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a039_",
|
"Order": "a039_",
|
||||||
@ -3096,7 +3082,7 @@
|
|||||||
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a068_",
|
"Order": "a069_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFchangedns": {
|
"WPFchangedns": {
|
||||||
@ -3141,5 +3127,13 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a082_",
|
"Order": "a082_",
|
||||||
"Type": "300"
|
"Type": "300"
|
||||||
|
},
|
||||||
|
"WPFToggleTaskView": {
|
||||||
|
"Content": "Task View",
|
||||||
|
"Description": "If Enabled then Task View Icon in Taskbar will be shown.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a069_",
|
||||||
|
"Type": "Toggle"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,58 +30,5 @@ function Get-LocalizedYesNo {
|
|||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
||||||
# Return the array of characters
|
# Return the array of characters
|
||||||
return $charactersArray
|
return $charactersArray
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function Get-LocalizedYesNoTakeown {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
This function runs takeown.exe and captures its output to extract yes no in a localized Windows
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
The function retrieves lines from the output of takeown.exe until there are at least 2 characters
|
|
||||||
captured in a specific format, such as "Yes=<first character>, No=<second character>".
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
$yesNoArray = Get-LocalizedYesNo
|
|
||||||
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
|
||||||
#>
|
|
||||||
|
|
||||||
# Run takeown.exe and capture its output
|
|
||||||
$takeownOutput = & takeown.exe /? | Out-String
|
|
||||||
|
|
||||||
# Parse the output and retrieve lines until there are at least 2 characters in the array
|
|
||||||
$found = $false
|
|
||||||
$charactersArray = @()
|
|
||||||
foreach ($line in $takeownOutput -split "`r`n")
|
|
||||||
{
|
|
||||||
# skip everything before /D flag help
|
|
||||||
if ($found)
|
|
||||||
{
|
|
||||||
# now that /D is found start looking for a single character in double quotes
|
|
||||||
# in help text there is another string in double quotes but it is not a single character
|
|
||||||
$regexPattern = '"([a-zA-Z])"'
|
|
||||||
|
|
||||||
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
|
||||||
|
|
||||||
# if ($charactersArray.Count -gt 0) {
|
|
||||||
# Write-Output "Extracted symbols: $($matches -join ', ')"
|
|
||||||
# } else {
|
|
||||||
# Write-Output "No matches found."
|
|
||||||
# }
|
|
||||||
|
|
||||||
if ($charactersArray.Count -ge 2)
|
|
||||||
{
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ($line -match "/D ")
|
|
||||||
{
|
|
||||||
$found = $true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
|
||||||
# Return the array of characters
|
|
||||||
return $charactersArray
|
|
||||||
}
|
}
|
@ -61,19 +61,19 @@ function Get-TabXaml {
|
|||||||
$paneltotal = $columncount
|
$paneltotal = $columncount
|
||||||
}
|
}
|
||||||
# add ColumnDefinitions to evenly draw colums
|
# add ColumnDefinitions to evenly draw colums
|
||||||
$blockXml="<Grid.ColumnDefinitions>`n"+("<ColumnDefinition Width=""*""/>`n"*($paneltotal))+"</Grid.ColumnDefinitions>`n"
|
$blockXml="<Grid.ColumnDefinitions>`r`n"+("<ColumnDefinition Width=""*""/>`r`n"*($paneltotal))+"</Grid.ColumnDefinitions>`r`n"
|
||||||
# Iterate through organizedData by panel, category, and application
|
# Iterate through organizedData by panel, category, and application
|
||||||
$count = 0
|
$count = 0
|
||||||
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
||||||
$count++
|
$count++
|
||||||
if ($columncount -gt 0) {
|
if ($columncount -gt 0) {
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
if ($panelcount -eq $panelcount2 ) {
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,49 +83,49 @@ function Get-TabXaml {
|
|||||||
|
|
||||||
$categorycontent = $($category -replace '^.__', '')
|
$categorycontent = $($category -replace '^.__', '')
|
||||||
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
||||||
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`n"
|
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`r`n"
|
||||||
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
||||||
foreach ($appName in $sortedApps) {
|
foreach ($appName in $sortedApps) {
|
||||||
$count++
|
$count++
|
||||||
if ($columncount -gt 0) {
|
if ($columncount -gt 0) {
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
if ($panelcount -eq $panelcount2 ) {
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$appInfo = $organizedData[$panel][$category][$appName]
|
$appInfo = $organizedData[$panel][$category][$appName]
|
||||||
if ("Toggle" -eq $appInfo.Type) {
|
if ("Toggle" -eq $appInfo.Type) {
|
||||||
$blockXml += "<DockPanel LastChildFill=`"True`">`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`n"
|
$blockXml += "<DockPanel LastChildFill=`"True`">`r`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`r`n"
|
||||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`n</DockPanel>`n"
|
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`r`n</DockPanel>`r`n"
|
||||||
} elseif ("Combobox" -eq $appInfo.Type) {
|
} elseif ("Combobox" -eq $appInfo.Type) {
|
||||||
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`n"
|
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`r`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`r`n"
|
||||||
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`n"
|
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`r`n"
|
||||||
$addfirst="IsSelected=`"True`""
|
$addfirst="IsSelected=`"True`""
|
||||||
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
||||||
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`n"
|
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`r`n"
|
||||||
$addfirst=""
|
$addfirst=""
|
||||||
}
|
}
|
||||||
$blockXml += "</ComboBox>`n</StackPanel>"
|
$blockXml += "</ComboBox>`r`n</StackPanel>"
|
||||||
# If it is a digit, type is button and button length is digits
|
# If it is a digit, type is button and button length is digits
|
||||||
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
||||||
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`n"
|
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`r`n"
|
||||||
# else it is a checkbox
|
# else it is a checkbox
|
||||||
} else {
|
} else {
|
||||||
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
||||||
if ($null -eq $appInfo.Link)
|
if ($null -eq $appInfo.Link)
|
||||||
{
|
{
|
||||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`n"
|
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`r`n"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$blockXml += "<StackPanel Orientation=""Horizontal"">`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`n</StackPanel>`n"
|
$blockXml += "<StackPanel Orientation=""Horizontal"">`r`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`r`n</StackPanel>`r`n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
}
|
}
|
||||||
return ($blockXml)
|
return ($blockXml)
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,15 @@ Function Get-WinUtilToggleStatus {
|
|||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($ToggleSwitch -eq "WPFToggleTaskbarSearch"){
|
||||||
|
$SearchButton = (Get-ItemProperty -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search").SearchboxTaskbarMode
|
||||||
|
if($SearchButton -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
||||||
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
||||||
if($StickyKeys -eq 58){
|
if($StickyKeys -eq 58){
|
||||||
@ -107,6 +116,15 @@ Function Get-WinUtilToggleStatus {
|
|||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($ToggleSwitch -eq "WPFToggleTaskView") {
|
||||||
|
$TaskView = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').ShowTaskViewButton
|
||||||
|
if($TaskView -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
||||||
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
||||||
if($TaskbarWidgets -eq 0) {
|
if($TaskbarWidgets -eq 0) {
|
||||||
|
@ -11,9 +11,7 @@ function Get-WinUtilVariables {
|
|||||||
[Parameter()]
|
[Parameter()]
|
||||||
[string[]]$Type
|
[string[]]$Type
|
||||||
)
|
)
|
||||||
|
$keys = ($sync.keys).where{ $_ -like "WPF*" }
|
||||||
$keys = $sync.keys | Where-Object { $_ -like "WPF*" }
|
|
||||||
|
|
||||||
if ($Type) {
|
if ($Type) {
|
||||||
$output = $keys | ForEach-Object {
|
$output = $keys | ForEach-Object {
|
||||||
Try {
|
Try {
|
||||||
|
@ -1,19 +1,3 @@
|
|||||||
function Invoke-MicroWin-Helper {
|
|
||||||
<#
|
|
||||||
|
|
||||||
.SYNOPSIS
|
|
||||||
checking unit tests
|
|
||||||
|
|
||||||
.PARAMETER Name
|
|
||||||
no parameters
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
placeholder
|
|
||||||
|
|
||||||
#>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Test-CompatibleImage() {
|
function Test-CompatibleImage() {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
@ -175,8 +159,14 @@ function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
|
|||||||
{
|
{
|
||||||
$status = "Removing Provisioned $($appx.PackageName)"
|
$status = "Removing Provisioned $($appx.PackageName)"
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
||||||
|
try {
|
||||||
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Application $($appx.PackageName) could not be removed"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1,29 +1,21 @@
|
|||||||
function Invoke-WinUtilGPU {
|
function Invoke-WinUtilGPU {
|
||||||
$gpuInfo = Get-CimInstance Win32_VideoController
|
$gpuInfo = Get-CimInstance Win32_VideoController
|
||||||
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
# GPUs to blacklist from using Demanding Theming
|
||||||
$gpuName = $gpu.Name
|
$lowPowerGPUs = (
|
||||||
if ($gpuName -like "*NVIDIA*") {
|
"*NVIDIA GeForce*M*",
|
||||||
return $true # NVIDIA GPU found
|
"*NVIDIA GeForce*Laptop*",
|
||||||
}
|
"*NVIDIA GeForce*GT*",
|
||||||
}
|
"*AMD Radeon(TM)*",
|
||||||
|
"*UHD*"
|
||||||
|
)
|
||||||
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
foreach ($gpu in $gpuInfo) {
|
||||||
$gpuName = $gpu.Name
|
foreach ($gpuPattern in $lowPowerGPUs){
|
||||||
if ($gpuName -like "*AMD Radeon RX*") {
|
if ($gpu.Name -like $gpuPattern) {
|
||||||
return $true # AMD GPU Found
|
return $false
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
|
||||||
$gpuName = $gpu.Name
|
|
||||||
if ($gpuName -like "*UHD*") {
|
|
||||||
return $false # Intel Intergrated GPU Found
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
|
||||||
$gpuName = $gpu.Name
|
|
||||||
if ($gpuName -like "*AMD Radeon(TM)*") {
|
|
||||||
return $false # AMD Intergrated GPU Found
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $true
|
||||||
|
}
|
34
functions/private/Invoke-WinUtilTaskView.ps1
Normal file
34
functions/private/Invoke-WinUtilTaskView.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Invoke-WinUtilTaskView {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enable/Disable Task View
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Task View
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Task View"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Task View"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
Set-ItemProperty -Path $Path -Name ShowTaskViewButton -Value $value
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
34
functions/private/Invoke-WinUtilTaskbarSearch.ps1
Normal file
34
functions/private/Invoke-WinUtilTaskbarSearch.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Invoke-WinUtilTaskbarSearch {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enable/Disable Taskbar Widgets
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Taskbar Widgets
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Search Button"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Search Button"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search\"
|
||||||
|
Set-ItemProperty -Path $Path -Name SearchboxTaskbarMode -Value $value
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
@ -26,7 +26,7 @@ function Invoke-WPFButton {
|
|||||||
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
||||||
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
||||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||||
"WPFOOSUbutton" {Invoke-WPFOOSU -action "customize"}
|
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
||||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
||||||
"WPFundoall" {Invoke-WPFundoall}
|
"WPFundoall" {Invoke-WPFundoall}
|
||||||
|
@ -1,43 +1,20 @@
|
|||||||
function Invoke-WPFOOSU {
|
function Invoke-WPFOOSU {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Downloads and runs OO Shutup 10 with or without config files
|
Downloads and runs OO Shutup 10
|
||||||
.PARAMETER action
|
|
||||||
Specifies how OOSU should be started
|
|
||||||
customize: Opens the OOSU GUI
|
|
||||||
recommended: Loads and applies the recommended OOSU policies silently
|
|
||||||
undo: Resets all policies to factory silently
|
|
||||||
#>
|
#>
|
||||||
|
try {
|
||||||
param (
|
|
||||||
[ValidateSet("customize", "recommended", "undo")]
|
|
||||||
[string]$action
|
|
||||||
)
|
|
||||||
|
|
||||||
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
||||||
|
|
||||||
$Initial_ProgressPreference = $ProgressPreference
|
$Initial_ProgressPreference = $ProgressPreference
|
||||||
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
||||||
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
||||||
|
|
||||||
switch ($action)
|
|
||||||
{
|
|
||||||
"customize"{
|
|
||||||
Write-Host "Starting OO Shutup 10 ..."
|
Write-Host "Starting OO Shutup 10 ..."
|
||||||
Start-Process $OOSU_filepath
|
Start-Process $OOSU_filepath
|
||||||
}
|
}
|
||||||
"recommended"{
|
catch {
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_recommended.cfg"
|
Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red
|
||||||
$sync.configs.ooshutup10_recommended | Out-File -FilePath $oosu_config -Force
|
|
||||||
Write-Host "Applying recommended OO Shutup 10 Policies"
|
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
|
||||||
}
|
|
||||||
"undo"{
|
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_factory.cfg"
|
|
||||||
$sync.configs.ooshutup10_factory | Out-File -FilePath $oosu_config -Force
|
|
||||||
Write-Host "Resetting all OO Shutup 10 Policies"
|
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
$ProgressPreference = $Initial_ProgressPreference
|
$ProgressPreference = $Initial_ProgressPreference
|
||||||
}
|
}
|
||||||
|
}
|
@ -5,6 +5,8 @@ function Invoke-WPFPanelAutologin {
|
|||||||
Enables autologin using Sysinternals Autologon.exe
|
Enables autologin using Sysinternals Autologon.exe
|
||||||
|
|
||||||
#>
|
#>
|
||||||
curl.exe -ss "https://live.sysinternals.com/Autologon.exe" -o $env:temp\autologin.exe # Official Microsoft recommendation https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
|
||||||
cmd /c $env:temp\autologin.exe /accepteula
|
# Official Microsoft recommendation: https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
||||||
|
Invoke-WebRequest -Uri "https://live.sysinternals.com/Autologon.exe" -OutFile "$env:temp\autologin.exe"
|
||||||
|
cmd /c "$env:temp\autologin.exe" /accepteula
|
||||||
}
|
}
|
@ -28,5 +28,7 @@ function Invoke-WPFToggle {
|
|||||||
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
||||||
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
||||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
||||||
|
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)}
|
||||||
|
"WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ function Invoke-WPFUnInstall {
|
|||||||
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||||
|
|
||||||
if ($PackagesToInstall.Count -eq 0) {
|
if ($PackagesToInstall.Count -eq 0) {
|
||||||
$WarningMsg = "Please select the program(s) to install"
|
$WarningMsg = "Please select the program(s) to uninstall"
|
||||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ $InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionSta
|
|||||||
$InitialSessionState.Variables.Add($hashVars)
|
$InitialSessionState.Variables.Add($hashVars)
|
||||||
|
|
||||||
# Get every private function and add them to the session state
|
# Get every private function and add them to the session state
|
||||||
$functions = Get-ChildItem function:\ | Where-Object {$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
$functions = (Get-ChildItem function:\).where{$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
||||||
foreach ($function in $functions){
|
foreach ($function in $functions){
|
||||||
$functionDefinition = Get-Content function:\$($function.name)
|
$functionDefinition = Get-Content function:\$($function.name)
|
||||||
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
||||||
@ -133,9 +133,17 @@ $sync.keys | ForEach-Object {
|
|||||||
|
|
||||||
# Load computer information in the background
|
# Load computer information in the background
|
||||||
Invoke-WPFRunspace -ScriptBlock {
|
Invoke-WPFRunspace -ScriptBlock {
|
||||||
|
try{
|
||||||
|
$oldProgressPreference = $ProgressPreference
|
||||||
|
$ProgressPreference = "SilentlyContinue"
|
||||||
$sync.ConfigLoaded = $False
|
$sync.ConfigLoaded = $False
|
||||||
$sync.ComputerInfo = Get-ComputerInfo
|
$sync.ComputerInfo = Get-ComputerInfo
|
||||||
$sync.ConfigLoaded = $True
|
$sync.ConfigLoaded = $True
|
||||||
|
}
|
||||||
|
finally{
|
||||||
|
$ProgressPreference = "Continue"
|
||||||
|
}
|
||||||
|
|
||||||
} | Out-Null
|
} | Out-Null
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
@ -145,9 +153,6 @@ Invoke-WPFRunspace -ScriptBlock {
|
|||||||
# Print the logo
|
# Print the logo
|
||||||
Invoke-WPFFormVariables
|
Invoke-WPFFormVariables
|
||||||
|
|
||||||
# Install Winget if not already present
|
|
||||||
Install-WinUtilWinget
|
|
||||||
|
|
||||||
# Set the titlebar
|
# Set the titlebar
|
||||||
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
||||||
# Set the commands that will run when the form is closed
|
# Set the commands that will run when the form is closed
|
||||||
@ -271,7 +276,7 @@ Add-Type @"
|
|||||||
"@
|
"@
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
foreach ($proc in (Get-Process).where{ $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" }) {
|
||||||
# Check if the process's MainWindowHandle is valid
|
# Check if the process's MainWindowHandle is valid
|
||||||
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
||||||
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
||||||
@ -282,19 +287,37 @@ Add-Type @"
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# need to experiemnt more
|
|
||||||
# setting icon for the windows is still not working
|
# Using a TaskbarItem Overlay until someone figures out how to replace the icon correctly
|
||||||
# $pngUrl = "https://christitus.com/images/logo-full.png"
|
|
||||||
# $pngPath = "$env:TEMP\cttlogo.png"
|
# URL of the image
|
||||||
# $iconPath = "$env:TEMP\cttlogo.ico"
|
$imageUrl = "https://christitus.com/images/logo-full.png"
|
||||||
# # Download the PNG file
|
|
||||||
# Invoke-WebRequest -Uri $pngUrl -OutFile $pngPath
|
# Download the image
|
||||||
# if (Test-Path -Path $pngPath) {
|
$imagePath = "$env:TEMP\logo-full.png"
|
||||||
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $iconPath
|
Invoke-WebRequest -Uri $imageUrl -OutFile $imagePath
|
||||||
# }
|
|
||||||
# $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath)
|
# Read the image file as a byte array
|
||||||
# Write-Host $icon.Handle
|
$imageBytes = [System.IO.File]::ReadAllBytes($imagePath)
|
||||||
# [Window]::SendMessage($windowHandle, 0x80, [IntPtr]::Zero, $icon.Handle)
|
|
||||||
|
# Convert the byte array to a Base64 string
|
||||||
|
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
||||||
|
|
||||||
|
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
||||||
|
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
||||||
|
$bitmap.BeginInit()
|
||||||
|
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
||||||
|
$bitmap.EndInit()
|
||||||
|
$bitmap.Freeze()
|
||||||
|
|
||||||
|
# Ensure TaskbarItemInfo is created if not already
|
||||||
|
if (-not $sync["Form"].TaskbarItemInfo) {
|
||||||
|
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the overlay icon for the taskbar
|
||||||
|
$sync["Form"].TaskbarItemInfo.Overlay = $bitmap
|
||||||
|
|
||||||
|
|
||||||
$rect = New-Object RECT
|
$rect = New-Object RECT
|
||||||
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
||||||
@ -369,11 +392,11 @@ Add-Type @"
|
|||||||
|
|
||||||
# Load Checkboxes and Labels outside of the Filter fuction only once on startup for performance reasons
|
# Load Checkboxes and Labels outside of the Filter fuction only once on startup for performance reasons
|
||||||
$filter = Get-WinUtilVariables -Type CheckBox
|
$filter = Get-WinUtilVariables -Type CheckBox
|
||||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $psitem.Key -in $filter }
|
$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter }
|
||||||
|
|
||||||
$filter = Get-WinUtilVariables -Type Label
|
$filter = Get-WinUtilVariables -Type Label
|
||||||
$labels = @{}
|
$labels = @{}
|
||||||
$sync.GetEnumerator() | Where-Object {$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value}
|
($sync.GetEnumerator()).where{$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value}
|
||||||
|
|
||||||
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
|
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
|
||||||
|
|
||||||
@ -470,13 +493,11 @@ $sync["AboutMenuItem"].Add_Click({
|
|||||||
$authorInfo = @"
|
$authorInfo = @"
|
||||||
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
||||||
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
||||||
GUI : <a href="https://github.com/KonTy">@KonTy</a>
|
|
||||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
||||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||||
"@
|
"@
|
||||||
Show-CustomDialog -Message $authorInfo -Width 400
|
Show-CustomDialog -Message $authorInfo -Width 400
|
||||||
})
|
})
|
||||||
|
|
||||||
$sync["Form"].ShowDialog() | out-null
|
$sync["Form"].ShowDialog() | out-null
|
||||||
Stop-Transcript
|
Stop-Transcript
|
||||||
|
40
windev.ps1
Normal file
40
windev.ps1
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
This Script is used as a target for the https://christitus.com/windev alias.
|
||||||
|
It queries the latest winget release (no matter if Pre-Release, Draft or Full Release) and invokes It
|
||||||
|
.DESCRIPTION
|
||||||
|
This Script provides a simple way to always start the bleeding edge release even if it's not yet a full release.
|
||||||
|
This function should be run with administrative privileges.
|
||||||
|
Because this way of recursively invoking scripts via Invoke-Expression it might very well happen that AV Programs flag this because it's a common way of mulitstage exploits to run
|
||||||
|
.EXAMPLE
|
||||||
|
irm https://christitus.com/windev | iex
|
||||||
|
OR
|
||||||
|
Run in Admin Powershell > ./windev.ps1
|
||||||
|
#>
|
||||||
|
|
||||||
|
# Function to fetch the latest release tag from the GitHub API
|
||||||
|
function Get-LatestRelease {
|
||||||
|
try {
|
||||||
|
$releases = Invoke-RestMethod -Uri 'https://api.github.com/repos/ChrisTitusTech/winutil/releases'
|
||||||
|
$latestRelease = $releases | Select-Object -First 1
|
||||||
|
return $latestRelease.tag_name
|
||||||
|
} catch {
|
||||||
|
Write-Host "Error fetching release data: $_" -ForegroundColor Red
|
||||||
|
return $null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to redirect to the latest pre-release version
|
||||||
|
function RedirectToLatestPreRelease {
|
||||||
|
$latestRelease = Get-LatestRelease
|
||||||
|
if ($latestRelease) {
|
||||||
|
$url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1"
|
||||||
|
Invoke-RestMethod $url | Invoke-Expression
|
||||||
|
} else {
|
||||||
|
Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the redirect function
|
||||||
|
|
||||||
|
RedirectToLatestPreRelease
|
1747
winutil.ps1
1747
winutil.ps1
File diff suppressed because it is too large
Load Diff
@ -571,6 +571,18 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition Binding="{Binding Path=ComputedHorizontalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
<Condition Binding="{Binding Path=ComputedVerticalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</MultiDataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -701,18 +713,20 @@
|
|||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
||||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||||
<Button Name="WPFuninstall" Content=" Uninstall Selection" Margin="2"/>
|
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||||
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
{{InstallPanel_applications}}
|
{{InstallPanel_applications}}
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
||||||
|
Reference in New Issue
Block a user