Compare commits

..

No commits in common. "faae0e69cb250653ff9ee805531e6f485cad3bf3" and "27792dc8a3439692a57704a48d9de625d3f428fd" have entirely different histories.

66 changed files with 8604 additions and 9488 deletions

View File

@ -1,38 +0,0 @@
# Pull Request
## Title
[Provide a succinct and descriptive title for the pull request.]
## Type of Change
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation update
- [ ] Refactoring
- [ ] Hotfix
- [ ] Security patch
- [ ] UI/UX improvement
## Description
[Provide a detailed explanation of the changes you have made. Include the reasons behind these changes and any relevant context. Link any related issues.]
## Testing
[Detail the testing you have performed to ensure that these changes function as intended. Include information about any added tests.]
## Impact
[Discuss the impact of your changes on the project. This might include effects on performance, new dependencies, or changes in behaviour.]
## Issue related to PR
[What issue is related to this PR (if any)]
- Resolves #
[What discussion is related to this PR (if any)]
- Discussion: #
## Additional Information
[Any additional information that reviewers should be aware of.]
## Checklist
- [ ] My code adheres to the coding and style guidelines of the project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] My changes generate no errors/warnings/merge conflicts.

View File

@ -1,23 +0,0 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material
- run: pip install pillow cairosvg
- run: mkdocs gh-deploy --force

View File

@ -1,30 +0,0 @@
name: Close Discussion on PR Merge
on:
pull_request:
types: [closed]
jobs:
closeDiscussion:
runs-on: ubuntu-latest
steps:
- name: Check if PR was merged
if: github.event.pull_request.merged == true
run: echo "PR was merged"
- name: Extract Discussion Number
if: github.event.pull_request.merged == true
id: extract-discussion
run: |
echo "::set-output name=discussion::$(echo "${{ github.event.pull_request.body }}" | grep -oP '(?<=Discussion: #)\d+')"
shell: bash
- name: Close the discussion
if: github.event.pull_request.merged == true && steps.extract-discussion.outputs.discussion
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCUSSION_ID: ${{ steps.extract-discussion.outputs.discussion }}
run: |
curl -X PATCH -H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "closed"}' \
"https://api.github.com/repos/${{ github.repository }}/discussions/${DISCUSSION_ID}"

View File

