mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-07 13:43:50 -05:00
Compare commits
30 Commits
48d94ed981
...
24.06.28
Author | SHA1 | Date | |
---|---|---|---|
f6af93afbd | |||
0c841f98e8 | |||
e4c44e4878 | |||
8a78c960ea | |||
cb3b64e195 | |||
83f93ceba4 | |||
9ac93fd2dc | |||
13712b4c77 | |||
8d65f3bcf8 | |||
5c937efa9b | |||
ade1c3b830 | |||
8ded42a3ce | |||
65b91330ed | |||
98f8b07951 | |||
acaad991a7 | |||
e00bc5f723 | |||
a5fd8e355d | |||
8a2e1391e0 | |||
81c3722881 | |||
279e707a7a | |||
e894613f68 | |||
be08211cdc | |||
118c3e3964 | |||
3f4e353d13 | |||
a09ae3e251 | |||
f9c09495fc | |||
de424ce636 | |||
c28760e11a | |||
53090a6164 | |||
4661bf31ba |
@ -103,5 +103,11 @@ Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding as
|
|||||||
Write-Progress -Activity "Compiling" -Completed
|
Write-Progress -Activity "Compiling" -Completed
|
||||||
|
|
||||||
if ($run){
|
if ($run){
|
||||||
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
try {
|
||||||
|
Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -407,7 +407,7 @@
|
|||||||
"link": "https://discord.com/",
|
"link": "https://discord.com/",
|
||||||
"winget": "Discord.Discord"
|
"winget": "Discord.Discord"
|
||||||
},
|
},
|
||||||
"WPFInstallditto": {
|
"WPFInstallditto": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "ditto",
|
"choco": "ditto",
|
||||||
"content": "Ditto",
|
"content": "Ditto",
|
||||||
@ -591,7 +591,7 @@
|
|||||||
"link": "https://file-converter.io/",
|
"link": "https://file-converter.io/",
|
||||||
"winget": "AdrienAllard.FileConverter"
|
"winget": "AdrienAllard.FileConverter"
|
||||||
},
|
},
|
||||||
"WPFInstallfiles": {
|
"WPFInstallfiles": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "files",
|
"choco": "files",
|
||||||
"content": "Files",
|
"content": "Files",
|
||||||
@ -1295,14 +1295,6 @@
|
|||||||
"link": "https://sourceforge.net/projects/equalizerapo",
|
"link": "https://sourceforge.net/projects/equalizerapo",
|
||||||
"winget": "na"
|
"winget": "na"
|
||||||
},
|
},
|
||||||
"WPFInstallFreeFileSync": {
|
|
||||||
"category": "Utilities",
|
|
||||||
"choco": "freefilesync",
|
|
||||||
"content": "FreeFileSync",
|
|
||||||
"description": "Synchronize Files and Folders",
|
|
||||||
"link": "https://freefilesync.org",
|
|
||||||
"winget": "na"
|
|
||||||
},
|
|
||||||
"WPFInstallCompactGUI": {
|
"WPFInstallCompactGUI": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "compactgui",
|
"choco": "compactgui",
|
||||||
@ -1879,7 +1871,7 @@
|
|||||||
"link": "https://www.rust-lang.org/",
|
"link": "https://www.rust-lang.org/",
|
||||||
"winget": "Rustlang.Rust.MSVC"
|
"winget": "Rustlang.Rust.MSVC"
|
||||||
},
|
},
|
||||||
"WPFInstallsagethumbs": {
|
"WPFInstallsagethumbs": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "sagethumbs",
|
"choco": "sagethumbs",
|
||||||
"content": "SageThumbs",
|
"content": "SageThumbs",
|
||||||
@ -2007,7 +1999,7 @@
|
|||||||
"link": "http://www.uderzo.it/main_products/space_sniffer/",
|
"link": "http://www.uderzo.it/main_products/space_sniffer/",
|
||||||
"winget": "UderzoSoftware.SpaceSniffer"
|
"winget": "UderzoSoftware.SpaceSniffer"
|
||||||
},
|
},
|
||||||
"WPFInstallspotube": {
|
"WPFInstallspotube": {
|
||||||
"category": "Multimedia Tools",
|
"category": "Multimedia Tools",
|
||||||
"choco": "spotube",
|
"choco": "spotube",
|
||||||
"content": "Spotube",
|
"content": "Spotube",
|
||||||
@ -2831,6 +2823,7 @@
|
|||||||
"link": "https://joytokey.net/en/",
|
"link": "https://joytokey.net/en/",
|
||||||
"winget": "JTKsoftware.JoyToKey"
|
"winget": "JTKsoftware.JoyToKey"
|
||||||
},
|
},
|
||||||
|
|
||||||
"WPFInstallnditools": {
|
"WPFInstallnditools": {
|
||||||
"category": "Multimedia Tools",
|
"category": "Multimedia Tools",
|
||||||
"choco": "na",
|
"choco": "na",
|
||||||
@ -2838,5 +2831,21 @@
|
|||||||
"description":"NDI, or Network Device Interface, is a video connectivity standard that enables multimedia systems to identify and communicate with one another over IP and to encode, transmit, and receive high-quality, low latency, frame-accurate video and audio, and exchange metadata in real-time.",
|
"description":"NDI, or Network Device Interface, is a video connectivity standard that enables multimedia systems to identify and communicate with one another over IP and to encode, transmit, and receive high-quality, low latency, frame-accurate video and audio, and exchange metadata in real-time.",
|
||||||
"link": "https://ndi.video/",
|
"link": "https://ndi.video/",
|
||||||
"winget": "NDI.NDITools"
|
"winget": "NDI.NDITools"
|
||||||
|
},
|
||||||
|
"WPFInstallkicad": {
|
||||||
|
"category": "Pro Tools",
|
||||||
|
"choco": "na",
|
||||||
|
"content": "Kicad",
|
||||||
|
"description":"Kicad is an open-source EDA tool. It's a good starting point for those who want to do electrical design and is even used by professionals in the industry.",
|
||||||
|
"link": "https://www.kicad.org/",
|
||||||
|
"winget": "KiCad.KiCad"
|
||||||
|
},
|
||||||
|
"WPFInstalldropox": {
|
||||||
|
"category": "Utilities",
|
||||||
|
"choco": "na",
|
||||||
|
"content": "Dropbox",
|
||||||
|
"description":"The Dropbox desktop app! Save hard drive space, share and edit files and send for signature – all without the distraction of countless browser tabs.",
|
||||||
|
"link": "https://www.dropbox.com/en_GB/desktop",
|
||||||
|
"winget": "Dropbox.Dropbox"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2323,17 +2323,15 @@
|
|||||||
},
|
},
|
||||||
"WPFTweaksRemoveEdge": {
|
"WPFTweaksRemoveEdge": {
|
||||||
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
||||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: AveYo",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a029_",
|
"Order": "a029_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||||
|
Invoke-WebRequest -Uri \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -OutFile \"$ENV:TEMP\\edgeremoval.bat\"
|
||||||
curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -o $ENV:temp\\edgeremoval.bat
|
|
||||||
Start-Process $ENV:temp\\edgeremoval.bat
|
Start-Process $ENV:temp\\edgeremoval.bat
|
||||||
|
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
@ -2389,12 +2387,12 @@
|
|||||||
"WPFTweaksDisableLMS1": {
|
"WPFTweaksDisableLMS1": {
|
||||||
"Content": "Disable Intel MM (vPro LMS)",
|
"Content": "Disable Intel MM (vPro LMS)",
|
||||||
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
||||||
"category": "Essential Tweaks",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a0015_",
|
"Order": "a026_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"Kill OneDrive process\"
|
Write-Host \"Kill LMS\"
|
||||||
$serviceName = \"LMS\"
|
$serviceName = \"LMS\"
|
||||||
Write-Host \"Stopping and disabling service: $serviceName\"
|
Write-Host \"Stopping and disabling service: $serviceName\"
|
||||||
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
||||||
@ -2438,8 +2436,7 @@
|
|||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"Install Microsoft Edge\"
|
Write-Host \"LMS vPro needs to be redownloaded from intel.com\"
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
|
||||||
|
|
||||||
"
|
"
|
||||||
]
|
]
|
||||||
|
@ -27,60 +27,6 @@ function Get-LocalizedYesNo {
|
|||||||
$regexPattern = '([a-zA-Z])'
|
$regexPattern = '([a-zA-Z])'
|
||||||
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
||||||
|
|
||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
|
||||||
# Return the array of characters
|
|
||||||
return $charactersArray
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function Get-LocalizedYesNoTakeown {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
This function runs takeown.exe and captures its output to extract yes no in a localized Windows
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
The function retrieves lines from the output of takeown.exe until there are at least 2 characters
|
|
||||||
captured in a specific format, such as "Yes=<first character>, No=<second character>".
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
$yesNoArray = Get-LocalizedYesNo
|
|
||||||
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
|
||||||
#>
|
|
||||||
|
|
||||||
# Run takeown.exe and capture its output
|
|
||||||
$takeownOutput = & takeown.exe /? | Out-String
|
|
||||||
|
|
||||||
# Parse the output and retrieve lines until there are at least 2 characters in the array
|
|
||||||
$found = $false
|
|
||||||
$charactersArray = @()
|
|
||||||
foreach ($line in $takeownOutput -split "`r`n")
|
|
||||||
{
|
|
||||||
# skip everything before /D flag help
|
|
||||||
if ($found)
|
|
||||||
{
|
|
||||||
# now that /D is found start looking for a single character in double quotes
|
|
||||||
# in help text there is another string in double quotes but it is not a single character
|
|
||||||
$regexPattern = '"([a-zA-Z])"'
|
|
||||||
|
|
||||||
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
|
||||||
|
|
||||||
# if ($charactersArray.Count -gt 0) {
|
|
||||||
# Write-Output "Extracted symbols: $($matches -join ', ')"
|
|
||||||
# } else {
|
|
||||||
# Write-Output "No matches found."
|
|
||||||
# }
|
|
||||||
|
|
||||||
if ($charactersArray.Count -ge 2)
|
|
||||||
{
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ($line -match "/D ")
|
|
||||||
{
|
|
||||||
$found = $true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
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
|
||||||
|
@ -1,19 +1,3 @@
|
|||||||
function Invoke-MicroWin-Helper {
|
|
||||||
<#
|
|
||||||
|
|
||||||
.SYNOPSIS
|
|
||||||
checking unit tests
|
|
||||||
|
|
||||||
.PARAMETER Name
|
|
||||||
no parameters
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
placeholder
|
|
||||||
|
|
||||||
#>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Test-CompatibleImage() {
|
function Test-CompatibleImage() {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
@ -287,19 +287,37 @@ Add-Type @"
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# need to experiemnt more
|
|
||||||
# setting icon for the windows is still not working
|
# Using a TaskbarItem Overlay until someone figures out how to replace the icon correctly
|
||||||
# $pngUrl = "https://christitus.com/images/logo-full.png"
|
|
||||||
# $pngPath = "$env:TEMP\cttlogo.png"
|
# URL of the image
|
||||||
# $iconPath = "$env:TEMP\cttlogo.ico"
|
$imageUrl = "https://christitus.com/images/logo-full.png"
|
||||||
# # Download the PNG file
|
|
||||||
# Invoke-WebRequest -Uri $pngUrl -OutFile $pngPath
|
# Download the image
|
||||||
# if (Test-Path -Path $pngPath) {
|
$imagePath = "$env:TEMP\logo-full.png"
|
||||||
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $iconPath
|
Invoke-WebRequest -Uri $imageUrl -OutFile $imagePath
|
||||||
# }
|
|
||||||
# $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath)
|
# Read the image file as a byte array
|
||||||
# Write-Host $icon.Handle
|
$imageBytes = [System.IO.File]::ReadAllBytes($imagePath)
|
||||||
# [Window]::SendMessage($windowHandle, 0x80, [IntPtr]::Zero, $icon.Handle)
|
|
||||||
|
# Convert the byte array to a Base64 string
|
||||||
|
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
||||||
|
|
||||||
|
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
||||||
|
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
||||||
|
$bitmap.BeginInit()
|
||||||
|
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
||||||
|
$bitmap.EndInit()
|
||||||
|
$bitmap.Freeze()
|
||||||
|
|
||||||
|
# Ensure TaskbarItemInfo is created if not already
|
||||||
|
if (-not $sync["Form"].TaskbarItemInfo) {
|
||||||
|
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the overlay icon for the taskbar
|
||||||
|
$sync["Form"].TaskbarItemInfo.Overlay = $bitmap
|
||||||
|
|
||||||
|
|
||||||
$rect = New-Object RECT
|
$rect = New-Object RECT
|
||||||
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
||||||
|
1144
winutil.ps1
1144
winutil.ps1
File diff suppressed because it is too large
Load Diff
@ -571,6 +571,18 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition Binding="{Binding Path=ComputedHorizontalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
<Condition Binding="{Binding Path=ComputedVerticalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</MultiDataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -701,18 +713,20 @@
|
|||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
||||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||||
<Button Name="WPFuninstall" Content=" Uninstall Selection" Margin="2"/>
|
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||||
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
{{InstallPanel_applications}}
|
{{InstallPanel_applications}}
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
||||||
|
Reference in New Issue
Block a user