mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-21 21:41:29 -06:00
Trim Trailing Whitespace
This commit is contained in:
parent
807b0fb307
commit
0ce32aa2c2
@ -23,13 +23,13 @@ Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
|||||||
|
|
||||||
Get-ChildItem .\xaml | ForEach-Object {
|
Get-ChildItem .\xaml | ForEach-Object {
|
||||||
$xaml = (Get-Content $psitem.FullName).replace("'","''")
|
$xaml = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
|
|
||||||
Write-output "`$$($psitem.BaseName) = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
|
Write-output "`$$($psitem.BaseName) = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
}
|
}
|
||||||
|
|
||||||
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("'","''")
|
||||||
|
|
||||||
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"WPFInstall7zip": {
|
"WPFInstall7zip": {
|
||||||
"winget": "7zip.7zip",
|
"winget": "7zip.7zip",
|
||||||
"choco": "7zip"
|
"choco": "7zip"
|
||||||
@ -546,7 +546,7 @@
|
|||||||
"WPFInstalltidal": {
|
"WPFInstalltidal": {
|
||||||
"Winget": "9NNCB5BS59PH",
|
"Winget": "9NNCB5BS59PH",
|
||||||
"choco": "na"
|
"choco": "na"
|
||||||
},
|
},
|
||||||
"WPFInstallubisoft": {
|
"WPFInstallubisoft": {
|
||||||
"winget": "Ubisoft.Connect",
|
"winget": "Ubisoft.Connect",
|
||||||
"choco": "ubisoft-connect"
|
"choco": "ubisoft-connect"
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
"Microsoft-Windows-Subsystem-Linux"
|
"Microsoft-Windows-Subsystem-Linux"
|
||||||
],
|
],
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFFeaturenfs": {
|
"WPFFeaturenfs": {
|
||||||
|
@ -85,7 +85,7 @@ Example:
|
|||||||
"ClientForNFS-Infrastructure",
|
"ClientForNFS-Infrastructure",
|
||||||
"NFS-Administration"
|
"NFS-Administration"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
||||||
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||||
@ -147,14 +147,14 @@ Example:
|
|||||||
"EssTweaksServices",
|
"EssTweaksServices",
|
||||||
"EssTweaksTele"
|
"EssTweaksTele"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
||||||
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||||
|
|
||||||
$NameofButton = "WPF" + ""
|
$NameofButton = "WPF" + ""
|
||||||
$commands = @(
|
$commands = @(
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
$jsonfile = Get-Content ./config/preset.json | ConvertFrom-Json
|
$jsonfile = Get-Content ./config/preset.json | ConvertFrom-Json
|
||||||
@ -186,21 +186,21 @@ $jsonfile | ConvertTo-Json | Out-File ./config/preset.json
|
|||||||
"Path": "Path in registry",
|
"Path": "Path in registry",
|
||||||
"Name": "Name of Registry key",
|
"Name": "Name of Registry key",
|
||||||
"Type": "Item type",
|
"Type": "Item type",
|
||||||
"Value": "Value to modify",
|
"Value": "Value to modify",
|
||||||
"OriginalValue": "value to reset"
|
"OriginalValue": "value to reset"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"service" : [
|
"service" : [
|
||||||
{
|
{
|
||||||
"Name": "Name of service",
|
"Name": "Name of service",
|
||||||
"StartupType": "Startup type to set",
|
"StartupType": "Startup type to set",
|
||||||
"OriginalType": "Startup type to reset"
|
"OriginalType": "Startup type to reset"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ScheduledTask" : [
|
"ScheduledTask" : [
|
||||||
{
|
{
|
||||||
"Name": "Path to scheduled task",
|
"Name": "Path to scheduled task",
|
||||||
"State": "State to set",
|
"State": "State to set",
|
||||||
"OriginalState": "State to reset"
|
"OriginalState": "State to reset"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -211,10 +211,10 @@ $jsonfile | ConvertTo-Json | Out-File ./config/preset.json
|
|||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Script to make modifications not possible with the above types
|
"Script to make modifications not possible with the above types
|
||||||
Special care needs to be taken here as converting from json to a scriptblock
|
Special care needs to be taken here as converting from json to a scriptblock
|
||||||
can cause weird issues. Please look at the example below to get an idea of how things should work"
|
can cause weird issues. Please look at the example below to get an idea of how things should work"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"Same as above however is meant to undo what you did above"
|
"Same as above however is meant to undo what you did above"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,14 +228,14 @@ Example:
|
|||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||||
"Name": "EnableActivityFeed",
|
"Name": "EnableActivityFeed",
|
||||||
"Type": "DWord",
|
"Type": "DWord",
|
||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "1"
|
"OriginalValue": "1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
|
||||||
"Name": "PublishUserActivities",
|
"Name": "PublishUserActivities",
|
||||||
"Type": "DWord",
|
"Type": "DWord",
|
||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "1"
|
"OriginalValue": "1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -244,12 +244,12 @@ Example:
|
|||||||
"service" : [
|
"service" : [
|
||||||
{
|
{
|
||||||
"Name": "HomeGroupListener",
|
"Name": "HomeGroupListener",
|
||||||
"StartupType": "Manual",
|
"StartupType": "Manual",
|
||||||
"OriginalType": "Automatic"
|
"OriginalType": "Automatic"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "HomeGroupProvider",
|
"Name": "HomeGroupProvider",
|
||||||
"StartupType": "Manual",
|
"StartupType": "Manual",
|
||||||
"OriginalType": "Automatic"
|
"OriginalType": "Automatic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -258,12 +258,12 @@ Example:
|
|||||||
"ScheduledTask" : [
|
"ScheduledTask" : [
|
||||||
{
|
{
|
||||||
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
|
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
|
||||||
"State": "Disabled",
|
"State": "Disabled",
|
||||||
"OriginalState": "Enabled"
|
"OriginalState": "Enabled"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater",
|
"Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater",
|
||||||
"State": "Disabled",
|
"State": "Disabled",
|
||||||
"OriginalState": "Enabled"
|
"OriginalState": "Enabled"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -279,7 +279,7 @@ Example:
|
|||||||
"Import-Module BitsTransfer
|
"Import-Module BitsTransfer
|
||||||
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
|
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
|
||||||
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
|
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
|
||||||
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
|
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -323,11 +323,11 @@ Example:
|
|||||||
#)
|
#)
|
||||||
|
|
||||||
#$InvokeScript = @(
|
#$InvokeScript = @(
|
||||||
# ""
|
# ""
|
||||||
#)
|
#)
|
||||||
|
|
||||||
#$UndoScript = @(
|
#$UndoScript = @(
|
||||||
# ""
|
# ""
|
||||||
#)
|
#)
|
||||||
|
|
||||||
$NameofButton = "WPF" + ""
|
$NameofButton = "WPF" + ""
|
||||||
@ -375,7 +375,7 @@ Example:
|
|||||||
"Primary": "1.1.1.1",
|
"Primary": "1.1.1.1",
|
||||||
"Secondary": "1.0.0.1"
|
"Secondary": "1.0.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
||||||
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
#Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
|
||||||
|
@ -1853,7 +1853,7 @@
|
|||||||
$preferences.Preferences[28] = 0
|
$preferences.Preferences[28] = 0
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences
|
||||||
}
|
}
|
||||||
Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue
|
Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
# Group svchost.exe processes
|
# Group svchost.exe processes
|
||||||
$ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb
|
$ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb
|
||||||
@ -2089,26 +2089,26 @@
|
|||||||
"
|
"
|
||||||
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
|
$TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams')
|
||||||
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')
|
$TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe')
|
||||||
|
|
||||||
Write-Host \"Stopping Teams process...\"
|
Write-Host \"Stopping Teams process...\"
|
||||||
Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue
|
Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\"
|
Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\"
|
||||||
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
|
if ([System.IO.File]::Exists($TeamsUpdateExePath)) {
|
||||||
# Uninstall app
|
# Uninstall app
|
||||||
$proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru
|
$proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru
|
||||||
$proc.WaitForExit()
|
$proc.WaitForExit()
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host \"Removing Teams AppxPackage...\"
|
Write-Host \"Removing Teams AppxPackage...\"
|
||||||
Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue
|
||||||
Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
|
Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
Write-Host \"Deleting Teams directory\"
|
Write-Host \"Deleting Teams directory\"
|
||||||
if ([System.IO.Directory]::Exists($TeamsPath)) {
|
if ([System.IO.Directory]::Exists($TeamsPath)) {
|
||||||
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
|
Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host \"Deleting Teams uninstall registry key\"
|
Write-Host \"Deleting Teams uninstall registry key\"
|
||||||
# Uninstall from Uninstall registry key UninstallString
|
# Uninstall from Uninstall registry key UninstallString
|
||||||
$us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString
|
$us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString
|
||||||
@ -2133,7 +2133,7 @@
|
|||||||
"WPFEssTweaksStorage": {
|
"WPFEssTweaksStorage": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
|
"Remove-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Recurse -ErrorAction SilentlyContinue"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"New-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" | Out-Null
|
"New-Item -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" | Out-Null
|
||||||
"
|
"
|
||||||
@ -2163,7 +2163,7 @@
|
|||||||
},
|
},
|
||||||
"WPFEssTweaksRemoveEdge": {
|
"WPFEssTweaksRemoveEdge": {
|
||||||
"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
|
||||||
|
|
||||||
curl.exe -s \"https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat\" -o $ENV:temp\\edgeremoval.bat
|
curl.exe -s \"https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat\" -o $ENV:temp\\edgeremoval.bat
|
||||||
@ -2181,7 +2181,7 @@
|
|||||||
"WPFEssTweaksRemoveOnedrive": {
|
"WPFEssTweaksRemoveOnedrive": {
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
|
|
||||||
Write-Host \"Kill OneDrive process\"
|
Write-Host \"Kill OneDrive process\"
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
taskkill.exe /F /IM \"OneDrive.exe\"
|
||||||
taskkill.exe /F /IM \"explorer.exe\"
|
taskkill.exe /F /IM \"explorer.exe\"
|
||||||
|
@ -32,18 +32,18 @@ Function Get-WinUtilCheckBoxes {
|
|||||||
if ($uncheck -eq $true){
|
if ($uncheck -eq $true){
|
||||||
$CheckBox.value.ischecked = $false
|
$CheckBox.value.ischecked = $false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Group -eq "WPFTweaks"){
|
if($Group -eq "WPFTweaks"){
|
||||||
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPF*Tweaks*"}
|
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPF*Tweaks*"}
|
||||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
|
$CheckBoxes = $sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter}
|
||||||
Foreach ($CheckBox in $CheckBoxes){
|
Foreach ($CheckBox in $CheckBoxes){
|
||||||
if($CheckBox.value.ischecked -eq $true){
|
if($CheckBox.value.ischecked -eq $true){
|
||||||
$Output.Add($Checkbox.Name)
|
$Output.Add($Checkbox.Name)
|
||||||
|
|
||||||
if ($uncheck -eq $true){
|
if ($uncheck -eq $true){
|
||||||
$CheckBox.value.ischecked = $false
|
$CheckBox.value.ischecked = $false
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ Function Get-WinUtilCheckBoxes {
|
|||||||
Foreach ($CheckBox in $CheckBoxes){
|
Foreach ($CheckBox in $CheckBoxes){
|
||||||
if($CheckBox.value.ischecked -eq $true){
|
if($CheckBox.value.ischecked -eq $true){
|
||||||
$Output.Add($Checkbox.Name)
|
$Output.Add($Checkbox.Name)
|
||||||
|
|
||||||
if ($uncheck -eq $true){
|
if ($uncheck -eq $true){
|
||||||
$CheckBox.value.ischecked = $false
|
$CheckBox.value.ischecked = $false
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Get-WinUtilInstallerProcess {
|
function Get-WinUtilInstallerProcess {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Meant to check for running processes and will return a boolean response
|
Meant to check for running processes and will return a boolean response
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param($Process)
|
param($Process)
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
function Get-WinUtilRegistry {
|
function Get-WinUtilRegistry {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will make all modifications to the registry
|
This function will make all modifications to the registry
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name,
|
$Name,
|
||||||
$Path,
|
$Path,
|
||||||
@ -16,7 +16,7 @@ function Get-WinUtilRegistry {
|
|||||||
$Value
|
$Value
|
||||||
)
|
)
|
||||||
|
|
||||||
Try{
|
Try{
|
||||||
$syscheckvalue = Get-ItemPropertyValue -Path $Path -Value $Value # Return Value
|
$syscheckvalue = Get-ItemPropertyValue -Path $Path -Value $Value # Return Value
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
Function Get-WinUtilToggleStatus {
|
Function Get-WinUtilToggleStatus {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Meant to pull the registry keys for a toggle switch and returns true or false
|
Meant to pull the registry keys for a toggle switch and returns true or false
|
||||||
|
|
||||||
True should mean status is enabled
|
True should mean status is enabled
|
||||||
False should mean status is disabled
|
False should mean status is disabled
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Param($ToggleSwitch)
|
Param($ToggleSwitch)
|
||||||
@ -15,7 +15,7 @@ Function Get-WinUtilToggleStatus {
|
|||||||
$system = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').SystemUsesLightTheme
|
$system = (Get-ItemProperty -path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize').SystemUsesLightTheme
|
||||||
if($app -eq 0 -and $system -eq 0){
|
if($app -eq 0 -and $system -eq 0){
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
@ -24,7 +24,7 @@ Function Get-WinUtilToggleStatus {
|
|||||||
$bingsearch = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search').BingSearchEnabled
|
$bingsearch = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search').BingSearchEnabled
|
||||||
if($bingsearch -eq 0){
|
if($bingsearch -eq 0){
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
function Get-WinUtilVariables {
|
function Get-WinUtilVariables {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
placeholder
|
placeholder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
[Parameter()]
|
[Parameter()]
|
||||||
@ -12,7 +12,7 @@ function Get-WinUtilVariables {
|
|||||||
[string]$Type
|
[string]$Type
|
||||||
)
|
)
|
||||||
|
|
||||||
$keys = $sync.keys | Where-Object {$psitem -like "WPF*"}
|
$keys = $sync.keys | Where-Object {$psitem -like "WPF*"}
|
||||||
|
|
||||||
if($type){
|
if($type){
|
||||||
$output = $keys | ForEach-Object {
|
$output = $keys | ForEach-Object {
|
||||||
@ -23,7 +23,7 @@ function Get-WinUtilVariables {
|
|||||||
}
|
}
|
||||||
Catch{<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>}
|
Catch{<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>}
|
||||||
}
|
}
|
||||||
return $output
|
return $output
|
||||||
}
|
}
|
||||||
return $keys
|
return $keys
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
function Install-WinUtilChoco {
|
function Install-WinUtilChoco {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Function is meant to ensure Choco is installed
|
Function is meant to ensure Choco is installed
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@ -14,7 +14,7 @@ function Install-WinUtilChoco {
|
|||||||
Write-Host "Chocolatey Already Installed"
|
Write-Host "Chocolatey Already Installed"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Seems Chocolatey is not installed, installing now?"
|
Write-Host "Seems Chocolatey is not installed, installing now?"
|
||||||
#Let user decide if he wants to install Chocolatey
|
#Let user decide if he wants to install Chocolatey
|
||||||
$confirmation = Read-Host "Are you Sure You Want To Proceed:(y/n)"
|
$confirmation = Read-Host "Are you Sure You Want To Proceed:(y/n)"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
Function Install-WinUtilProgramWinget {
|
Function Install-WinUtilProgramWinget {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This will install programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
This will install programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
||||||
|
|
||||||
Note the triple quotes are required any time you need a " in a normal script block.
|
Note the triple quotes are required any time you need a " in a normal script block.
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
@ -20,7 +20,7 @@ Function Install-WinUtilProgramWinget {
|
|||||||
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
||||||
|
|
||||||
Foreach ($Program in $($ProgramsToInstall -split ",")){
|
Foreach ($Program in $($ProgramsToInstall -split ",")){
|
||||||
|
|
||||||
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
||||||
if($manage -eq "Installing"){
|
if($manage -eq "Installing"){
|
||||||
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
|
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
|
||||||
@ -28,7 +28,7 @@ Function Install-WinUtilProgramWinget {
|
|||||||
if($manage -eq "Uninstalling"){
|
if($manage -eq "Uninstalling"){
|
||||||
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
|
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
$X++
|
$X++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
function Get-LatestHash {
|
function Get-LatestHash {
|
||||||
$shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url
|
$shaUrl = ((Invoke-WebRequest $apiLatestUrl -UseBasicParsing | ConvertFrom-Json).assets | Where-Object { $_.name -match '^Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt$' }).browser_download_url
|
||||||
|
|
||||||
$shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
|
$shaFile = Join-Path -Path $tempFolder -ChildPath 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt'
|
||||||
$WebClient.DownloadFile($shaUrl, $shaFile)
|
$WebClient.DownloadFile($shaUrl, $shaFile)
|
||||||
|
|
||||||
Get-Content $shaFile
|
Get-Content $shaFile
|
||||||
}
|
}
|
||||||
|
|
||||||
function Install-WinUtilWinget {
|
function Install-WinUtilWinget {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Function is meant to ensure winget is installed
|
Function is meant to ensure winget is installed
|
||||||
|
|
||||||
#>
|
#>
|
||||||
Try{
|
Try{
|
||||||
Write-Host "Checking if Winget is Installed..."
|
Write-Host "Checking if Winget is Installed..."
|
||||||
@ -39,7 +39,7 @@ function Install-WinUtilWinget {
|
|||||||
|
|
||||||
Write-Host "Running Alternative Installer and Direct Installing"
|
Write-Host "Running Alternative Installer and Direct Installing"
|
||||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winget.ps1 | iex"
|
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winget.ps1 | iex"
|
||||||
|
|
||||||
Write-Host "Winget Installed"
|
Write-Host "Winget Installed"
|
||||||
}
|
}
|
||||||
Catch{
|
Catch{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WinUtilBingSearch {
|
function Invoke-WinUtilBingSearch {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Sets Bing Search on or off
|
Sets Bing Search on or off
|
||||||
|
|
||||||
#>
|
#>
|
||||||
Param($Enabled)
|
Param($Enabled)
|
||||||
Try{
|
Try{
|
||||||
|
@ -46,19 +46,19 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
$registryKeys = $sync.configs.tweaks.$Config.registry
|
$registryKeys = $sync.configs.tweaks.$Config.registry
|
||||||
$scheduledtaskKeys = $sync.configs.tweaks.$Config.scheduledtask
|
$scheduledtaskKeys = $sync.configs.tweaks.$Config.scheduledtask
|
||||||
$serviceKeys = $sync.configs.tweaks.$Config.service
|
$serviceKeys = $sync.configs.tweaks.$Config.service
|
||||||
|
|
||||||
if($registryKeys -or $scheduledtaskKeys -or $serviceKeys){
|
if($registryKeys -or $scheduledtaskKeys -or $serviceKeys){
|
||||||
$Values = @()
|
$Values = @()
|
||||||
|
|
||||||
|
|
||||||
Foreach ($tweaks in $registryKeys){
|
Foreach ($tweaks in $registryKeys){
|
||||||
Foreach($tweak in $tweaks){
|
Foreach($tweak in $tweaks){
|
||||||
|
|
||||||
if(test-path $tweak.Path){
|
if(test-path $tweak.Path){
|
||||||
$actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name)
|
$actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name)
|
||||||
$expectedValue = $tweak.Value
|
$expectedValue = $tweak.Value
|
||||||
if ($expectedValue -notlike $actualValue){
|
if ($expectedValue -notlike $actualValue){
|
||||||
$values += $False
|
$values += $False
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
Foreach ($tweaks in $scheduledtaskKeys){
|
Foreach ($tweaks in $scheduledtaskKeys){
|
||||||
Foreach($tweak in $tweaks){
|
Foreach($tweak in $tweaks){
|
||||||
$task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"}
|
$task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"}
|
||||||
|
|
||||||
if($task){
|
if($task){
|
||||||
$actualValue = $task.State
|
$actualValue = $task.State
|
||||||
$expectedValue = $tweak.State
|
$expectedValue = $tweak.State
|
||||||
@ -81,7 +81,7 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
Foreach ($tweaks in $serviceKeys){
|
Foreach ($tweaks in $serviceKeys){
|
||||||
Foreach($tweak in $tweaks){
|
Foreach($tweak in $tweaks){
|
||||||
$Service = Get-Service -Name $tweak.Name
|
$Service = Get-Service -Name $tweak.Name
|
||||||
|
|
||||||
if($Service){
|
if($Service){
|
||||||
$actualValue = $Service.StartType
|
$actualValue = $Service.StartType
|
||||||
$expectedValue = $tweak.StartupType
|
$expectedValue = $tweak.StartupType
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Function Invoke-WinUtilDarkMode {
|
Function Invoke-WinUtilDarkMode {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Sets Dark Mode on or off
|
Sets Dark Mode on or off
|
||||||
|
|
||||||
#>
|
#>
|
||||||
Param($DarkMoveEnabled)
|
Param($DarkMoveEnabled)
|
||||||
Try{
|
Try{
|
||||||
@ -15,7 +15,7 @@ Function Invoke-WinUtilDarkMode {
|
|||||||
Write-Host "Disabling Dark Mode"
|
Write-Host "Disabling Dark Mode"
|
||||||
$DarkMoveValue = 1
|
$DarkMoveValue = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||||
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value $DarkMoveValue
|
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value $DarkMoveValue
|
||||||
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value $DarkMoveValue
|
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value $DarkMoveValue
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WinUtilFeatureInstall {
|
function Invoke-WinUtilFeatureInstall {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function converts all the values from the tweaks.json and routes them to the appropriate function
|
This function converts all the values from the tweaks.json and routes them to the appropriate function
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
@ -13,7 +13,7 @@ function Invoke-WinUtilFeatureInstall {
|
|||||||
$CheckBox | ForEach-Object {
|
$CheckBox | ForEach-Object {
|
||||||
if($sync.configs.feature.$psitem.feature){
|
if($sync.configs.feature.$psitem.feature){
|
||||||
Foreach( $feature in $sync.configs.feature.$psitem.feature ){
|
Foreach( $feature in $sync.configs.feature.$psitem.feature ){
|
||||||
Try{
|
Try{
|
||||||
Write-Host "Installing $feature"
|
Write-Host "Installing $feature"
|
||||||
Enable-WindowsOptionalFeature -Online -FeatureName $feature -All -NoRestart
|
Enable-WindowsOptionalFeature -Online -FeatureName $feature -All -NoRestart
|
||||||
}
|
}
|
||||||
@ -24,10 +24,10 @@ function Invoke-WinUtilFeatureInstall {
|
|||||||
|
|
||||||
else{
|
else{
|
||||||
Write-Warning "Unable to Install $feature due to unhandled exception"
|
Write-Warning "Unable to Install $feature due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($sync.configs.feature.$psitem.InvokeScript){
|
if($sync.configs.feature.$psitem.InvokeScript){
|
||||||
Foreach( $script in $sync.configs.feature.$psitem.InvokeScript ){
|
Foreach( $script in $sync.configs.feature.$psitem.InvokeScript ){
|
||||||
@ -44,10 +44,10 @@ function Invoke-WinUtilFeatureInstall {
|
|||||||
|
|
||||||
else{
|
else{
|
||||||
Write-Warning "Unable to Install $feature due to unhandled exception"
|
Write-Warning "Unable to Install $feature due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
function Invoke-WinUtilScript {
|
function Invoke-WinUtilScript {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will run a separate powershell script. Meant for things that can't be handled with the other functions
|
This function will run a separate powershell script. Meant for things that can't be handled with the other functions
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ function Invoke-WinUtilScript {
|
|||||||
|
|
||||||
$Scriptblock = [scriptblock]::Create({"Write-output 'Hello World'"})
|
$Scriptblock = [scriptblock]::Create({"Write-output 'Hello World'"})
|
||||||
Invoke-WinUtilScript -ScriptBlock $scriptblock -Name "Hello World"
|
Invoke-WinUtilScript -ScriptBlock $scriptblock -Name "Hello World"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name,
|
$Name,
|
||||||
@ -38,7 +38,7 @@ function Invoke-WinUtilScript {
|
|||||||
Catch {
|
Catch {
|
||||||
# Generic catch block to handle any other type of exception
|
# Generic catch block to handle any other type of exception
|
||||||
Write-Warning "Unable to run script for $name due to unhandled exception"
|
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WinUtilTweaks {
|
function Invoke-WinUtilTweaks {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function converts all the values from the tweaks.json and routes them to the appropriate function
|
This function converts all the values from the tweaks.json and routes them to the appropriate function
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
@ -18,7 +18,7 @@ function Invoke-WinUtilTweaks {
|
|||||||
ScriptType = "UndoScript"
|
ScriptType = "UndoScript"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Else{
|
Else{
|
||||||
$Values = @{
|
$Values = @{
|
||||||
Registry = "Value"
|
Registry = "Value"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
function Remove-WinUtilAPPX {
|
function Remove-WinUtilAPPX {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will remove any of the provided APPX names
|
This function will remove any of the provided APPX names
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
|
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name
|
$Name
|
||||||
@ -24,11 +24,11 @@ function Remove-WinUtilAPPX {
|
|||||||
}
|
}
|
||||||
Else{
|
Else{
|
||||||
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Catch{
|
Catch{
|
||||||
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
Write-Warning "Unable to uninstall $name due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
function Set-WinUtilDNS {
|
function Set-WinUtilDNS {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will set the DNS of all interfaces that are in the "Up" state. It will lookup the values from the DNS.Json file
|
This function will set the DNS of all interfaces that are in the "Up" state. It will lookup the values from the DNS.Json file
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilDNS -DNSProvider "google"
|
Set-WinUtilDNS -DNSProvider "google"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param($DNSProvider)
|
param($DNSProvider)
|
||||||
if($DNSProvider -eq "Default"){return}
|
if($DNSProvider -eq "Default"){return}
|
||||||
@ -27,6 +27,6 @@ function Set-WinUtilDNS {
|
|||||||
}
|
}
|
||||||
Catch{
|
Catch{
|
||||||
Write-Warning "Unable to set DNS Provider due to an unhandled exception"
|
Write-Warning "Unable to set DNS Provider due to an unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
function Set-WinUtilRegistry {
|
function Set-WinUtilRegistry {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will make all modifications to the registry
|
This function will make all modifications to the registry
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name,
|
$Name,
|
||||||
$Path,
|
$Path,
|
||||||
@ -16,7 +16,7 @@ function Set-WinUtilRegistry {
|
|||||||
$Value
|
$Value
|
||||||
)
|
)
|
||||||
|
|
||||||
Try{
|
Try{
|
||||||
if(!(Test-Path 'HKU:\')){New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS}
|
if(!(Test-Path 'HKU:\')){New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS}
|
||||||
|
|
||||||
If (!(Test-Path $Path)) {
|
If (!(Test-Path $Path)) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
function Set-WinUtilRestorePoint {
|
function Set-WinUtilRestorePoint {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will make a Restore Point
|
This function will make a Restore Point
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
# Check if the user has administrative privileges
|
# Check if the user has administrative privileges
|
||||||
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||||
@ -24,7 +24,7 @@ function Set-WinUtilRestorePoint {
|
|||||||
$exists = Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -name "SystemRestorePointCreationFrequency" -ErrorAction SilentlyContinue
|
$exists = Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -name "SystemRestorePointCreationFrequency" -ErrorAction SilentlyContinue
|
||||||
if($null -eq $exists){
|
if($null -eq $exists){
|
||||||
write-host 'Changing system to allow multiple restore points per day'
|
write-host 'Changing system to allow multiple restore points per day'
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointCreationFrequency" -Value "0" -Type DWord -Force -ErrorAction Stop | Out-Null
|
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointCreationFrequency" -Value "0" -Type DWord -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get all the restore points for the current day
|
# Get all the restore points for the current day
|
||||||
@ -33,7 +33,7 @@ function Set-WinUtilRestorePoint {
|
|||||||
# Check if there is already a restore point created today
|
# Check if there is already a restore point created today
|
||||||
if ($existingRestorePoints.Count -eq 0) {
|
if ($existingRestorePoints.Count -eq 0) {
|
||||||
$description = "System Restore Point created by WinUtil"
|
$description = "System Restore Point created by WinUtil"
|
||||||
|
|
||||||
Checkpoint-Computer -Description $description -RestorePointType "MODIFY_SETTINGS"
|
Checkpoint-Computer -Description $description -RestorePointType "MODIFY_SETTINGS"
|
||||||
Write-Host -ForegroundColor Green "System Restore Point Created Successfully"
|
Write-Host -ForegroundColor Green "System Restore Point Created Successfully"
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
function Set-WinUtilScheduledTask {
|
function Set-WinUtilScheduledTask {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will enable/disable the provided Scheduled Task
|
This function will enable/disable the provided Scheduled Task
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -State "Disabled"
|
Set-WinUtilScheduledTask -Name "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -State "Disabled"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name,
|
$Name,
|
||||||
@ -35,6 +35,6 @@ function Set-WinUtilScheduledTask {
|
|||||||
}
|
}
|
||||||
Catch{
|
Catch{
|
||||||
Write-Warning "Unable to run script for $name due to unhandled exception"
|
Write-Warning "Unable to run script for $name due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,24 +1,24 @@
|
|||||||
Function Set-WinUtilService {
|
Function Set-WinUtilService {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will change the startup type of services and start/stop them as needed
|
This function will change the startup type of services and start/stop them as needed
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilService -Name "HomeGroupListener" -StartupType "Manual"
|
Set-WinUtilService -Name "HomeGroupListener" -StartupType "Manual"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$Name,
|
$Name,
|
||||||
$StartupType
|
$StartupType
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
Write-Host "Setting Service $Name to $StartupType"
|
Write-Host "Setting Service $Name to $StartupType"
|
||||||
|
|
||||||
# Check if the service exists
|
# Check if the service exists
|
||||||
$service = Get-Service -Name $Name -ErrorAction Stop
|
$service = Get-Service -Name $Name -ErrorAction Stop
|
||||||
|
|
||||||
# Service exists, proceed with changing properties
|
# Service exists, proceed with changing properties
|
||||||
$service | Set-Service -StartupType $StartupType -ErrorAction Stop
|
$service | Set-Service -StartupType $StartupType -ErrorAction Stop
|
||||||
}
|
}
|
||||||
@ -29,5 +29,5 @@ Function Set-WinUtilService {
|
|||||||
Write-Warning "Unable to set $Name due to unhandled exception"
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
Write-Warning $_.Exception.Message
|
Write-Warning $_.Exception.Message
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
function Set-WinUtilUITheme {
|
function Set-WinUtilUITheme {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will set theme to the XAML file
|
This function will set theme to the XAML file
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilUITheme -inputXAML $inputXAML
|
Set-WinUtilUITheme -inputXAML $inputXAML
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param
|
param
|
||||||
(
|
(
|
||||||
@ -41,7 +41,7 @@ function Set-WinUtilUITheme {
|
|||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
Write-Warning "Unable to apply theme"
|
Write-Warning "Unable to apply theme"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
|
|
||||||
return $inputXML;
|
return $inputXML;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Test-WinUtilPackageManager {
|
function Test-WinUtilPackageManager {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Checks for Winget or Choco depending on the parameter
|
Checks for Winget or Choco depending on the parameter
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Param(
|
Param(
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Function Update-WinUtilProgramWinget {
|
Function Update-WinUtilProgramWinget {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This will update programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
This will update programs via Winget using a new powershell.exe instance to prevent the GUI from locking up.
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[ScriptBlock]$wingetinstall = {
|
[ScriptBlock]$wingetinstall = {
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
function Invoke-WPFButton {
|
function Invoke-WPFButton {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Meant to make creating buttons easier. There is a section below in the gui that will assign this function to every button.
|
Meant to make creating buttons easier. There is a section below in the gui that will assign this function to every button.
|
||||||
This way you can dictate what each button does from this function.
|
This way you can dictate what each button does from this function.
|
||||||
|
|
||||||
Input will be the name of the button that is clicked.
|
Input will be the name of the button that is clicked.
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Param ([string]$Button)
|
Param ([string]$Button)
|
||||||
|
|
||||||
#Use this to get the name of the button
|
#Use this to get the name of the button
|
||||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Simple Switch for legacy windows
|
Simple Switch for legacy windows
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param($Panel)
|
param($Panel)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFFeatureInstall {
|
function Invoke-WPFFeatureInstall {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
GUI Function to install Windows Features
|
GUI Function to install Windows Features
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
if($sync.ProcessRunning){
|
if($sync.ProcessRunning){
|
||||||
@ -26,12 +26,12 @@ function Invoke-WPFFeatureInstall {
|
|||||||
Write-Host "--- Features are Installed ---"
|
Write-Host "--- Features are Installed ---"
|
||||||
Write-Host "--- A Reboot may be required ---"
|
Write-Host "--- A Reboot may be required ---"
|
||||||
Write-Host "==================================="
|
Write-Host "==================================="
|
||||||
|
|
||||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "All features are now installed "
|
$MessageboxTitle = "All features are now installed "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFFixesNetwork {
|
function Invoke-WPFFixesNetwork {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Write-Host "Resetting Network with netsh"
|
Write-Host "Resetting Network with netsh"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
function Invoke-WPFFixesUpdate {
|
function Invoke-WPFFixesUpdate {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
### Reset Windows Update Script - reregister dlls, services, and remove registry entries.
|
### Reset Windows Update Script - reregister dlls, services, and remove registry entries.
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Function Invoke-WPFFormVariables {
|
Function Invoke-WPFFormVariables {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
#If ($global:ReadmeDisplay -ne $true) { Write-Host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true }
|
#If ($global:ReadmeDisplay -ne $true) { Write-Host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true }
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ function Invoke-WPFGetInstalled {
|
|||||||
if($checkbox -eq "tweaks"){
|
if($checkbox -eq "tweaks"){
|
||||||
Write-Host "Getting Installed Tweaks..."
|
Write-Host "Getting Installed Tweaks..."
|
||||||
}
|
}
|
||||||
|
|
||||||
$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox
|
$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox
|
||||||
|
|
||||||
$sync.form.Dispatcher.invoke({
|
$sync.form.Dispatcher.invoke({
|
||||||
foreach($checkbox in $Checkboxes){
|
foreach($checkbox in $Checkboxes){
|
||||||
$sync.$checkbox.ischecked = $True
|
$sync.$checkbox.ischecked = $True
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
function Invoke-WPFImpex {
|
function Invoke-WPFImpex {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function handles importing and exporting of the checkboxes checked for the tweaks section
|
This function handles importing and exporting of the checkboxes checked for the tweaks section
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Invoke-WPFImpex -type "export"
|
Invoke-WPFImpex -type "export"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param(
|
param(
|
||||||
$type,
|
$type,
|
||||||
@ -18,7 +18,7 @@ function Invoke-WPFImpex {
|
|||||||
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
||||||
}
|
}
|
||||||
if ($type -eq "import"){
|
if ($type -eq "import"){
|
||||||
$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog
|
$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog
|
||||||
}
|
}
|
||||||
|
|
||||||
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
||||||
@ -28,7 +28,7 @@ function Invoke-WPFImpex {
|
|||||||
if($FileBrowser.FileName -eq ""){
|
if($FileBrowser.FileName -eq ""){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type -eq "export"){
|
if ($type -eq "export"){
|
||||||
$jsonFile = Get-WinUtilCheckBoxes $checkbox -unCheck $false
|
$jsonFile = Get-WinUtilCheckBoxes $checkbox -unCheck $false
|
||||||
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFInstall {
|
function Invoke-WPFInstall {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
if($sync.ProcessRunning){
|
if($sync.ProcessRunning){
|
||||||
@ -35,7 +35,7 @@ function Invoke-WPFInstall {
|
|||||||
$MessageboxTitle = "Installs are Finished "
|
$MessageboxTitle = "Installs are Finished "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFInstallUpgrade {
|
function Invoke-WPFInstallUpgrade {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
if(!(Test-WinUtilPackageManager -winget)){
|
if(!(Test-WinUtilPackageManager -winget)){
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFPanelAutologin {
|
function Invoke-WPFPanelAutologin {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
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
|
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
|
cmd /c $env:temp\autologin.exe /accepteula
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFPanelDISM {
|
function Invoke-WPFPanelDISM {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan;
|
Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan;
|
||||||
Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow;
|
Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFRunspace {
|
function Invoke-WPFRunspace {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Simple function to make it easier to invoke a runspace from inside the script.
|
Simple function to make it easier to invoke a runspace from inside the script.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
@ -14,14 +14,14 @@ function Invoke-WPFRunspace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Invoke-WPFRunspace @params
|
Invoke-WPFRunspace @params
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param (
|
Param (
|
||||||
$ScriptBlock,
|
$ScriptBlock,
|
||||||
$ArgumentList
|
$ArgumentList
|
||||||
)
|
)
|
||||||
|
|
||||||
#Crate a PowerShell instance.
|
#Crate a PowerShell instance.
|
||||||
$script:powershell = [powershell]::Create()
|
$script:powershell = [powershell]::Create()
|
||||||
@ -30,7 +30,7 @@ function Invoke-WPFRunspace {
|
|||||||
$script:powershell.AddScript($ScriptBlock)
|
$script:powershell.AddScript($ScriptBlock)
|
||||||
$script:powershell.AddArgument($ArgumentList)
|
$script:powershell.AddArgument($ArgumentList)
|
||||||
$script:powershell.RunspacePool = $sync.runspace
|
$script:powershell.RunspacePool = $sync.runspace
|
||||||
|
|
||||||
#Run our RunspacePool.
|
#Run our RunspacePool.
|
||||||
$script:handle = $script:powershell.BeginInvoke()
|
$script:handle = $script:powershell.BeginInvoke()
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ function Invoke-WPFShortcut {
|
|||||||
|
|
||||||
Switch ($ShortcutToAdd) {
|
Switch ($ShortcutToAdd) {
|
||||||
"WinUtil" {
|
"WinUtil" {
|
||||||
$SourceExe = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
|
$SourceExe = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||||
$IRM = 'irm https://christitus.com/win | iex'
|
$IRM = 'irm https://christitus.com/win | iex'
|
||||||
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
||||||
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
||||||
@ -28,6 +28,6 @@ function Invoke-WPFShortcut {
|
|||||||
$Shortcut.TargetPath = $SourceExe
|
$Shortcut.TargetPath = $SourceExe
|
||||||
$Shortcut.Arguments = $ArgumentsToSourceExe
|
$Shortcut.Arguments = $ArgumentsToSourceExe
|
||||||
$Shortcut.Save()
|
$Shortcut.Save()
|
||||||
|
|
||||||
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName)"
|
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName)"
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
function Invoke-WPFTab {
|
function Invoke-WPFTab {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Sole purpose of this function is to reduce duplicated code for switching between tabs.
|
Sole purpose of this function is to reduce duplicated code for switching between tabs.
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Param ($ClickedTab)
|
Param ($ClickedTab)
|
||||||
@ -13,7 +13,7 @@ function Invoke-WPFTab {
|
|||||||
$x = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1
|
$x = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1
|
||||||
|
|
||||||
0..($Tabs.Count -1 ) | ForEach-Object {
|
0..($Tabs.Count -1 ) | ForEach-Object {
|
||||||
|
|
||||||
if ($x -eq $psitem){
|
if ($x -eq $psitem){
|
||||||
$sync.$TabNav.Items[$psitem].IsSelected = $true
|
$sync.$TabNav.Items[$psitem].IsSelected = $true
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
function Invoke-WPFToggle {
|
function Invoke-WPFToggle {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Meant to make creating toggle switches easier. There is a section below in the gui that will assign this function to every switch.
|
Meant to make creating toggle switches easier. There is a section below in the gui that will assign this function to every switch.
|
||||||
This way you can dictate what each button does from this function.
|
This way you can dictate what each button does from this function.
|
||||||
|
|
||||||
Input will be the name of the toggle that is checked.
|
Input will be the name of the toggle that is checked.
|
||||||
#>
|
#>
|
||||||
|
|
||||||
Param ([string]$Button)
|
Param ([string]$Button)
|
||||||
|
|
||||||
#Use this to get the name of the button
|
#Use this to get the name of the button
|
||||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Function Invoke-WPFUltimatePerformance {
|
Function Invoke-WPFUltimatePerformance {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param($State)
|
param($State)
|
||||||
Try{
|
Try{
|
||||||
@ -31,7 +31,7 @@ Function Invoke-WPFUltimatePerformance {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host "Power scheme '$powerSchemeName' already exists."
|
Write-Host "Power scheme '$powerSchemeName' already exists."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($state -eq "Disabled"){
|
elseif($state -eq "Disabled"){
|
||||||
# Define the name of the power scheme you want to remove
|
# Define the name of the power scheme you want to remove
|
||||||
@ -50,10 +50,10 @@ Function Invoke-WPFUltimatePerformance {
|
|||||||
|
|
||||||
if($null -ne $guid){
|
if($null -ne $guid){
|
||||||
Write-Host "Found power scheme '$powerSchemeName' with GUID $guid. Removing..."
|
Write-Host "Found power scheme '$powerSchemeName' with GUID $guid. Removing..."
|
||||||
|
|
||||||
# Remove the power scheme
|
# Remove the power scheme
|
||||||
powercfg /delete $guid
|
powercfg /delete $guid
|
||||||
|
|
||||||
Write-Host "Power scheme removed successfully."
|
Write-Host "Power scheme removed successfully."
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -65,7 +65,7 @@ Function Invoke-WPFUltimatePerformance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Catch{
|
Catch{
|
||||||
Write-Warning $psitem.Exception.Message
|
Write-Warning $psitem.Exception.Message
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFUnInstall {
|
function Invoke-WPFUnInstall {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
if($sync.ProcessRunning){
|
if($sync.ProcessRunning){
|
||||||
@ -41,7 +41,7 @@ function Invoke-WPFUnInstall {
|
|||||||
$MessageboxTitle = "Uninstalls are Finished "
|
$MessageboxTitle = "Uninstalls are Finished "
|
||||||
$Messageboxbody = ("Done")
|
$Messageboxbody = ("Done")
|
||||||
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFUpdatesdefault {
|
function Invoke-WPFUpdatesdefault {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
||||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFUpdatesdisable {
|
function Invoke-WPFUpdatesdisable {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
|
||||||
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFUpdatessecurity {
|
function Invoke-WPFUpdatessecurity {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
Write-Host "Disabling driver offering through Windows Update..."
|
Write-Host "Disabling driver offering through Windows Update..."
|
||||||
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) {
|
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFtweaksbutton {
|
function Invoke-WPFtweaksbutton {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
if($sync.ProcessRunning){
|
if($sync.ProcessRunning){
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
function Invoke-WPFundoall {
|
function Invoke-WPFundoall {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
PlaceHolder
|
PlaceHolder
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
if($sync.ProcessRunning){
|
if($sync.ProcessRunning){
|
||||||
@ -18,8 +18,8 @@ function Invoke-WPFundoall {
|
|||||||
$msg = "Please check the tweaks you wish to undo."
|
$msg = "Please check the tweaks you wish to undo."
|
||||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
|
Invoke-WPFRunspace -ArgumentList $Tweaks -ScriptBlock {
|
||||||
param($Tweaks)
|
param($Tweaks)
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'PSShouldProcess',
|
'PSShouldProcess',
|
||||||
'PSUseApprovedVerbs',
|
'PSUseApprovedVerbs',
|
||||||
'PSUseDeclaredVarsMoreThanAssignments')
|
'PSUseDeclaredVarsMoreThanAssignments')
|
||||||
#>
|
#>
|
||||||
# Do not analyze the following rules. Use ExcludeRules when you have
|
# Do not analyze the following rules. Use ExcludeRules when you have
|
||||||
# commented out the IncludeRules settings above and want to include all
|
# commented out the IncludeRules settings above and want to include all
|
||||||
# the default rules except for those you exclude below.
|
# the default rules except for those you exclude below.
|
||||||
|
@ -7,21 +7,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion Load Variables needed for testing
|
#endregion Load Variables needed for testing
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Tests - Application Installs
|
# Tests - Application Installs
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
|
|
||||||
Describe "Config Files" -ForEach @(
|
Describe "Config Files" -ForEach @(
|
||||||
@{
|
@{
|
||||||
name = "applications"
|
name = "applications"
|
||||||
config = $('{
|
config = $('{
|
||||||
"winget": "value",
|
"winget": "value",
|
||||||
"choco": "value"
|
"choco": "value"
|
||||||
}' | ConvertFrom-Json)
|
}' | ConvertFrom-Json)
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
name = "tweaks"
|
name = "tweaks"
|
||||||
undo = $true
|
undo = $true
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ Describe "Config Files" -ForEach @(
|
|||||||
$result.Add($application)
|
$result.Add($application)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result | Select-String "WPF*" | should -BeNullOrEmpty
|
$result | Select-String "WPF*" | should -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,16 +52,16 @@ Describe "Config Files" -ForEach @(
|
|||||||
|
|
||||||
foreach ($tweak in $tweaks){
|
foreach ($tweak in $tweaks){
|
||||||
$Originals = @(
|
$Originals = @(
|
||||||
@{
|
@{
|
||||||
name = "registry"
|
name = "registry"
|
||||||
value = "OriginalValue"
|
value = "OriginalValue"
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
name = "service"
|
name = "service"
|
||||||
value = "OriginalType"
|
value = "OriginalType"
|
||||||
},
|
},
|
||||||
@{
|
@{
|
||||||
name = "ScheduledTask"
|
name = "ScheduledTask"
|
||||||
value = "OriginalState"
|
value = "OriginalState"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
#===========================================================================
|
#===========================================================================
|
||||||
|
|
||||||
Describe "Functions"{
|
Describe "Functions"{
|
||||||
|
|
||||||
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||||||
|
|
||||||
context "$($psitem.BaseName)" {
|
context "$($psitem.BaseName)" {
|
||||||
BeforeEach -Scriptblock {
|
BeforeEach -Scriptblock {
|
||||||
. $fullname
|
. $fullname
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Imports with no errors" -TestCases @{
|
It "Imports with no errors" -TestCases @{
|
||||||
basename = $($psitem.BaseName)
|
basename = $($psitem.BaseName)
|
||||||
fullname = $psitem.FullName
|
fullname = $psitem.FullName
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
./Compile.ps1
|
./Compile.ps1
|
||||||
|
|
||||||
$script = Get-Content .\winutil.ps1
|
$script = Get-Content .\winutil.ps1
|
||||||
$script[0..($script.count - 21)] | Out-File .\pester.ps1
|
$script[0..($script.count - 21)] | Out-File .\pester.ps1
|
||||||
|
|
||||||
|
|
||||||
#endregion Load Variables needed for testing
|
#endregion Load Variables needed for testing
|
||||||
|
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
. .\pester.ps1
|
. .\pester.ps1
|
||||||
@ -23,5 +23,5 @@ Describe "GUI" {
|
|||||||
It "Imports with no errors" {
|
It "Imports with no errors" {
|
||||||
$sync.Form | should -Not -BeNullOrEmpty
|
$sync.Form | should -Not -BeNullOrEmpty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ $functions = Get-ChildItem function:\ | Where-Object {$_.name -like "*winutil*"
|
|||||||
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
|
||||||
|
|
||||||
# And add it to the iss object
|
# And add it to the iss object
|
||||||
$initialSessionState.Commands.Add($functionEntry)
|
$initialSessionState.Commands.Add($functionEntry)
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ $sync.runspace.Open()
|
|||||||
|
|
||||||
WingetFailedInstall($Message) : base($Message) {}
|
WingetFailedInstall($Message) : base($Message) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChocoFailedInstall : Exception {
|
class ChocoFailedInstall : Exception {
|
||||||
[string] $additionalData
|
[string] $additionalData
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ $sync.runspace.Open()
|
|||||||
|
|
||||||
GenericException($Message) : base($Message) {}
|
GenericException($Message) : base($Message) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion exception classes
|
#endregion exception classes
|
||||||
|
|
||||||
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
Background="{MainBackgroundColor}"
|
Background="{MainBackgroundColor}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="Chris Titus Tech's Windows Utility" Height="800" Width="1200">
|
Title="Chris Titus Tech's Windows Utility" Height="800" Width="1200">
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<Style TargetType="ComboBox">
|
<Style TargetType="ComboBox">
|
||||||
<Setter Property="Foreground" Value="{ComboBoxForegroundColor}" />
|
<Setter Property="Foreground" Value="{ComboBoxForegroundColor}" />
|
||||||
@ -24,7 +24,7 @@
|
|||||||
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
ClickMode="Press">
|
ClickMode="Press">
|
||||||
<TextBlock Text="{TemplateBinding SelectionBoxItem}"
|
<TextBlock Text="{TemplateBinding SelectionBoxItem}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
/>
|
/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
@ -132,24 +132,24 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
|
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="CheckBox">
|
<ControlTemplate TargetType="CheckBox">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border Width="45"
|
<Border Width="45"
|
||||||
Height="20"
|
Height="20"
|
||||||
Background="#555555"
|
Background="#555555"
|
||||||
CornerRadius="10"
|
CornerRadius="10"
|
||||||
Margin="5,0"
|
Margin="5,0"
|
||||||
/>
|
/>
|
||||||
<Border Name="WPFToggleSwitchButton"
|
<Border Name="WPFToggleSwitchButton"
|
||||||
Width="25"
|
Width="25"
|
||||||
Height="25"
|
Height="25"
|
||||||
Background="Black"
|
Background="Black"
|
||||||
CornerRadius="12.5"
|
CornerRadius="12.5"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
/>
|
/>
|
||||||
<ContentPresenter Name="WPFToggleSwitchContent"
|
<ContentPresenter Name="WPFToggleSwitchContent"
|
||||||
@ -216,13 +216,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DockPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="1100">
|
<DockPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="1100">
|
||||||
<Image Height="50" Width="50" Name="WPFIcon" SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="0,10,0,10"/>
|
<Image Height="50" Width="50" Name="WPFIcon" SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="0,10,0,10"/>
|
||||||
<Button Content="Install" HorizontalAlignment="Left" Height="40" Width="100"
|
<Button Content="Install" HorizontalAlignment="Left" Height="40" Width="100"
|
||||||
Background="{ButtonInstallBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab1BT"/>
|
Background="{ButtonInstallBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab1BT"/>
|
||||||
<Button Content="Tweaks" HorizontalAlignment="Left" Height="40" Width="100"
|
<Button Content="Tweaks" HorizontalAlignment="Left" Height="40" Width="100"
|
||||||
Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab2BT"/>
|
Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab2BT"/>
|
||||||
<Button Content="Config" HorizontalAlignment="Left" Height="40" Width="100"
|
<Button Content="Config" HorizontalAlignment="Left" Height="40" Width="100"
|
||||||
Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab3BT"/>
|
Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab3BT"/>
|
||||||
<Button Content="Updates" HorizontalAlignment="Left" Height="40" Width="100"
|
<Button Content="Updates" HorizontalAlignment="Left" Height="40" Width="100"
|
||||||
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab4BT"/>
|
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonInstallForegroundColor}" FontWeight="Bold" Name="WPFTab4BT"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
<TabControl Grid.Row="1" Padding="-1" Name="WPFTabNav" Background="#222222">
|
<TabControl Grid.Row="1" Padding="-1" Name="WPFTabNav" Background="#222222">
|
||||||
@ -303,7 +303,7 @@
|
|||||||
<CheckBox Name="WPFInstallvisualstudio" Content="Visual Studio 2022" Margin="5,0"/>
|
<CheckBox Name="WPFInstallvisualstudio" Content="Visual Studio 2022" Margin="5,0"/>
|
||||||
<CheckBox Name="WPFInstallvscode" Content="VS Code" Margin="5,0"/>
|
<CheckBox Name="WPFInstallvscode" Content="VS Code" Margin="5,0"/>
|
||||||
<CheckBox Name="WPFInstallvscodium" Content="VS Codium" Margin="5,0"/>
|
<CheckBox Name="WPFInstallvscodium" Content="VS Codium" Margin="5,0"/>
|
||||||
|
|
||||||
<Label Content="Document" FontSize="16" Margin="5,0"/>
|
<Label Content="Document" FontSize="16" Margin="5,0"/>
|
||||||
<CheckBox Name="WPFInstalladobe" Content="Adobe Reader DC" Margin="5,0"/>
|
<CheckBox Name="WPFInstalladobe" Content="Adobe Reader DC" Margin="5,0"/>
|
||||||
<CheckBox Name="WPFInstallopenoffice" Content="Apache OpenOffice" Margin="5,0"/>
|
<CheckBox Name="WPFInstallopenoffice" Content="Apache OpenOffice" Margin="5,0"/>
|
||||||
@ -517,17 +517,17 @@
|
|||||||
<CheckBox Name="WPFMiscTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
<CheckBox Name="WPFMiscTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
||||||
|
|
||||||
<Label Content="DNS" />
|
<Label Content="DNS" />
|
||||||
<ComboBox Name="WPFchangedns" Height = "20" Width = "160" HorizontalAlignment = "Left" Margin="5,5">
|
<ComboBox Name="WPFchangedns" Height = "20" Width = "160" HorizontalAlignment = "Left" Margin="5,5">
|
||||||
<ComboBoxItem IsSelected="True" Content = "Default"/>
|
<ComboBoxItem IsSelected="True" Content = "Default"/>
|
||||||
<ComboBoxItem Content = "DHCP"/>
|
<ComboBoxItem Content = "DHCP"/>
|
||||||
<ComboBoxItem Content = "Google"/>
|
<ComboBoxItem Content = "Google"/>
|
||||||
<ComboBoxItem Content = "Cloudflare"/>
|
<ComboBoxItem Content = "Cloudflare"/>
|
||||||
<ComboBoxItem Content = "Cloudflare_Malware"/>
|
<ComboBoxItem Content = "Cloudflare_Malware"/>
|
||||||
<ComboBoxItem Content = "Cloudflare_Malware_Adult"/>
|
<ComboBoxItem Content = "Cloudflare_Malware_Adult"/>
|
||||||
<ComboBoxItem Content = "Level3"/>
|
<ComboBoxItem Content = "Level3"/>
|
||||||
<ComboBoxItem Content = "Open_DNS"/>
|
<ComboBoxItem Content = "Open_DNS"/>
|
||||||
<ComboBoxItem Content = "Quad9"/>
|
<ComboBoxItem Content = "Quad9"/>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<Button Name="WPFtweaksbutton" Content="Run Tweaks" HorizontalAlignment = "Left" Width="160"/>
|
<Button Name="WPFtweaksbutton" Content="Run Tweaks" HorizontalAlignment = "Left" Width="160"/>
|
||||||
<Button Name="WPFundoall" Content="Undo Selected Tweaks" HorizontalAlignment = "Left" Width="160"/>
|
<Button Name="WPFundoall" Content="Undo Selected Tweaks" HorizontalAlignment = "Left" Width="160"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
Loading…
Reference in New Issue
Block a user