@ -14,7 +14,7 @@ jobs:
contents: none contents: none
steps: steps:
- name: Close inactive issues - name: Close inactive issues
uses: actions/stale@v8 uses: actions/stale@v9.0.0
with: with:
# A list of labels to reference when looking through issues, # A list of labels to reference when looking through issues,
# and only when one (or even more) of these labels are found.. # and only when one (or even more) of these labels are found..
@ -33,7 +33,7 @@ jobs:
# Increase this value if the project receives a lot of # Increase this value if the project receives a lot of
# PRs (yes.. apparently they're processed no matter what) & Issues. # PRs (yes.. apparently they're processed no matter what) & Issues.
# Default value for it (according to the docs) is 30 # Default value for it (according to the docs) is 30
operations-per-run: 200 operations-per-run: 100
# Make this field equal true if you want to test your configuration if it works correctly or not # Make this field equal true if you want to test your configuration if it works correctly or not
debug-only: false debug-only: false
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,17 +0,0 @@
name: On release published
on:
release:
types: [published]
jobs:
changelog:
name: Update changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
- uses: rhysd/changelog-from-release/action@v3
with:
file: /docs/updates.md
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -7,7 +7,7 @@
- If you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command: - If you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command:
```ps1 ```
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1') [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1')
``` ```
@ -22,11 +22,11 @@ If you are still having issues try using a **VPN**, or changing your **DNS provi
- Script doesn't run/PowerShell crashes: - Script doesn't run/PowerShell crashes:
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) 1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
2. Run: 2. Run:
```ps1 ```
Set-ExecutionPolicy Unrestricted -Scope Process -Force Set-ExecutionPolicy Unrestricted -Scope Process -Force
``` ```
3. Run: 3. Run:
```ps1 ```
irm christitus.com/win | iex irm christitus.com/win | iex
``` ```
@ -38,12 +38,12 @@ If you are still having issues try using a **VPN**, or changing your **DNS provi
control /name Microsoft.PowerOptions /page pageGlobalSettings control /name Microsoft.PowerOptions /page pageGlobalSettings
``` ```
- If that doesn't work, Disable Hibernation: Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) and enter: - If that doesn't work, Disable Hibernation: Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) and enter:
```ps1 ```
powercfg /H off powercfg /H off
``` ```
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) Windows Search does not work: Enable Background Apps - [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) Windows Search does not work: Enable Background Apps
- [#198](https://github.com/ChrisTitusTech/winutil/issues/198) Xbox Game Bar Activation Broken: Set the Xbox Accessory Management Service to Automatic - [#198](https://github.com/ChrisTitusTech/winutil/issues/198) Xbox Game Bar Activation Broken: Set the Xbox Accessory Management Service to Automatic
```ps1 ```
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
``` ```
@ -51,3 +51,14 @@ Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center' - (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
- Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'. - Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'.
- Script doesn't run/PowerShell crashes:
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
2. Run:
```
Set-ExecutionPolicy Unrestricted -Scope Process -Force
```
3. Run:
```
irm christitus.com/win | iex
```

112
README.md
View File

@ -1,14 +1,12 @@
# Chris Titus Tech's Windows Utility # Chris Titus Tech's Windows Utility
[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=7a39fb)](https://github.com/ChrisTitusTech/winutil/releases/latest) [![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=7a39fb)](https://github.com/ChrisTitusTech/winutil/releases/latest)
![GitHub Downloads (all assets, latest release)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/latest/total)
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ)
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient. This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
![screen-install](./docs/assets/screen-install.png) ![screen-install](screen-install.png)
## 💡 Usage ## Usage
Winutil must be run in Admin mode because it performs system-wide tweaks. To achieve this, open PowerShell or Windows Terminal as an administrator. Here are a few ways to do it: Winutil must be run in Admin mode because it performs system-wide tweaks. To achieve this, open PowerShell or Windows Terminal as an administrator. Here are a few ways to do it:
@ -24,39 +22,111 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach
### Launch Command ### Launch Command
#### Stable Branch #### Simple way
```ps1 ```ps1
irm "https://christitus.com/win" | iex irm "https://christitus.com/win" | iex
``` ```
#### Dev Branch Courtesy of the issue: [#144](/../../issues/144)
If this site is not reachable from your country, please try running it directly from GitHub.
```ps1 ```ps1
irm "https://christitus.com/windev" | iex irm "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1" | iex
``` ```
If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/) If you still have Issues, refer to [Known Issues](https://github.com/ChrisTitusTech/winutil/blob/main/KnownIssues.md).
## 🎓 Documenation
### [WinUtil Official Documentation](https://christitustech.github.io/winutil/)
### YouTube Tutorial
[![Watch the video](https://img.youtube.com/vi/6UQZ5oQg8XA/hqdefault.jpg)](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
### [ChrisTitus.com Article](https://christitus.com/windows-tool/)
## 💖 Support #### Automation
Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
![GetInstalled](/wiki/Get-Installed.png)
2. Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
![SettingsExport](/wiki/Settings-Export.png)
3. Copy this file to a USB or somewhere you can use after Windows installation.
4. Use Microwin tab to create a custom Windows image.
5. Install the Windows image.
6. In the new Windows, Open PowerShell in the admin mode and run command to automatically apply tweaks and install apps from the config file.
```
iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run"
```
7. Have a cup of coffee! Come back when it's done.
## Support
- To morally and mentally support the project, make sure to leave a ⭐️! - To morally and mentally support the project, make sure to leave a ⭐️!
- EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox - EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox
## 🏅 Thanks to all Contributors ## Tutorial
[![Watch the video](https://img.youtube.com/vi/6UQZ5oQg8XA/hqdefault.jpg)](https://www.youtube.com/watch?v=6UQZ5oQg8XA)
## Overview
- Install
- Install Selection: Organize programs by category and facilitate installation by enabling users to select programs and initiate the installation process with a single click.
- Upgrade All: Upgrade all existing programs to their latest versions, ensuring users have the most up-to-date and feature-rich software.
- Uninstall Selection: Effortlessly uninstall selected programs, providing users with a streamlined way to remove unwanted software from their system.
- Get Installed: Retrieve a comprehensive list of installed programs on the system, offering users visibility into the software currently installed on their computer.
- Import / Export: Enable users to import or export the selection list of programs, allowing them to save their preferred program configurations or share them with others. This feature promotes convenience and flexibility in managing program selections across different systems.
- Tweaks
- Recommended Selection: Provides pre-defined templates tailored for desktop, laptop, and minimal configurations, allowing users to select recommended settings and optimizations specific to their system type.
- Essential Tweaks: Offers a collection of essential tweaks aimed at improving system performance, privacy, and resource utilization. These tweaks include creating a system restore point, disabling telemetry, Wi-Fi Sense, setting services to manual, disabling location tracking, and HomeGroup, among others.
- Advanced Tweaks: Encompasses a range of various advanced power user tweaks to further optimize the system. These tweaks include removing OneDrive and Edge, disabling User Account Control (UAC), notification panel, among others.
- Toggles: Adds easy to use, one click shortcuts for toggling dark mode, NumLock on startup, file extensions, sticky keys, among others.
- Additional Tweaks: Introduces various other tweaks such as enabling dark mode, changing DNS settings, adding an Ultimate Performance mode, and creating shortcuts for WinUtil tools. These tweaks provide users with additional customization options to tailor their system to their preferences.
- Config
- Features: Allows users to easily install various essential components and features to enhance their Windows experience. These features include installing .NET Frameworks, enabling Hyper-V virtualization, enabling legacy media support for Windows Media Player and DirectPlay, enabling NFS (Network File System) for network file sharing, and enabling Windows Subsystem for Linux (WSL) for running Linux applications on Windows.
- Fixes: Provides a range of helpful fixes to address common issues and improve system stability. This includes setting up autologon for seamless login experiences, resetting Windows updates to resolve update-related problems, performing a system corruption scan to detect and repair corrupted files, and resetting network settings to troubleshoot network connectivity issues.
- Legacy Windows Panels: Includes access to legacy Windows panels from Windows 7, allowing users to access familiar and powerful tools. These panels include Control Panel for managing system settings, Network Connections for configuring network adapters and connections, Power Panel for adjusting power and sleep settings, Sound Settings for managing audio devices and settings, System Properties for viewing and modifying system information, and User Accounts for managing user profiles and account settings.
- Updates:
- Default (Out of Box) Settings: Provides the default settings that come with Windows for updates.
- Security (Recommended) Settings: Offers recommended settings, including a slight delay of feature updates by 2 years and installation of security updates 4 days after release.
- Disable All Updates (Not Recommended!): Allows users to disable all Windows updates, but it's not recommended due to potential security risks.
Video and Written Article walkthrough @ <https://christitus.com/windows-tool/>
## Issues
If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me to promptly address any bugs or consider feature requests.
## Contribute Code
Pull Requests are now handled directly on the MAIN branch. This was done since we can now select specific releases to launch via releases in GitHub.
If doing a code change and you can submit a PR to main branch, but I am very selective about these. Do not use a code formatter, massive amounts of line changes, and make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN Pull Request!
When creating pull requests, it is essential to thoroughly document all changes made. This includes documenting any additions made to the tweaks section and ensuring that corresponding undo measures are in place to remove the newly added tweaks if necessary. Failure to adhere to this format may result in denial of the pull request. Additionally, comprehensive documentation is required for all code changes. Any code lacking sufficient documentation may also be denied.
By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
NOTE: When creating a function please include "WPF" or "WinUtil" in the name so that it can be loaded into the runspace.
## 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 🍻.
[![Contributors](https://contrib.rocks/image?repo=ChrisTitusTech/winutil)](https://github.com/ChrisTitusTech/winutil/graphs/contributors) [![Contributors](https://contrib.rocks/image?repo=ChrisTitusTech/winutil)](https://github.com/ChrisTitusTech/winutil/graphs/contributors)
## 📊 GitHub Stats ## GitHub Stats
![Alt](https://repobeats.axiom.co/api/embed/aad37eec9114c507f109d34ff8d38a59adc9503f.svg "Repobeats analytics image") ![Alt](https://repobeats.axiom.co/api/embed/aad37eec9114c507f109d34ff8d38a59adc9503f.svg "Repobeats analytics image")

View File

@ -951,37 +951,69 @@
"link": "https://jami.net/", "link": "https://jami.net/",
"winget": "SFLinux.Jami" "winget": "SFLinux.Jami"
}, },
"java8": { "java16": {
"category": "Development", "category": "Development",
"choco": "corretto8jdk", "choco": "temurin16jre",
"content": "Amazon Corretto 8 (LTS)", "content": "OpenJDK Java 16",
"description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "description": "OpenJDK Java 16 is the latest version of the open-source Java development kit.",
"link": "https://aws.amazon.com/corretto", "link": "https://adoptopenjdk.net/",
"winget": "Amazon.Corretto.8.JDK" "winget": "AdoptOpenJDK.OpenJDK.16"
}, },
"java11": { "java18": {
"category": "Development", "category": "Development",
"choco": "corretto11jdk", "choco": "temurin18jre",
"content": "Amazon Corretto 11 (LTS)", "content": "Oracle Java 18",
"description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "description": "Oracle Java 18 is the latest version of the official Java development kit from Oracle.",
"link": "https://aws.amazon.com/corretto", "link": "https://www.oracle.com/java/",
"winget": "Amazon.Corretto.11.JDK" "winget": "EclipseAdoptium.Temurin.18.JRE"
},
"java17": {
"category": "Development",
"choco": "corretto17jdk",
"content": "Amazon Corretto 17 (LTS)",
"description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).",
"link": "https://aws.amazon.com/corretto",
"winget": "Amazon.Corretto.17.JDK"
}, },
"java21": { "java21": {
"category": "Development", "category": "Development",
"choco": "corretto21jdk", "choco": "na",
"content": "Amazon Corretto 21 (LTS)", "content": "Azul Zulu JDK 21",
"description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "description": "Azul Zulu JDK 21 is a distribution of the OpenJDK with long-term support, performance enhancements, and security updates.",
"link": "https://aws.amazon.com/corretto", "link": "https://www.azul.com/downloads/zulu-community/",
"winget": "Amazon.Corretto.21.JDK" "winget": "Azul.Zulu.21.JDK"
},
"java8": {
"category": "Development",
"choco": "temurin8jre",
"content": "OpenJDK Java 8",
"description": "OpenJDK Java 8 is an open-source implementation of the Java Platform, Standard Edition.",
"link": "https://adoptopenjdk.net/",
"winget": "EclipseAdoptium.Temurin.8.JRE"
},
"java11runtime": {
"category": "Development",
"choco": "na",
"content": "Eclipse Temurin JRE 11",
"description": "Eclipse Temurin JRE is the open source Java SE build based upon OpenJRE.",
"link": "https://adoptium.net/",
"winget": "EclipseAdoptium.Temurin.11.JRE"
},
"java17runtime": {
"category": "Development",
"choco": "na",
"content": "Eclipse Temurin JRE 17",
"description": "Eclipse Temurin JRE is the open source Java SE build based upon OpenJRE.",
"link": "https://adoptium.net/",
"winget": "EclipseAdoptium.Temurin.17.JRE"
},
"java18runtime": {
"category": "Development",
"choco": "na",
"content": "Eclipse Temurin JRE 18",
"description": "Eclipse Temurin JRE is the open source Java SE build based upon OpenJRE.",
"link": "https://adoptium.net/",
"winget": "EclipseAdoptium.Temurin.18.JRE"
},
"java19runtime": {
"category": "Development",
"choco": "na",
"content": "Eclipse Temurin JRE 19",
"description": "Eclipse Temurin JRE is the open source Java SE build based upon OpenJRE.",
"link": "https://adoptium.net/",
"winget": "EclipseAdoptium.Temurin.19.JRE"
}, },
"jdownloader": { "jdownloader": {
"category": "Utilities", "category": "Utilities",
@ -1183,14 +1215,6 @@
"link": "https://meldmerge.org/", "link": "https://meldmerge.org/",
"winget": "Meld.Meld" "winget": "Meld.Meld"
}, },
"ModernFlyouts": {
"category": "Multimedia Tools",
"choco": "na",
"content": "Modern Flyouts",
"description": "An open source, modern, Fluent Design-based set of flyouts for Windows.",
"link": "https://github.com/ModernFlyouts-Community/ModernFlyouts/",
"winget": "ModernFlyouts.ModernFlyouts"
},
"monitorian": { "monitorian": {
"category": "Utilities", "category": "Utilities",
"choco": "monitorian", "choco": "monitorian",
@ -1919,10 +1943,10 @@
"link": "https://getsharex.com/", "link": "https://getsharex.com/",
"winget": "ShareX.ShareX" "winget": "ShareX.ShareX"
}, },
"nilesoftShell": { "nilesoftShel": {
"category": "Utilities", "category": "Utilities",
"choco": "nilesoft-shell", "choco": "nilesoft-shell",
"content": "Nilesoft Shell", "content": "Shell (Expanded Context Menu)",
"description": "Shell is an expanded context menu tool that adds extra functionality and customization options to the Windows context menu.", "description": "Shell is an expanded context menu tool that adds extra functionality and customization options to the Windows context menu.",
"link": "https://nilesoft.org/", "link": "https://nilesoft.org/",
"winget": "Nilesoft.Shell" "winget": "Nilesoft.Shell"
@ -2458,7 +2482,7 @@
"wingetui": { "wingetui": {
"category": "Utilities", "category": "Utilities",
"choco": "wingetui", "choco": "wingetui",
"content": "UnigetUI", "content": "WingetUI",
"description": "WingetUI is a graphical user interface for Microsoft's Windows Package Manager (winget).", "description": "WingetUI is a graphical user interface for Microsoft's Windows Package Manager (winget).",
"link": "https://www.marticliment.com/wingetui/", "link": "https://www.marticliment.com/wingetui/",
"winget": "SomePythonThings.WingetUIStore" "winget": "SomePythonThings.WingetUIStore"
@ -2848,7 +2872,7 @@
"winget": "NDI.NDITools" "winget": "NDI.NDITools"
}, },
"kicad": { "kicad": {
"category": "Multimedia Tools", "category": "Pro Tools",
"choco": "na", "choco": "na",
"content": "Kicad", "content": "Kicad",
"description":"Kicad is an open-source EDA tool. It's a good starting point for those who want to do electrical design and is even used by professionals in the industry.", "description":"Kicad is an open-source EDA tool. It's a good starting point for those who want to do electrical design and is even used by professionals in the industry.",
@ -2878,13 +2902,5 @@
"description":"GUI Tool To Removes Ads From Various Places Around Windows 11", "description":"GUI Tool To Removes Ads From Various Places Around Windows 11",
"link": "https://github.com/xM4ddy/OFGB", "link": "https://github.com/xM4ddy/OFGB",
"winget": "xM4ddy.OFGB" "winget": "xM4ddy.OFGB"
},
"Shotcut": {
"category": "Multimedia Tools",
"choco": "na",
"content": "Shotcut",
"description": "Shotcut is a free, open source, cross-platform video editor.",
"link": "https://shotcut.org/",
"winget": "Meltytech.Shotcut"
} }
} }

View File

@ -1,50 +1,30 @@
{ {
"Google":{ "Google":{
"Primary": "8.8.8.8", "Primary": "8.8.8.8",
"Secondary": "8.8.4.4", "Secondary": "8.8.4.4"
"Primary6": "2001:4860:4860::8888",
"Secondary6": "2001:4860:4860::8844"
}, },
"Cloudflare":{ "Cloudflare":{
"Primary": "1.1.1.1", "Primary": "1.1.1.1",
"Secondary": "1.0.0.1", "Secondary": "1.0.0.1"
"Primary6": "2606:4700:4700::1111",
"Secondary6": "2606:4700:4700::1001"
}, },
"Cloudflare_Malware":{ "Cloudflare_Malware":{
"Primary": "1.1.1.2", "Primary": "1.1.1.2",
"Secondary": "1.0.0.2", "Secondary": "1.0.0.2"
"Primary6": "2606:4700:4700::1112",
"Secondary6": "2606:4700:4700::1002"
}, },
"Cloudflare_Malware_Adult":{ "Cloudflare_Malware_Adult":{
"Primary": "1.1.1.3", "Primary": "1.1.1.3",
"Secondary": "1.0.0.3", "Secondary": "1.0.0.3"
"Primary6": "2606:4700:4700::1113", },
"Secondary6": "2606:4700:4700::1003" "Level3":{
"Primary": "4.2.2.2",
"Secondary": "4.2.2.1"
}, },
"Open_DNS":{ "Open_DNS":{
"Primary": "208.67.222.222", "Primary": "208.67.222.222",
"Secondary": "208.67.220.220", "Secondary": "208.67.220.220"
"Primary6": "2620:119:35::35",
"Secondary6": "2620:119:53::53"
}, },
"Quad9":{ "Quad9":{
"Primary": "9.9.9.9", "Primary": "9.9.9.9",
"Secondary": "149.112.112.112", "Secondary": "149.112.112.112"
"Primary6": "2620:fe::fe",
"Secondary6": "2620:fe::9"
},
"AdGuard_Ads_Trackers":{
"Primary": "94.140.14.14",
"Secondary": "94.140.15.15",
"Primary6": "2a10:50c0::ad1:ff",
"Secondary6": "2a10:50c0::ad2:ff"
},
"AdGuard_Ads_Trackers_Malware_Adult":{
"Primary": "94.140.14.15",
"Secondary": "94.140.15.16",
"Primary6": "2a10:50c0::bad1:ff",
"Secondary6": "2a10:50c0::bad2:ff"
} }
} }

View File

@ -184,104 +184,90 @@
"category": "Features", "category": "Features",
"panel": "1", "panel": "1",
"Order": "a060_", "Order": "a060_",
"Type": "Button", "Type": "150"
"ButtonWidth": "300"
}, },
"WPFPanelAutologin": { "WPFPanelAutologin": {
"Content": "Set Up Autologin", "Content": "Set Up Autologin",
"category": "Fixes", "category": "Fixes",
"Order": "a040_", "Order": "a040_",
"panel": "1", "panel": "1",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFFixesUpdate": { "WPFFixesUpdate": {
"Content": "Reset Windows Update", "Content": "Reset Windows Update",
"category": "Fixes", "category": "Fixes",
"panel": "1", "panel": "1",
"Order": "a041_", "Order": "a041_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFFixesNetwork": { "WPFFixesNetwork": {
"Content": "Reset Network", "Content": "Reset Network",
"category": "Fixes", "category": "Fixes",
"Order": "a042_", "Order": "a042_",
"panel": "1", "panel": "1",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFPanelDISM": { "WPFPanelDISM": {
"Content": "System Corruption Scan", "Content": "System Corruption Scan",
"category": "Fixes", "category": "Fixes",
"panel": "1", "panel": "1",
"Order": "a043_", "Order": "a043_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFFixesWinget": { "WPFFixesWinget": {
"Content": "WinGet Reinstall", "Content": "WinGet Reinstall",
"category": "Fixes", "category": "Fixes",
"panel": "1", "panel": "1",
"Order": "a044_", "Order": "a044_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFRunAdobeCCCleanerTool": { "WPFRunAdobeCCCleanerTool": {
"Content": "Remove Adobe Creative Cloud", "Content": "Remove Adobe Creative Cloud",
"category": "Fixes", "category": "Fixes",
"panel": "1", "panel": "1",
"Order": "a045_", "Order": "a045_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFPanelnetwork": { "WPFPanelnetwork": {
"Content": "Network Connections", "Content": "Network Connections",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPanelcontrol": { "WPFPanelcontrol": {
"Content": "Control Panel", "Content": "Control Panel",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPanelpower": { "WPFPanelpower": {
"Content": "Power Panel", "Content": "Power Panel",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPanelregion": { "WPFPanelregion": {
"Content": "Region", "Content": "Region",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPanelsound": { "WPFPanelsound": {
"Content": "Sound Settings", "Content": "Sound Settings",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPanelsystem": { "WPFPanelsystem": {
"Content": "System Properties", "Content": "System Properties",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
}, },
"WPFPaneluser": { "WPFPaneluser": {
"Content": "User Accounts", "Content": "User Accounts",
"category": "Legacy Windows Panels", "category": "Legacy Windows Panels",
"panel": "2", "panel": "2",
"Type": "Button", "Type": "200"
"ButtonWidth": "300"
} }
} }

399
config/helperscript.ps1 Normal file
View File

@ -0,0 +1,399 @@
# This file is meant to assist in building out the json files inside this folder.
#===========================================================================
# applications.json
#===========================================================================
<#
Applications.json
-----------------
This file holds all the install commands to install the applications.
This file has the ability to expect multiple frameworks per checkbox.
You can also add multiple install commands by separating them with ;
The structure of the json is as follows
{
"Name of Button": {
"winget": "Winget command"
"choco": "Chocolatey command"
},
}
Example:
{
"WPFInstalladobe": {
"winget": "Adobe.Acrobat.Reader.64-bit"
"choco": "adobereader"
},
"WPFInstalladvancedip": {
"winget": "Famatech.AdvancedIPScanner"
"choco": "advanced-ip-scanner"
}
}
#>
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
#------Do not delete WPF------
$NameofButton = "WPF" + ""
$WingetCommand = ""
$ChocoCommand = ""
$ButtonToAdd = New-Object psobject
$jsonfile = Get-Content ./config/applications.json | ConvertFrom-Json
# Remove if already exists
if($jsonfile.$NameofButton){
$jsonfile.psobject.Properties.remove($NameofButton)
}
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Winget" -Value $WingetCommand
Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "choco" -Value $ChocoCommand
Add-Member -InputObject $jsonfile.install -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
$jsonfile | ConvertTo-Json | Out-File ./config/applications.json
#===========================================================================
# feature.json
#===========================================================================
<#
feature.json
-----------------
This file holds all the windows commands to install specific features (IE Hyper-v)
The structure of the json is as follows
{
"Name of Button": [
"Array of",
"commands"
]
}
Example:
{
"Featurewsl": [
"VirtualMachinePlatform",
"Microsoft-Windows-Subsystem-Linux"
],
"Featurenfs": [
"ServicesForNFS-ClientOnly",
"ClientForNFS-Infrastructure",
"NFS-Administration"
]
}
#>
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
$NameofButton = ""
$commands = @(
)
$jsonfile = Get-Content ./config/feature.json | ConvertFrom-Json
# Remove if already exists
if($jsonfile.$NameofButton){
$jsonfile.psobject.Properties.remove($NameofButton)
}
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $commands
$jsonfile | ConvertTo-Json | Out-File ./config/feature.json
#===========================================================================
# preset.json
#===========================================================================
<#
preset.json
-----------------
This file holds all check boxes you wish to check when clicking a preset button in the tweaks section.
The structure of the json is as follows
{
"Name of Button": [
"Array of",
"checkboxes to check"
]
}
Example:
{
"laptop": [
"EssTweaksAH",
"EssTweaksDVR",
"EssTweaksHome",
"EssTweaksLoc",
"EssTweaksOO",
"EssTweaksRP",
"EssTweaksServices",
"EssTweaksStorage",
"EssTweaksTele",
"EssTweaksWifi",
"MiscTweaksLapPower",
"MiscTweaksLapNum"
],
"minimal": [
"EssTweaksHome",
"EssTweaksOO",
"EssTweaksRP",
"EssTweaksServices",
"EssTweaksTele"
]
}
#>
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
$NameofButton = "WPF" + ""
$commands = @(
)
$jsonfile = Get-Content ./config/preset.json | ConvertFrom-Json
# Remove if already exists
if($jsonfile.$NameofButton){
$jsonfile.psobject.Properties.remove($NameofButton)
}
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $commands
$jsonfile | ConvertTo-Json | Out-File ./config/preset.json
#===========================================================================
# tweaks.json
#===========================================================================
<#
tweaks.json
-----------------
This file holds all the tweaks needed to make modifications to windows. This file is the most complicated so modify with care.
The structure of the json is as follows
{
"Name of button": {
"registry" : [
{
"Path": "Path in registry",
"Name": "Name of Registry key",
"Type": "Item type",
"Value": "Value to modify",
"OriginalValue": "value to reset"
}
],
"service" : [
{
"Name": "Name of service",
"StartupType": "Startup type to set",
"OriginalType": "Startup type to reset"
}
],
"ScheduledTask" : [
{
"Name": "Path to scheduled task",
"State": "State to set",
"OriginalState": "State to reset"
}
],
"appx": [
List of appx,
files to uninstall
],
"InvokeScript": [
"Script to make modifications not possible with the above types
Special care needs to be taken here as converting from json to a scriptblock
can cause weird issues. Please look at the example below to get an idea of how things should work"
],
"UndoScript": [
"Same as above however is meant to undo what you did above"
]
}
}
Example:
{
EssTweaksAH": {
"registry" : [
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
"Name": "EnableActivityFeed",
"Type": "DWord",
"Value": "0",
"OriginalValue": "1"
},
{
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System",
"Name": "PublishUserActivities",
"Type": "DWord",
"Value": "0",
"OriginalValue": "1"
}
]
},
"EssTweaksHome": {
"service" : [
{
"Name": "HomeGroupListener",
"StartupType": "Manual",
"OriginalType": "Automatic"
},
{
"Name": "HomeGroupProvider",
"StartupType": "Manual",
"OriginalType": "Automatic"
}
]
},
"EssTweaksTele": {
"ScheduledTask" : [
{
"Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser",
"State": "Disabled",
"OriginalState": "Enabled"
},
{
"Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater",
"State": "Disabled",
"OriginalState": "Enabled"
}
]
},
"EssTweaksDeBloat": {
"appx": [
"Microsoft.Microsoft3DViewer",
"Microsoft.AppConnector"
]
},
"EssTweaksOO": {
"InvokeScript": [
"Import-Module BitsTransfer
Start-BitsTransfer -Source \"https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg\" -Destination C:\\Windows\\Temp\\ooshutup10.cfg
Start-BitsTransfer -Source \"https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe\" -Destination C:\\Windows\\Temp\\OOSU10.exe
C:\\Windows\\Temp\\OOSU10.exe C:\\Windows\\Temp\\ooshutup10.cfg /quiet"
]
}
}
#>
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
# Make sure to uncomment the sections you which to add.
#$Registry = @(
# # To add more repeat this separated by a comma
# @{
# Path = ""
# Name = ""
# Type = ""
# Value = ""
# OriginalValue = ""
# }
#)
#$Service = @(
# # To add more repeat this separated by a comma
# @{
# Name = ""
# StartupType = ""
# OriginalType = ""
# }
#)
#$ScheduledTask = @(
# # To add more repeat this separated by a comma
# @{
# Name = ""
# State = ""
# OriginalState = ""
# }
#)
#$Appx = @(
# ""
#)
#$InvokeScript = @(
# ""
#)
#$UndoScript = @(
# ""
#)
$NameofButton = "WPF" + ""
$ButtonToAdd = New-Object psobject
$jsonfile = Get-Content ./config/tweaks.json | ConvertFrom-Json
# Remove if already exists
if($jsonfile.$NameofButton){
$jsonfile.psobject.Properties.remove($NameofButton)
}
if($Registry){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "registry" -Value $Registry}
if($Service){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "service" -Value $Service}
if($ScheduledTask){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "ScheduledTask" -Value $ScheduledTask}
if($Appx){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "Appx" -Value $Appx}
if($InvokeScript){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "InvokeScript" -Value $InvokeScript}
if($UndoScript){Add-Member -InputObject $ButtonToAdd -MemberType NoteProperty -Name "UndoScript" -Value $UndoScript}
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofButton -Value $ButtonToAdd
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/tweaks.json
#===========================================================================
# dns.json
#===========================================================================
<#
dns.json
-----------------
This file holds all the DNS entries.
The structure of the json is as follows
{
"DNS Provider": [
"Primary": "IP address",
"Secondary": "IP address"
]
}
Example:
{
"Cloudflare":{
"Primary": "1.1.1.1",
"Secondary": "1.0.0.1"
}
}
#>
# Modify the variables and run his code. It will import the current file and add your addition. From there you can create a pull request.
$NameofProvider = "" -replace " ","_"
$IPAddress = @{
"Primary" = "0.0.0.0"
"Secondary" = "0.0.0.0"
}
$ButtonToAdd = New-Object psobject
$jsonfile = Get-Content ./config/dns.json | ConvertFrom-Json
# Remove if already exists
if($jsonfile.$NameofProvider){
$jsonfile.psobject.Properties.remove($NameofProvider)
}
Add-Member -InputObject $jsonfile -MemberType NoteProperty -Name $NameofProvider -Value $IPAddress
($jsonfile | ConvertTo-Json -Depth 5).replace('\r\n',"`r`n") | Out-File ./config/dns.json

View File

@ -14,8 +14,7 @@
"WPFTweaksDeleteTempFiles", "WPFTweaksDeleteTempFiles",
"WPFTweaksEndTaskOnTaskbar", "WPFTweaksEndTaskOnTaskbar",
"WPFTweaksRestorePoint", "WPFTweaksRestorePoint",
"WPFTweaksTeredo", "WPFTweaksTeredo"
"WPFTweaksPowershell7Tele"
], ],
"Minimal": [ "Minimal": [
"WPFTweaksConsumerFeatures", "WPFTweaksConsumerFeatures",

View File

@ -1,30 +1,5 @@
{ {
"Classic": { "Classic": {
"CustomDialogFontSize": "12",
"CustomDialogFontSizeHeader": "14",
"CustomDialogIconSize": "25",
"CustomDialogWidth": "400",
"CustomDialogHeight": "200",
"FontSize": "12",
"FontFamily": "Arial",
"FontSizeHeading": "14",
"HeaderFontFamily": "Consolas, Monaco",
"CheckBoxBulletDecoratorFontSize": "14",
"CheckBoxMargin": "15,0,0,2",
"TabButtonFontSize": "14",
"TabButtonWidth": "100",
"TabButtonHeight": "25",
"TabRowHeightInPixels": "50",
"IconFontSize": "14",
"IconButtonSize": "35",
"WinUtilIconSize": "Auto",
"SettingsIconFontSize": "18",
"MicroWinLogoSize": "10",
"ComboBoxBackgroundColor": "#FFFFFF", "ComboBoxBackgroundColor": "#FFFFFF",
"LabelboxForegroundColor": "#000000", "LabelboxForegroundColor": "#000000",
"MainForegroundColor": "#000000", "MainForegroundColor": "#000000",
@ -34,18 +9,6 @@
"LinkHoverForegroundColor": "#000000", "LinkHoverForegroundColor": "#000000",
"GroupBorderBackgroundColor": "#000000", "GroupBorderBackgroundColor": "#000000",
"ComboBoxForegroundColor": "#000000", "ComboBoxForegroundColor": "#000000",
"ButtonFontSize": "12",
"ButtonFontFamily": "Arial",
"ButtonWidth": "200",
"ButtonHeight": "25",
"ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#FFFFFF", "ButtonInstallBackgroundColor": "#FFFFFF",
"ButtonTweaksBackgroundColor": "#FFFFFF", "ButtonTweaksBackgroundColor": "#FFFFFF",
"ButtonConfigBackgroundColor": "#FFFFFF", "ButtonConfigBackgroundColor": "#FFFFFF",
@ -61,40 +24,15 @@
"ButtonBackgroundSelectedColor": "#F0F0F0", "ButtonBackgroundSelectedColor": "#F0F0F0",
"ButtonForegroundColor": "#000000", "ButtonForegroundColor": "#000000",
"ToggleButtonOnColor": "#2e77ff", "ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1", "ButtonBorderThickness": "1",
"ButtonMargin": "1", "ButtonMargin": "1",
"ButtonCornerRadius": "2", "ButtonCornerRadius": "2",
"ToggleButtonHeight": "25",
"BorderColor": "#000000", "BorderColor": "#000000",
"BorderOpacity": "0.2", "BorderOpacity": "0.2",
"ShadowPulse": "Forever" "ShadowPulse": "Forever"
}, },
"Matrix": { "Matrix": {
"CustomDialogFontSize": "12",
"CustomDialogFontSizeHeader": "14",
"CustomDialogIconSize": "25",
"CustomDialogWidth": "400",
"CustomDialogHeight": "200",
"FontSize": "12",
"FontFamily": "Arial",
"FontSizeHeading": "14",
"HeaderFontFamily": "Consolas, Monaco",
"CheckBoxBulletDecoratorFontSize": "14",
"CheckBoxMargin": "15,0,0,2",
"TabButtonFontSize": "14",
"TabButtonWidth": "100",
"TabButtonHeight": "25",
"TabRowHeightInPixels": "50",
"IconFontSize": "14",
"IconButtonSize": "35",
"WinUtilIconSize": "Auto",
"SettingsIconFontSize": "18",
"MicroWinLogoSize": "10",
"ComboBoxBackgroundColor": "#000000", "ComboBoxBackgroundColor": "#000000",
"LabelboxForegroundColor": "#FFEE58", "LabelboxForegroundColor": "#FFEE58",
"MainForegroundColor": "#9CCC65", "MainForegroundColor": "#9CCC65",
@ -103,18 +41,6 @@
"LinkForegroundColor": "#add8e6", "LinkForegroundColor": "#add8e6",
"LinkHoverForegroundColor": "#FFFFFF", "LinkHoverForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58", "ComboBoxForegroundColor": "#FFEE58",
"ButtonFontSize": "12",
"ButtonFontFamily": "Arial",
"ButtonWidth": "200",
"ButtonHeight": "25",
"ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222", "ButtonInstallBackgroundColor": "#222222",
"ButtonTweaksBackgroundColor": "#333333", "ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444", "ButtonConfigBackgroundColor": "#444444",
@ -129,40 +55,15 @@
"ButtonBackgroundSelectedColor": "#FF5733", "ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65", "ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff", "ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1", "ButtonBorderThickness": "1",
"ButtonMargin": "1", "ButtonMargin": "1",
"ButtonCornerRadius": "2", "ButtonCornerRadius": "2",
"ToggleButtonHeight": "25",
"BorderColor": "#FFAC1C", "BorderColor": "#FFAC1C",
"BorderOpacity": "0.8", "BorderOpacity": "0.8",
"ShadowPulse": "0:0:3" "ShadowPulse": "0:0:3"
}, },
"Dark": { "Dark": {
"CustomDialogFontSize": "12",
"CustomDialogFontSizeHeader": "14",
"CustomDialogIconSize": "25",
"CustomDialogWidth": "400",
"CustomDialogHeight": "200",
"FontSize": "12",
"FontFamily": "Arial",
"FontSizeHeading": "14",
"HeaderFontFamily": "Consolas, Monaco",
"CheckBoxBulletDecoratorFontSize": "14",
"CheckBoxMargin": "15,0,0,2",
"TabButtonFontSize": "14",
"TabButtonWidth": "100",
"TabButtonHeight": "25",
"TabRowHeightInPixels": "50",
"IconFontSize": "14",
"IconButtonSize": "35",
"WinUtilIconSize": "Auto",
"SettingsIconFontSize": "18",
"MicroWinLogoSize": "10",
"ComboBoxBackgroundColor": "#000000", "ComboBoxBackgroundColor": "#000000",
"LabelboxForegroundColor": "#FFEE58", "LabelboxForegroundColor": "#FFEE58",
"MainForegroundColor": "#9CCC65", "MainForegroundColor": "#9CCC65",
@ -171,18 +72,6 @@
"LinkForegroundColor": "#add8e6", "LinkForegroundColor": "#add8e6",
"LinkHoverForegroundColor": "#FFFFFF", "LinkHoverForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58", "ComboBoxForegroundColor": "#FFEE58",
"ButtonFontSize": "12",
"ButtonFontFamily": "Arial",
"ButtonWidth": "200",
"ButtonHeight": "25",
"ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222", "ButtonInstallBackgroundColor": "#222222",
"ButtonTweaksBackgroundColor": "#333333", "ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444", "ButtonConfigBackgroundColor": "#444444",
@ -197,10 +86,10 @@
"ButtonBackgroundSelectedColor": "#FF5733", "ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65", "ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff", "ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1", "ButtonBorderThickness": "1",
"ButtonMargin": "1", "ButtonMargin": "1",
"ButtonCornerRadius": "2", "ButtonCornerRadius": "2",
"ToggleButtonHeight": "25",
"BorderColor": "#FFAC1C", "BorderColor": "#FFAC1C",
"BorderOpacity": "0.2", "BorderOpacity": "0.2",
"ShadowPulse": "Forever" "ShadowPulse": "Forever"

View File

@ -2317,19 +2317,6 @@
"Invoke-WPFTweakPS7 -action \"PS5\"" "Invoke-WPFTweakPS7 -action \"PS5\""
] ]
}, },
"WPFTweaksPowershell7Tele": {
"Content": "Disable Powershell 7 Telemetry",
"Description": "This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data.",
"category": "Essential Tweaks",
"panel": "1",
"Order": "a009_",
"InvokeScript": [
"[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')"
],
"UndoScript": [
"[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine')"
]
},
"WPFTweaksStorage": { "WPFTweaksStorage": {
"Content": "Disable Storage Sense", "Content": "Disable Storage Sense",
"Description": "Storage Sense deletes temp files automatically.", "Description": "Storage Sense deletes temp files automatically.",
@ -2996,75 +2983,35 @@
] ]
}, },
"WPFToggleDarkMode": { "WPFToggleDarkMode": {
"Content": "Enable Dark Theme for Windows", "Content": "Dark Theme",
"Description": "Enable/Disable Dark Mode.", "Description": "Enable/Disable Dark Mode.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a100_", "Order": "a060_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFToggleBingSearch": { "WPFToggleBingSearch": {
"Content": "Enable Bing Search in Start Menu", "Content": "Bing Search in Start Menu",
"Description": "If enable then includes web search results from Bing in your Start Menu search.", "Description": "If enable then includes web search results from Bing in your Start Menu search.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a101_", "Order": "a061_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFToggleNumLock": { "WPFToggleNumLock": {
"Content": "Enable NumLock on Startup", "Content": "NumLock on Startup",
"Description": "Toggle the Num Lock key state when your computer starts.", "Description": "Toggle the Num Lock key state when your computer starts.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a102_", "Order": "a062_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFToggleVerboseLogon": { "WPFToggleVerboseLogon": {
"Content": "Enable Verbose Messages During Logon", "Content": "Verbose Logon Messages",
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a103_", "Order": "a063_",
"Type": "Toggle"
},
"WPFToggleSnapWindow": {
"Content": "Enable Snap Window",
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
"category": "Customize Preferences",
"panel": "2",
"Order": "a104_",
"Type": "Toggle"
},
"WPFToggleSnapFlyout": {
"Content": "Enable Snap Assist Flyout",
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a105_",
"Type": "Toggle"
},
"WPFToggleSnapSuggestion": {
"Content": "Enable Snap Assist Suggestion",
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a106_",
"Type": "Toggle"
},
"WPFToggleMouseAcceleration": {
"Content": "Enable Mouse Acceleration",
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a107_",
"Type": "Toggle"
},
"WPFToggleStickyKeys": {
"Content": "Enable Sticky Keys",
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a108_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFToggleShowExt": { "WPFToggleShowExt": {
@ -3072,31 +3019,55 @@
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a200_", "Order": "a064_",
"Type": "Toggle"
},
"WPFToggleSnapWindow": {
"Content": "Snap Window",
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
"category": "Customize Preferences",
"panel": "2",
"Order": "a065_",
"Type": "Toggle"
},
"WPFToggleSnapFlyout": {
"Content": "Snap Assist Flyout",
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a066_",
"Type": "Toggle"
},
"WPFToggleSnapSuggestion": {
"Content": "Snap Assist Suggestion",
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a067_",
"Type": "Toggle"
},
"WPFToggleMouseAcceleration": {
"Content": "Mouse Acceleration",
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a068_",
"Type": "Toggle"
},
"WPFToggleStickyKeys": {
"Content": "Sticky Keys",
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a070_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFToggleTaskbarSearch": { "WPFToggleTaskbarSearch": {
"Content": "Show Search Button in Taskbar", "Content": "Taskbar Search",
"Description": "If Enabled Search Button will be on the taskbar.", "Description": "If Enabled Search Button will be on the taskbar.",
"category": "Customize Preferences", "category": "Customize Preferences",
"panel": "2", "panel": "2",
"Order": "a201_", "Order": "a068_",
"Type": "Toggle"
},
"WPFToggleTaskView": {
"Content": "Show Task View Button in Taskbar",
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a202_",
"Type": "Toggle"
},
"WPFToggleTaskbarWidgets": {
"Content": "Show Widgets Button in Taskbar",
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a203_",
"Type": "Toggle" "Type": "Toggle"
}, },
"WPFOOSUbutton": { "WPFOOSUbutton": {
@ -3104,7 +3075,15 @@
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a039_", "Order": "a039_",
"Type": "Button" "Type": "220"
},
"WPFToggleTaskbarWidgets": {
"Content": "Taskbar Widgets",
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a069_",
"Type": "Toggle"
}, },
"WPFchangedns": { "WPFchangedns": {
"Content": "DNS", "Content": "DNS",
@ -3119,37 +3098,42 @@
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a041_", "Order": "a041_",
"Type": "Button" "Type": "160"
}, },
"WPFUndoall": { "WPFUndoall": {
"Content": "Undo Selected Tweaks", "Content": "Undo Selected Tweaks",
"category": "z__Advanced Tweaks - CAUTION", "category": "z__Advanced Tweaks - CAUTION",
"panel": "1", "panel": "1",
"Order": "a042_", "Order": "a042_",
"Type": "Button" "Type": "160"
}, },
"WPFAddUltPerf": { "WPFAddUltPerf": {
"Content": "Add and Activate Ultimate Performance Profile", "Content": "Add and Activate Ultimate Performance Profile",
"category": "Performance Plans", "category": "Performance Plans",
"panel": "2", "panel": "2",
"Order": "a080_", "Order": "a080_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFRemoveUltPerf": { "WPFRemoveUltPerf": {
"Content": "Remove Ultimate Performance Profile", "Content": "Remove Ultimate Performance Profile",
"category": "Performance Plans", "category": "Performance Plans",
"panel": "2", "panel": "2",
"Order": "a081_", "Order": "a081_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300"
}, },
"WPFWinUtilShortcut": { "WPFWinUtilShortcut": {
"Content": "Create WinUtil Shortcut", "Content": "Create WinUtil Shortcut",
"category": "Shortcuts", "category": "Shortcuts",
"panel": "2", "panel": "2",
"Order": "a082_", "Order": "a082_",
"Type": "Button", "Type": "300"
"ButtonWidth": "300" },
"WPFToggleTaskView": {
"Content": "Task View",
"Description": "If Enabled then Task View Icon in Taskbar will be shown.",
"category": "Customize Preferences",
"panel": "2",
"Order": "a069_",
"Type": "Toggle"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -1,57 +0,0 @@
# How to Contribute?
## Issues
* If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me (and others in the community) to promptly address any bugs, or consider feature requests.
## Contribute Code
* Pull Requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub.
* If you're doing code changes, then you can submit a PR to `main` branch, but I am very selective about these.
> [!WARNING]
> Do not use a code formatter, massive amounts of line changes, and make multiple feature changes.
> EACH FEATURE CHANGE SHOULD BE IT'S OWN Pull Request!
* When creating pull requests, it is essential to thoroughly document all changes made. This includes, but not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes, document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in denial of the pull request. Additionally, Any code lacking sufficient documentation may also be denied.
* By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
> [!NOTE]
> When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
## Walk through
### Fork the Repo
* Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your Repository-list.
![Fork](assets/ForkButton.png)
### Clone the Fork
* While you can make your changes directly through the Web, we recommend cloning the repo to your device to test your fork easily.
* Using the application GitHub Desktop (available in WinUtil) you can easily manage your repos locally. You can do it using other tools like git-cli (available in WinUtil), we recommend GitHub Desktop for ease of use.
* Install GitHub Desktop if not already installed
* Log in using the same GitHub account u used to fork WinUtil
* Choose the fork under "Your Repositories" and press "clone {repo name}"
* Create a new Branch and name it something relatable to your changes,
* Now you can modify WinUtil to your liking using your prefered text editor.
### Testing your changes
* To test to see if your changes work as intended run following commands in a powershell teminal:
* Change the directory where you are running the commands to the forked project.
* `cd {path to the folder with the compile.ps1}`
* Run following command to compile and run Winutil
* `.\Compile.ps1 -run`
* After seeing that your changes work properly feel free to commit the changes to the repository and make a PR, for help on that follow the documentation below.
### Commiting the changes
* Commit your changes once you are fine with the result
* Push the changes to "upload" them to your fork on github.com.
### Making a PR
* To make a PR on your repo under a new branch linking to the main branch a button will show and say Preview and Create pull request. Click that button and fill in all information that is provided on the template. Once all the information is filled in correctly check your PR to make sure there is not a WinUtil.ps1 file attached to the PR. Once everything is good make the PR and wait for Chris (The Maintainer) to accept or deny your PR. Once it is accepted in by Chris you will be able to see your changes in the /windev build.
* If you do not see your feature in the main /win build that is fine. As all new changes go into the /windev build to make sure everything is working ok before going fully public.
* Congrats you just submitted your first PR. Thank you so much for contributing to WinUtil.

View File

@ -1,4 +0,0 @@
# FAQ's
## How do I uninstall WinUtil?
* You do not have to uninstall WinUtil. As it is a script you run from Powershell it only loads into your RAM. This means as soon as you close WinUtil it will be deleted off your system.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -1,12 +0,0 @@
# Welcome to Chris Titus WinUtil Official Documentation!
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ)
## Running
There are 4 ways to run WinUtil. The 4 ways goes as follows:
* `irm christitus.com/win | iex` - Runs WinUtil from ChrisTitus's website using the latest Full Releases.
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex` - Runs WinUtil from github using the latest Full Release.
* `irm christitus.com/windev | iex` - Runs WinUtil from ChrisTitus website using the latest Pre-Release.
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/windev.ps1 | iex` - Runs WinUtil from github using the latest Pre-Release.

View File

@ -1,3 +0,0 @@
# Update Log
#

View File

@ -1,159 +0,0 @@
# User Guide
## Overview
* short one
## Walkthrough
### Program
#### Installation & Updates
* To install programs select the programs you wish to install or update like the picture below.
![Program Install](assets/ProgramInstall.png)
* Once you have selected the programs you wish to install click the select Install/Upgrade Selected button as seen below.
![Program Install Button](assets/ProgramInstallButton.png)
#### Upgrade All
* Press the button to upgrade all installed programs that are supported by WinGet, there is no selection needed.
#### Uninstall
* To uninstall programs select the programs you wish to uninstall like the picture below.
![Program Uninstall](assets/ProgramInstall.png)
* Once you have selected the programs you wish to uninstall click the select Uninstall Selected button as seen below.
![Program Uninstall Button](assets/ProgramUninstall.png)
#### Get Installed
* Checks for installed programs that are supported by WinGet and selects them in the Utility.
#### Clear Selection
* Clears ur current selection so no program is checked.
### Tweaks
#### Tweaks Addition
* To enable tweaks on your system select Tweaks at the top next to Install.
* Then you can select what tweaks you want adding to your system. We do have some presets you can select from at the top you can see this in the picture below.
![Tweaks Screen](assets/TweaksScreen.PNG)
* After you have chosen your tweaks click the Run Tweaks button at the bottom of the screen.
#### Tweaks Removal
* To disable tweaks on your system select Tweaks at the top next to Install.
* Then you can select what tweaks you want removing from your system.
* After you have chosen your tweaks you want to remove click the Undo Selected Tweaks button at the bottom of the screen.
#### Essential Tweaks
* The Tweaks under the Essential
#### Advanced Tweaks - CAUTION
#### O&O Shutup
#### DNS
#### Customize Preferences
#### Performance Plans
#### Shortcuts
![Tweaks Screen](assets/TweaksScreen.PNG)
### Config
#### Features
* Install the most used Windows Features by checking the checkbox and clicking "Install Features" to install them
#### Fixes
* Quick Fixes for your system if you are having Issues.
* Set Up Autologin
* Reset Windows Update
* Reset Network
* System Corruption Scan
* WinGet Reinstall
* Remove Adobe Creative Cloud
#### Legacy Windows Panels
### Updates | Not working rn
### MicroWin
**MicroWin** lets you customize your Windows 10 and 11 installation images by debloating them however you want.
![MicroWin](assets/MicroWinScreen.png)
#### Basic usage
1. Specify the source Windows ISO to customize
* If you don't have a Windows ISO file prepared, you can download it using the Media Creation Tool for the respective Windows version. [Here](https://go.microsoft.com/fwlink/?linkid=2156295) is the Windows 11 version, and [here](https://go.microsoft.com/fwlink/?LinkId=2265055) is the Windows 10 version
2. Configure the debloat process
3. Specify the target location for the new ISO file
4. Let the magic happen!
**NOTE:** this feature is still in development and you may encounter some issues with the generated images. If that happens, don't hesitate to report an issue!
#### Options
* **Download oscdimg.exe from CTT GitHub repo** will grab a OSCDIMG executable from the GitHub repository instead of a Chocolatey package
OSCDIMG is the tool that lets the program create ISO images. Typically, you would find this in the [Windows Assessment and Deployment Kit](https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install)
* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder on the `%TEMP%` directory
* 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
##### 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 were permanent ones or had 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 case 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. On that regard, don't install AVs with bad reputation 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
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image
* **Import drivers from 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 of 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
##### Ventoy options
* **Copy to Ventoy** will copy the target ISO file to any USB drive with [Ventoy](https://ventoy.net/en/index.html) installed
Ventoy is a solution that lets you boot to any ISO file stored in a drive. Think of it as having multiple bootable USBs in one. Do note though that your drive needs to have enough free space for the target ISO file
## Automation
* Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
* On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
![GetInstalled](assets/Get-Installed.png)
* Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
![SettingsExport](assets/Settings-Export.png)
* Copy this file to a USB or somewhere you can use after Windows installation.
* Use Microwin tab to create a custom Windows image.
* Install the Windows image.
* In the new Windows, Open PowerShell in the admin mode and run command to automatically apply tweaks and install apps from the config file.
* ``` iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run" ```
* Have a cup of coffee! Come back when it's done.

View File

@ -2,92 +2,26 @@ function ConvertTo-Icon {
<# <#
.DESCRIPTION .DESCRIPTION
This function will convert BMP, GIF, EXIF, JPG, PNG and TIFF to ICO file This function will convert PNG to ICO file
.PARAMETER bitmapPath
The file path to bitmap image to make '.ico' file out of.
Supported file types according to Microsoft Documentation is the following:
BMP, GIF, EXIF, JPG, PNG and TIFF.
.PARAMETER iconPath
The file path to write the new '.ico' resource.
.PARAMETER overrideIconFile
An optional boolean Parameter that makes the function overrides
the Icon File Path if the file exists. Defaults to $true.
.EXAMPLE .EXAMPLE
try { ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico"
} catch [System.IO.FileNotFoundException] {
# Handle the thrown exception here...
}
This Example makes a '.ico' file at "$env:TEMP\cttlogo.ico" File Path using the bitmap file
found in "$env:TEMP\cttlogo.png", the function overrides the '.ico' File if it's found.
this function will throw a FileNotFound Exception at the event of not finding the provided bitmap File Path.
.EXAMPLE
try {
ConvertTo-Icon "$env:TEMP\cttlogo.png" "$env:TEMP\cttlogo.ico"
} catch [System.IO.FileNotFoundException] {
# Handle the thrown exception here...
}
This Example is the same as Example 1, but uses Positional Parameters instead.
.EXAMPLE
if (Test-Path "$env:TEMP\cttlogo.png") {
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico"
}
This Example is same as Example 1, but checks if the bitmap File exists before calling 'ConvertTo-Icon' Function.
This's the recommended way of using this function, as it doesn't require any try-catch blocks.
.EXAMPLE
try {
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath "$env:TEMP\cttlogo.ico" -overrideIconFile $false
} catch [System.IO.FileNotFoundException] {
# Handle the thrown exception here...
}
This Example make use of '-overrideIconFile' Optional Parameter, the default for this paramter is $true.
By doing '-overrideIconFile $false', the 'ConvertTo-Icon' function will raise an exception that needs to be catched throw a 'catch' Code Block,
otherwise it'll crash the running PowerShell instance/process.
#> #>
param( param( [Parameter(Mandatory=$true)]
[Parameter(Mandatory=$true, position=0)] $bitmapPath,
[string]$bitmapPath, $iconPath = "$env:temp\newicon.ico"
[Parameter(Mandatory=$true, position=1)]
[string]$iconPath,
[Parameter(position=2)]
[bool]$overrideIconFile = $true
) )
Add-Type -AssemblyName System.Drawing Add-Type -AssemblyName System.Drawing
if (Test-Path $bitmapPath) { if (Test-Path $bitmapPath) {
if ((Test-Path $iconPath) -AND ($overrideIconFile -eq $false)) {
Write-Host "[ConvertTo-Icon] Icon File is found at '$iconPath', and the 'overrideIconFile' Parameter is set to '$overrideIconFile'. Skipping the bitmap to icon convertion..." -ForegroundColor Yellow
return
}
# Load bitmap file into memory, and make an Icon version out of it
$b = [System.Drawing.Bitmap]::FromFile($bitmapPath) $b = [System.Drawing.Bitmap]::FromFile($bitmapPath)
$icon = [System.Drawing.Icon]::FromHandle($b.GetHicon()) $icon = [System.Drawing.Icon]::FromHandle($b.GetHicon())
# Create the folder for the new icon file if it doesn't exists
$iconFolder = (New-Object System.IO.FileInfo($iconPath)).Directory.FullName
[System.IO.Directory]::CreateDirectory($iconFolder) | Out-Null
# Write the Icon File and do some cleaning-up
$file = New-Object System.IO.FileStream($iconPath, 'OpenOrCreate') $file = New-Object System.IO.FileStream($iconPath, 'OpenOrCreate')
$icon.Save($file) $icon.Save($file)
$file.Close() $file.Close()
$icon.Dispose() $icon.Dispose()
#explorer "/SELECT,$iconpath"
} }
else { else { Write-Warning "$BitmapPath does not exist" }
throw [System.IO.FileNotFoundException] "[ConvertTo-Icon] The provided bitmap File Path is not found at '$bitmapPath'."
}
} }

View File

@ -6,10 +6,8 @@ function Get-TabXaml {
It takes the tabname and the number of columns to display the applications in as input and returns the XAML for the tab as output It takes the tabname and the number of columns to display the applications in as input and returns the XAML for the tab as output
.PARAMETER tabname .PARAMETER tabname
The name of the tab to generate XAML for The name of the tab to generate XAML for
Note: the 'tabname' parameter must equal one of the json files found in $sync.configs variable
Otherwise, it'll throw an exception
.PARAMETER columncount .PARAMETER columncount
The number of columns to display the applications in, default is 0 The number of columns to display the applications in
.OUTPUTS .OUTPUTS
The XAML for the tab The XAML for the tab
.EXAMPLE .EXAMPLE
@ -17,20 +15,10 @@ function Get-TabXaml {
#> #>
param( param( [Parameter(Mandatory=$true)]
[Parameter(Mandatory, position=0)] $tabname,
[string]$tabname, $columncount = 0
[Parameter(position=1)]
[ValidateRange(0,10)] # 10 panels as max number is more then enough
[int]$columncount = 0
) )
# Validate tabname
if ($sync.configs.$tabname -eq $null) {
throw "Invalid parameter passed, can't find '$tabname' in '`$sync.configs' variable, please double check any calls to 'Get-TabXaml' function."
}
$organizedData = @{} $organizedData = @{}
# Iterate through JSON data and organize by panel and category # Iterate through JSON data and organize by panel and category
foreach ($appName in $sync.configs.$tabname.PSObject.Properties.Name) { foreach ($appName in $sync.configs.$tabname.PSObject.Properties.Name) {
@ -51,7 +39,6 @@ function Get-TabXaml {
ComboItems = $appInfo.ComboItems ComboItems = $appInfo.ComboItems
# Checked is the property to set startup checked status of checkbox (Default is false) # Checked is the property to set startup checked status of checkbox (Default is false)
Checked = $appInfo.Checked Checked = $appInfo.Checked
ButtonWidth = $appInfo.ButtonWidth
} }
if (-not $organizedData.ContainsKey($appObject.panel)) { if (-not $organizedData.ContainsKey($appObject.panel)) {
@ -66,21 +53,6 @@ function Get-TabXaml {
# Add Order property to keep the original order of tweaks and features # Add Order property to keep the original order of tweaks and features
$organizedData[$appObject.panel][$appInfo.Category]["$($appInfo.order)$appName"] = $appObject $organizedData[$appObject.panel][$appInfo.Category]["$($appInfo.order)$appName"] = $appObject
} }
# Same tab amount in last line of 'inputXML.xaml' file
# TODO: Get the base repeat (amount) of tabs from last line (or even lines)
# so it can dynamicly react to whatever is before this generated XML string.
# .. may be solve this even before calling this function, and pass the result as a parameter?
$tab_repeat = 7
$spaces_per_tab = 4 # The convenction used across the code base
$tab_as_spaces = $(" " * $spaces_per_tab)
$precal_indent = $($tab_as_spaces * $tab_repeat)
$precal_indent_p1 = $($tab_as_spaces * ($tab_repeat + 1))
$precal_indent_p2 = $($tab_as_spaces * ($tab_repeat + 2))
$precal_indent_m1 = $($tab_as_spaces * ($tab_repeat - 1))
$precal_indent_m2 = $($tab_as_spaces * ($tab_repeat - 2))
# Calculate the needed number of panels
$panelcount=0 $panelcount=0
$paneltotal = $organizedData.Keys.Count $paneltotal = $organizedData.Keys.Count
if ($columncount -gt 0) { if ($columncount -gt 0) {
@ -89,27 +61,19 @@ function Get-TabXaml {
$paneltotal = $columncount $paneltotal = $columncount
} }
# add ColumnDefinitions to evenly draw colums # add ColumnDefinitions to evenly draw colums
$blockXml = "<Grid.ColumnDefinitions>" $blockXml="<Grid.ColumnDefinitions>`r`n"+("<ColumnDefinition Width=""*""/>`r`n"*($paneltotal))+"</Grid.ColumnDefinitions>`r`n"
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat) + # Iterate through organizedData by panel, category, and application
"<ColumnDefinition Width=""*""/>") * $paneltotal
$blockXml += $("`r`n" + " " * ($spaces_per_tab * ($tab_repeat - 1))) +
"</Grid.ColumnDefinitions>" + "`r`n"
# Iterate through 'organizedData' by panel, category, and application
$count = 0 $count = 0
foreach ($panel in ($organizedData.Keys | Sort-Object)) { foreach ($panel in ($organizedData.Keys | Sort-Object)) {
$blockXml += $precal_indent_m1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n" $blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
$blockXml += $precal_indent + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
$panelcount++ $panelcount++
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) { foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
$count++ $count++
if ($columncount -gt 0) { if ($columncount -gt 0) {
$panelcount2 = [Int](($count)/$maxcount-0.5) $panelcount2 = [Int](($count)/$maxcount-0.5)
if ($panelcount -eq $panelcount2 ) { if ($panelcount -eq $panelcount2 ) {
$blockXml += $precal_indent_p2 + "</StackPanel>" + "`r`n" $blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
$blockXml += $precal_indent_p1 + "</Border>" + "`r`n" $blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
$blockXml += $precal_indent_p1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
$blockXml += $precal_indent_p2 + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
$panelcount++ $panelcount++
} }
} }
@ -119,99 +83,49 @@ function Get-TabXaml {
$categorycontent = $($category -replace '^.__', '') $categorycontent = $($category -replace '^.__', '')
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent $categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat)) + $blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`r`n"
"<Label Name=""$categoryname"" Content=""$categorycontent""" + " " +
"FontSize=""{FontSizeHeading}"" FontFamily=""{HeaderFontFamily}""/>" + "`r`n" + "`r`n"
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object $sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
foreach ($appName in $sortedApps) { foreach ($appName in $sortedApps) {
$count++ $count++
if ($columncount -gt 0) { if ($columncount -gt 0) {
$panelcount2 = [Int](($count)/$maxcount-0.5) $panelcount2 = [Int](($count)/$maxcount-0.5)
# Verify the indentation actually works...
if ($panelcount -eq $panelcount2 ) { if ($panelcount -eq $panelcount2 ) {
$blockXml += $precal_indent_m1 + $blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
"</StackPanel>" + "`r`n" $blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
$blockXml += $precal_indent_m2 +
"</Border>" + "`r`n"
$blockXml += $precal_indent_m2 +
"<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
$blockXml += $precal_indent_m1 +
"<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
$panelcount++ $panelcount++
} }
} }
$appInfo = $organizedData[$panel][$category][$appName] $appInfo = $organizedData[$panel][$category][$appName]
switch ($appInfo.Type) { if ("Toggle" -eq $appInfo.Type) {
"Toggle" { $blockXml += "<DockPanel LastChildFill=`"True`">`r`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`r`n"
$blockXml += $precal_indent_m1 + $blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`r`n</DockPanel>`r`n"
"<DockPanel LastChildFill=""True"">" + "`r`n" } elseif ("Combobox" -eq $appInfo.Type) {
$blockXml += $precal_indent + $blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`r`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`r`n"
"<CheckBox Name=""$($appInfo.Name)"" Style=""{StaticResource ColorfulToggleSwitchStyle}"" Margin=""4,0""" + " " + $blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`r`n"
"HorizontalAlignment=""Right"" FontSize=""{FontSize}""/>" + "`r`n" $addfirst="IsSelected=`"True`""
$blockXml += $precal_indent +
"<Label Content=""$($appInfo.Content)"" ToolTip=""$($appInfo.Description)""" + " " +
"HorizontalAlignment=""Left"" FontSize=""{FontSize}""/>" + "`r`n"
$blockXml += $precal_indent_m1 +
"</DockPanel>" + "`r`n"
}
"Combobox" {
$blockXml += $precal_indent_m1 +
"<StackPanel Orientation=""Horizontal"" Margin=""0,5,0,0"">" + "`r`n"
$blockXml += $precal_indent + "<Label Content=""$($appInfo.Content)"" HorizontalAlignment=""Left""" + " " +
"VerticalAlignment=""Center"" FontSize=""{FontSize}""/>" + "`r`n"
$blockXml += $precal_indent +
"<ComboBox Name=""$($appInfo.Name)"" Height=""32"" Width=""186"" HorizontalAlignment=""Left""" + " " +
"VerticalAlignment=""Center"" Margin=""5,5"" FontSize=""{FontSize}"">" + "`r`n"
$addfirst="IsSelected=""True"""
foreach ($comboitem in ($appInfo.ComboItems -split " ")) { foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
$blockXml += $precal_indent_p1 + $blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`r`n"
"<ComboBoxItem $addfirst Content=""$comboitem"" FontSize=""{FontSize}""/>" + "`r`n"
$addfirst="" $addfirst=""
} }
$blockXml += "</ComboBox>`r`n</StackPanel>"
$blockXml += $precal_indent_p1 + "</ComboBox>" + "`r`n" # If it is a digit, type is button and button length is digits
$blockXml += $precal_indent + "</StackPanel>" + "`r`n" } elseif ($appInfo.Type -match "^[\d\.]+$") {
} $blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`r`n"
"Button" {
if ($appInfo.ButtonWidth -ne $null) {
$ButtonWidthStr = "Width=""$($appInfo.ButtonWidth)"""
}
$blockXml += $precal_indent +
"<Button Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""" + " " +
"HorizontalAlignment=""Left"" Margin=""5"" Padding=""20,5"" $($ButtonWidthStr)/>" + "`r`n"
}
# else it is a checkbox # else it is a checkbox
default {
$checkedStatus = If ($appInfo.Checked -eq $null) {""} Else {" IsChecked=""$($appInfo.Checked)"""}
if ($appInfo.Link -eq $null) {
$blockXml += $precal_indent +
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus) Margin=""5,0""" + " " +
"ToolTip=""$($appInfo.Description)""/>" + "`r`n"
} else { } else {
$blockXml += $precal_indent + $checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
"<StackPanel Orientation=""Horizontal"">" + "`r`n" if ($null -eq $appInfo.Link)
$blockXml += $precal_indent_p1 + {
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus)" + " " + $blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`r`n"
"ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/>" + "`r`n" }
$blockXml += $precal_indent_p1 + else
"<TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)""" + " " + {
"ToolTip=""$($appInfo.Link)""/>" + "`r`n" $blockXml += "<StackPanel Orientation=""Horizontal"">`r`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`r`n</StackPanel>`r`n"
$blockXml += $precal_indent +
"</StackPanel>" + "`r`n"
} }
} }
} }
} }
} $blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
$blockXml += $precal_indent_p1 + "</StackPanel>" + "`r`n"
$blockXml += $precal_indent + "</Border>" + "`r`n"
} }
return ($blockXml) return ($blockXml)
} }

View File

@ -14,15 +14,19 @@ function Install-WinUtilChoco {
return return
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
Write-Host "Seems Chocolatey is not installed, installing now." Write-Host "Seems Chocolatey is not installed, installing now."
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) -ErrorAction Stop
powershell choco feature enable -n allowGlobalConfirmation powershell choco feature enable -n allowGlobalConfirmation
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }
Catch { Catch {
Write-Host "===========================================" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red
Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red
Write-Host "===========================================" -Foregroundcolor Red Write-Host "===========================================" -Foregroundcolor Red
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
} }

View File

@ -54,18 +54,12 @@ function Install-WinUtilProgramChoco {
} }
if(($chocoInstallStatus -eq 0) -AND ($tryUpgrade -eq $false)){ if(($chocoInstallStatus -eq 0) -AND ($tryUpgrade -eq $false)){
Write-Host "$($Program.choco) installed successfully using Chocolatey." Write-Host "$($Program.choco) installed successfully using Chocolatey."
$X++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value ($x/$count) })
continue continue
} else { } else {
Write-Host "Failed to install $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $installOutputFilePath)." 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 { } catch {
Write-Host "Failed to install $($Program.choco) due to an error: $_" Write-Host "Failed to install $($Program.choco) due to an error: $_"
$X++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
} }
} }
@ -77,20 +71,16 @@ function Install-WinUtilProgramChoco {
$chocoUninstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "uninstall $($Program.choco) -y" -Wait -PassThru).ExitCode $chocoUninstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "uninstall $($Program.choco) -y" -Wait -PassThru).ExitCode
if($chocoUninstallStatus -eq 0){ if($chocoUninstallStatus -eq 0){
Write-Host "$($Program.choco) uninstalled successfully using Chocolatey." Write-Host "$($Program.choco) uninstalled successfully using Chocolatey."
$x++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value ($x/$count) })
continue continue
} else { } else {
Write-Host "Failed to uninstall $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $uninstallOutputFilePath)." Write-Host "Failed to uninstall $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $uninstallOutputFilePath)."
$x++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) })
} }
} catch { } catch {
Write-Host "Failed to uninstall $($Program.choco) due to an error: $_" Write-Host "Failed to uninstall $($Program.choco) due to an error: $_"
}
}
$x++ $x++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($x/$count) }) # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value $using:x/$using:count })
}
}
} }
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed

