mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 10:32:35 -05:00
Compare commits
60 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 |
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 }}
|
||||||
|
66
Compile.ps1
66
Compile.ps1
@ -10,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 = @"
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
### ###
|
### ###
|
||||||
@ -18,48 +34,64 @@ $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("'","''")
|
||||||
|
|
||||||
# Replace every XML Special Character so it'll render correctly in final build
|
# Replace every XML Special Character so it'll render correctly in final build
|
||||||
# Only do so if json files has content to be displayed (for example the applications, tweaks, features json files)
|
# Only do so if json files has content to be displayed (for example the applications, tweaks, features json files)
|
||||||
# Some Type Convertion using Casting and Cleaning Up of the convertion result using 'Replace' Method
|
# Some Type Convertion using Casting and Cleaning Up of the convertion result using 'Replace' Method
|
||||||
$jsonAsObject = $json | convertfrom-json
|
$jsonAsObject = $json | convertfrom-json
|
||||||
$firstLevelJsonList = ([System.String]$jsonAsObject).split('=;') | ForEach-Object {
|
$firstLevelJsonList = ([System.String]$jsonAsObject).split('=;') | ForEach-Object {
|
||||||
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
# 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) {
|
||||||
$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
|
||||||
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
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")
|
||||||
|
|
||||||
$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" ))
|
||||||
@ -70,13 +102,13 @@ $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
|
||||||
@ -87,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
|
||||||
|
@ -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,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Standard": [
|
"Standard": [
|
||||||
"WPFTweaksAH",
|
"WPFTweaksAH",
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksDVR",
|
"WPFTweaksDVR",
|
||||||
"WPFTweaksHiber",
|
"WPFTweaksHiber",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
@ -16,6 +17,7 @@
|
|||||||
"WPFTweaksTeredo"
|
"WPFTweaksTeredo"
|
||||||
],
|
],
|
||||||
"Minimal": [
|
"Minimal": [
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"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",
|
||||||
@ -1580,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.",
|
||||||
@ -1738,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",
|
||||||
@ -2443,79 +2452,92 @@
|
|||||||
},
|
},
|
||||||
"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 \"Removing OneDrive\"
|
||||||
|
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
||||||
|
if (Test-Path $regPath){
|
||||||
|
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
||||||
|
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
||||||
|
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
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 \"Kill OneDrive process\"
|
Write-Host \"Removing OneDrive leftovers\"
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
||||||
taskkill.exe /F /IM \"explorer.exe\"
|
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:systemdrive\\OneDriveTemp\"
|
||||||
|
reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f
|
||||||
|
# check if directory is empty before removing:
|
||||||
|
If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) {
|
||||||
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host \"Copy all OneDrive to Root UserProfile\"
|
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($env:USERPROFILE.TrimEnd())\\OneDrive' '$($env:USERPROFILE.TrimEnd())\\' /e /xj\" -NoNewWindow -Wait
|
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||||
|
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||||
|
|
||||||
Write-Host \"Remove OneDrive\"
|
Write-Host \"Removing run hook for new users\"
|
||||||
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --force --silent Microsoft.OneDrive \" -NoNewWindow -Wait
|
reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\"
|
||||||
|
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
||||||
|
reg unload \"hku\\Default\"
|
||||||
|
|
||||||
Write-Host \"Removing OneDrive leftovers\"
|
Write-Host \"Removing startmenu entry\"
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
||||||
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:systemdrive\\OneDriveTemp\"
|
|
||||||
# check if directory is empty before removing:
|
|
||||||
If ((Get-ChildItem \"$env:userprofile\\OneDrive\" -Recurse | Measure-Object).Count -eq 0) {
|
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:userprofile\\OneDrive\"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
Write-Host \"Removing scheduled task\"
|
||||||
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
|
||||||
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
|
||||||
|
|
||||||
Write-Host \"Removing run hook for new users\"
|
# Add Shell folders restoring default locations
|
||||||
reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\"
|
Write-Host \"Shell Fixing\"
|
||||||
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString
|
||||||
reg unload \"hku\\Default\"
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -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
|
||||||
|
Write-Host \"Restarting explorer\"
|
||||||
|
taskkill.exe /F /IM \"explorer.exe\"
|
||||||
|
Start-Process \"explorer.exe\"
|
||||||
|
|
||||||
Write-Host \"Removing startmenu entry\"
|
Write-Host \"Waiting for explorer to complete loading\"
|
||||||
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
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
|
||||||
Write-Host \"Removing scheduled task\"
|
Start-Sleep 5
|
||||||
Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
|
}
|
||||||
|
else{
|
||||||
# Add Shell folders restoring default locations
|
Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red
|
||||||
Write-Host \"Shell Fixing\"
|
}
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString
|
"
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -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
|
|
||||||
Write-Host \"Restarting explorer\"
|
|
||||||
Start-Process \"explorer.exe\"
|
|
||||||
|
|
||||||
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.\"
|
|
||||||
Start-Sleep 5
|
|
||||||
"
|
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
@ -2697,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_",
|
||||||
@ -2960,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.",
|
||||||
@ -3059,7 +3059,15 @@
|
|||||||
"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": {
|
||||||
@ -3074,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": {
|
||||||
@ -3119,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,4 +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
|
||||||
|
|
||||||
}
|
}
|
@ -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 {
|
||||||
|
@ -159,7 +159,13 @@ 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)
|
||||||
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
try {
|
||||||
|
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
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
@ -276,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)"
|
||||||
@ -392,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
|
||||||
|
|
||||||
@ -493,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
|
689
winutil.ps1
689
winutil.ps1
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user