2023-07-27 16:06:41 -05:00
|
|
|
# SPDX-License-Identifier: MIT
|
2023-10-19 17:12:55 -05:00
|
|
|
# Set the maximum number of threads for the RunspacePool to the number of threads on the machine
|
2023-05-09 13:14:27 -05:00
|
|
|
$maxthreads = [int]$env:NUMBER_OF_PROCESSORS
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Create a new session state for parsing variables into our runspace
|
2023-05-09 13:14:27 -05:00
|
|
|
$hashVars = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'sync',$sync,$Null
|
|
|
|
$InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault()
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Add the variable to the session state
|
2023-05-09 13:14:27 -05:00
|
|
|
$InitialSessionState.Variables.Add($hashVars)
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Get every private function and add them to the session state
|
2024-06-28 17:02:32 -05:00
|
|
|
$functions = (Get-ChildItem function:\).where{$_.name -like "*winutil*" -or $_.name -like "*WPF*"}
|
2024-08-06 15:35:17 -05:00
|
|
|
foreach ($function in $functions) {
|
2023-05-09 13:14:27 -05:00
|
|
|
$functionDefinition = Get-Content function:\$($function.name)
|
|
|
|
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
2023-10-19 17:12:55 -05:00
|
|
|
|
2023-05-09 13:14:27 -05:00
|
|
|
$initialSessionState.Commands.Add($functionEntry)
|
|
|
|
}
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Create the runspace pool
|
|
|
|
$sync.runspace = [runspacefactory]::CreateRunspacePool(
|
|
|
|
1, # Minimum thread count
|
|
|
|
$maxthreads, # Maximum thread count
|
|
|
|
$InitialSessionState, # Initial session state
|
|
|
|
$Host # Machine to create runspaces on
|
|
|
|
)
|
2023-05-09 13:14:27 -05:00
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Open the RunspacePool instance
|
2023-05-09 13:14:27 -05:00
|
|
|
$sync.runspace.Open()
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Create classes for different exceptions
|
2023-03-07 14:28:00 -06:00
|
|
|
|
|
|
|
class WingetFailedInstall : Exception {
|
2024-09-09 20:05:10 -05:00
|
|
|
[string]$additionalData
|
2023-03-07 14:28:00 -06:00
|
|
|
|
|
|
|
WingetFailedInstall($Message) : base($Message) {}
|
|
|
|
}
|
2023-10-19 17:12:55 -05:00
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
class ChocoFailedInstall : Exception {
|
2024-09-09 20:05:10 -05:00
|
|
|
[string]$additionalData
|
2023-03-07 14:28:00 -06:00
|
|
|
|
|
|
|
ChocoFailedInstall($Message) : base($Message) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class GenericException : Exception {
|
2024-09-09 20:05:10 -05:00
|
|
|
[string]$additionalData
|
2023-03-07 14:28:00 -06:00
|
|
|
|
|
|
|
GenericException($Message) : base($Message) {}
|
|
|
|
}
|
2023-10-19 17:12:55 -05:00
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
|
|
|
|
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
2023-07-27 16:06:41 -05:00
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
|
|
|
[xml]$XAML = $inputXML
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Read the XAML file
|
2024-08-28 11:08:39 -05:00
|
|
|
$readerOperationSuccessful = $false # There's more cases of failure then success.
|
2023-03-07 14:28:00 -06:00
|
|
|
$reader = (New-Object System.Xml.XmlNodeReader $xaml)
|
2024-07-08 14:59:58 -05:00
|
|
|
try {
|
|
|
|
$sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader )
|
2024-08-28 11:08:39 -05:00
|
|
|
$readerOperationSuccessful = $true
|
2024-07-08 14:59:58 -05:00
|
|
|
} catch [System.Management.Automation.MethodInvocationException] {
|
2024-08-28 16:55:40 -05:00
|
|
|
Write-Host "We ran into a problem with the XAML code. Check the syntax for this control..." -ForegroundColor Red
|
2023-03-07 14:28:00 -06:00
|
|
|
Write-Host $error[0].Exception.Message -ForegroundColor Red
|
2024-07-08 14:59:58 -05:00
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
If ($error[0].Exception.Message -like "*button*") {
|
2024-08-28 16:55:40 -05:00
|
|
|
write-Host "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n" -ForegroundColor Red
|
2023-03-07 14:28:00 -06:00
|
|
|
}
|
2024-07-08 14:59:58 -05:00
|
|
|
} catch {
|
2024-08-28 16:55:40 -05:00
|
|
|
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed." -ForegroundColor Red
|
2023-03-07 14:28:00 -06:00
|
|
|
}
|
|
|
|
|
2024-08-28 11:08:39 -05:00
|
|
|
if (-NOT ($readerOperationSuccessful)) {
|
|
|
|
Write-Host "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method." -ForegroundColor Red
|
|
|
|
Write-Host "Quitting winutil..." -ForegroundColor Red
|
|
|
|
$sync.runspace.Dispose()
|
|
|
|
$sync.runspace.Close()
|
|
|
|
[System.GC]::Collect()
|
|
|
|
exit 1
|
|
|
|
}
|
2024-09-21 10:01:02 -05:00
|
|
|
|
|
|
|
# Setup the Window to follow listen for windows Theme Change events and update the winutil theme
|
|
|
|
# throttle logic needed, because windows seems to send more than one theme change event per change
|
|
|
|
$lastThemeChangeTime = [datetime]::MinValue
|
|
|
|
$debounceInterval = [timespan]::FromSeconds(2)
|
|
|
|
$sync.Form.Add_Loaded({
|
|
|
|
$interopHelper = New-Object System.Windows.Interop.WindowInteropHelper $sync.Form
|
|
|
|
$hwndSource = [System.Windows.Interop.HwndSource]::FromHwnd($interopHelper.Handle)
|
|
|
|
$hwndSource.AddHook({
|
|
|
|
param (
|
|
|
|
[System.IntPtr]$hwnd,
|
|
|
|
[int]$msg,
|
|
|
|
[System.IntPtr]$wParam,
|
|
|
|
[System.IntPtr]$lParam,
|
|
|
|
[ref]$handled
|
|
|
|
)
|
|
|
|
# Check for the Event WM_SETTINGCHANGE (0x1001A) and validate that Button shows the icon for "Auto" => [char]0xF08C
|
|
|
|
if (($msg -eq 0x001A) -and $sync.ThemeButton.Content -eq [char]0xF08C) {
|
|
|
|
$currentTime = [datetime]::Now
|
|
|
|
if ($currentTime - $lastThemeChangeTime -gt $debounceInterval) {
|
|
|
|
Invoke-WinutilThemeChange -theme "Auto"
|
|
|
|
$script:lastThemeChangeTime = $currentTime
|
|
|
|
$handled = $true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
2024-09-20 08:34:10 -05:00
|
|
|
Invoke-WinutilThemeChange -init $true
|
2024-08-28 16:55:40 -05:00
|
|
|
# Load the configuration files
|
2024-09-27 15:54:07 -05:00
|
|
|
|
2024-09-27 17:21:22 -05:00
|
|
|
$noimage = "https://images.emojiterra.com/google/noto-emoji/unicode-15/color/512px/1f4e6.png"
|
|
|
|
$noimage = [Windows.Media.Imaging.BitmapImage]::new([Uri]::new($noimage))
|
2024-10-14 12:17:12 -05:00
|
|
|
|
|
|
|
$sync.configs.applicationsHashtable = @{}
|
|
|
|
$sync.configs.applications.PSObject.Properties | ForEach-Object {
|
|
|
|
$sync.configs.applicationsHashtable[$_.Name] = $_.Value
|
2024-09-27 15:54:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
# Now call the function with the final merged config
|
2024-09-28 06:40:38 -05:00
|
|
|
Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName "appscategory" -columncount 1
|
2024-10-14 12:17:12 -05:00
|
|
|
Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel"
|
2024-10-02 01:17:47 -05:00
|
|
|
|
2024-08-28 16:55:40 -05:00
|
|
|
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
|
|
|
|
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
|
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
#===========================================================================
|
|
|
|
# Store Form Objects In PowerShell
|
|
|
|
#===========================================================================
|
|
|
|
|
2023-05-09 13:14:27 -05:00
|
|
|
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
|
2023-03-07 14:28:00 -06:00
|
|
|
|
2024-09-10 13:02:22 -05:00
|
|
|
#Persist the Chocolatey preference across winutil restarts
|
2024-10-13 13:45:26 -05:00
|
|
|
$ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
|
|
|
$sync.ChocoRadioButton.Add_Checked({New-Item -Path $ChocoPreferencePath -Force })
|
|
|
|
$sync.ChocoRadioButton.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force})
|
|
|
|
if (Test-Path $ChocoPreferencePath) {
|
|
|
|
$sync.ChocoRadioButton.IsChecked = $true
|
|
|
|
}
|
2024-09-10 13:02:22 -05:00
|
|
|
|
2023-05-09 13:14:27 -05:00
|
|
|
$sync.keys | ForEach-Object {
|
2024-08-06 15:35:17 -05:00
|
|
|
if($sync.$psitem) {
|
|
|
|
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "ToggleButton") {
|
2023-11-28 16:11:11 -06:00
|
|
|
$sync["$psitem"].Add_Click({
|
|
|
|
[System.Object]$Sender = $args[0]
|
|
|
|
Invoke-WPFButton $Sender.name
|
|
|
|
})
|
|
|
|
}
|
2023-07-27 16:06:41 -05:00
|
|
|
|
2024-08-06 15:35:17 -05:00
|
|
|
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "Button") {
|
2023-07-27 16:06:41 -05:00
|
|
|
$sync["$psitem"].Add_Click({
|
|
|
|
[System.Object]$Sender = $args[0]
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
Invoke-WPFButton $Sender.name
|
2023-07-27 16:06:41 -05:00
|
|
|
})
|
|
|
|
}
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
|
|
|
|
if ($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "TextBlock") {
|
|
|
|
if ($sync["$psitem"].Name.EndsWith("Link")) {
|
|
|
|
$sync["$psitem"].Add_MouseUp({
|
|
|
|
[System.Object]$Sender = $args[0]
|
|
|
|
Start-Process $Sender.ToolTip -ErrorAction Stop
|
2024-01-15 11:32:19 -06:00
|
|
|
Write-Debug "Opening: $($Sender.ToolTip)"
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
})
|
|
|
|
}
|
2024-02-02 16:22:08 -06:00
|
|
|
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
}
|
2023-07-27 16:06:41 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
#===========================================================================
|
|
|
|
# Setup background config
|
|
|
|
#===========================================================================
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Load computer information in the background
|
2023-03-07 14:28:00 -06:00
|
|
|
Invoke-WPFRunspace -ScriptBlock {
|
2024-08-06 15:35:17 -05:00
|
|
|
try {
|
2024-06-25 14:10:16 -05:00
|
|
|
$oldProgressPreference = $ProgressPreference
|
|
|
|
$ProgressPreference = "SilentlyContinue"
|
|
|
|
$sync.ConfigLoaded = $False
|
|
|
|
$sync.ComputerInfo = Get-ComputerInfo
|
|
|
|
$sync.ConfigLoaded = $True
|
|
|
|
}
|
|
|
|
finally{
|
|
|
|
$ProgressPreference = "Continue"
|
|
|
|
}
|
2024-06-28 17:15:39 -05:00
|
|
|
|
2023-03-07 14:28:00 -06:00
|
|
|
} | Out-Null
|
|
|
|
|
|
|
|
#===========================================================================
|
2023-10-19 17:12:55 -05:00
|
|
|
# Setup and Show the Form
|
2023-03-07 14:28:00 -06:00
|
|
|
#===========================================================================
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Print the logo
|
2023-03-07 14:28:00 -06:00
|
|
|
Invoke-WPFFormVariables
|
|
|
|
|
2024-07-25 16:19:45 -05:00
|
|
|
# Progress bar in taskbaritem > Set-WinUtilProgressbar
|
|
|
|
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
|
|
|
|
Set-WinUtilTaskbaritem -state "None"
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
# Set the titlebar
|
2023-05-09 13:14:27 -05:00
|
|
|
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
2023-10-19 17:12:55 -05:00
|
|
|
# Set the commands that will run when the form is closed
|
2023-05-09 13:14:27 -05:00
|
|
|
$sync["Form"].Add_Closing({
|
|
|
|
$sync.runspace.Dispose()
|
|
|
|
$sync.runspace.Close()
|
|
|
|
[System.GC]::Collect()
|
|
|
|
})
|
|
|
|
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
# Attach the event handler to the Click event
|
2024-07-08 14:59:58 -05:00
|
|
|
$sync.SearchBarClearButton.Add_Click({
|
|
|
|
$sync.SearchBar.Text = ""
|
|
|
|
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
})
|
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
# add some shortcuts for people that don't like clicking
|
|
|
|
$commonKeyEvents = {
|
|
|
|
if ($sync.ProcessRunning -eq $true) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-08-06 15:35:17 -05:00
|
|
|
if ($_.Key -eq "Escape") {
|
2024-07-08 14:59:58 -05:00
|
|
|
$sync.SearchBar.SelectAll()
|
|
|
|
$sync.SearchBar.Text = ""
|
|
|
|
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
return
|
2023-11-28 16:11:11 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
# don't ask, I know what I'm doing, just go...
|
2024-08-06 15:35:17 -05:00
|
|
|
if (($_.Key -eq "Q" -and $_.KeyboardDevice.Modifiers -eq "Ctrl")) {
|
2023-11-28 16:11:11 -06:00
|
|
|
$this.Close()
|
|
|
|
}
|
|
|
|
if ($_.KeyboardDevice.Modifiers -eq "Alt") {
|
|
|
|
if ($_.SystemKey -eq "I") {
|
|
|
|
Invoke-WPFButton "WPFTab1BT"
|
|
|
|
}
|
|
|
|
if ($_.SystemKey -eq "T") {
|
|
|
|
Invoke-WPFButton "WPFTab2BT"
|
|
|
|
}
|
|
|
|
if ($_.SystemKey -eq "C") {
|
|
|
|
Invoke-WPFButton "WPFTab3BT"
|
|
|
|
}
|
|
|
|
if ($_.SystemKey -eq "U") {
|
|
|
|
Invoke-WPFButton "WPFTab4BT"
|
|
|
|
}
|
|
|
|
if ($_.SystemKey -eq "M") {
|
|
|
|
Invoke-WPFButton "WPFTab5BT"
|
|
|
|
}
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
if ($_.SystemKey -eq "P") {
|
|
|
|
Write-Host "Your Windows Product Key: $((Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey)"
|
|
|
|
}
|
2023-11-28 16:11:11 -06:00
|
|
|
}
|
|
|
|
# shortcut for the filter box
|
|
|
|
if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") {
|
2024-07-08 14:59:58 -05:00
|
|
|
if ($sync.SearchBar.Text -eq "Ctrl-F to filter") {
|
|
|
|
$sync.SearchBar.SelectAll()
|
|
|
|
$sync.SearchBar.Text = ""
|
2023-11-28 16:11:11 -06:00
|
|
|
}
|
2024-07-08 14:59:58 -05:00
|
|
|
$sync.SearchBar.Focus()
|
2023-11-28 16:11:11 -06:00
|
|
|
}
|
|
|
|
}
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
$sync["Form"].Add_PreViewKeyDown($commonKeyEvents)
|
|
|
|
|
|
|
|
$sync["Form"].Add_MouseLeftButtonDown({
|
2024-09-20 08:34:10 -05:00
|
|
|
# Hide Settings and Theme Popup on click anywhere else
|
|
|
|
if ($sync.SettingsButton.IsOpen -or
|
2024-09-20 09:03:18 -05:00
|
|
|
$sync.ThemePopup.IsOpen) {
|
2024-09-20 08:34:10 -05:00
|
|
|
$sync.SettingsPopup.IsOpen = $false
|
|
|
|
$sync.ThemePopup.IsOpen = $false
|
|
|
|
}
|
2023-11-28 16:11:11 -06:00
|
|
|
$sync["Form"].DragMove()
|
|
|
|
})
|
|
|
|
|
Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
$sync["Form"].Add_MouseDoubleClick({
|
2024-09-20 08:32:41 -05:00
|
|
|
if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or
|
|
|
|
$_.OriginalSource -is [System.Windows.Controls.StackPanel]) {
|
2024-09-20 09:03:18 -05:00
|
|
|
if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal) {
|
2024-09-20 08:32:41 -05:00
|
|
|
$sync["Form"].WindowState = [Windows.WindowState]::Maximized
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$sync["Form"].WindowState = [Windows.WindowState]::Normal
|
|
|
|
}
|
Test 2023 12 19 (#1294)
* Compile Winutil
* Issue #1283, #1280 fixes, more (#1288)
* Explorer Fix
* Wifi, Explorer Crash, WinUtil Icon fixes. First attempt at white theme
* White theme
* Fix for clashing microwin directories if process fails, now new directory will be generated
* * Tested latest Windows 10 (22H2) images work fine
* Made dialog box more clear for issue #1283
* Added better logic for handling takeown /D flag for different locals issue #1280
* Refreshed the UI to more modern look
* Improved white theme
* Regrouped Tweak tab to make more sense
* Advanced tweaks were in a separate column but the button applied both Essential and advanced now they are in the same column and button applies both
* All instant action buttons were moved to Customize preferences column
* Explorer lockup Fix
* Wifi, Explorer Crash, WinUtil Icon fixes.
* Fix for clashing microwin directories if process fails, now new directory will be generated
* Merge all
* Theme improvement, adding icon to the shortcut
* Ability to download oscdimg from github, reorginizing Apps to fit better on more (smaller screens)
* Fixing release branch to WinUtil
* Adding double click to fullscreen
* Update Get-Oscdimg.ps1
---------
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Update winutil.ps1
* remove merc and thorium
* Ashlyn Programs
* Also inject drivers into boot.wim
* copy #1291
new branch
---------
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Cedric Lewe <0skillallluck@pm.me>
2023-12-19 13:55:55 -06:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2024-01-15 11:32:19 -06:00
|
|
|
$sync["Form"].Add_Deactivated({
|
|
|
|
Write-Debug "WinUtil lost focus"
|
2024-09-20 08:34:10 -05:00
|
|
|
# Hide Settings and Theme Popup on Winutil Focus Loss
|
|
|
|
if ($sync.SettingsButton.IsOpen -or
|
2024-09-20 09:03:18 -05:00
|
|
|
$sync.ThemePopup.IsOpen) {
|
2024-09-20 08:34:10 -05:00
|
|
|
$sync.SettingsPopup.IsOpen = $false
|
|
|
|
$sync.ThemePopup.IsOpen = $false
|
2023-11-28 16:11:11 -06:00
|
|
|
}
|
2024-01-15 11:32:19 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
$sync["Form"].Add_ContentRendered({
|
2023-11-28 16:11:11 -06:00
|
|
|
|
2024-02-02 16:22:08 -06:00
|
|
|
try {
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
[void][Window]
|
|
|
|
} catch {
|
2024-01-15 11:32:19 -06:00
|
|
|
Add-Type @"
|
2023-11-28 16:11:11 -06:00
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
public class Window {
|
2024-01-15 11:32:19 -06:00
|
|
|
[DllImport("user32.dll")]
|
|
|
|
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
[DllImport("user32.dll")]
|
|
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
|
|
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
|
2024-02-02 16:22:08 -06:00
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
[DllImport("user32.dll")]
|
|
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
|
|
public static extern bool MoveWindow(IntPtr handle, int x, int y, int width, int height, bool redraw);
|
2024-02-02 16:22:08 -06:00
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
[DllImport("user32.dll")]
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
public static extern int GetSystemMetrics(int nIndex);
|
2024-01-15 11:32:19 -06:00
|
|
|
};
|
2023-11-28 16:11:11 -06:00
|
|
|
public struct RECT {
|
|
|
|
public int Left; // x position of upper-left corner
|
|
|
|
public int Top; // y position of upper-left corner
|
|
|
|
public int Right; // x position of lower-right corner
|
|
|
|
public int Bottom; // y position of lower-right corner
|
|
|
|
}
|
|
|
|
"@
|
|
|
|
}
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
|
2024-06-28 17:02:32 -05:00
|
|
|
foreach ($proc in (Get-Process).where{ $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" }) {
|
Test 2024 04 20 2 (#2030)
* Several Additions to 'applications.json' File (#1865)
* Add 'ditto' App to 'applications.json' File
* Add 'rdcman' App to 'applications.json' File
* Add 'mp3tag' App to 'applications.json' File
* Add 'fan control' App to 'applications.json' File
* Compile Winutil
* Add 'betterbird' App to 'applications.json' File (#1876)
* Compile Winutil
* Added fnm to the install menu (#1879)
* Compile Winutil
* Update applications.json (#1883)
* Compile Winutil
* Simple improvement: make WinUtil's Shortcut Function Do Less (Lazier) (#1903)
* Add Extra Comments to 'Invoke-WPFShortcut' to make the Logic a Bit Clearer
* Make The 'Invoke-WPFShortcut' Function Lazier for Added Efficiency and to not Display False Info whenever the User Cancels the 'Save As' Operation
* Compile Winutil
* Update applications.jsonremove Whatsapp because it is not being maintained and is named "outdated" when installed
* Update applications.json
remove Whatsapp because it is not being maintained and is named "outdated" when installed
* Compile Winutil
* Add option to remove Microsoft Copilot AI
* Add option to remove MS Copilot
* Update tweaks.json
* fix bugs
- remove appx caused a lockup
- also it looks like copilot will be the dependency for some built-in windows searches
Due to this I am changing it from a removal to a disable.
* Compile Winutil
* remove authy authy reached EOLhttps://help.twilio.com/articles/22771146070299-User-guide-End-of-Life-EOL-for-Twilio-Authy-Desktop-app
* remove authy
authy reached EOL
https://help.twilio.com/articles/22771146070299-User-guide-End-of-Life-EOL-for-Twilio-Authy-Desktop-app
* Compile Winutil
* Update applications.jsonWindhawkThe customization marketplace for Windows programshttps://www.youtube.com/watch?v=ijG0nXnO2gQ
* Update applications.json
Windhawk
The customization marketplace for Windows programs
https://www.youtube.com/watch?v=ijG0nXnO2gQ
* add MSEdgeRedirect to applications.jsonperhaps a good "tweak" that could be added to Tweaks section down the road. project is foss... could be a good resource for someone with enough skills.in the meantime, does what it says it will, and does it well.
* add MSEdgeRedirect to applications.json
perhaps a good "tweak" that could be added to Tweaks section down the road. project is foss... could be a good resource for someone with enough skills.
in the meantime, does what it says it will, and does it well.
* Fix Winget Detection by doing Proper Error Handling using a Try-Catch
* Fix Winget Detection by doing Proper Error Handling using a Try-Catch
* Remove unnecessary Variable Initialization of 'wingetFullVersion'
Co-authored-by: Martin Wiethan <47688561+Marterich@users.noreply.github.com>
* Add Comments to be make The Logic a Lot More Clear to Follow and Understand
* Add Another Catch Statement with some 'Write-Warning' for Extra Information
* Remove StartAllBack + Adobe Debloater Tweak + Add Netbird
* remove StartAllBack
* Added Adobe Service Debloater
Sets Adobe Services to manual for people that sadly need to work with their apps.
* Add Netbird
https://netbird.io
* Compile Winutil
* Update applications.json
* Compile Winutil
* Added ability to import drivers
* Added ability to import drivers
Added the ability to import drivers from the active installation to the MicroWin image.
* Merge branch 'test-2024-04-20-2' into CW-MicroWin-240420
* Update inputXML.xaml
Removed warning because of a fluke
* Update Invoke-WPFMicrowin.ps1
Use the driver injection directory if it is specified and if the directory exists
* Merge branch 'test-2024-04-20-2' into CW-MicroWin-240420
* Merge branch 'test-2024-04-20-2' into CW-MicroWin-240420
* Compile Winutil
* Test 2024 04 20 2 | 7 additions to applications.json
* 7 additions to applications.json
Adds:
NetLimiter - https://www.netlimiter.com
OneCommander - https://www.onecommander.com
Borderless Gaming - https://github.com/Codeusa/Borderless-Gaming
Equalizer APO - https://sourceforge.net/projects/equalizerapo
FreeFileSync - https://freefilesync.org
Elgato Stream Deck - https://www.elgato.com/uk/en/s/downloads
Stardock Curtains - https://www.stardock.com/products/curtains
* Added Compact GUI support
Link: https://github.com/IridiumIO/CompactGUI
Since I wasn't sure what category to put it in, I chose Utilities.
* Added ExifCleaner support
Link: https://github.com/szTheory/exifcleaner
* Removed trial ware additions
Removed:
Net Limiter
One Commander
Elgato: Stream Deck
Stardock Curtains
* Compile Winutil
* add GlazeWM to applications.js (#1891)
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Remove old Win7 game tweak
* Compile Winutil
* Test 1715290913 fix ugly ifs (#1957)
* fix nested ifs
* Compile Winutil
* fix syntax
* Compile Winutil
* Add Spotify and Choco Fallback
* Compile Winutil
---------
Co-authored-by: ty802 <ty802@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
* Compile Winutil
* Fix incorrect url for jellyfin-media-player (#1912)
* Compile Winutil
* Update name and description for Element (#1930)
- Fixed the name and description for Element to reflect the name of the client, rather than the underlying technology-Matrix.
* Compile Winutil
* Optimize winget download speed (#1931)
* Optimize Winget Download Speed
* Add Downloading Message
* Compile Winutil
* Include OOSU Config in winutil.ps1 (#1932)
* Compile Winutil
* Only install choco if needed (#1943)
* Compile Winutil
* Install Choco if needed
* Compile Winutil
* Added ForceAutoHDR application to applications.json (#1951)
* Added ForceAutoHDR application to applications.json
Entry added on line 2642
* Update config/applications.json
Yep my bad I though games related tools should be under "Games"
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
---------
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
* Compile Winutil
* add Godot Engine to applications.json (#1933)
Added Godot Engine (https://godotengine.org/).
Godot Engine is a free, open-source 2D and 3D game engine with a focus on usability and flexibility.
* Compile Winutil
* Add GitKraken Client (#1927)
Adds development utility client for git repository management
* Compile Winutil
* Simplified Admin Check and Added Code Comments (#1938)
- Simplified the admin check by filtering the "WindowsIdentity" class for owner value and comparing against admin value
- Removed the need for an if admin check by moving its commands under the if not admin check.
- Added code comments
* Compile Winutil
* Main window handle (#1941)
Condition is comparing $proc.Id with [System.IntPtr]::Zero. The Id property is an integer, representing the process ID, and it's not directly related to window handles.
Instead, you should compare the MainWindowHandle property against [System.IntPtr]::Zero
* Compile Winutil
* Add SMPlayer to `applications.json` (#1948)
* Add SMPlayer to `applications.json`
* Fix formatting
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Adobe Network Blocking / Adobe Debloater / Tweak Fixes & more (#1954)
* Added Applications
AFFiNE: Open source Notion alternative with selfhostable option for syncing.
Wazuh Agent: Adgent for open-source security monitoring platform
* Change layout of toggles
Change the layout of the toggles to first show toggles and then the content (text).
- testet, works
* added snap related toggles
- disable snapping entirely (requires relogin of windows user)
- disable suggestion to snap other windows next to the snapped window
-tested
* Layouted Checkboxes, redesigned Toggles & renamed RDCMan
- Removed text inside toggle as it can be confusing because it sais "enable" while enabled and "disable" if disabled. The coloring should be enough to know in what state that setting is.
- without the text i could make it a little bit smaller while still letting it look good.
- Renamed "Remote Desktop Connection Manager (RDCMan)" to "RDCMan" because that name is shorter and also mostly used by the linked site.
- layouted checkboxes so they are not more left than the title and look tidy.
- tested
* Disable Acrobat auto-updates
- added script & undoscript to disable automatic downloads & installation of acrobat reader. The user gets a notified if there is an update available. I put some info to that inside the code
* edited AFFiNE description
* Tweak Adobe Debloater
-disable Adobe Desktop Service by getting ownership and renaming it.
- added AGMService service
- disable AGMService and AGSService entirely
* Block Adobe Network, Debloat Adobe & Compile
- fixes order of tweaks to always run "WPFTweaksRestorePoint" first. Before it was only the case because if was one of the first letter0s of the alphabet
- Fixed some stuff at Debloat Adobe & added Adobe Reader update stopper & "deactivated" Adobe Desktop Service.
- Added Blocking of Adobe Servers (as of your suggestion) to it's own Tweak.
- ran compile for testing & showing
* undo compilation
* added Note to AcrobatUpdates Management in Tweak "Debloat Adobe"
* Fix Right Click Method to use accurate names
* fixed my mistake in README
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Install flow rework (#1961)
* Install flow rework
Sperated Winget and Chocolatey setps when installing software add skip them when not needed
* fix uninstall
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Made disabling Fullscreen optimizations its own tweak (#1934)
* Removed "GameDVR_DXGIHonorFSEWindowsCompatible" modification from "Disable GameDVR" tweak
* Created advanced tweak "Disable fullscreen optimizations"
Disables fullscreen optimizations in all applications. (Which can cause problems with Color Management in Exclusive Fullscreen)
* Compile Winutil
* fix glaze
* Compile Winutil
* Fix Typo in the App Entry 'GlazeWM' in 'applications.json' File (#1958)
* Reorder Tweaks
* Fix ordering of Advanced Tweaks
* Compile Winutil
* Preset Update
* Organize Tweaks
* Compile Winutil
* Add the pixi package manager
* Add the pixi package manager
* Compile Winutil
* Add Arc Browser to the application list.
* Add Arc Browser to the application list.
* Compile Winutil
* Update applications.json - Added NDI toolsNDI, or Network Device Interface, is developed by Newtek. It enables the encoding, transmission, and reception of high-quality, low latency, video and audio over IP.https://ndi.video/Apologies if I'm not doing this right. I have zero experience using Github.
* Update applications.json - Added NDI tools
NDI, or Network Device Interface, is developed by Newtek. It enables the encoding, transmission, and reception of high-quality, low latency, video and audio over IP.
https://ndi.video/
Apologies if I'm not doing this right. I have zero experience using Github.
* Compile Winutil
* docs: minor spellchecking
* docs: minor spellchecking
* Fix scratch textbox bug
* Fix scratch textbox bug
* Fixing Microwin, no more errors and it creats image now without issues
* Compile Winutil
* Tweaks page overhaul:
* Toggle page overhaul:
* Modern toggles
+ Tweak: Disable Copilot
+ Tweak: Set hibernation to default (fix issue
https://github.com/ChrisTitusTech/winutil/issues/1399)
* Merge branch 'test-2024-04-20-2' into TweaksToggles
* Compile Winutil
* Able to set the Default Terminal to Powershell 7 in Windows Terminal
* Run winget in open powershell window if possible and handle update
* add return code reference
* Seperated Logic for PS7 Profile change
* Add tweak
* Revert changes to last commit in Christitus Repo
* Merge pull request #1 from Marterich/PS7profile
Split Logic in different Script, Re-Add files with to reflect Chris's Repo
* Compile Winutil
* Update tweaks.json
* Compile Winutil
* Update tweaks.json
* Compile Winutil
* disables to disable
* Compile Winutil
* Update applications.json - Files, ditto, spotube, sagethumbs added & file converter choco variable fixed (#1996)
Added Files, ditto, spotube and sagethumbs.
Fixed File Converted by Adrien Allard with proper Choco variable.
"files">"file-conveter"
"WPFInstallfileconverter": {
"category": "Utilities",
"choco": "file-converter",
"content": "File-Converter",
"description": "File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in windows explorer.",
"link": "https://file-converter.io/",
"winget": "AdrienAllard.FileConverter"
* Compile Winutil
* Winget install return code handling & Window management (#1992)
* Run winget in open powershell window if possible and handle update
* add return code reference
* Compile Winutil
* Fix typo (#1965)
Co-authored-by: Chris Titus <contact@christitus.com>
* Change voicemeeter URL to their newer site (#1967)
* Compile Winutil
* Change voicemeeter URL to newest site
* Compile Winutil
---------
Co-authored-by: Yuuh15 <Yuuh15@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Removed broken winget from applications.json (#1968)
The winget does not work for vencord. The installer downloads and then fails. (#1515)
* Compile Winutil
* Optimize Display Behaviour of Category Labels (#1979)
* Hide Category title if empty
* Changed labels to a hashtable for faster access
* Extract WPFNamecreation to function, fix hide all if none match
* Compile Winutil
* ps1 ext add
* Update oosu10 config files and ad missing fileextension (#1980)
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Fix fallback bug and merge choco uninstall rework (#1962)
* Implement Uninstall Command for Chocolatey, and Made a Starting Point on the Automatic Upgrade when a Package is Already Installed, similar to WinGet Install Command
* Add Extra Guards/Checks in 'Install-WinUtilProgramChoco' Private Function
* Fix fallback bug and merge choco uninstall rework
- fixed return from wrong return from winget install
Install-WinUtilProgramWinget
- syntax/wording cleenup in Install-WinUtilProgramWinget
- fix bugs in ty802/winutil#1 after merge
---------
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* Update applications.json (#1976)
added qgis in right format
Co-authored-by: Chris Titus <contact@christitus.com>
* Compile Winutil
* fix sagethumbs error
* Compile Winutil
---------
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: Melloni <66322451+MelloniDev@users.noreply.github.com>
Co-authored-by: Justawildwolf <62820836+blusewill@users.noreply.github.com>
Co-authored-by: MyDrift <personal@mdiana.ch>
Co-authored-by: ModernTTY <165050080+ModernTTY@users.noreply.github.com>
Co-authored-by: Kasim <kasim@rafique.co.uk>
Co-authored-by: trenton4k <trenton4k@gmail.com>
Co-authored-by: Evan Galvin <evan.galvin@blissroms.org>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: misspent <78914154+misspent@users.noreply.github.com>
Co-authored-by: Federico Pulcino <78621373+FedeP14@users.noreply.github.com>
Co-authored-by: kian yamamoto <kiany@thatnameisnotavailable.com>
Co-authored-by: ty802 <ty802@users.noreply.github.com>
Co-authored-by: Callum Carmicheal <callumcarmicheal@gmail.com>
Co-authored-by: Rux <jonathan.e.rux@ruxunderscore.com>
Co-authored-by: Martin Wiethan <47688561+Marterich@users.noreply.github.com>
Co-authored-by: Andrew <121936658+7gxycn08@users.noreply.github.com>
Co-authored-by: Jelle <89023848+mrjbongo@users.noreply.github.com>
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
Co-authored-by: Hayden Plumley <mrhaydendp@gmail.com>
Co-authored-by: Berrick Werkman <105836264+BKlaasWerkman@users.noreply.github.com>
Co-authored-by: o-iu <168581616+o-iu@users.noreply.github.com>
Co-authored-by: Luadih <50816896+Luadih@users.noreply.github.com>
Co-authored-by: Morten Enemark Lund <melund@gmail.com>
Co-authored-by: Pleș Alexandru <34649178+plesalex100@users.noreply.github.com>
Co-authored-by: tvrepairguy <170785918+tvrepairguy@users.noreply.github.com>
Co-authored-by: LazyStability <Klysmus@online.de>
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: drabspirit <39843622+drabspirit@users.noreply.github.com>
Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com>
Co-authored-by: Yuuh15 <Yuuh15@users.noreply.github.com>
Co-authored-by: Owen <78411938+Owen-3456@users.noreply.github.com>
Co-authored-by: Snoep <128747388+SnoepNFTs@users.noreply.github.com>
2024-06-04 22:27:27 -05:00
|
|
|
# Check if the process's MainWindowHandle is valid
|
2024-08-06 15:35:17 -05:00
|
|
|
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
2024-01-15 11:32:19 -06:00
|
|
|
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
|
|
|
$windowHandle = $proc.MainWindowHandle
|
2024-08-06 15:35:17 -05:00
|
|
|
} else {
|
|
|
|
Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)"
|
2024-06-28 17:15:39 -05:00
|
|
|
|
2024-01-15 11:32:19 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
$rect = New-Object RECT
|
2024-01-15 11:32:19 -06:00
|
|
|
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
2023-11-28 16:11:11 -06:00
|
|
|
$width = $rect.Right - $rect.Left
|
|
|
|
$height = $rect.Bottom - $rect.Top
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
|
|
|
|
Write-Debug "UpperLeft:$($rect.Left),$($rect.Top) LowerBottom:$($rect.Right),$($rect.Bottom). Width:$($width) Height:$($height)"
|
|
|
|
|
|
|
|
# Load the Windows Forms assembly
|
|
|
|
Add-Type -AssemblyName System.Windows.Forms
|
|
|
|
$primaryScreen = [System.Windows.Forms.Screen]::PrimaryScreen
|
|
|
|
# Check if the primary screen is found
|
|
|
|
if ($primaryScreen) {
|
|
|
|
# Extract screen width and height for the primary monitor
|
|
|
|
$screenWidth = $primaryScreen.Bounds.Width
|
|
|
|
$screenHeight = $primaryScreen.Bounds.Height
|
|
|
|
|
|
|
|
# Print the screen size
|
|
|
|
Write-Debug "Primary Monitor Width: $screenWidth pixels"
|
|
|
|
Write-Debug "Primary Monitor Height: $screenHeight pixels"
|
|
|
|
|
|
|
|
# Compare with the primary monitor size
|
|
|
|
if ($width -gt $screenWidth -or $height -gt $screenHeight) {
|
|
|
|
Write-Debug "The specified width and/or height is greater than the primary monitor size."
|
|
|
|
[void][Window]::MoveWindow($windowHandle, 0, 0, $screenWidth, $screenHeight, $True)
|
|
|
|
} else {
|
|
|
|
Write-Debug "The specified width and height are within the primary monitor size limits."
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
Write-Debug "Unable to retrieve information about the primary monitor."
|
|
|
|
}
|
2024-02-02 16:22:08 -06:00
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
Invoke-WPFTab "WPFTab1BT"
|
|
|
|
$sync["Form"].Focus()
|
2024-01-15 11:32:19 -06:00
|
|
|
|
|
|
|
# maybe this is not the best place to load and execute config file?
|
|
|
|
# maybe community can help?
|
2024-08-06 15:35:17 -05:00
|
|
|
if ($PARAM_CONFIG) {
|
2024-01-15 11:32:19 -06:00
|
|
|
Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG
|
2024-08-06 15:35:17 -05:00
|
|
|
if ($PARAM_RUN) {
|
2024-01-15 11:32:19 -06:00
|
|
|
while ($sync.ProcessRunning) {
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
}
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
|
|
|
|
Write-Host "Applying tweaks..."
|
|
|
|
Invoke-WPFtweaksbutton
|
|
|
|
while ($sync.ProcessRunning) {
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
}
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
|
|
|
|
Write-Host "Installing features..."
|
|
|
|
Invoke-WPFFeatureInstall
|
|
|
|
while ($sync.ProcessRunning) {
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
}
|
|
|
|
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
Write-Host "Installing applications..."
|
|
|
|
while ($sync.ProcessRunning) {
|
|
|
|
Start-Sleep -Seconds 1
|
|
|
|
}
|
|
|
|
Invoke-WPFInstall
|
|
|
|
Start-Sleep -Seconds 5
|
|
|
|
|
|
|
|
Write-Host "Done."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
})
|
|
|
|
|
2024-09-21 09:30:10 -05:00
|
|
|
# Add event handlers for the RadioButtons
|
|
|
|
$sync["ISOdownloader"].add_Checked({
|
|
|
|
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Visible
|
|
|
|
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible
|
|
|
|
})
|
|
|
|
|
|
|
|
$sync["ISOmanual"].add_Checked({
|
|
|
|
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Collapsed
|
|
|
|
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
|
|
|
|
})
|
|
|
|
|
[MicroWin] First Anniversary Special PR (#2853)
* Fix minor denomination problem for packages
* Fix incorrect filter of OS packages
Packages such as the metadata for capabilities (FoDs) or the foundation package were being incorrectly filtered. They were part of `Remove-ProvisionedPackages`, which only removes AppX packages. These are **OS packages**, something completely different
* Fixed indentation
* Exclude `Microsoft-RemoteDesktopConnection`
Exclude that from feature list. Fixes #2705
* Remove DISM from AppX removal listings
DISM is a system component. It will never be an AppX package. This is unnecessary
* Improve error handling for file copy
* Remove space (for some reason)
Compilation script is very adamant that this should be this way
* Exclude the VBSCRIPT Features on Demand from pkgs
Exclude the VBSCRIPT feature on demand (or capability) from package removal. Some people were reporting that excluding VBSCRIPT fixed problems with AMD chipset drivers on MicroWin
* Exclude Recall from feature listings
This fixes problems people were experiencing where the file explorer would go back to the Windows 10 layout
* Improve error output
* Add 24H2 to release list
* Detect Windows 10 and show compatibility dialog
* Disable some insane desktop stuff on Windows 10
I've only been able to disable Search Highlights. News and Interests persists
* Change policy for News and Interests
Avoid showing "Access denied" errors for this. This is still broken - News and Interests is still there. [louder]Linus Torvalds curse word here[/louder]
Anyway, if someone wants to give setting this up a shot, send me suggestions on how to do this
* Write suggestion for AV
* Hold errored packages in a list
Items are being added correctly, but I can't get that to show to the end-user. Perhaps a different approach will work
* Remove older Windows versions from download list
Sadly, the links for these had been removed by Microsoft, in favor of the latest version (24H2)
* Add sorting to error messages
Thanks @og-mrk for the suggestion and the patch (even though I applied it myself)
* Make error messages easier to view (#1)
* Make error messages easier to view
* Improve error output
---------
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
* Disable Recall on first run
Keeps the Explorer look of modern Windows 11 builds whilst removing the Recall feature (which I think will manifest itself on PCs with Lunar Lake processors)
* Replace "C:\" with environment variable
This still works on single-boot configurations, but presents a more dynamic approach
* Fix Volume Mixer issues and removal of leftovers
Fix originally from @MyDrift-user on #2856
* Add missing piece to last commit
* Default to downloading OSCDIMG from GitHub repo
Chocolatey may not be the way to help us detect the presence of OSCDIMG.
Everyone, unless someone REALLY uses old deployment technology, has moved to Windows ADK 10.0
* Fix Sorting of Errored Packages by using 'Sort-Object' instead of 'IComparer' approach (#2)
Fixes startup issues in PWSH 7
* Remove reference to News and Interests from output
Even though the logic is still there, it doesn't work. I don't want to deal with that anymore. Search Highlights, on the other hand, is removed very easily
* Exclude License packages from removal
They throw an "Access denied" error when trying to remove them. This is a timesaver
---------
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
2024-10-07 15:37:47 -05:00
|
|
|
$sync["ISORelease"].Items.Add("24H2") | Out-Null
|
|
|
|
$sync["ISORelease"].SelectedItem = "24H2"
|
2024-09-21 09:30:10 -05:00
|
|
|
|
2024-09-23 12:29:34 -05:00
|
|
|
$sync["ISOLanguage"].Items.Add("System Language ($(Get-FidoLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null
|
2024-09-21 09:30:10 -05:00
|
|
|
if ($currentCulture -ne "English International") {
|
|
|
|
$sync["ISOLanguage"].Items.Add("English International") | Out-Null
|
|
|
|
}
|
|
|
|
if ($currentCulture -ne "English") {
|
|
|
|
$sync["ISOLanguage"].Items.Add("English") | Out-Null
|
|
|
|
}
|
|
|
|
if ($sync["ISOLanguage"].Items.Count -eq 1) {
|
|
|
|
$sync["ISOLanguage"].IsEnabled = $false
|
|
|
|
}
|
2024-09-23 12:29:34 -05:00
|
|
|
$sync["ISOLanguage"].SelectedIndex = 0
|
2024-09-21 09:30:10 -05:00
|
|
|
|
2024-07-08 14:59:58 -05:00
|
|
|
$sync["SearchBar"].Add_TextChanged({
|
|
|
|
if ($sync.SearchBar.Text -ne "") {
|
|
|
|
$sync.SearchBarClearButton.Visibility = "Visible"
|
2024-08-06 15:35:17 -05:00
|
|
|
} else {
|
2024-07-08 14:59:58 -05:00
|
|
|
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
Test 2024 01 03 (#1384)
* Increase performance during loading. (#1348)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Custom save targets for MicroWin ISOs (#1346)
* Workaround for Explorer freezes
Some people have reported that setting the Event Log service to Automatic and starting it can (temporarily) fix Explorer freezes.
This change detects whether the next service in the list is "EventLog" and skips it
* Allow user to save MicroWin ISOs anywhere
Adds a SaveFileDialog component to let the user specify the location of the MicroWin ISO and uses it during creation with oscdimg.
(It uses a Process object from System.Diagnostics because I couldn't get it to work with Start-Process)
* Removed temporary workaround
Removed my version of the workaround in favor of the version from @KonTy (merge PR #1348 first)
---------
Co-authored-by: Chris Titus <contact@christitus.com>
* Highly anticipated fix for small screens (#1358)
* Increase performance during loading.
Add a clear button to the search box.
Add link and description attributes to the applications JSON.
Use the link for linking to the app website.
Use the description as a tooltip for each app.
Add a clickable link to the website for each application (this took a long time; don't kick me if I got some wrong).
Pressing Escape now clears the filter box.
Pressing Alt-P prints your PID.
* Fix for services that are being stopped
* Compile winutil
* Adding new Get-LocalizedYesNo based on choice.exe which is faster and more reliable, thank you @dtm-r for implementing it and testing it on English, German, Dutch, French, Italian, Spansich and Russian. Incredible work by @dtm-r, all cridit and props go to him.
See this thread for details https://github.com/ChrisTitusTech/winutil/issues/1324
* Added error-checking logic for mounting ISOs and also created a wiki page that explains some of the errors.
* Highly anticipated fix for small screen computers
---------
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Winutil take a long time to create iso file and goes to sleep, this fixes that issue #1343 (#1371)
Co-authored-by: KonTy <KonTy@github.com>
* Compile Winutil
* Create .gitattributes
* Update .gitattributes
* add winget ventoy package (#1374)
* add winget ventoy package
* convert applications.json to utf-8
* update applications.json again
* Compile Winutil
* Update applications.json
fix encoding
* Compile Winutil
* Fix Encoding and Bad Symbols
* Compile Winutil
* feat: Add more software choices (#1379)
* Compile Winutil
* Update configs.Tests.ps1
* Update winutil.Tests.ps1
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* Update applications.json
* Compile Winutil
* fix functions for unit tests
* Compile Winutil
* Update Invoke-MicroWin-Helper.ps1
* Compile Winutil
* fix name WPF Close Button
* Update inputXML.xaml
* Compile Winutil
* my bad that wasnt it
* modify unit test for stop on error
* Compile Winutil
* Update unittests.yaml
* Create test
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* Compile Winutil
* Make restore points optional, enabled by default (#1380)
* Make restore points optional, enabled by default
* Tweaks order fix if restorepoint is checked
* Compile Winutil
* update unit tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update winutil.Tests.ps1
* tests
* Compile Winutil
* Update unittests.yaml
* Update unittests.yaml
* Update unittests.yaml
* fix unit test
* Update winutil.Tests.ps1
* rewrite all pester test for winutil
* Compile Winutil
* fix handle is invalid error
* final unit test
---------
Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: Kiril Vasilev <Kiril.v92@gmail.com>
2024-01-12 00:34:41 -06:00
|
|
|
}
|
2024-10-13 13:33:26 -05:00
|
|
|
switch ($sync.currentTab) {
|
|
|
|
"Install" {
|
|
|
|
Search-AppsByNameOrDescription -SearchString $sync.SearchBar.Text
|
|
|
|
}
|
|
|
|
}
|
2023-11-28 16:11:11 -06:00
|
|
|
})
|
|
|
|
|
2024-08-30 12:46:00 -05:00
|
|
|
$sync["Form"].Add_Loaded({
|
|
|
|
param($e)
|
2024-10-13 12:25:02 -05:00
|
|
|
$sync.Form.MinWidth = "1000"
|
2024-08-30 12:46:00 -05:00
|
|
|
$sync["Form"].MaxWidth = [Double]::PositiveInfinity
|
|
|
|
$sync["Form"].MaxHeight = [Double]::PositiveInfinity
|
|
|
|
})
|
|
|
|
|
2024-09-09 20:19:34 -05:00
|
|
|
$NavLogoPanel = $sync["Form"].FindName("NavLogoPanel")
|
|
|
|
$NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-Null
|
|
|
|
|
2024-07-25 16:19:45 -05:00
|
|
|
# Initialize the hashtable
|
|
|
|
$winutildir = @{}
|
|
|
|
|
|
|
|
# Set the path for the winutil directory
|
|
|
|
$winutildir["path"] = "$env:LOCALAPPDATA\winutil\"
|
2024-09-09 20:19:34 -05:00
|
|
|
[System.IO.Directory]::CreateDirectory($winutildir["path"]) | Out-Null
|
2024-07-25 16:19:45 -05:00
|
|
|
|
|
|
|
$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico"
|
|
|
|
|
2024-09-09 20:19:34 -05:00
|
|
|
if (Test-Path $winutildir["logo.ico"]) {
|
|
|
|
$sync["logorender"] = $winutildir["logo.ico"]
|
|
|
|
} else {
|
|
|
|
$sync["logorender"] = (Invoke-WinUtilAssets -Type "Logo" -Size 90 -Render)
|
2024-07-25 16:19:45 -05:00
|
|
|
}
|
2024-09-09 20:19:34 -05:00
|
|
|
$sync["checkmarkrender"] = (Invoke-WinUtilAssets -Type "checkmark" -Size 512 -Render)
|
|
|
|
$sync["warningrender"] = (Invoke-WinUtilAssets -Type "warning" -Size 512 -Render)
|
2024-07-25 16:19:45 -05:00
|
|
|
|
|
|
|
Set-WinUtilTaskbaritem -overlay "logo"
|
|
|
|
|
|
|
|
$sync["Form"].Add_Activated({
|
|
|
|
Set-WinUtilTaskbaritem -overlay "logo"
|
|
|
|
})
|
2024-09-20 08:34:10 -05:00
|
|
|
# Define event handler for ThemeButton click
|
|
|
|
$sync["ThemeButton"].Add_Click({
|
2024-09-20 09:03:18 -05:00
|
|
|
if ($sync.ThemePopup.IsOpen) {
|
2024-09-20 08:34:10 -05:00
|
|
|
$sync.ThemePopup.IsOpen = $false
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$sync.ThemePopup.IsOpen = $true
|
|
|
|
}
|
|
|
|
$sync.SettingsPopup.IsOpen = $false
|
|
|
|
})
|
|
|
|
|
|
|
|
# Define event handlers for menu items
|
|
|
|
$sync["AutoThemeMenuItem"].Add_Click({
|
|
|
|
$sync.ThemePopup.IsOpen = $false
|
|
|
|
Invoke-WinutilThemeChange -theme "Auto"
|
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
# Define event handlers for menu items
|
|
|
|
$sync["DarkThemeMenuItem"].Add_Click({
|
|
|
|
$sync.ThemePopup.IsOpen = $false
|
|
|
|
Invoke-WinutilThemeChange -theme "Dark"
|
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
# Define event handlers for menu items
|
|
|
|
$sync["LightThemeMenuItem"].Add_Click({
|
|
|
|
$sync.ThemePopup.IsOpen = $false
|
|
|
|
Invoke-WinutilThemeChange -theme "Light"
|
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
|
2024-07-25 16:19:45 -05:00
|
|
|
|
2024-01-15 11:32:19 -06:00
|
|
|
# Define event handler for button click
|
|
|
|
$sync["SettingsButton"].Add_Click({
|
|
|
|
Write-Debug "SettingsButton clicked"
|
2024-09-21 10:00:32 -05:00
|
|
|
if ($sync.SettingsPopup.IsOpen) {
|
|
|
|
$sync.SettingsPopup.IsOpen = $false
|
2024-01-15 11:32:19 -06:00
|
|
|
}
|
2024-09-20 08:34:10 -05:00
|
|
|
else{
|
2024-09-21 10:00:32 -05:00
|
|
|
$sync.SettingsPopup.IsOpen = $true
|
2024-09-20 08:34:10 -05:00
|
|
|
}
|
2024-09-21 10:00:32 -05:00
|
|
|
$sync.ThemePopup.IsOpen = $false
|
2024-01-15 11:32:19 -06:00
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
|
|
|
|
# Define event handlers for menu items
|
|
|
|
$sync["ImportMenuItem"].Add_Click({
|
|
|
|
# Handle Import menu item click
|
|
|
|
Write-Debug "Import clicked"
|
|
|
|
$sync["SettingsPopup"].IsOpen = $false
|
|
|
|
Invoke-WPFImpex -type "import"
|
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
|
|
|
|
$sync["ExportMenuItem"].Add_Click({
|
|
|
|
# Handle Export menu item click
|
|
|
|
Write-Debug "Export clicked"
|
|
|
|
$sync["SettingsPopup"].IsOpen = $false
|
|
|
|
Invoke-WPFImpex -type "export"
|
|
|
|
$_.Handled = $false
|
|
|
|
})
|
|
|
|
|
|
|
|
$sync["AboutMenuItem"].Add_Click({
|
|
|
|
# Handle Export menu item click
|
|
|
|
Write-Debug "About clicked"
|
|
|
|
$sync["SettingsPopup"].IsOpen = $false
|
|
|
|
$authorInfo = @"
|
2024-06-25 13:54:18 -05:00
|
|
|
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
|
|
|
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
|
|
|
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
|
|
|
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
|
|
|
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
2024-02-02 16:22:08 -06:00
|
|
|
"@
|
2024-09-20 08:34:10 -05:00
|
|
|
|
|
|
|
Show-CustomDialog -Message $authorInfo -LogoSize $LogoSize
|
2024-01-15 11:32:19 -06:00
|
|
|
})
|
2024-07-14 18:50:40 -05:00
|
|
|
|
|
|
|
$sync["SponsorMenuItem"].Add_Click({
|
|
|
|
# Handle Export menu item click
|
|
|
|
Write-Debug "Sponsors clicked"
|
|
|
|
$sync["SettingsPopup"].IsOpen = $false
|
|
|
|
$authorInfo = @"
|
|
|
|
<a href="https://github.com/sponsors/ChrisTitusTech">Current sponsors for ChrisTitusTech:</a>
|
|
|
|
"@
|
|
|
|
$authorInfo += "`n"
|
|
|
|
try {
|
|
|
|
# Call the function to get the sponsors
|
|
|
|
$sponsors = Invoke-WinUtilSponsors
|
|
|
|
|
|
|
|
# Append the sponsors to the authorInfo
|
|
|
|
$sponsors | ForEach-Object { $authorInfo += "$_`n" }
|
2024-08-06 15:35:17 -05:00
|
|
|
} catch {
|
2024-07-14 18:50:40 -05:00
|
|
|
$authorInfo += "An error occurred while fetching or processing the sponsors: $_`n"
|
|
|
|
}
|
|
|
|
|
2024-09-20 08:34:10 -05:00
|
|
|
Show-CustomDialog -Message $authorInfo -EnableScroll $true
|
2024-07-14 18:50:40 -05:00
|
|
|
})
|
2024-09-20 08:34:10 -05:00
|
|
|
|
2024-10-13 12:25:02 -05:00
|
|
|
|
|
|
|
|
2023-11-28 16:11:11 -06:00
|
|
|
$sync["Form"].ShowDialog() | out-null
|
2024-03-21 18:23:24 -05:00
|
|
|
Stop-Transcript
|