View File

@ -22,17 +22,16 @@ Function Install-WinUtilProgramWinget {
[Parameter(Position=1)] [Parameter(Position=1)]
[String]$manage = "Installing" [String]$manage = "Installing"
) )
$x = 0
$count = $ProgramsToInstall.Count $count = $ProgramsToInstall.Count
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0 Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Configuring winget packages ---" Write-Host "-- Configuring winget packages ---"
Write-Host "===========================================" Write-Host "==========================================="
for ($i = 0; $i -le $ProgramsToInstall.Count; $i++) { Foreach ($Program in $ProgramsToInstall){
$Program = $ProgramsToInstall[$i]
$failedPackages = @() $failedPackages = @()
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($i + 1) of $count" -PercentComplete $(($i/$count) * 100) Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){ if($manage -eq "Installing"){
# Install package via ID, if it fails try again with different scope and then with an unelevated prompt. # Install package via ID, if it fails try again with different scope and then with an unelevated prompt.
# Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround. # Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround.
@ -43,24 +42,20 @@ Function Install-WinUtilProgramWinget {
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0){ if($status -eq 0){
Write-Host "$($Program.winget) installed successfully." Write-Host "$($Program.winget) installed successfully."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
if ($status -eq -1978335189){ if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
Write-Host "Attempt with User scope" Write-Host "Attempt with User scope"
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
if($status -eq 0){ if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User scope." Write-Host "$($Program.winget) installed successfully with User scope."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
if ($status -eq -1978335189){ if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
Write-Host "Attempt with User prompt" Write-Host "Attempt with User prompt"
@ -75,21 +70,18 @@ Function Install-WinUtilProgramWinget {
} }
if($status -eq 0){ if($status -eq 0){
Write-Host "$($Program.winget) installed successfully with User prompt." Write-Host "$($Program.winget) installed successfully with User prompt."
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
if ($status -eq -1978335189){ if ($status -eq -1978335189){
Write-Host "$($Program.winget) No applicable update found" Write-Host "$($Program.winget) No applicable update found"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
continue continue
} }
} catch { } catch {
Write-Host "Failed to install $($Program.winget). With winget" Write-Host "Failed to install $($Program.winget). With winget"
$failedPackages += $Program $failedPackages += $Program
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -value ($i/$count) })
} }
} }
elseif($manage -eq "Uninstalling") { if($manage -eq "Uninstalling"){
# Uninstall package via ID using winget directly. # Uninstall package via ID using winget directly.
try { try {
$status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode $status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode
@ -102,13 +94,10 @@ Function Install-WinUtilProgramWinget {
} catch { } catch {
Write-Host "Failed to uninstall $($Program.winget) due to an error: $_" Write-Host "Failed to uninstall $($Program.winget) due to an error: $_"
$failedPackages += $Program $failedPackages += $Program
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$count) })
}
else {
throw "[Install-WinUtilProgramWinget] Invalid Value for Parameter 'manage', Provided Value is: $manage"
} }
$X++
# $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value $using:x/$using:count })
} }
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
return $failedPackages; return $failedPackages;

