mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-07 05:33:51 -05:00
Compare commits
7 Commits
24.06.28
...
48d94ed981
Author | SHA1 | Date | |
---|---|---|---|
48d94ed981 | |||
b88c7f0cc4 | |||
69547f13ce | |||
f81528b5b8 | |||
81e1346251 | |||
b97e5b06c1 | |||
dddc1cac14 |
@ -103,11 +103,5 @@ 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){
|
||||||
try {
|
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
||||||
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,6 +1295,14 @@
|
|||||||
"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",
|
||||||
@ -1871,7 +1879,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",
|
||||||
@ -1999,7 +2007,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",
|
||||||
@ -2823,7 +2831,6 @@
|
|||||||
"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",
|
||||||
@ -2831,21 +2838,5 @@
|
|||||||
"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,15 +2323,17 @@
|
|||||||
},
|
},
|
||||||
"WPFTweaksRemoveEdge": {
|
"WPFTweaksRemoveEdge": {
|
||||||
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
||||||
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: AveYo",
|
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
||||||
"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": [
|
||||||
@ -2387,12 +2389,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": "z__Advanced Tweaks - CAUTION",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a026_",
|
"Order": "a0015_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"Kill LMS\"
|
Write-Host \"Kill OneDrive process\"
|
||||||
$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;
|
||||||
@ -2436,7 +2438,8 @@
|
|||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
Write-Host \"LMS vPro needs to be redownloaded from intel.com\"
|
Write-Host \"Install Microsoft Edge\"
|
||||||
|
taskkill.exe /F /IM \"OneDrive.exe\"
|
||||||
|
|
||||||
"
|
"
|
||||||
]
|
]
|
||||||
|
@ -27,6 +27,60 @@ 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,3 +1,19 @@
|
|||||||
|
function Invoke-MicroWin-Helper {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
checking unit tests
|
||||||
|
|
||||||
|
.PARAMETER Name
|
||||||
|
no parameters
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
placeholder
|
||||||
|
|
||||||
|
#>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function Test-CompatibleImage() {
|
function Test-CompatibleImage() {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
@ -287,37 +287,19 @@ Add-Type @"
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# need to experiemnt more
|
||||||
# Using a TaskbarItem Overlay until someone figures out how to replace the icon correctly
|
# setting icon for the windows is still not working
|
||||||
|
# $pngUrl = "https://christitus.com/images/logo-full.png"
|
||||||
# URL of the image
|
# $pngPath = "$env:TEMP\cttlogo.png"
|
||||||
$imageUrl = "https://christitus.com/images/logo-full.png"
|
# $iconPath = "$env:TEMP\cttlogo.ico"
|
||||||
|
# # Download the PNG file
|
||||||
# Download the image
|
# Invoke-WebRequest -Uri $pngUrl -OutFile $pngPath
|
||||||
$imagePath = "$env:TEMP\logo-full.png"
|
# if (Test-Path -Path $pngPath) {
|
||||||
Invoke-WebRequest -Uri $imageUrl -OutFile $imagePath
|
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $iconPath
|
||||||
|
# }
|
||||||
# Read the image file as a byte array
|
# $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath)
|
||||||
$imageBytes = [System.IO.File]::ReadAllBytes($imagePath)
|
# Write-Host $icon.Handle
|
||||||
|
# [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,18 +571,6 @@
|
|||||||
</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>
|
||||||
@ -713,20 +701,18 @@
|
|||||||
<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 Selected" Margin="2"/>
|
<Button Name="WPFuninstall" Content=" Uninstall Selection" 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 x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<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