mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-09 14:43:52 -05:00
Compare commits
1 Commits
0ba0e348e5
...
admin-elev
Author | SHA1 | Date | |
---|---|---|---|
ae57539640 |
21
.github/workflows/github-pages.yaml
vendored
21
.github/workflows/github-pages.yaml
vendored
@ -1,16 +1,15 @@
|
|||||||
name: GitHub Pages Deploy
|
name: GitHub Pages Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
paths:
|
types: [published, prereleased]
|
||||||
- '.github/mkdocs.yml'
|
|
||||||
- '.github/requirements.txt'
|
|
||||||
- 'docs/**'
|
|
||||||
- 'overrides/**'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -23,10 +22,10 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x # Install latest Stable release of Python 3
|
python-version: 3.x # Install latest Stable release of Python 3
|
||||||
cache: 'pip' # Caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
|
|
||||||
- name: Install Necessary Dependencies
|
- name: Install Necessary Dependencies using 'pip install -r .github/requirements.txt'
|
||||||
run: pip install -r .github/requirements.txt
|
run: pip install -r .github/requirements.txt
|
||||||
|
|
||||||
- name: Build & Deploy using mkdocs
|
- name: Build & Deploy using 'mkdocs'
|
||||||
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
|
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
|
@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
|
|||||||
|
|
||||||
These are the sponsors that help keep this project alive with monthly contributions.
|
These are the sponsors that help keep this project alive with monthly contributions.
|
||||||
|
|
||||||
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><a href="https://github.com/claudemods"><img src="https://github.com/claudemods.png" width="60px" alt="Claudemods" /></a><a href="https://github.com/hkolatan"><img src="https://github.com/hkolatan.png" width="60px" alt="Halil Kolatan" /></a><!-- sponsors -->
|
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><!-- sponsors -->
|
||||||
|
|
||||||
## 🏅 Thanks to all Contributors
|
## 🏅 Thanks to all Contributors
|
||||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 152 KiB |
@ -69,7 +69,7 @@ function Invoke-WPFTweakPS7{
|
|||||||
Write-Host "Powershell 7 is already installed."
|
Write-Host "Powershell 7 is already installed."
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Installing Powershell 7..."
|
Write-Host "Installing Powershell 7..."
|
||||||
Install-WinUtilProgramWinget -Action Install -Programs @("Microsoft.PowerShell")
|
Invoke-WinUtilWingetProgram -Action Install -Programs @("Microsoft.PowerShell")
|
||||||
}
|
}
|
||||||
$targetTerminalName = "PowerShell"
|
$targetTerminalName = "PowerShell"
|
||||||
}
|
}
|
||||||
@ -105,10 +105,10 @@ function Invoke-WPFTweakPS7{
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
## Function: Install-WinUtilProgramWinget
|
## Function: Invoke-WinUtilWingetProgram
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Function Install-WinUtilProgramWinget {
|
Function Invoke-WinUtilWingetProgram {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Runs the designated action on the provided programs using Winget
|
Runs the designated action on the provided programs using Winget
|
||||||
|
@ -29,11 +29,6 @@
|
|||||||
* Click the `Clear Selection` button.
|
* Click the `Clear Selection` button.
|
||||||
* This will unselect all checked programs.
|
* This will unselect all checked programs.
|
||||||
|
|
||||||
=== "prefer Chocolatey"
|
|
||||||
* Check the `prefer Chocolatey` checkbox
|
|
||||||
* By default Winutil will use winget to install/upgrade/remove packages and fallback to Chocolatey. This option reverses the preference.
|
|
||||||
* This preference will be used for all Buttons on the Install page and persist across Winutil restarts
|
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
!!! tip
|
!!! tip
|
||||||
@ -203,7 +198,26 @@ The utility provides three distinct settings for managing Windows updates: Defau
|
|||||||
* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder in the `%TEMP%` directory.
|
* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder in the `%TEMP%` directory.
|
||||||
* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu.
|
* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu.
|
||||||
|
|
||||||
By default, MicroWin will debloat the Pro edition, but you can choose any edition you want.
|
By default, MicroWin will debloat the Pro edition, but you can choose any edition you want.
|
||||||
|
|
||||||
|
|
||||||
|
##### Customization options
|
||||||
|
|
||||||
|
* **Keep Provisioned Packages**: leaving this option unticked (default) will try to remove every operating system package.
|
||||||
|
|
||||||
|
Some packages may remain after processing. This can happen if the packages in question are permanent or have been superseded by newer versions.
|
||||||
|
|
||||||
|
* **Keep Appx Packages**: leaving this option unticked (default) will try to remove every Microsoft Store app from the Windows image.
|
||||||
|
|
||||||
|
This option will exclude some applications that are essential in the event that you want or need to add a Store app later on.
|
||||||
|
|
||||||
|
* **Keep Defender**: leaving this option unticked will try to remove every part of Windows Defender, including the Windows Security app.
|
||||||
|
|
||||||
|
Leaving this option unticked is **NOT recommended** unless you plan to use a third-party antivirus solution on your MicroWin installation. In that regard, don't install AVs with bad reputations or rogueware.
|
||||||
|
|
||||||
|
* **Keep Edge**: leaving this option unticked will try to remove every part of the Microsoft Edge browser using the best methods available.
|
||||||
|
|
||||||
|
Leaving this option unticked is not recommended because it might break some applications that might depend on the `Edge WebView2` runtime. However, if that happens, you can easily [reinstall it](https://developer.microsoft.com/en-us/microsoft-edge/webview2)
|
||||||
|
|
||||||
|
|
||||||
##### Driver integration options
|
##### Driver integration options
|
||||||
@ -211,15 +225,7 @@ By default, MicroWin will debloat the Pro edition, but you can choose any editio
|
|||||||
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image.
|
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image.
|
||||||
* **Import drivers from the current system** will add every third-party driver that is present in your active installation.
|
* **Import drivers from the current system** will add every third-party driver that is present in your active installation.
|
||||||
|
|
||||||
This makes the target image have the same hardware compatibility as the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the 'sources` folder.
|
This makes the target image have the same hardware compatibility as the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the 'sources` folder.
|
||||||
|
|
||||||
##### Custom user settings
|
|
||||||
|
|
||||||
With MicroWin, you can also configure your user before proceeding if you don't want to use the default `User` account. To do this, simply type the account name (20 characters maximum), and a password. Then, let MicroWin do the rest.
|
|
||||||
|
|
||||||
!!! info
|
|
||||||
|
|
||||||
Please make sure that you remember your password. MicroWin will configure auto-login settings, so you won't have to enter your password. However, if you are required to enter your password, it's best that you don't forget it.
|
|
||||||
|
|
||||||
|
|
||||||
##### Ventoy options
|
##### Ventoy options
|
||||||
|
@ -15,8 +15,8 @@ function Install-WinUtilChoco {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Seems Chocolatey is not installed, installing now."
|
Write-Host "Seems Chocolatey is not installed, installing now."
|
||||||
Start-Process -FilePath "powershell" -ArgumentList "Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop" -Wait -NoNewWindow
|
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
|
||||||
Start-Process -FilePath "powershell" -ArgumentList "choco feature enable -n allowGlobalConfirmation" -Wait -NoNewWindow
|
powershell choco feature enable -n allowGlobalConfirmation
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
Write-Host "===========================================" -Foregroundcolor Red
|
||||||
|
@ -1,258 +1,102 @@
|
|||||||
function Install-WinUtilProgramChoco {
|
function Install-WinUtilProgramChoco {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Manages the installation or uninstallation of a list of Chocolatey packages.
|
Manages the provided programs using Chocolatey
|
||||||
|
|
||||||
.PARAMETER Programs
|
.PARAMETER ProgramsToInstall
|
||||||
A string array containing the programs to be installed or uninstalled.
|
A list of programs to manage
|
||||||
|
|
||||||
.PARAMETER Action
|
.PARAMETER manage
|
||||||
Specifies the action to perform: "Install" or "Uninstall". The default value is "Install".
|
The action to perform on the programs, can be either 'Installing' or 'Uninstalling'
|
||||||
|
|
||||||
.DESCRIPTION
|
.NOTES
|
||||||
This function processes a list of programs to be managed using Chocolatey. Depending on the specified action, it either installs or uninstalls each program in the list, updating the taskbar progress accordingly. After all operations are completed, temporary output files are cleaned up.
|
The triple quotes are required any time you need a " in a normal script block.
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Install-WinUtilProgramChoco -Programs @("7zip","chrome") -Action "Uninstall"
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory, Position = 0)]
|
[Parameter(Mandatory, Position=0)]
|
||||||
[string[]]$Programs,
|
[PsCustomObject]$ProgramsToInstall,
|
||||||
|
|
||||||
[Parameter(Position = 1)]
|
[Parameter(Position=1)]
|
||||||
[String]$Action = "Install"
|
[String]$manage = "Installing"
|
||||||
)
|
)
|
||||||
|
|
||||||
function Initialize-OutputFile {
|
$x = 0
|
||||||
<#
|
$count = $ProgramsToInstall.Count
|
||||||
.SYNOPSIS
|
|
||||||
Initializes an output file by removing any existing file and creating a new, empty file at the specified path.
|
# This check isn't really necessary, as there's a couple of checks before this Private Function gets called, but just to make sure ;)
|
||||||
|
if($count -le 0) {
|
||||||
.PARAMETER filePath
|
throw "Private Function 'Install-WinUtilProgramChoco' expected Parameter 'ProgramsToInstall' to be of size 1 or greater, instead got $count,`nPlease double check your code and re-compile WinUtil."
|
||||||
The full path to the file to be initialized.
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
This function ensures that the specified file is reset by removing any existing file at the provided path and then creating a new, empty file. It is useful when preparing a log or output file for subsequent operations.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Initialize-OutputFile -filePath "C:\temp\output.txt"
|
|
||||||
#>
|
|
||||||
|
|
||||||
param ($filePath)
|
|
||||||
Remove-Item -Path $filePath -Force -ErrorAction SilentlyContinue
|
|
||||||
New-Item -ItemType File -Path $filePath | Out-Null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Run-ChocoCommand {
|
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
||||||
<#
|
Write-Host "==========================================="
|
||||||
.SYNOPSIS
|
Write-Host "-- Configuring Chocolatey pacakages ---"
|
||||||
Executes a Chocolatey command with the specified arguments and returns the exit code.
|
Write-Host "==========================================="
|
||||||
|
Foreach ($Program in $ProgramsToInstall) {
|
||||||
.PARAMETER arguments
|
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.choco) $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
||||||
The arguments to be passed to the Chocolatey command.
|
if($manage -eq "Installing") {
|
||||||
|
write-host "Starting install of $($Program.choco) with Chocolatey."
|
||||||
.DESCRIPTION
|
|
||||||
This function runs a specified Chocolatey command by passing the provided arguments to the `choco` executable. It waits for the process to complete and then returns the exit code, allowing the caller to determine success or failure based on the exit code.
|
|
||||||
|
|
||||||
.RETURNS
|
|
||||||
[int]
|
|
||||||
The exit code of the Chocolatey command.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
$exitCode = Run-ChocoCommand -arguments "install 7zip -y"
|
|
||||||
#>
|
|
||||||
|
|
||||||
param ($arguments)
|
|
||||||
return (Start-Process -FilePath "choco" -ArgumentList $arguments -Wait -PassThru).ExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
function Check-UpgradeNeeded {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Checks if an upgrade is needed for a Chocolatey package based on the content of a log file.
|
|
||||||
|
|
||||||
.PARAMETER filePath
|
|
||||||
The path to the log file that contains the output of a Chocolatey install command.
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
This function reads the specified log file and checks for keywords that indicate whether an upgrade is needed. It returns a boolean value indicating whether the terms "reinstall" or "already installed" are present, which suggests that the package might need an upgrade.
|
|
||||||
|
|
||||||
.RETURNS
|
|
||||||
[bool]
|
|
||||||
True if the log file indicates that an upgrade is needed; otherwise, false.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
$isUpgradeNeeded = Check-UpgradeNeeded -filePath "C:\temp\install-output.txt"
|
|
||||||
#>
|
|
||||||
|
|
||||||
param ($filePath)
|
|
||||||
return Get-Content -Path $filePath | Select-String -Pattern "reinstall|already installed" -Quiet
|
|
||||||
}
|
|
||||||
|
|
||||||
function Update-TaskbarProgress {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Updates the taskbar progress based on the current installation progress.
|
|
||||||
|
|
||||||
.PARAMETER currentIndex
|
|
||||||
The current index of the program being installed or uninstalled.
|
|
||||||
|
|
||||||
.PARAMETER totalPrograms
|
|
||||||
The total number of programs to be installed or uninstalled.
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
This function calculates the progress of the installation or uninstallation process and updates the taskbar accordingly. The taskbar is set to "Normal" if all programs have been processed, otherwise, it is set to "Error" as a placeholder.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Update-TaskbarProgress -currentIndex 3 -totalPrograms 10
|
|
||||||
#>
|
|
||||||
|
|
||||||
param (
|
|
||||||
[int]$currentIndex,
|
|
||||||
[int]$totalPrograms
|
|
||||||
)
|
|
||||||
$progressState = if ($currentIndex -eq $totalPrograms) { "Normal" } else { "Error" }
|
|
||||||
$sync.form.Dispatcher.Invoke([action] { Set-WinUtilTaskbaritem -state $progressState -value ($currentIndex / $totalPrograms) })
|
|
||||||
}
|
|
||||||
|
|
||||||
function Install-ChocoPackage {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Installs a Chocolatey package and optionally upgrades it if needed.
|
|
||||||
|
|
||||||
.PARAMETER Program
|
|
||||||
A string containing the name of the Chocolatey package to be installed.
|
|
||||||
|
|
||||||
.PARAMETER currentIndex
|
|
||||||
The current index of the program in the list of programs to be managed.
|
|
||||||
|
|
||||||
.PARAMETER totalPrograms
|
|
||||||
The total number of programs to be installed.
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
This function installs a Chocolatey package by running the `choco install` command. If the installation output indicates that an upgrade might be needed, the function will attempt to upgrade the package. The taskbar progress is updated after each package is processed.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Install-ChocoPackage -Program $Program -currentIndex 0 -totalPrograms 5
|
|
||||||
#>
|
|
||||||
|
|
||||||
param (
|
|
||||||
[string]$Program,
|
|
||||||
[int]$currentIndex,
|
|
||||||
[int]$totalPrograms
|
|
||||||
)
|
|
||||||
|
|
||||||
$installOutputFile = "$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt"
|
|
||||||
Initialize-OutputFile $installOutputFile
|
|
||||||
|
|
||||||
Write-Host "Starting installation of $Program with Chocolatey."
|
|
||||||
|
|
||||||
try {
|
|
||||||
$installStatusCode = Run-ChocoCommand "install $Program -y --log-file $installOutputFile"
|
|
||||||
if ($installStatusCode -eq 0) {
|
|
||||||
|
|
||||||
if (Check-UpgradeNeeded $installOutputFile) {
|
|
||||||
$upgradeStatusCode = Run-ChocoCommand "upgrade $Program -y"
|
|
||||||
Write-Host "$Program was" $(if ($upgradeStatusCode -eq 0) { "upgraded successfully." } else { "not upgraded." })
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "$Program installed successfully."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Host "Failed to install $Program."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-Host "Failed to install $Program due to an error: $_"
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
Update-TaskbarProgress $currentIndex $totalPrograms
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Uninstall-ChocoPackage {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Uninstalls a Chocolatey package and any related metapackages.
|
|
||||||
|
|
||||||
.PARAMETER Program
|
|
||||||
A string containing the name of the Chocolatey package to be uninstalled.
|
|
||||||
|
|
||||||
.PARAMETER currentIndex
|
|
||||||
The current index of the program in the list of programs to be managed.
|
|
||||||
|
|
||||||
.PARAMETER totalPrograms
|
|
||||||
The total number of programs to be uninstalled.
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
This function uninstalls a Chocolatey package and any related metapackages (e.g., .install or .portable variants). It updates the taskbar progress after processing each package.
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Uninstall-ChocoPackage -Program $Program -currentIndex 0 -totalPrograms 5
|
|
||||||
#>
|
|
||||||
|
|
||||||
param (
|
|
||||||
[string]$Program,
|
|
||||||
[int]$currentIndex,
|
|
||||||
[int]$totalPrograms
|
|
||||||
)
|
|
||||||
|
|
||||||
$uninstallOutputFile = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt"
|
|
||||||
Initialize-OutputFile $uninstallOutputFile
|
|
||||||
|
|
||||||
Write-Host "Searching for metapackages of $Program (.install or .portable)"
|
|
||||||
$chocoPackages = ((choco list | Select-String -Pattern "$Program(\.install|\.portable)?").Matches.Value) -join " "
|
|
||||||
if ($chocoPackages) {
|
|
||||||
Write-Host "Starting uninstallation of $chocoPackages with Chocolatey."
|
|
||||||
try {
|
try {
|
||||||
$uninstallStatusCode = Run-ChocoCommand "uninstall $chocoPackages -y"
|
$tryUpgrade = $false
|
||||||
Write-Host "$Program" $(if ($uninstallStatusCode -eq 0) { "uninstalled successfully." } else { "failed to uninstall." })
|
$installOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt"
|
||||||
|
New-Item -ItemType File -Path $installOutputFilePath
|
||||||
|
$chocoInstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "install $($Program.choco) -y" -Wait -PassThru -RedirectStandardOutput $installOutputFilePath).ExitCode
|
||||||
|
if(($chocoInstallStatus -eq 0) -AND (Test-Path -Path $installOutputFilePath)) {
|
||||||
|
$keywordsFound = Get-Content -Path $installOutputFilePath | Where-Object {$_ -match "reinstall" -OR $_ -match "already installed"}
|
||||||
|
if ($keywordsFound) {
|
||||||
|
$tryUpgrade = $true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch {
|
# TODO: Implement the Upgrade part using 'choco upgrade' command, this will make choco consistent with WinGet, as WinGet tries to Upgrade when you use the install command.
|
||||||
Write-Host "Failed to uninstall $Program due to an error: $_"
|
if ($tryUpgrade) {
|
||||||
}
|
throw "Automatic Upgrade for Choco isn't implemented yet, a feature to make it consistent with WinGet, the install command using choco simply failed because $($Program.choco) is already installed."
|
||||||
finally {
|
}
|
||||||
Update-TaskbarProgress $currentIndex $totalPrograms
|
if(($chocoInstallStatus -eq 0) -AND ($tryUpgrade -eq $false)) {
|
||||||
|
Write-Host "$($Program.choco) installed successfully using Chocolatey."
|
||||||
|
$X++
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value ($x/$count) })
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
Write-Host "Failed to install $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $installOutputFilePath)."
|
||||||
|
$X++
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to install $($Program.choco) due to an error: $_"
|
||||||
|
$X++
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Write-Host "$Program is not installed."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$totalPrograms = $Programs.Count
|
if($manage -eq "Uninstalling") {
|
||||||
if ($totalPrograms -le 0) {
|
write-host "Starting uninstall of $($Program.choco) with Chocolatey."
|
||||||
throw "Parameter 'Programs' must have at least one item."
|
try {
|
||||||
}
|
$uninstallOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt"
|
||||||
|
New-Item -ItemType File -Path $uninstallOutputFilePath
|
||||||
Write-Host "==========================================="
|
$chocoUninstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "uninstall $($Program.choco) -y" -Wait -PassThru).ExitCode
|
||||||
Write-Host "-- Configuring Chocolatey packages ---"
|
if($chocoUninstallStatus -eq 0) {
|
||||||
Write-Host "==========================================="
|
Write-Host "$($Program.choco) uninstalled successfully using Chocolatey."
|
||||||
|
$x++
|
||||||
for ($currentIndex = 0; $currentIndex -lt $totalPrograms; $currentIndex++) {
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value ($x/$count) })
|
||||||
$Program = $Programs[$currentIndex]
|
continue
|
||||||
Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($currentIndex / $totalPrograms * 100)
|
} else {
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($currentIndex / $totalPrograms)})
|
Write-Host "Failed to uninstall $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $uninstallOutputFilePath)."
|
||||||
|
$x++
|
||||||
switch ($Action) {
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
|
||||||
"Install" {
|
}
|
||||||
Install-ChocoPackage -Program $Program -currentIndex $currentIndex -totalPrograms $totalPrograms
|
} catch {
|
||||||
|
Write-Host "Failed to uninstall $($Program.choco) due to an error: $_"
|
||||||
|
$x++
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
|
||||||
}
|
}
|
||||||
"Uninstall" {
|
|
||||||
Uninstall-ChocoPackage -Program $Program -currentIndex $currentIndex -totalPrograms $totalPrograms
|
|
||||||
}
|
|
||||||
default {
|
|
||||||
throw "Invalid action parameter value: '$Action'."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Set-WinUtilProgressBar -label "$($Action)ation done" -percent 100
|
|
||||||
# Cleanup Output Files
|
|
||||||
$outputFiles = @("$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt", "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt")
|
|
||||||
foreach ($filePath in $outputFiles) {
|
|
||||||
Remove-Item -Path $filePath -Force -ErrorAction SilentlyContinue
|
|
||||||
}
|
}
|
||||||
|
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
|
||||||
|
|
||||||
|
# Cleanup leftovers files
|
||||||
|
if(Test-Path -Path $installOutputFilePath) { Remove-Item -Path $installOutputFilePath }
|
||||||
|
if(Test-Path -Path $uninstallOutputFilePath) { Remove-Item -Path $uninstallOutputFilePath }
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,16 +13,6 @@ Function Invoke-WinUtilCurrentSystem {
|
|||||||
param(
|
param(
|
||||||
$CheckBox
|
$CheckBox
|
||||||
)
|
)
|
||||||
if ($CheckBox -eq "choco") {
|
|
||||||
$apps = (choco list | Select-String -Pattern "^\S+").Matches.Value
|
|
||||||
$filter = Get-WinUtilVariables -Type Checkbox | Where-Object {$psitem -like "WPFInstall*"}
|
|
||||||
$sync.GetEnumerator() | Where-Object {$psitem.Key -in $filter} | ForEach-Object {
|
|
||||||
$dependencies = @($sync.configs.applications.$($psitem.Key).choco -split ";")
|
|
||||||
if ($dependencies -in $apps) {
|
|
||||||
Write-Output $psitem.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($checkbox -eq "winget") {
|
if ($checkbox -eq "winget") {
|
||||||
|
|
||||||
|
@ -101,9 +101,7 @@ function Remove-Packages {
|
|||||||
$_ -NotLike "*DesktopAppInstaller*" -AND
|
$_ -NotLike "*DesktopAppInstaller*" -AND
|
||||||
$_ -NotLike "*WebMediaExtensions*" -AND
|
$_ -NotLike "*WebMediaExtensions*" -AND
|
||||||
$_ -NotLike "*WMIC*" -AND
|
$_ -NotLike "*WMIC*" -AND
|
||||||
$_ -NotLike "*UI.XaML*" -AND
|
$_ -NotLike "*UI.XaML*"
|
||||||
$_ -NotLike "*Ethernet*" -AND
|
|
||||||
$_ -NotLike "*Wifi*"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($pkg in $pkglist) {
|
foreach ($pkg in $pkglist) {
|
||||||
@ -134,48 +132,42 @@ function Remove-ProvisionedPackages() {
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Remove-ProvisionedPackages
|
Remove-ProvisionedPackages
|
||||||
#>
|
#>
|
||||||
try
|
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
||||||
{
|
$_.PackageName -NotLike "*AppInstaller*" -AND
|
||||||
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
|
$_.PackageName -NotLike "*Store*" -and
|
||||||
$_.PackageName -NotLike "*AppInstaller*" -AND
|
$_.PackageName -NotLike "*dism*" -and
|
||||||
$_.PackageName -NotLike "*Store*" -and
|
$_.PackageName -NotLike "*Foundation*" -and
|
||||||
$_.PackageName -NotLike "*dism*" -and
|
$_.PackageName -NotLike "*FodMetadata*" -and
|
||||||
$_.PackageName -NotLike "*Foundation*" -and
|
$_.PackageName -NotLike "*LanguageFeatures*" -and
|
||||||
$_.PackageName -NotLike "*FodMetadata*" -and
|
$_.PackageName -NotLike "*Notepad*" -and
|
||||||
$_.PackageName -NotLike "*LanguageFeatures*" -and
|
$_.PackageName -NotLike "*Printing*" -and
|
||||||
$_.PackageName -NotLike "*Notepad*" -and
|
$_.PackageName -NotLike "*Wifi*" -and
|
||||||
$_.PackageName -NotLike "*Printing*" -and
|
$_.PackageName -NotLike "*Foundation*" -and
|
||||||
$_.PackageName -NotLike "*Foundation*" -and
|
$_.PackageName -NotLike "*YourPhone*" -and
|
||||||
$_.PackageName -NotLike "*YourPhone*" -and
|
$_.PackageName -NotLike "*Xbox*" -and
|
||||||
$_.PackageName -NotLike "*Xbox*" -and
|
$_.PackageName -NotLike "*WindowsTerminal*" -and
|
||||||
$_.PackageName -NotLike "*WindowsTerminal*" -and
|
$_.PackageName -NotLike "*Calculator*" -and
|
||||||
$_.PackageName -NotLike "*Calculator*" -and
|
$_.PackageName -NotLike "*Photos*" -and
|
||||||
$_.PackageName -NotLike "*Photos*" -and
|
$_.PackageName -NotLike "*VCLibs*" -and
|
||||||
$_.PackageName -NotLike "*VCLibs*" -and
|
$_.PackageName -NotLike "*Paint*" -and
|
||||||
$_.PackageName -NotLike "*Paint*" -and
|
$_.PackageName -NotLike "*Gaming*" -and
|
||||||
$_.PackageName -NotLike "*Gaming*" -and
|
$_.PackageName -NotLike "*Extension*" -and
|
||||||
$_.PackageName -NotLike "*Extension*" -and
|
$_.PackageName -NotLike "*SecHealthUI*"
|
||||||
$_.PackageName -NotLike "*SecHealthUI*"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$counter = 0
|
$counter = 0
|
||||||
foreach ($appx in $appxProvisionedPackages) {
|
foreach ($appx in $appxProvisionedPackages) {
|
||||||
$status = "Removing Provisioned $($appx.PackageName)"
|
$status = "Removing Provisioned $($appx.PackageName)"
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
||||||
try {
|
try {
|
||||||
Remove-AppxProvisionedPackage -Path "$scratchDir" -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
Remove-AppxProvisionedPackage -Path "$scratchDir" -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Application $($appx.PackageName) could not be removed"
|
Write-Host "Application $($appx.PackageName) could not be removed"
|
||||||
continue
|
continue
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
# This can happen if getting AppX packages fails
|
|
||||||
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
|
|
||||||
}
|
}
|
||||||
|
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
||||||
}
|
}
|
||||||
|
|
||||||
function Copy-ToUSB([string]$fileToCopy) {
|
function Copy-ToUSB([string]$fileToCopy) {
|
||||||
@ -247,11 +239,6 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
|
|||||||
|
|
||||||
function New-Unattend {
|
function New-Unattend {
|
||||||
|
|
||||||
param (
|
|
||||||
[Parameter(Mandatory, Position = 0)] [string] $userName,
|
|
||||||
[Parameter(Position = 1)] [string] $userPassword
|
|
||||||
)
|
|
||||||
|
|
||||||
$unattend = @'
|
$unattend = @'
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
||||||
@ -274,21 +261,21 @@ function New-Unattend {
|
|||||||
<UserAccounts>
|
<UserAccounts>
|
||||||
<LocalAccounts>
|
<LocalAccounts>
|
||||||
<LocalAccount wcm:action="add">
|
<LocalAccount wcm:action="add">
|
||||||
<Name>USER-REPLACEME</Name>
|
<Name>User</Name>
|
||||||
<Group>Administrators</Group>
|
<Group>Administrators</Group>
|
||||||
<Password>
|
<Password>
|
||||||
<Value>PW-REPLACEME</Value>
|
<Value></Value>
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
</Password>
|
</Password>
|
||||||
</LocalAccount>
|
</LocalAccount>
|
||||||
</LocalAccounts>
|
</LocalAccounts>
|
||||||
</UserAccounts>
|
</UserAccounts>
|
||||||
<AutoLogon>
|
<AutoLogon>
|
||||||
<Username>USER-REPLACEME</Username>
|
<Username>User</Username>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<LogonCount>1</LogonCount>
|
<LogonCount>1</LogonCount>
|
||||||
<Password>
|
<Password>
|
||||||
<Value>PW-REPLACEME</Value>
|
<Value></Value>
|
||||||
<PlainText>true</PlainText>
|
<PlainText>true</PlainText>
|
||||||
</Password>
|
</Password>
|
||||||
</AutoLogon>
|
</AutoLogon>
|
||||||
@ -548,11 +535,6 @@ function New-Unattend {
|
|||||||
# Replace the placeholder text with the Specialize pass
|
# Replace the placeholder text with the Specialize pass
|
||||||
$unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim()
|
$unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim()
|
||||||
}
|
}
|
||||||
# Replace default User and Password values with the provided parameters
|
|
||||||
$unattend = $unattend.Replace("USER-REPLACEME", $userName).Trim()
|
|
||||||
$unattend = $unattend.Replace("PW-REPLACEME", $userPassword).Trim()
|
|
||||||
|
|
||||||
# Save unattended answer file with UTF-8 encoding
|
|
||||||
$unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8
|
$unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Function Install-WinUtilProgramWinget {
|
Function Invoke-WinUtilWingetProgram {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Runs the designated action on the provided programs using Winget
|
Runs the designated action on the provided programs using Winget
|
@ -1,6 +1,6 @@
|
|||||||
function Invoke-WPFGetInstalled {
|
function Invoke-WPFGetInstalled {
|
||||||
<#
|
<#
|
||||||
TODO: Add the Option to use Chocolatey as Engine
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Invokes the function that gets the checkboxes to check in a new runspace
|
Invokes the function that gets the checkboxes to check in a new runspace
|
||||||
|
|
||||||
@ -16,12 +16,12 @@ function Invoke-WPFGetInstalled {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($sync.WPFpreferChocolatey.IsChecked -eq $false) -and ((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") {
|
if(((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$preferChoco = $sync.WPFpreferChocolatey.IsChecked
|
|
||||||
Invoke-WPFRunspace -ArgumentList $checkbox, $preferChoco -DebugPreference $DebugPreference -ScriptBlock {
|
Invoke-WPFRunspace -ArgumentList $checkbox -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
param($checkbox, $preferChoco, $DebugPreference)
|
param($checkbox, $DebugPreference)
|
||||||
|
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
|
||||||
@ -32,12 +32,8 @@ function Invoke-WPFGetInstalled {
|
|||||||
if($checkbox -eq "tweaks") {
|
if($checkbox -eq "tweaks") {
|
||||||
Write-Host "Getting Installed Tweaks..."
|
Write-Host "Getting Installed Tweaks..."
|
||||||
}
|
}
|
||||||
if ($preferChoco -and $checkbox -eq "winget") {
|
|
||||||
$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox "choco"
|
$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox
|
||||||
}
|
|
||||||
else{
|
|
||||||
$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox
|
|
||||||
}
|
|
||||||
|
|
||||||
$sync.form.Dispatcher.invoke({
|
$sync.form.Dispatcher.invoke({
|
||||||
foreach($checkbox in $Checkboxes) {
|
foreach($checkbox in $Checkboxes) {
|
||||||
|
@ -19,9 +19,10 @@ function Invoke-WPFInstall {
|
|||||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$ChocoPreference = $($sync.WPFpreferChocolatey.IsChecked)
|
|
||||||
Invoke-WPFRunspace -ArgumentList $PackagesToInstall,$ChocoPreference -DebugPreference $DebugPreference -ScriptBlock {
|
|
||||||
param($PackagesToInstall, $ChocoPreference, $DebugPreference)
|
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
|
param($PackagesToInstall, $DebugPreference)
|
||||||
if ($PackagesToInstall.count -eq 1) {
|
if ($PackagesToInstall.count -eq 1) {
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
||||||
} else {
|
} else {
|
||||||
@ -29,29 +30,17 @@ function Invoke-WPFInstall {
|
|||||||
}
|
}
|
||||||
$packagesWinget, $packagesChoco = {
|
$packagesWinget, $packagesChoco = {
|
||||||
$packagesWinget = [System.Collections.ArrayList]::new()
|
$packagesWinget = [System.Collections.ArrayList]::new()
|
||||||
$packagesChoco = [System.Collections.ArrayList]::new()
|
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
foreach ($package in $PackagesToInstall) {
|
||||||
foreach ($package in $PackagesToInstall) {
|
|
||||||
if ($ChocoPreference) {
|
|
||||||
if ($package.choco -eq "na") {
|
|
||||||
$packagesWinget.add($package.winget)
|
|
||||||
Write-Host "Queueing $($package.winget) for Winget install"
|
|
||||||
} else {
|
|
||||||
$null = $packagesChoco.add($package.choco)
|
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($package.winget -eq "na") {
|
if ($package.winget -eq "na") {
|
||||||
$packagesChoco.add($package.choco)
|
$packagesChoco.add($package)
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
||||||
} else {
|
} else {
|
||||||
$null = $packagesWinget.add($($package.winget))
|
$null = $packagesWinget.add($($package.winget))
|
||||||
Write-Host "Queueing $($package.winget) for Winget install"
|
Write-Host "Queueing $($package.winget) for Winget install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return $packagesWinget, $packagesChoco
|
||||||
return $packagesWinget, $packagesChoco
|
|
||||||
}.Invoke($PackagesToInstall)
|
}.Invoke($PackagesToInstall)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -59,12 +48,12 @@ function Invoke-WPFInstall {
|
|||||||
$errorPackages = @()
|
$errorPackages = @()
|
||||||
if($packagesWinget.Count -gt 0) {
|
if($packagesWinget.Count -gt 0) {
|
||||||
Install-WinUtilWinget
|
Install-WinUtilWinget
|
||||||
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
|
$errorPackages += Invoke-WinUtilWingetProgram -Action Install -Programs $packagesWinget
|
||||||
|
$errorPackages| ForEach-Object {if($_.choco -ne "na") {$packagesChoco += $_}}
|
||||||
}
|
}
|
||||||
if($packagesChoco.Count -gt 0) {
|
if($packagesChoco.Count -gt 0) {
|
||||||
Install-WinUtilChoco
|
Install-WinUtilChoco
|
||||||
Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco
|
Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco
|
||||||
}
|
}
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
Write-Host "-- Installs have finished ---"
|
Write-Host "-- Installs have finished ---"
|
||||||
|
@ -2,35 +2,25 @@ function Invoke-WPFInstallUpgrade {
|
|||||||
<#
|
<#
|
||||||
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Invokes the function that upgrades all installed programs
|
Invokes the function that upgrades all installed programs using winget
|
||||||
|
|
||||||
#>
|
#>
|
||||||
if ($sync.WPFpreferChocolatey.IsChecked) {
|
if((Test-WinUtilPackageManager -winget) -eq "not-installed") {
|
||||||
Install-WinUtilChoco
|
return
|
||||||
$chocoUpgradeStatus = (Start-Process "choco" -ArgumentList "upgrade all -y" -Wait -PassThru -NoNewWindow).ExitCode
|
|
||||||
if ($chocoUpgradeStatus -eq 0) {
|
|
||||||
Write-Host "Upgrade Successful"
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Write-Host "Error Occured. Return Code: $chocoUpgradeStatus"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
if((Test-WinUtilPackageManager -winget) -eq "not-installed") {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Get-WinUtilInstallerProcess -Process $global:WinGetInstall) {
|
if(Get-WinUtilInstallerProcess -Process $global:WinGetInstall) {
|
||||||
$msg = "[Invoke-WPFInstallUpgrade] Install process is currently running. Please check for a powershell window labeled 'Winget Install'"
|
$msg = "[Invoke-WPFInstallUpgrade] Install process is currently running. Please check for a powershell window labeled 'Winget Install'"
|
||||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
|
|
||||||
Update-WinUtilProgramWinget
|
|
||||||
|
|
||||||
Write-Host "==========================================="
|
|
||||||
Write-Host "-- Updates started ---"
|
|
||||||
Write-Host "-- You can close this window if desired ---"
|
|
||||||
Write-Host "==========================================="
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set-WinUtilTaskbaritem -state "Indeterminate"
|
||||||
|
|
||||||
|
Update-WinUtilProgramWinget
|
||||||
|
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Updates started ---"
|
||||||
|
Write-Host "-- You can close this window if desired ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
}
|
}
|
||||||
|
@ -178,22 +178,7 @@ public class PowerManagement {
|
|||||||
Write-Host "Removal complete!"
|
Write-Host "Removal complete!"
|
||||||
|
|
||||||
Write-Host "Create unattend.xml"
|
Write-Host "Create unattend.xml"
|
||||||
#New-Unattend
|
New-Unattend
|
||||||
if ($sync.MicrowinUserName.Text -eq "")
|
|
||||||
{
|
|
||||||
New-Unattend -userName "User"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($sync.MicrowinUserPassword.Password -eq "")
|
|
||||||
{
|
|
||||||
New-Unattend -userName "$($sync.MicrowinUserName.Text)"
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
New-Unattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Write-Host "Done Create unattend.xml"
|
Write-Host "Done Create unattend.xml"
|
||||||
Write-Host "Copy unattend.xml file into the ISO"
|
Write-Host "Copy unattend.xml file into the ISO"
|
||||||
New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther"
|
New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther"
|
||||||
|
@ -30,9 +30,7 @@ function Invoke-WPFRunspace {
|
|||||||
|
|
||||||
# Add Scriptblock and Arguments to runspace
|
# Add Scriptblock and Arguments to runspace
|
||||||
$script:powershell.AddScript($ScriptBlock)
|
$script:powershell.AddScript($ScriptBlock)
|
||||||
foreach ($Argument in $ArgumentList) {
|
$script:powershell.AddArgument($ArgumentList)
|
||||||
$script:powershell.AddArgument($Argument)
|
|
||||||
}
|
|
||||||
$script:powershell.AddArgument($DebugPreference) # Pass DebugPreference to the script block
|
$script:powershell.AddArgument($DebugPreference) # Pass DebugPreference to the script block
|
||||||
$script:powershell.RunspacePool = $sync.runspace
|
$script:powershell.RunspacePool = $sync.runspace
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ function Invoke-WPFTweakPS7{
|
|||||||
Write-Host "Powershell 7 is already installed."
|
Write-Host "Powershell 7 is already installed."
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Installing Powershell 7..."
|
Write-Host "Installing Powershell 7..."
|
||||||
Install-WinUtilProgramWinget -Action Install -Programs @("Microsoft.PowerShell")
|
Invoke-WinUtilWingetProgram -Action Install -Programs @("Microsoft.PowerShell")
|
||||||
}
|
}
|
||||||
$targetTerminalName = "PowerShell"
|
$targetTerminalName = "PowerShell"
|
||||||
}
|
}
|
||||||
|
@ -28,51 +28,38 @@ function Invoke-WPFUnInstall {
|
|||||||
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
if($confirm -eq "No") {return}
|
if($confirm -eq "No") {return}
|
||||||
$ChocoPreference = $($sync.WPFpreferChocolatey.IsChecked)
|
|
||||||
|
|
||||||
Invoke-WPFRunspace -ArgumentList $PackagesToInstall, $ChocoPreference -DebugPreference $DebugPreference -ScriptBlock {
|
|
||||||
param($PackagesToInstall, $ChocoPreference, $DebugPreference)
|
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
|
param($PackagesToInstall, $DebugPreference)
|
||||||
if ($PackagesToInstall.count -eq 1) {
|
if ($PackagesToInstall.count -eq 1) {
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
||||||
} else {
|
} else {
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
||||||
}
|
}
|
||||||
$packagesWinget, $packagesChoco = {
|
$packagesWinget, $packagesChoco = {
|
||||||
$packagesWinget = [System.Collections.ArrayList]::new()
|
$packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
$packagesChoco = [System.Collections.ArrayList]::new()
|
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
foreach ($package in $PackagesToInstall) {
|
||||||
foreach ($package in $PackagesToInstall) {
|
|
||||||
if ($ChocoPreference) {
|
|
||||||
if ($package.choco -eq "na") {
|
|
||||||
$packagesWinget.add($package.winget)
|
|
||||||
Write-Host "Queueing $($package.winget) for Winget uninstall"
|
|
||||||
} else {
|
|
||||||
$null = $packagesChoco.add($package.choco)
|
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey uninstall"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($package.winget -eq "na") {
|
if ($package.winget -eq "na") {
|
||||||
$packagesChoco.add($package.choco)
|
$packagesChoco.add($package)
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey uninstall"
|
Write-Host "Queueing $($package.choco) for Chocolatey Uninstall"
|
||||||
} else {
|
} else {
|
||||||
$null = $packagesWinget.add($($package.winget))
|
$packagesWinget.add($($package.winget))
|
||||||
Write-Host "Queueing $($package.winget) for Winget uninstall"
|
Write-Host "Queueing $($package.winget) for Winget Uninstall"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return $packagesWinget, $packagesChoco
|
||||||
return $packagesWinget, $packagesChoco
|
|
||||||
}.Invoke($PackagesToInstall)
|
}.Invoke($PackagesToInstall)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
# Install all selected programs in new window
|
# Install all selected programs in new window
|
||||||
if($packagesWinget.Count -gt 0) {
|
if($packagesWinget.Count -gt 0) {
|
||||||
Install-WinUtilProgramWinget -Action Uninstall -Programs $packagesWinget
|
Invoke-WinUtilWingetProgram -Action Uninstall -Programs $packagesWinget
|
||||||
}
|
}
|
||||||
if($packagesChoco.Count -gt 0) {
|
if($packagesChoco.Count -gt 0) {
|
||||||
Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco
|
Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco -Manage "Uninstalling"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
|
@ -87,14 +87,6 @@ try {
|
|||||||
|
|
||||||
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
|
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
|
||||||
|
|
||||||
#Persist the Chocolatey preference across winutil restarts
|
|
||||||
$ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
|
||||||
$sync.WPFpreferChocolatey.Add_Checked({New-Item -Path $ChocoPreferencePath -Force })
|
|
||||||
$sync.WPFpreferChocolatey.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force})
|
|
||||||
if (Test-Path $ChocoPreferencePath) {
|
|
||||||
$sync.WPFpreferChocolatey.IsChecked = $true
|
|
||||||
}
|
|
||||||
|
|
||||||
$sync.keys | ForEach-Object {
|
$sync.keys | ForEach-Object {
|
||||||
if($sync.$psitem) {
|
if($sync.$psitem) {
|
||||||
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "CheckBox" `
|
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "CheckBox" `
|
||||||
|
@ -44,15 +44,26 @@ $sync.version = "#{replaceme}"
|
|||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
$sync.ProcessRunning = $false
|
$sync.ProcessRunning = $false
|
||||||
|
|
||||||
# If script isn't running as admin, show error message and quit
|
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||||
If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544") {
|
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
|
||||||
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
|
$wtInstalled = Get-Command wt.exe -ErrorAction SilentlyContinue
|
||||||
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
|
$pwshInstalled = Get-Command pwsh -ErrorAction SilentlyContinue
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
if ($pwshInstalled) {
|
||||||
|
$powershellcmd = "pwsh"
|
||||||
|
} else {
|
||||||
|
$powershellcmd = "powershell"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($wtInstalled) {
|
||||||
|
Start-Process wt.exe -ArgumentList "new-tab $powershellcmd -ExecutionPolicy Bypass -Command `"irm https://christitus.com/win | iex`"" -Verb RunAs
|
||||||
|
} else {
|
||||||
|
Start-Process $powershellcmd -ArgumentList "-ExecutionPolicy Bypass -Command `"irm https://christitus.com/win | iex`"" -Verb RunAs
|
||||||
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set PowerShell window title
|
# Set PowerShell window title
|
||||||
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
||||||
clear-host
|
clear-host
|
@ -566,36 +566,6 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="PasswordBox">
|
|
||||||
<Setter Property="Background" Value="{MainBackgroundColor}"/>
|
|
||||||
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
|
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
|
||||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
|
||||||
<Setter Property="FontSize" Value="{FontSize}"/>
|
|
||||||
<Setter Property="Padding" Value="5"/>
|
|
||||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
||||||
<Setter Property="Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate TargetType="PasswordBox">
|
|
||||||
<Border Background="{TemplateBinding Background}"
|
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
|
||||||
CornerRadius="5">
|
|
||||||
<Grid>
|
|
||||||
<ScrollViewer x:Name="PART_ContentHost" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
<Setter Property="Effect">
|
|
||||||
<Setter.Value>
|
|
||||||
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{BorderOpacity}" Color="{BorderColor}"/>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
||||||
<Setter Property="Visibility" Value="Collapsed"/>
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@ -793,9 +763,6 @@
|
|||||||
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
||||||
<CheckBox Name="WPFpreferChocolatey" VerticalAlignment="Center" VerticalContentAlignment="Center">
|
|
||||||
<TextBlock Text="Prefer Chocolatey" ToolTip="Prefers Chocolatey as Download Engine instead of Winget" VerticalAlignment="Center" />
|
|
||||||
</CheckBox>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||||
@ -954,23 +921,6 @@
|
|||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock>
|
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock>
|
|
||||||
<TextBox Name="MicrowinUserName" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
|
||||||
Margin="6"
|
|
||||||
Text=""
|
|
||||||
IsReadOnly="False"
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
Foreground="{LabelboxForegroundColor}"
|
|
||||||
MaxLength="20"
|
|
||||||
/>
|
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password (characters will not be shown for your security):</TextBlock>
|
|
||||||
<PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
|
||||||
Margin="6"
|
|
||||||
PasswordChar="*"
|
|
||||||
Foreground="{LabelboxForegroundColor}"
|
|
||||||
/>
|
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
|
||||||
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
|
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed">
|
<StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed">
|
||||||
@ -1018,14 +968,15 @@
|
|||||||
Foreground="{ComboBoxForegroundColor}">
|
Foreground="{ComboBoxForegroundColor}">
|
||||||
<Bold>MicroWin features:</Bold><LineBreak/>
|
<Bold>MicroWin features:</Bold><LineBreak/>
|
||||||
- Remove Telemetry and Tracking <LineBreak/>
|
- Remove Telemetry and Tracking <LineBreak/>
|
||||||
- Fast Install using either the "User" local account or the account of your choosing <LineBreak/>
|
- Fast Install using "User" local account <LineBreak/>
|
||||||
- No internet requirement for install <LineBreak/>
|
- No internet requirement for install <LineBreak/>
|
||||||
- Apps debloat <LineBreak/>
|
- Apps debloat <LineBreak/>
|
||||||
<LineBreak/>
|
<LineBreak/>
|
||||||
<LineBreak/>
|
<LineBreak/>
|
||||||
|
|
||||||
<Bold>INSTRUCTIONS</Bold> <LineBreak/>
|
<Bold>INSTRUCTIONS</Bold> <LineBreak/>
|
||||||
- <TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Download</TextBlock> the latest Windows 11 image from Microsoft <LineBreak/>
|
- Download the latest Windows 11 image from Microsoft <LineBreak/>
|
||||||
|
LINK: https://www.microsoft.com/software-download/windows11 <LineBreak/>
|
||||||
May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
|
May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
|
||||||
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
|
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
|
||||||
- Launch WinUtil and MicroWin <LineBreak/>
|
- Launch WinUtil and MicroWin <LineBreak/>
|
||||||
|
Reference in New Issue
Block a user