View File

@ -19,6 +19,7 @@ function Install-WinUtilWinget {
Write-Host "`nWinget is not Installed. Continuing with install.`r" -ForegroundColor Red Write-Host "`nWinget is not Installed. Continuing with install.`r" -ForegroundColor Red
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" })
# Gets the computer's information # Gets the computer's information
if ($null -eq $sync.ComputerInfo){ if ($null -eq $sync.ComputerInfo){
@ -64,5 +65,6 @@ function Install-WinUtilWinget {
throw [WingetFailedInstall]::new('Failed to install!') throw [WingetFailedInstall]::new('Failed to install!')
} }
} }
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }

View File

@ -58,9 +58,6 @@ Function Invoke-WinUtilCurrentSystem {
$values += $False $values += $False
} }
} }
else {
$values += $False
}
} }
} }

View File

@ -12,8 +12,6 @@ function Invoke-WinUtilFeatureInstall {
# $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$using:CheckBox.Count }) # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$using:CheckBox.Count })
x = 0
$CheckBox | ForEach-Object { $CheckBox | ForEach-Object {
if($sync.configs.feature.$psitem.feature){ if($sync.configs.feature.$psitem.feature){
Foreach( $feature in $sync.configs.feature.$psitem.feature ){ Foreach( $feature in $sync.configs.feature.$psitem.feature ){
@ -24,11 +22,10 @@ function Invoke-WinUtilFeatureInstall {
Catch{ Catch{
if ($psitem.Exception.Message -like "*requires elevation*"){ if ($psitem.Exception.Message -like "*requires elevation*"){
Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
else{ else{
Set-WinUtilTaskbaritem -state "Error"
Write-Warning "Unable to Install $feature due to unhandled exception" Write-Warning "Unable to Install $feature due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace Write-Warning $psitem.Exception.StackTrace
} }
@ -42,11 +39,11 @@ function Invoke-WinUtilFeatureInstall {
Write-Host "Running Script for $psitem" Write-Host "Running Script for $psitem"
Invoke-Command $scriptblock -ErrorAction stop Invoke-Command $scriptblock -ErrorAction stop
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }
Catch{ Catch{
if ($psitem.Exception.Message -like "*requires elevation*"){ if ($psitem.Exception.Message -like "*requires elevation*"){
Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?"
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
else{ else{
@ -57,7 +54,5 @@ function Invoke-WinUtilFeatureInstall {
} }
} }
} }
$X++
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$CheckBox.Count) })
} }
} }

View File

@ -2,10 +2,10 @@ function Invoke-WinUtilTaskbarSearch {
<# <#
.SYNOPSIS .SYNOPSIS
Enable/Disable Taskbar Search Button. Enable/Disable Taskbar Widgets
.PARAMETER Enabled .PARAMETER Enabled
Indicates whether to enable or disable Taskbar Search Button. Indicates whether to enable or disable Taskbar Widgets
#> #>
Param($Enabled) Param($Enabled)

View File

@ -24,7 +24,6 @@ function Set-WinUtilDNS {
} }
Else{ Else{
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary)", "$($sync.configs.dns.$DNSProvider.Secondary)") Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary)", "$($sync.configs.dns.$DNSProvider.Secondary)")
Set-DnsClientServerAddress -InterfaceIndex $Adapter.ifIndex -ServerAddresses ("$($sync.configs.dns.$DNSProvider.Primary6)", "$($sync.configs.dns.$DNSProvider.Secondary6)")
} }
} }
} }

