Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@
<CheckBox Name="EssTweaksRemoveCortana" Content="Remove Cortana" Margin="5,0" ToolTip="Removes Cortana, but often breaks search... if you are a heavy windows search users, this is NOT recommended."/>
<CheckBox Name="EssTweaksRemoveEdge" Content="Remove Microsoft Edge" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
<CheckBox Name="MiscTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
<Label Content="DNS" />
<ComboBox Name="changedns" Height = "20" Width = "100" HorizontalAlignment = "Left" >
<ComboBoxItem IsSelected="True" Content = "Default"/>
<ComboBoxItem Content = "Google"/>
<ComboBoxItem Content = "Cloud Flare"/>
<ComboBoxItem Content = "Level3"/>
<ComboBoxItem Content = "Open DNS"/>
</ComboBox>
<Button Name="tweaksbutton" Background="AliceBlue" Content="Run Tweaks" Margin="20,10,20,0"/>
<Button Name="undoall" Background="AliceBlue" Content="Undo All Tweaks" Margin="20,5"/>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion runspace.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#for CI/CD
$BranchToUse = 'test'
$BranchToUse = 'feature/change-dns'

<#
.NOTES
Expand Down
34 changes: 33 additions & 1 deletion winutil.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $BranchToUse = 'main'
GitHub : https://github.com/ChrisTitusTech
Version 0.0.1
#>

# $inputXML = Get-Content "MainWindow.xaml" #uncomment for development
$inputXML = (new-object Net.WebClient).DownloadString("https://raw.githubusercontent.com/ChrisTitusTech/winutil/$BranchToUse/MainWindow.xaml") #uncomment for Production

$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
Expand Down Expand Up @@ -838,6 +838,38 @@ $WPFtweaksbutton.Add_Click({
New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Name "InprocServer32" -force -value ""
$WPFMiscTweaksRightClickMenu.IsChecked = $false
}
If ( $WPFchangedns.text -eq 'Google' ) {
Write-Host "Setting DNS to Google for all connections..."
$DC = "8.8.8.8"
$Internet = "8.8.4.4"
$dns = "$DC", "$Internet"
$Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
$Interface.SetDNSServerSearchOrder($dns) | Out-Null
}
If ( $WPFchangedns.text -eq 'Cloud Flare' ) {
Write-Host "Setting DNS to Cloud Flare for all connections..."
$DC = "1.1.1.1"
$Internet = "1.0.0.1"
$dns = "$DC", "$Internet"
$Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
$Interface.SetDNSServerSearchOrder($dns) | Out-Null
}
If ( $WPFchangedns.text -eq 'Level3' ) {
Write-Host "Setting DNS to Level3 for all connections..."
$DC = "4.2.2.2"
$Internet = "4.2.2.4"
$dns = "$DC", "$Internet"
$Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
$Interface.SetDNSServerSearchOrder($dns) | Out-Null
}
If ( $WPFchangedns.text -eq 'Open DNS' ) {
Write-Host "Setting DNS to Open DNS for all connections..."
$DC = "208.67.222.222"
$Internet = "208.67.220.220"
$dns = "$DC", "$Internet"
$Interface = Get-WmiObject Win32_NetworkAdapterConfiguration
$Interface.SetDNSServerSearchOrder($dns) | Out-Null
}
If ( $WPFEssTweaksOO.IsChecked -eq $true ) {
If (!(Test-Path .\ooshutup10.cfg)) {
Write-Host "Running O&O Shutup with Recommended Settings"
Expand Down