View File

@ -33,13 +33,7 @@ function Set-WinUtilTaskbaritem {
} }
if ($state) { if ($state) {
switch ($state) { $sync["Form"].taskbarItemInfo.ProgressState = $state
'Indeterminate' { $sync["Form"].taskbarItemInfo.ProgressState = "Indeterminate" }
'Normal' { $sync["Form"].taskbarItemInfo.ProgressState = "Normal" }
'Error' { $sync["Form"].taskbarItemInfo.ProgressState = "Error" }
'Paused' { $sync["Form"].taskbarItemInfo.ProgressState = "Paused" }
default { $sync["Form"].taskbarItemInfo.ProgressState = "None" }
}
} }
if ($overlay -and (Test-Path $overlay)) { if ($overlay -and (Test-Path $overlay)) {

View File

@ -15,15 +15,6 @@ function Show-CustomDialog {
.PARAMETER Height .PARAMETER Height
The height of the custom dialog window. The height of the custom dialog window.
.PARAMETER FontSize
The Font Size for text shown inside the custom dialog window.
.PARAMETER HeaderFontSize
The Font Size for the Header of the custom dialog window.
.PARAMETER IconSize
The Size to use for Icon inside the custom dialog window.
.EXAMPLE .EXAMPLE
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200 Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
@ -31,10 +22,7 @@ function Show-CustomDialog {
param( param(
[string]$Message, [string]$Message,
[int]$Width = 300, [int]$Width = 300,
[int]$Height = 200, [int]$Height = 200
[int]$FontSize = 10,
[int]$HeaderFontSize = 14,
[int]$IconSize = 25
) )
Add-Type -AssemblyName PresentationFramework Add-Type -AssemblyName PresentationFramework
@ -60,7 +48,6 @@ function Show-CustomDialog {
$dialog.Foreground = $foregroundColor $dialog.Foreground = $foregroundColor
$dialog.Background = $backgroundColor $dialog.Background = $backgroundColor
$dialog.FontFamily = $font $dialog.FontFamily = $font
$dialog.FontSize = $FontSize
# Create a Border for the green edge with rounded corners # Create a Border for the green edge with rounded corners
$border = New-Object Windows.Controls.Border $border = New-Object Windows.Controls.Border
@ -124,8 +111,8 @@ function Show-CustomDialog {
[Windows.Controls.Grid]::SetRow($stackPanel, 0) # Set the row to the second row (0-based index) [Windows.Controls.Grid]::SetRow($stackPanel, 0) # Set the row to the second row (0-based index)
$viewbox = New-Object Windows.Controls.Viewbox $viewbox = New-Object Windows.Controls.Viewbox
$viewbox.Width = $IconSize $viewbox.Width = 25
$viewbox.Height = $IconSize $viewbox.Height = 25
# Combine the paths into a single string # Combine the paths into a single string
# $cttLogoPath = @" # $cttLogoPath = @"
@ -187,7 +174,7 @@ $cttLogoPath = @"
# Add "Winutil" text # Add "Winutil" text
$winutilTextBlock = New-Object Windows.Controls.TextBlock $winutilTextBlock = New-Object Windows.Controls.TextBlock
$winutilTextBlock.Text = "Winutil" $winutilTextBlock.Text = "Winutil"
$winutilTextBlock.FontSize = $HeaderFontSize $winutilTextBlock.FontSize = 18 # Adjust font size as needed
$winutilTextBlock.Foreground = $foregroundColor $winutilTextBlock.Foreground = $foregroundColor
$winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block $winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block
$stackPanel.Children.Add($winutilTextBlock) $stackPanel.Children.Add($winutilTextBlock)
@ -255,7 +242,6 @@ $cttLogoPath = @"
# Add OK button # Add OK button
$okButton = New-Object Windows.Controls.Button $okButton = New-Object Windows.Controls.Button
$okButton.Content = "OK" $okButton.Content = "OK"
$okButton.FontSize = $FontSize
$okButton.Width = 80 $okButton.Width = 80
$okButton.Height = 30 $okButton.Height = 30
$okButton.HorizontalAlignment = [Windows.HorizontalAlignment]::Center $okButton.HorizontalAlignment = [Windows.HorizontalAlignment]::Center

View File

@ -27,8 +27,8 @@ function Invoke-WPFButton {
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"} "WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
"WPFtweaksbutton" {Invoke-WPFtweaksbutton} "WPFtweaksbutton" {Invoke-WPFtweaksbutton}
"WPFOOSUbutton" {Invoke-WPFOOSU} "WPFOOSUbutton" {Invoke-WPFOOSU}
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"} "WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disable"} "WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
"WPFundoall" {Invoke-WPFundoall} "WPFundoall" {Invoke-WPFundoall}
"WPFFeatureInstall" {Invoke-WPFFeatureInstall} "WPFFeatureInstall" {Invoke-WPFFeatureInstall}
"WPFPanelDISM" {Invoke-WPFPanelDISM} "WPFPanelDISM" {Invoke-WPFPanelDISM}

View File

@ -16,18 +16,12 @@ function Invoke-WPFFeatureInstall {
Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock { Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock {
param($Features, $DebugPreference) param($Features, $DebugPreference)
$sync.ProcessRunning = $true $sync.ProcessRunning = $true
if ($Features.count -eq 1){
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
Invoke-WinUtilFeatureInstall $Features Invoke-WinUtilFeatureInstall $Features
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "$env:TEMP\cttcheck.png" })
Write-Host "===================================" Write-Host "==================================="
Write-Host "--- Features are Installed ---" Write-Host "--- Features are Installed ---"
Write-Host "--- A Reboot may be required ---" Write-Host "--- A Reboot may be required ---"

View File

@ -107,7 +107,6 @@ function Invoke-WPFGetIso {
{ {
# It's critical and we can't continue. Output an error # It's critical and we can't continue. Output an error
Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations." Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
else else
@ -126,7 +125,6 @@ function Invoke-WPFGetIso {
Write-Error "Failed to mount the image. Error: $($_.Exception.Message)" Write-Error "Failed to mount the image. Error: $($_.Exception.Message)"
Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system" Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system"
Write-Error "Please refer to this wiki for more details https://github.com/ChrisTitusTech/winutil/blob/main/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting%2Cmd" Write-Error "Please refer to this wiki for more details https://github.com/ChrisTitusTech/winutil/blob/main/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting%2Cmd"
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
# storing off values in hidden fields for further steps # storing off values in hidden fields for further steps
@ -204,7 +202,6 @@ function Invoke-WPFGetIso {
$msg = "Neither install.wim nor install.esd exist in the image, this could happen if you use unofficial Windows images. Please don't use shady images from the internet, use only official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/" $msg = "Neither install.wim nor install.esd exist in the image, this could happen if you use unofficial Windows images. Please don't use shady images from the internet, use only official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/"
Write-Host $msg Write-Host $msg
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
Set-WinUtilTaskbaritem -state "Error" -value 1
throw throw
} }
elseif ((-not (Test-Path -Path $wimFile -PathType Leaf)) -and (Test-Path -Path $wimFile.Replace(".wim", ".esd").Trim() -PathType Leaf)) elseif ((-not (Test-Path -Path $wimFile -PathType Leaf)) -and (Test-Path -Path $wimFile.Replace(".wim", ".esd").Trim() -PathType Leaf))

View File

@ -23,11 +23,7 @@ function Invoke-WPFInstall {
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock { Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
param($PackagesToInstall, $DebugPreference) param($PackagesToInstall, $DebugPreference)
if ($PackagesToInstall.count -eq 1){ # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$using:PackagesToInstall.Count })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
$packagesWinget, $packagesChoco = { $packagesWinget, $packagesChoco = {
$packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new() $packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new()
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new() $packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
@ -58,7 +54,7 @@ function Invoke-WPFInstall {
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Installs have finished ---" Write-Host "-- Installs have finished ---"
Write-Host "===========================================" Write-Host "==========================================="
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "$env:TEMP\cttcheck.png" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }
Catch { Catch {
Write-Host "===========================================" Write-Host "==========================================="

View File

@ -15,8 +15,6 @@ function Invoke-WPFInstallUpgrade {
return return
} }
# Set-WinUtilTaskbaritem -state "Indeterminate"
Update-WinUtilProgramWinget Update-WinUtilProgramWinget
Write-Host "===========================================" Write-Host "==========================================="

View File

@ -77,7 +77,6 @@ public class PowerManagement {
$msg = "The export process has failed and MicroWin processing cannot continue" $msg = "The export process has failed and MicroWin processing cannot continue"
Write-Host "Failed to export the image" Write-Host "Failed to export the image"
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
} }
@ -91,7 +90,6 @@ public class PowerManagement {
$dlg_msg = $msg + "`n`nIf you want more information, the version of the image selected is $($imgVersion)`n`nIf an image has been incorrectly marked as incompatible, report an issue to the developers." $dlg_msg = $msg + "`n`nIf you want more information, the version of the image selected is $($imgVersion)`n`nIf an image has been incorrectly marked as incompatible, report an issue to the developers."
Write-Host $msg Write-Host $msg
[System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation) [System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation)
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
@ -100,7 +98,6 @@ public class PowerManagement {
if (-not $mountDirExists -or -not $scratchDirExists) if (-not $mountDirExists -or -not $scratchDirExists)
{ {
Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist." Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
@ -115,7 +112,6 @@ public class PowerManagement {
else else
{ {
Write-Host "Could not mount image. Exiting..." Write-Host "Could not mount image. Exiting..."
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
@ -178,14 +174,13 @@ public class PowerManagement {
Remove-Features -keepDefender:$keepDefender Remove-Features -keepDefender:$keepDefender
Write-Host "Removing features complete!" Write-Host "Removing features complete!"
Write-Host "Removing Appx Bloat"
if (!$keepPackages) if (!$keepPackages)
{ {
Write-Host "Removing OS packages"
Remove-Packages Remove-Packages
} }
if (!$keepProvisionedPackages) if (!$keepProvisionedPackages)
{ {
Write-Host "Removing Appx Bloat"
Remove-ProvisionedPackages -keepSecurity:$keepDefender Remove-ProvisionedPackages -keepSecurity:$keepDefender
} }
@ -372,7 +367,6 @@ public class PowerManagement {
if (-not (Test-Path -Path "$mountDir\sources\install.wim")) if (-not (Test-Path -Path "$mountDir\sources\install.wim"))
{ {
Write-Error "Something went wrong and '$mountDir\sources\install.wim' doesn't exist. Please report this bug to the devs" Write-Error "Something went wrong and '$mountDir\sources\install.wim' doesn't exist. Please report this bug to the devs"
Set-WinUtilTaskbaritem -state "Error" -value 1
return return
} }
Write-Host "Windows image completed. Continuing with boot.wim." Write-Host "Windows image completed. Continuing with boot.wim."
@ -474,7 +468,6 @@ public class PowerManagement {
#$msg = "Done. ISO image is located here: $env:temp\microwin.iso" #$msg = "Done. ISO image is located here: $env:temp\microwin.iso"
$msg = "Done. ISO image is located here: $($SaveDialog.FileName)" $msg = "Done. ISO image is located here: $($SaveDialog.FileName)"
Write-Host $msg Write-Host $msg
Set-WinUtilTaskbaritem -state "None"
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information) [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information)
} else { } else {
Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed." Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed."

View File

@ -27,10 +27,8 @@ function Invoke-WPFShortcut {
$ArgumentsToSourceExe = "$powershell '$IRM'" $ArgumentsToSourceExe = "$powershell '$IRM'"
$DestinationName = "WinUtil.lnk" $DestinationName = "WinUtil.lnk"
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile "$env:TEMP\cttlogo.png"
if (Test-Path -Path "$env:TEMP\cttlogo.png") { if (Test-Path -Path "$env:TEMP\cttlogo.png") {
$iconPath = "$env:LOCALAPPDATA\winutil\cttlogo.ico" $iconPath = "$env:SystempRoot\cttlogo.ico"
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
} }
} }
@ -42,23 +40,20 @@ function Invoke-WPFShortcut {
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk" $FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
$FileBrowser.FileName = $DestinationName $FileBrowser.FileName = $DestinationName
# Do an Early Return if the Save Operation was canceled by User's Input. # Do an Early Return if The Save Shortcut operation was cancel by User's Input.
$FileBrowserResult = $FileBrowser.ShowDialog() $FileBrowserResult = $FileBrowser.ShowDialog()
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult $DialogResultEnum = New-Object System.Windows.Forms.DialogResult
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) { if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
return return
} }
# Prepare the Shortcut paramter
$WshShell = New-Object -comObject WScript.Shell $WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName) $Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
$Shortcut.TargetPath = $SourceExe $Shortcut.TargetPath = $SourceExe
$Shortcut.Arguments = $ArgumentsToSourceExe $Shortcut.Arguments = $ArgumentsToSourceExe
if ($iconPath -ne $null) { if ($null -ne $iconPath) {
$shortcut.IconLocation = $iconPath $shortcut.IconLocation = $iconPath
} }
# Save the Shortcut to disk
$Shortcut.Save() $Shortcut.Save()
if ($RunAsAdmin -eq $true) { if ($RunAsAdmin -eq $true) {

View File

@ -10,44 +10,69 @@ Function Invoke-WPFUltimatePerformance {
#> #>
param($State) param($State)
Try{ Try{
# Check if Ultimate Performance plan is installed
$ultimatePlan = powercfg -list | Select-String -Pattern "Ultimate Performance" if($state -eq "Enabled"){
if($state -eq "Enable"){ # Define the name and GUID of the power scheme
if ($ultimatePlan) { $powerSchemeName = "Ultimate Performance"
Write-Host "Ultimate Performance plan is already installed." $powerSchemeGuid = "e9a42b02-d5df-448d-aa00-03f14749eb61"
} else {
Write-Host "Installing Ultimate Performance plan..." # Get all power schemes
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 $schemes = powercfg /list | Out-String -Stream
Write-Host "> Ultimate Performance plan installed."
# Check if the power scheme already exists
$ultimateScheme = $schemes | Where-Object { $_ -match $powerSchemeName }
if ($null -eq $ultimateScheme) {
Write-Host "Power scheme '$powerSchemeName' not found. Adding..."
# Add the power scheme
powercfg /duplicatescheme $powerSchemeGuid
powercfg -attributes SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 -ATTRIB_HIDE
powercfg -setactive $powerSchemeGuid
powercfg -change -monitor-timeout-ac 0
Write-Host "Power scheme added successfully."
} }
else {
# Set the Ultimate Performance plan as active Write-Host "Power scheme '$powerSchemeName' already exists."
$ultimatePlanGUID = (powercfg -list | Select-String -Pattern "Ultimate Performance").Line.Split()[3]
powercfg -setactive $ultimatePlanGUID
Write-Host "Ultimate Performance plan is now active."
}
elseif($state -eq "Disable"){
if ($ultimatePlan) {
# Extract the GUID of the Ultimate Performance plan
$ultimatePlanGUID = $ultimatePlan.Line.Split()[3]
# Set a different power plan as active before deleting the Ultimate Performance plan
$balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3]
powercfg -setactive $balancedPlanGUID
# Delete the Ultimate Performance plan
powercfg -delete $ultimatePlanGUID
Write-Host "Ultimate Performance plan has been uninstalled."
Write-Host "> Balanced plan is now active."
} else {
Write-Host "Ultimate Performance plan is not installed."
} }
} }
} Catch{ elseif($state -eq "Disabled"){
# Define the name of the power scheme
$powerSchemeName = "Ultimate Performance"
# Get all power schemes
$schemes = powercfg /list | Out-String -Stream
# Find the scheme to be removed
$ultimateScheme = $schemes | Where-Object { $_ -match $powerSchemeName }
# If the scheme exists, remove it
if ($null -ne $ultimateScheme) {
# Extract the GUID of the power scheme
$guid = ($ultimateScheme -split '\s+')[3]
if($null -ne $guid){
Write-Host "Found power scheme '$powerSchemeName' with GUID $guid. Removing..."
# Remove the power scheme
powercfg /delete $guid
Write-Host "Power scheme removed successfully."
}
else {
Write-Host "Could not find GUID for power scheme '$powerSchemeName'."
}
}
else {
Write-Host "Power scheme '$powerSchemeName' not found."
}
}
}
Catch{
Write-Warning $psitem.Exception.Message Write-Warning $psitem.Exception.Message
} }
} }

View File

@ -32,11 +32,7 @@ function Invoke-WPFUnInstall {
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock { Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
param($PackagesToInstall, $DebugPreference) param($PackagesToInstall, $DebugPreference)
if ($PackagesToInstall.count -eq 1){ # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$using:PackagesToInstall.Count })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
$packagesWinget, $packagesChoco = { $packagesWinget, $packagesChoco = {
$packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new() $packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new()
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new() $packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
@ -62,12 +58,17 @@ function Invoke-WPFUnInstall {
Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco -Manage "Uninstalling" Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco -Manage "Uninstalling"
} }
$ButtonType = [System.Windows.MessageBoxButton]::OK
$MessageboxTitle = "Uninstalls are Finished "
$Messageboxbody = ("Done")
$MessageIcon = [System.Windows.MessageBoxImage]::Information
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
Write-Host "===========================================" Write-Host "==========================================="
Write-Host "-- Uninstalls have finished ---" Write-Host "-- Uninstalls have finished ---"
Write-Host "===========================================" Write-Host "==========================================="
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "$env:TEMP\cttcheck.png" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
} }
Catch { Catch {
Write-Host "===========================================" Write-Host "==========================================="
@ -76,10 +77,5 @@ function Invoke-WPFUnInstall {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" })
} }
$sync.ProcessRunning = $False $sync.ProcessRunning = $False
$ButtonType = [System.Windows.MessageBoxButton]::OK
$MessageboxTitle = "Uninstalls are Finished "
$Messageboxbody = ("Done")
$MessageIcon = [System.Windows.MessageBoxImage]::Information
} }
} }

View File

@ -30,22 +30,18 @@ function Invoke-WPFtweaksbutton {
$sync.ProcessRunning = $true $sync.ProcessRunning = $true
if ($Tweaks.count -eq 1){ # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$Tweaks.Count })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
$cnt = 0 $cnt = 0
# Execute other selected tweaks # Execute other selected tweaks
foreach ($tweak in $Tweaks) { foreach ($tweak in $Tweaks) {
Write-Debug "This is a tweak to run $tweak count: $cnt" Write-Debug "This is a tweak to run $tweak count: $cnt"
Invoke-WinUtilTweaks $tweak Invoke-WinUtilTweaks $tweak
$cnt += 1 $cnt += 1
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($cnt/$Tweaks.Count) }) # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($using:cnt/$using:Tweaks.Count)})
} }
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "$env:TEMP\cttcheck.png" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
Write-Host "=================================" Write-Host "================================="
Write-Host "-- Tweaks are Finished ---" Write-Host "-- Tweaks are Finished ---"
Write-Host "=================================" Write-Host "================================="

View File

@ -24,21 +24,14 @@ function Invoke-WPFundoall {
param($Tweaks, $DebugPreference) param($Tweaks, $DebugPreference)
$sync.ProcessRunning = $true $sync.ProcessRunning = $true
if ($Tweaks.count -eq 1){ # $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value $using:Tweaks.Count })
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
$cnt = 0
Foreach ($tweak in $tweaks){ Foreach ($tweak in $tweaks){
Invoke-WinUtilTweaks $tweak -undo $true Invoke-WinUtilTweaks $tweak -undo $true
$cnt += 1
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($cnt/$Tweaks.Count) })
} }
$sync.ProcessRunning = $false $sync.ProcessRunning = $false
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "$env:TEMP\cttcheck.png" }) $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" })
Write-Host "==================================" Write-Host "=================================="
Write-Host "--- Undo Tweaks are Finished ---" Write-Host "--- Undo Tweaks are Finished ---"
Write-Host "==================================" Write-Host "=================================="

View File

@ -1,42 +0,0 @@
site_name: Chris Titus WinUtil Official Documentation
repo_url: https://github.com/ChrisTitusTech/winutil
nav:
- Introduction: 'index.md'
- User Guide: 'userguide.md'
- Contribute: 'contribute.md'
- Updates: 'updates.md'
- Known Issues: 'KnownIssues.md'
- FAQ: 'faq.md'
theme:
name: material
custom_dir: 'overrides'
features:
- navigation.tabs
- navigation.sections
- toc.integrate
- navigation.top
- search.suggest
- search.highlight
- content.tabs.link
- content.code.annotation
- content.code.copy
language: en
logo: assets/favicon.png
favicon: assets/favicon.png
palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
primary: black
accent: purple
- scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
primary: teal
accent: lime
markdown_extensions:
- admonition

View File

@ -1,12 +0,0 @@
{% extends "base.html" %}
{% block header %}
{{ super() }}
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
<strong>Announcement:</strong> This documentation is still in progress.
</div>
{% endblock %}
{% block footer %}
{# Empty block to override the footer #}
{% endblock %}

View File

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View File

@ -70,16 +70,15 @@ $inputXML = Set-WinUtilUITheme -inputXML $inputXML -themeName $ctttheme
# Read the XAML file # Read the XAML file
$reader = (New-Object System.Xml.XmlNodeReader $xaml) $reader = (New-Object System.Xml.XmlNodeReader $xaml)
try { try { $sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader ) }
$sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader ) catch [System.Management.Automation.MethodInvocationException] {
} catch [System.Management.Automation.MethodInvocationException] {
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..." Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
Write-Host $error[0].Exception.Message -ForegroundColor Red Write-Host $error[0].Exception.Message -ForegroundColor Red
If ($error[0].Exception.Message -like "*button*") { If ($error[0].Exception.Message -like "*button*") {
write-warning "Ensure your &lt;button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n" write-warning "Ensure your &lt;button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
} }
} catch { }
catch {
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed." Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
} }
@ -160,12 +159,6 @@ $logoUrl = "https://christitus.com/images/logo-full.png"
$logoPath = "$env:TEMP\cttlogo.png" $logoPath = "$env:TEMP\cttlogo.png"
Invoke-WebRequest -Uri $logoUrl -OutFile $logoPath Invoke-WebRequest -Uri $logoUrl -OutFile $logoPath
# download the check
$CheckUrl = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/docs/assets/Check.png"
# Download the image
$CheckPath = "$env:TEMP\cttcheck.png"
Invoke-WebRequest -Uri $CheckUrl -OutFile $CheckPath
# Progress bar in taskbaritem > Set-WinUtilProgressbar # Progress bar in taskbaritem > Set-WinUtilProgressbar
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo $sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
Set-WinUtilTaskbaritem -state "None" Set-WinUtilTaskbaritem -state "None"
@ -180,9 +173,9 @@ $sync["Form"].Add_Closing({
}) })
# Attach the event handler to the Click event # Attach the event handler to the Click event
$sync.SearchBarClearButton.Add_Click({ $sync.CheckboxFilterClear.Add_Click({
$sync.SearchBar.Text = "" $sync.CheckboxFilter.Text = ""
$sync.SearchBarClearButton.Visibility = "Collapsed" $sync.CheckboxFilterClear.Visibility = "Collapsed"
}) })
# add some shortcuts for people that don't like clicking # add some shortcuts for people that don't like clicking
@ -193,9 +186,9 @@ $commonKeyEvents = {
if ($_.Key -eq "Escape") if ($_.Key -eq "Escape")
{ {
$sync.SearchBar.SelectAll() $sync.CheckboxFilter.SelectAll()
$sync.SearchBar.Text = "" $sync.CheckboxFilter.Text = ""
$sync.SearchBarClearButton.Visibility = "Collapsed" $sync.CheckboxFilterClear.Visibility = "Collapsed"
return return
} }
@ -226,11 +219,11 @@ $commonKeyEvents = {
} }
# shortcut for the filter box # shortcut for the filter box
if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") { if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") {
if ($sync.SearchBar.Text -eq "Ctrl-F to filter") { if ($sync.CheckboxFilter.Text -eq "Ctrl-F to filter") {
$sync.SearchBar.SelectAll() $sync.CheckboxFilter.SelectAll()
$sync.SearchBar.Text = "" $sync.CheckboxFilter.Text = ""
} }
$sync.SearchBar.Focus() $sync.CheckboxFilter.Focus()
} }
} }
@ -378,7 +371,7 @@ Add-Type @"
}) })
# Load Checkboxes and Labels outside of the Filter function only once on startup for performance reasons # Load Checkboxes and Labels outside of the Filter fuction only once on startup for performance reasons
$filter = Get-WinUtilVariables -Type CheckBox $filter = Get-WinUtilVariables -Type CheckBox
$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter } $CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter }
@ -388,13 +381,13 @@ $labels = @{}
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category $allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
$sync["SearchBar"].Add_TextChanged({ $sync["CheckboxFilter"].Add_TextChanged({
if ($sync.SearchBar.Text -ne "") { if ($sync.CheckboxFilter.Text -ne "") {
$sync.SearchBarClearButton.Visibility = "Visible" $sync.CheckboxFilterClear.Visibility = "Visible"
} }
else { else {
$sync.SearchBarClearButton.Visibility = "Collapsed" $sync.CheckboxFilterClear.Visibility = "Collapsed"
} }
$activeApplications = @() $activeApplications = @()
@ -405,7 +398,7 @@ $sync["SearchBar"].Add_TextChanged({
continue continue
} }
$textToSearch = $sync.SearchBar.Text.ToLower() $textToSearch = $sync.CheckboxFilter.Text.ToLower()
$checkBoxName = $CheckBox.Key $checkBoxName = $CheckBox.Key
$textBlockName = $checkBoxName + "Link" $textBlockName = $checkBoxName + "Link"
@ -445,10 +438,6 @@ $sync["SearchBar"].Add_TextChanged({
$label.Visibility = "Collapsed"} $label.Visibility = "Collapsed"}
}) })
$sync["Form"].Add_Activated({
Set-WinUtilTaskbaritem -overlay $logoPath
})
# Define event handler for button click # Define event handler for button click
$sync["SettingsButton"].Add_Click({ $sync["SettingsButton"].Add_Click({
Write-Debug "SettingsButton clicked" Write-Debug "SettingsButton clicked"
@ -489,12 +478,7 @@ MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</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> Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
"@ "@
$FontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSize Show-CustomDialog -Message $authorInfo -Width 400
$HeaderFontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSizeHeader
$IconSize = $sync.configs.themes.$ctttheme.CustomDialogIconSize
$Width = $sync.configs.themes.$ctttheme.CustomDialogWidth
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize
}) })
$sync["Form"].ShowDialog() | out-null $sync["Form"].ShowDialog() | out-null
Stop-Transcript Stop-Transcript

View File

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View File

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View File

@ -20,7 +20,7 @@ function Get-LatestRelease {
return $latestRelease.tag_name return $latestRelease.tag_name
} catch { } catch {
Write-Host "Error fetching release data: $_" -ForegroundColor Red Write-Host "Error fetching release data: $_" -ForegroundColor Red
return $latestRelease.tag_name return $null
} }
} }
@ -29,12 +29,10 @@ function RedirectToLatestPreRelease {
$latestRelease = Get-LatestRelease $latestRelease = Get-LatestRelease
if ($latestRelease) { if ($latestRelease) {
$url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1" $url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1"
Invoke-RestMethod $url | Invoke-Expression
} else { } else {
Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red
Write-Host "Using latest Full Release"
$url = "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1"
} }
Invoke-RestMethod $url | Invoke-Expression
} }
# Call the redirect function # Call the redirect function

File diff suppressed because it is too large Load Diff

View File

@ -49,8 +49,6 @@
<Style TargetType="Button" x:Key="HoverButtonStyle"> <Style TargetType="Button" x:Key="HoverButtonStyle">
<Setter Property="Foreground" Value="{MainForegroundColor}" /> <Setter Property="Foreground" Value="{MainForegroundColor}" />
<Setter Property="FontWeight" Value="Normal" /> <Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="{ButtonFontSize}" />
<Setter Property="TextElement.FontFamily" Value="{ButtonFontFamily}"/>
<Setter Property="Background" Value="{MainBackgroundColor}" /> <Setter Property="Background" Value="{MainBackgroundColor}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
@ -177,7 +175,6 @@
<!-- TextBlock template --> <!-- TextBlock template -->
<Style TargetType="TextBlock"> <Style TargetType="TextBlock">
<Setter Property="FontSize" Value="{FontSize}"/>
<Setter Property="Foreground" Value="{LabelboxForegroundColor}"/> <Setter Property="Foreground" Value="{LabelboxForegroundColor}"/>
<Setter Property="Background" Value="{LabelBackgroundColor}"/> <Setter Property="Background" Value="{LabelBackgroundColor}"/>
</Style> </Style>
@ -200,9 +197,7 @@
BorderBrush="{ButtonBackgroundColor}" BorderBrush="{ButtonBackgroundColor}"
BorderThickness="{ButtonBorderThickness}" BorderThickness="{ButtonBorderThickness}"
CornerRadius="{ButtonCornerRadius}"> CornerRadius="{ButtonCornerRadius}">
<ContentPresenter <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="10,2,10,2"/> Margin="10,2,10,2"/>
</Border> </Border>
</Grid> </Grid>
@ -242,9 +237,7 @@
<Setter Property="Margin" Value="{ButtonMargin}"/> <Setter Property="Margin" Value="{ButtonMargin}"/>
<Setter Property="Foreground" Value="{ButtonForegroundColor}"/> <Setter Property="Foreground" Value="{ButtonForegroundColor}"/>
<Setter Property="Background" Value="{ButtonBackgroundColor}"/> <Setter Property="Background" Value="{ButtonBackgroundColor}"/>
<Setter Property="Height" Value="{ButtonHeight}"/> <Setter Property="Height" Value="{ToggleButtonHeight}"/>
<Setter Property="Width" Value="{ButtonWidth}"/>
<Setter Property="FontSize" Value="{ButtonFontSize}"/>
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
@ -273,12 +266,12 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style x:Key="SearchBarClearButtonStyle" TargetType="Button"> <Style x:Key="ClearButtonStyle" TargetType="Button">
<Setter Property="FontFamily" Value="Arial"/> <Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="{SearchBarClearButtonFontSize}"/> <Setter Property="FontSize" Value="14"/>
<Setter Property="Content" Value="X"/> <Setter Property="Content" Value="X"/>
<Setter Property="Height" Value="{SearchBarClearButtonFontSize}"/> <Setter Property="Height" Value="14"/>
<Setter Property="Width" Value="{SearchBarClearButtonFontSize}"/> <Setter Property="Width" Value="14"/>
<Setter Property="Background" Value="Transparent"/> <Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{MainForegroundColor}"/> <Setter Property="Foreground" Value="{MainForegroundColor}"/>
<Setter Property="Padding" Value="0"/> <Setter Property="Padding" Value="0"/>
@ -297,22 +290,22 @@
<Style TargetType="CheckBox"> <Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{MainForegroundColor}"/> <Setter Property="Foreground" Value="{MainForegroundColor}"/>
<Setter Property="Background" Value="{MainBackgroundColor}"/> <Setter Property="Background" Value="{MainBackgroundColor}"/>
<Setter Property="FontSize" Value="{FontSize}" /> <!-- <Setter Property="FontSize" Value="15" /> -->
<Setter Property="TextElement.FontFamily" Value="{FontFamily}"/> <!-- <Setter Property="TextElement.FontFamily" Value="Consolas, sans-serif"/> -->
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}"> <Grid Background="{TemplateBinding Background}" Margin="6,0,0,0">
<BulletDecorator Background="Transparent"> <BulletDecorator Background="Transparent">
<BulletDecorator.Bullet> <BulletDecorator.Bullet>
<Grid Width="{CheckBoxBulletDecoratorFontSize}" Height="{CheckBoxBulletDecoratorFontSize}"> <Grid Width="16" Height="16">
<Border x:Name="Border" <Border x:Name="Border"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Background="{ButtonBackgroundColor}" Background="{ButtonBackgroundColor}"
BorderThickness="1" BorderThickness="1"
Width="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}" Width="14"
Height="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}" Height="14"
Margin="2" Margin="1"
SnapsToDevicePixels="True"/> SnapsToDevicePixels="True"/>
<Path x:Name="CheckMark" <Path x:Name="CheckMark"
Stroke="{TemplateBinding Foreground}" Stroke="{TemplateBinding Foreground}"
@ -421,6 +414,19 @@
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" x:Name="txtToggle" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="{MainForegroundColor}" FontSize="12">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="Off"/>
<Setter Property="Margin" Value="4,0,4,0"/>
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked}" Value="True">
<Setter Property="Text" Value="On"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Border Grid.Column="1" x:Name="Border" CornerRadius="8" <Border Grid.Column="1" x:Name="Border" CornerRadius="8"
BorderThickness="1" BorderThickness="1"
@ -541,7 +547,6 @@
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/> <Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
<Setter Property="BorderThickness" Value="1"/> <Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{MainForegroundColor}"/> <Setter Property="Foreground" Value="{MainForegroundColor}"/>
<Setter Property="FontSize" Value="{FontSize}"/>
<Setter Property="Padding" Value="5"/> <Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
@ -581,51 +586,51 @@
</Window.Resources> </Window.Resources>
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch"> <Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="{TabRowHeightInPixels}px"/> <RowDefinition Height="50px"/>
<RowDefinition Height=".9*"/> <RowDefinition Height=".9*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto"> <DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto">
<Image Height="{WinUtilIconSize}" Width="{WinUtilIconSize}" Name="WPFIcon" <Image Height="{ToggleButtonHeight}" Width="{ToggleButtonHeight}" Name="WPFIcon"
SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/> SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/>
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}" <ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT"> Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
<ToggleButton.Content> <ToggleButton.Content>
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonInstallForegroundColor}" > <TextBlock Background="Transparent" Foreground="{ButtonInstallForegroundColor}" >
<Underline>I</Underline>nstall <Underline>I</Underline>nstall
</TextBlock> </TextBlock>
</ToggleButton.Content> </ToggleButton.Content>
</ToggleButton> </ToggleButton>
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}" <ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT"> Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT">
<ToggleButton.Content> <ToggleButton.Content>
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonTweaksForegroundColor}"> <TextBlock Background="Transparent" Foreground="{ButtonTweaksForegroundColor}">
<Underline>T</Underline>weaks <Underline>T</Underline>weaks
</TextBlock> </TextBlock>
</ToggleButton.Content> </ToggleButton.Content>
</ToggleButton> </ToggleButton>
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}" <ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT"> Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT">
<ToggleButton.Content> <ToggleButton.Content>
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonConfigForegroundColor}"> <TextBlock Background="Transparent" Foreground="{ButtonConfigForegroundColor}">
<Underline>C</Underline>onfig <Underline>C</Underline>onfig
</TextBlock> </TextBlock>
</ToggleButton.Content> </ToggleButton.Content>
</ToggleButton> </ToggleButton>
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}" <ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT"> Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT">
<ToggleButton.Content> <ToggleButton.Content>
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}"> <TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
<Underline>U</Underline>pdates <Underline>U</Underline>pdates
</TextBlock> </TextBlock>
</ToggleButton.Content> </ToggleButton.Content>
</ToggleButton> </ToggleButton>
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}" <ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab5BT"> Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab5BT">
<ToggleButton.Content> <ToggleButton.Content>
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}"> <TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
<Underline>M</Underline>icroWin <Underline>M</Underline>icroWin
</TextBlock> </TextBlock>
</ToggleButton.Content> </ToggleButton.Content>
@ -637,23 +642,13 @@
<ColumnDefinition Width="50px"/> <ColumnDefinition Width="50px"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--
TODO:
Make this SearchBar TextBox Position itself and still
house the Magnifying Glass Character in place,
even if that Magnifying Icon changed its Size,
it should be positioned relative to the SearchBar.
Consider using a Math Solver, will help in making
development of these things much easier
-->
<TextBox <TextBox
Grid.Column="0" Grid.Column="0"
Width="{SearchBarWidth}" Width="200"
Height="{SearchBarHeight}" FontSize="14"
FontSize="{SearchBarTextBoxFontSize}"
VerticalAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2" Height="25" Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
Name="SearchBar" Name="CheckboxFilter"
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}" Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter"> ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
</TextBox> </TextBox>
@ -661,19 +656,11 @@
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left"
FontFamily="Segoe MDL2 Assets" FontFamily="Segoe MDL2 Assets"
FontSize="{IconFontSize}" FontSize="14" Margin="16,0,0,0">&#xE721;</TextBlock>
Margin="16,0,0,0">&#xE721;</TextBlock>
<!--
TODO:
Make this ClearButton Positioning react to
SearchBar Width Value changing, so it'll look correct.
Consider using a Math Solver, will help in making
development of these things much easier
-->
<Button Grid.Column="0" <Button Grid.Column="0"
VerticalAlignment="Center" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left"
Name="SearchBarClearButton" Name="CheckboxFilterClear"
Style="{StaticResource SearchBarClearButtonStyle}" Style="{StaticResource ClearButtonStyle}"
Margin="193,0,0,0" Visibility="Collapsed"/> Margin="193,0,0,0" Visibility="Collapsed"/>
<Button Name="SettingsButton" <Button Name="SettingsButton"
@ -681,8 +668,8 @@
Grid.Column="1" BorderBrush="Transparent" Grid.Column="1" BorderBrush="Transparent"
Background="{MainBackgroundColor}" Background="{MainBackgroundColor}"
Foreground="{MainForegroundColor}" Foreground="{MainForegroundColor}"
FontSize="{SettingsIconFontSize}" FontSize="18"
Width="{IconButtonSize}" Height="{IconButtonSize}" Width="35" Height="35"
HorizontalAlignment="Right" VerticalAlignment="Top" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,5,5,0" Margin="0,5,5,0"
FontFamily="Segoe MDL2 Assets" FontFamily="Segoe MDL2 Assets"
@ -693,10 +680,10 @@
HorizontalAlignment="Right" VerticalAlignment="Top"> HorizontalAlignment="Right" VerticalAlignment="Top">
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0"> <Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/> <MenuItem Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/> <MenuItem Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
<Separator/> <Separator/>
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/> <MenuItem Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
</StackPanel> </StackPanel>
</Border> </Border>
</Popup> </Popup>
@ -706,11 +693,11 @@
Content="&#xD7;" BorderThickness="0" Content="&#xD7;" BorderThickness="0"
BorderBrush="Transparent" BorderBrush="Transparent"
Background="{MainBackgroundColor}" Background="{MainBackgroundColor}"
Width="{IconButtonSize}" Height="{IconButtonSize}" Width="35" Height="35"
HorizontalAlignment="Right" VerticalAlignment="Top" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,5,5,0" Margin="0,5,5,0"
FontFamily="Arial" FontFamily="Arial"
Foreground="{MainForegroundColor}" FontSize="{IconFontSize}" Name="WPFCloseButton" /> Foreground="{MainForegroundColor}" FontSize="18" Name="WPFCloseButton" />
</Grid> </Grid>
</DockPanel> </DockPanel>
@ -746,17 +733,17 @@
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="45px"/> <RowDefinition Height="55"/>
<RowDefinition Height=".70*"/> <RowDefinition Height=".70*"/>
<RowDefinition Height=".10*"/> <RowDefinition Height=".10*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
{{InstallPanel_tweaks}} {{InstallPanel_tweaks}}
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5"> <StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
<Label Content="Recommended Selections:" FontSize="{FontSize}" VerticalAlignment="Center" Margin="2"/> <Label Content="Recommended Selections:" FontSize="14" VerticalAlignment="Center"/>
<Button Name="WPFstandard" Content=" Standard " Margin="2"/> <Button Name="WPFstandard" Content=" Standard " Margin="1"/>
<Button Name="WPFminimal" Content=" Minimal " Margin="2"/> <Button Name="WPFminimal" Content=" Minimal " Margin="1"/>
<Button Name="WPFclear" Content=" Clear " Margin="2"/> <Button Name="WPFclear" Content=" Clear " Margin="1"/>
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/> <Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="1"/>
</StackPanel> </StackPanel>
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0"> <Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0">
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left"> <StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
@ -787,19 +774,19 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0"> <Border Grid.Row="0" Grid.Column="0">
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True"> <StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
<Button Name="WPFUpdatesdefault" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/> <Button Name="WPFUpdatesdefault" FontSize="16" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.</TextBlock> <TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.</TextBlock>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Grid.Row="0" Grid.Column="1"> <Border Grid.Row="0" Grid.Column="1">
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True"> <StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
<Button Name="WPFUpdatessecurity" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/> <Button Name="WPFUpdatessecurity" FontSize="16" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.</TextBlock> <TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.</TextBlock>
</StackPanel> </StackPanel>
</Border> </Border>
<Border Grid.Row="0" Grid.Column="2"> <Border Grid.Row="0" Grid.Column="2">
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True"> <StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
<Button Name="WPFUpdatesdisable" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/> <Button Name="WPFUpdatesdisable" FontSize="16" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock> <TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock>
<TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/> <TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/>
</StackPanel> </StackPanel>
@ -807,7 +794,7 @@
</Grid> </Grid>
</ScrollViewer> </ScrollViewer>
</TabItem> </TabItem>
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5"> <TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5" Width="Auto" Height="Auto">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Width="Auto" Height="Auto"> <Grid Width="Auto" Height="Auto">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -822,12 +809,12 @@
HorizontalAlignment="Stretch"> HorizontalAlignment="Stretch">
<StackPanel Name="MicrowinMain" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0"> <StackPanel Name="MicrowinMain" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1"> <StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="-10,1,1,1" /> <CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="1" />
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{ComboBoxForegroundColor}"> <TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{ComboBoxForegroundColor}">
Choose a Windows ISO file that you've downloaded <LineBreak/> Choose a Windows ISO file that you've downloaded <LineBreak/>
Check the status in the console Check the status in the console
</TextBlock> </TextBlock>
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="-10,1,1,1" <CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
ToolTip="Use ISO directory for ScratchDir " /> ToolTip="Use ISO directory for ScratchDir " />
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -844,8 +831,6 @@
Foreground="{LabelboxForegroundColor}"> Foreground="{LabelboxForegroundColor}">
</TextBox> </TextBox>
<Button Name="MicrowinScratchDirBT" <Button Name="MicrowinScratchDirBT"
Width="Auto"
Height="Auto"
Grid.Column="1" Grid.Column="1"
Margin="2" Margin="2"
Padding="1" VerticalAlignment="Center"> Padding="1" VerticalAlignment="Center">
@ -874,12 +859,12 @@
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock> <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock>
<ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" /> <ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" />
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows features you want to remove from the ISO</TextBlock> <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows features you want to remove from the ISO</TextBlock>
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/> <CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="5,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/> <CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="5,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/> <CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/> <CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
<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="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="-10,5,0,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/> <CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="5,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
<TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}" <TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
Margin="6" Margin="6"
Text="" Text=""
@ -888,9 +873,9 @@
Foreground="{LabelboxForegroundColor}" Foreground="{LabelboxForegroundColor}"
ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"
/> />
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="-10,5,0,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/> <CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="5,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
<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="5,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"/>
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/> <Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
</StackPanel> </StackPanel>
@ -911,7 +896,7 @@
<Grid Name = "BusyMessage" Visibility="Collapsed"> <Grid Name = "BusyMessage" Visibility="Collapsed">
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" /> <TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets" <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
FontSize="{IconFontSize}" Margin="16,0,0,0">&#xE701;</TextBlock> FontSize="14" Margin="16,0,0,0">&#xE701;</TextBlock>
</Grid> </Grid>
<TextBlock x:Name = "asciiTextBlock" <TextBlock x:Name = "asciiTextBlock"
@ -921,7 +906,7 @@
VerticalAlignment = "Top" VerticalAlignment = "Top"
Height = "Auto" Height = "Auto"
Width = "Auto" Width = "Auto"
FontSize = "{MicroWinLogoSize}" FontSize = "10"
FontFamily = "Courier New" FontFamily = "Courier New"
> >
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __