mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 09:20:36 -06:00
Merge branch 'ChrisTitusTech:main' into microwinisodownloader
This commit is contained in:
commit
4b9a9b2ef6
128
.github/CODE_OF_CONDUCT.md
vendored
Normal file
128
.github/CODE_OF_CONDUCT.md
vendored
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
* Demonstrating empathy and kindness toward other people
|
||||||
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
* Giving and gracefully accepting constructive feedback
|
||||||
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
contact@christitus.com.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
8
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -7,7 +7,7 @@ assignees: ''
|
|||||||
---
|
---
|
||||||
|
|
||||||
## Describe the bug
|
## Describe the bug
|
||||||
A clear and concise description of what the bug is.
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
## To Reproduce
|
## To Reproduce
|
||||||
Steps to reproduce the behavior:
|
Steps to reproduce the behavior:
|
||||||
@ -17,10 +17,10 @@ Steps to reproduce the behavior:
|
|||||||
4. See error
|
4. See error
|
||||||
|
|
||||||
## Expected behavior
|
## Expected behavior
|
||||||
A clear and concise description of what you expected to happen.
|
<!-- A clear and concise description of what you expected to happen. -->
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
If applicable, add screenshots to help explain your problem.
|
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||||
|
|
||||||
## Additional context
|
## Additional context
|
||||||
Add any other context about the problem here.
|
<!-- Add any other context about the problem here. -->
|
||||||
|
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
8
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -8,13 +8,13 @@ assignees: ''
|
|||||||
---
|
---
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
**Is your feature request related to a problem? Please describe.**
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
**Describe the solution you'd like**
|
||||||
A clear and concise description of what you want to happen.
|
<!-- A clear and concise description of what you want to happen. -->
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
**Describe alternatives you've considered**
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context or screenshots about the feature request here.
|
<!-- Add any other context or screenshots about the feature request here. -->
|
||||||
|
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,7 +1,9 @@
|
|||||||
# Pull Request
|
# Pull Request
|
||||||
|
|
||||||
|
<!--Before you make this PR have you followed the docs here? - https://christitustech.github.io/winutil/contribute/ -->
|
||||||
|
|
||||||
## Title
|
## Title
|
||||||
[Provide a succinct and descriptive title for the pull request.]
|
<!--[Provide a succinct and descriptive title for the pull request.]-->
|
||||||
|
|
||||||
## Type of Change
|
## Type of Change
|
||||||
- [ ] New feature
|
- [ ] New feature
|
||||||
@ -13,20 +15,20 @@
|
|||||||
- [ ] UI/UX improvement
|
- [ ] UI/UX improvement
|
||||||
|
|
||||||
## Description
|
## 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.]
|
<!--[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
|
## Testing
|
||||||
[Detail the testing you have performed to ensure that these changes function as intended. Include information about any added tests.]
|
<!--[Detail the testing you have performed to ensure that these changes function as intended. Include information about any added tests.]-->
|
||||||
|
|
||||||
## Impact
|
## Impact
|
||||||
[Discuss the impact of your changes on the project. This might include effects on performance, new dependencies, or changes in behaviour.]
|
<!--[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
|
## Issue related to PR
|
||||||
[What issue/discussion is related to this PR (if any)]
|
<!--[What issue/discussion is related to this PR (if any)]-->
|
||||||
- Resolves #
|
- Resolves #
|
||||||
|
|
||||||
## Additional Information
|
## Additional Information
|
||||||
[Any additional information that reviewers should be aware of.]
|
<!--[Any additional information that reviewers should be aware of.]-->
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
- [ ] My code adheres to the coding and style guidelines of the project.
|
- [ ] My code adheres to the coding and style guidelines of the project.
|
||||||
|
2
.github/SECURITY.md
vendored
2
.github/SECURITY.md
vendored
@ -1,5 +1,5 @@
|
|||||||
# Security Policy
|
# Security Policy
|
||||||
|
|
||||||
If you find a security issue please make post it in the issues tab. If you think it should be private you can email me at contact@christitus.com.
|
If you find a security issue please make post it in the issues tab. If you think it should be private you can email me at contact@christitus.com.
|
||||||
|
|
||||||
For immediate response check out our discord server @ [![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)
|
For immediate response check out our discord server @ [![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)
|
||||||
|
58
.github/release-drafter.yml
vendored
Normal file
58
.github/release-drafter.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
name-template: '$RESOLVED_VERSION'
|
||||||
|
tag-template: '$RESOLVED_VERSION'
|
||||||
|
tag-prefix: ""
|
||||||
|
categories:
|
||||||
|
- title: '🚀 Features'
|
||||||
|
labels:
|
||||||
|
- 'feature'
|
||||||
|
- 'enhancement'
|
||||||
|
- title: '🐛 Bug Fixes'
|
||||||
|
labels:
|
||||||
|
- 'fix'
|
||||||
|
- 'bugfix'
|
||||||
|
- 'bug'
|
||||||
|
- title: '📚 Documentation'
|
||||||
|
label: 'documentation'
|
||||||
|
- title: '🔒 Security'
|
||||||
|
label: 'security'
|
||||||
|
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||||
|
template: |
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
|
||||||
|
$CONTRIBUTORS
|
||||||
|
|
||||||
|
change-title-escapes: '\<*_&"'''
|
||||||
|
autolabeler:
|
||||||
|
- label: 'documentation'
|
||||||
|
files:
|
||||||
|
- '*.md'
|
||||||
|
branch:
|
||||||
|
- '/docs{0,1}\/.+/'
|
||||||
|
- label: 'bug'
|
||||||
|
branch:
|
||||||
|
- '/fix\/.+/'
|
||||||
|
title:
|
||||||
|
- '/fix/i'
|
||||||
|
- label: 'enhancement'
|
||||||
|
branch:
|
||||||
|
- '/feature\/.+/'
|
||||||
|
body:
|
||||||
|
- '/[A-Z]+-[0-9]+/'
|
||||||
|
- label: 'documentation'
|
||||||
|
files:
|
||||||
|
- '**/*.md'
|
||||||
|
- 'docs/**/*'
|
||||||
|
- label: 'security'
|
||||||
|
branch:
|
||||||
|
- '/security\/.+/'
|
||||||
|
replacers:
|
||||||
|
- search: /"/g
|
||||||
|
replace: ''
|
||||||
|
- search: /'/g
|
||||||
|
replace: ''
|
||||||
|
exclude-labels:
|
||||||
|
- 'skip-changelog'
|
4
.github/workflows/close-old-issues.yaml
vendored
4
.github/workflows/close-old-issues.yaml
vendored
@ -22,8 +22,8 @@ jobs:
|
|||||||
exempt-issue-labels: "Keep Issue Open"
|
exempt-issue-labels: "Keep Issue Open"
|
||||||
# Split it into two weeks, after one week the issue will be marked as stale,
|
# Split it into two weeks, after one week the issue will be marked as stale,
|
||||||
# after another week have pasted without any update.. the issue will then be closed.
|
# after another week have pasted without any update.. the issue will then be closed.
|
||||||
days-before-issue-stale: 7
|
days-before-issue-stale: 90
|
||||||
days-before-issue-close: 7
|
days-before-issue-close: 365
|
||||||
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
||||||
days-before-pr-stale: -1
|
days-before-pr-stale: -1
|
||||||
days-before-pr-close: -1
|
days-before-pr-close: -1
|
||||||
|
1
.github/workflows/github-pages.yaml
vendored
1
.github/workflows/github-pages.yaml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
- '.github/requirements.txt'
|
- '.github/requirements.txt'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'overrides/**'
|
- 'overrides/**'
|
||||||
|
- '.github/CONTRIBUTING.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
19
.github/workflows/pre-release.yaml
vendored
19
.github/workflows/pre-release.yaml
vendored
@ -74,16 +74,27 @@ jobs:
|
|||||||
name: winutil
|
name: winutil
|
||||||
path: ./winutil.ps1
|
path: ./winutil.ps1
|
||||||
|
|
||||||
|
- name: Generate Release Notes
|
||||||
|
id: generate_notes
|
||||||
|
uses: release-drafter/release-drafter@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
config-name: release-drafter.yml
|
||||||
|
version: ${{ env.version }}
|
||||||
|
|
||||||
- name: Create and Upload Release
|
- name: Create and Upload Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.VERSION }}
|
tag_name: ${{ env.version }}
|
||||||
name: Pre-Release ${{ env.VERSION }}
|
name: Pre-Release ${{ env.version }}
|
||||||
body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)"
|
body: |
|
||||||
|
${{ steps.generate_notes.outputs.body }}
|
||||||
|
|
||||||
|
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)
|
||||||
append_body: false
|
append_body: false
|
||||||
files: ./winutil.ps1
|
files: ./winutil.ps1
|
||||||
prerelease: true
|
prerelease: true
|
||||||
generate_release_notes: true
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
56
Compile.ps1
56
Compile.ps1
@ -1,7 +1,8 @@
|
|||||||
param (
|
param (
|
||||||
[switch]$Debug,
|
[switch]$Debug,
|
||||||
[switch]$Run,
|
[switch]$Run,
|
||||||
[switch]$SkipPreprocessing
|
[switch]$SkipPreprocessing,
|
||||||
|
[string]$Arguments
|
||||||
)
|
)
|
||||||
$OFS = "`r`n"
|
$OFS = "`r`n"
|
||||||
$scriptname = "winutil.ps1"
|
$scriptname = "winutil.ps1"
|
||||||
@ -64,38 +65,14 @@ Get-ChildItem "$workingdir\functions" -Recurse -File | ForEach-Object {
|
|||||||
}
|
}
|
||||||
Update-Progress "Adding: Config *.json" 40
|
Update-Progress "Adding: Config *.json" 40
|
||||||
Get-ChildItem "$workingdir\config" | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
Get-ChildItem "$workingdir\config" | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||||
|
|
||||||
$json = (Get-Content $psitem.FullName).replace("'","''")
|
$json = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
|
$jsonAsObject = $json | convertfrom-json
|
||||||
# Replace every XML Special Character so it'll render correctly in final build
|
|
||||||
# Only do so if json files has content to be displayed (for example the applications, tweaks, features json files)
|
|
||||||
# Make an Array List containing every name at first level of Json File
|
|
||||||
$jsonAsObject = $json | convertfrom-json
|
|
||||||
$firstLevelJsonList = [System.Collections.ArrayList]::new()
|
|
||||||
$jsonAsObject.PSObject.Properties.Name | ForEach-Object {$null = $firstLevelJsonList.Add($_)}
|
|
||||||
# Note:
|
|
||||||
# Avoid using HTML Entity Codes, for example '”' (stands for "Right Double Quotation Mark"),
|
|
||||||
# Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
|
||||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
|
||||||
$firstLevelName = $firstLevelJsonList[$i]
|
|
||||||
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
|
||||||
}
|
|
||||||
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file
|
# Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file
|
||||||
if ($psitem.Name -eq "applications.json") {
|
if ($psitem.Name -eq "applications.json") {
|
||||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
foreach ($appEntryName in $jsonAsObject.PSObject.Properties.Name) {
|
||||||
$appEntryName = $firstLevelJsonList[$i]
|
|
||||||
$appEntryContent = $jsonAsObject.$appEntryName
|
$appEntryContent = $jsonAsObject.$appEntryName
|
||||||
# Remove the entire app entry, so we could add it later with a different name
|
|
||||||
$jsonAsObject.PSObject.Properties.Remove($appEntryName)
|
$jsonAsObject.PSObject.Properties.Remove($appEntryName)
|
||||||
# Add the app entry, but with a different name (WPFInstall + The App Entry Name)
|
|
||||||
$jsonAsObject | Add-Member -MemberType NoteProperty -Name "WPFInstall$appEntryName" -Value $appEntryContent
|
$jsonAsObject | Add-Member -MemberType NoteProperty -Name "WPFInstall$appEntryName" -Value $appEntryContent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,20 +87,7 @@ Get-ChildItem "$workingdir\config" | Where-Object {$psitem.extension -eq ".json"
|
|||||||
|
|
||||||
$xaml = (Get-Content "$workingdir\xaml\inputXML.xaml").replace("'","''")
|
$xaml = (Get-Content "$workingdir\xaml\inputXML.xaml").replace("'","''")
|
||||||
|
|
||||||
# Dot-source the Get-TabXaml function
|
|
||||||
. "$workingdir\functions\private\Get-TabXaml.ps1"
|
|
||||||
|
|
||||||
Update-Progress "Building: Xaml " 75
|
|
||||||
$appXamlContent = Get-TabXaml "applications" 5
|
|
||||||
$tweaksXamlContent = Get-TabXaml "tweaks"
|
|
||||||
$featuresXamlContent = Get-TabXaml "feature"
|
|
||||||
|
|
||||||
|
|
||||||
Update-Progress "Adding: Xaml " 90
|
Update-Progress "Adding: Xaml " 90
|
||||||
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
|
||||||
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
|
||||||
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
|
||||||
$xaml = $xaml -replace "{{InstallPanel_features}}", $featuresXamlContent
|
|
||||||
|
|
||||||
$script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
$script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
||||||
|
|
||||||
@ -155,10 +119,12 @@ catch {
|
|||||||
Write-Progress -Activity "Validating" -Completed
|
Write-Progress -Activity "Validating" -Completed
|
||||||
|
|
||||||
if ($run) {
|
if ($run) {
|
||||||
try {
|
$script = "& '$workingdir\$scriptname' $Arguments"
|
||||||
Start-Process -FilePath "pwsh" -ArgumentList "$workingdir\$scriptname"
|
|
||||||
} catch {
|
|
||||||
Start-Process -FilePath "powershell" -ArgumentList "$workingdir\$scriptname"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||||
|
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
||||||
|
|
||||||
|
Start-Process $processCmd -ArgumentList "$powershellcmd -NoProfile -Command $script"
|
||||||
|
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 Chris Titus
|
Copyright (c) 2022 CT Tech Group LLC
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
|
|||||||
|
|
||||||
These are the sponsors that help keep this project alive with monthly contributions.
|
These are the sponsors that help keep this project alive with monthly contributions.
|
||||||
|
|
||||||
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><a href="https://github.com/claudemods"><img src="https://github.com/claudemods.png" width="60px" alt="Claudemods" /></a><a href="https://github.com/hkolatan"><img src="https://github.com/hkolatan.png" width="60px" alt="Halil Kolatan" /></a><!-- sponsors -->
|
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><a href="https://github.com/claudemods"><img src="https://github.com/claudemods.png" width="60px" alt="Claudemods" /></a><a href="https://github.com/hkolatan"><img src="https://github.com/hkolatan.png" width="60px" alt="Halil Kolatan" /></a><a href="https://github.com/FatBastard0"><img src="https://github.com/FatBastard0.png" width="60px" alt="" /></a><a href="https://github.com/tcookj66"><img src="https://github.com/tcookj66.png" width="60px" alt="Timothy Cook" /></a><a href="https://github.com/june349"><img src="https://github.com/june349.png" width="60px" alt="" /></a><a href="https://github.com/Ascent7910"><img src="https://github.com/Ascent7910.png" width="60px" alt="Max" /></a><!-- sponsors -->
|
||||||
|
|
||||||
## 🏅 Thanks to all Contributors
|
## 🏅 Thanks to all Contributors
|
||||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||||
|
@ -87,14 +87,6 @@
|
|||||||
"link": "https://anydesk.com/",
|
"link": "https://anydesk.com/",
|
||||||
"winget": "AnyDeskSoftwareGmbH.AnyDesk"
|
"winget": "AnyDeskSoftwareGmbH.AnyDesk"
|
||||||
},
|
},
|
||||||
"ATLauncher": {
|
|
||||||
"category": "Games",
|
|
||||||
"choco": "na",
|
|
||||||
"content": "ATLauncher",
|
|
||||||
"description": "ATLauncher is a Launcher for Minecraft which integrates multiple different ModPacks to allow you to download and install ModPacks easily and quickly.",
|
|
||||||
"link": "https://github.com/ATLauncher/ATLauncher",
|
|
||||||
"winget": "ATLauncher.ATLauncher"
|
|
||||||
},
|
|
||||||
"audacity": {
|
"audacity": {
|
||||||
"category": "Multimedia Tools",
|
"category": "Multimedia Tools",
|
||||||
"choco": "audacity",
|
"choco": "audacity",
|
||||||
@ -511,14 +503,6 @@
|
|||||||
"link": "https://www.epicgames.com/store/en-US/",
|
"link": "https://www.epicgames.com/store/en-US/",
|
||||||
"winget": "EpicGames.EpicGamesLauncher"
|
"winget": "EpicGames.EpicGamesLauncher"
|
||||||
},
|
},
|
||||||
"errorlookup": {
|
|
||||||
"category": "Utilities",
|
|
||||||
"choco": "na",
|
|
||||||
"content": "Windows Error Code Lookup",
|
|
||||||
"description": "ErrorLookup is a tool for looking up Windows error codes and their descriptions.",
|
|
||||||
"link": "https://github.com/HenryPP/ErrorLookup",
|
|
||||||
"winget": "Henry++.ErrorLookup"
|
|
||||||
},
|
|
||||||
"esearch": {
|
"esearch": {
|
||||||
"category": "Utilities",
|
"category": "Utilities",
|
||||||
"choco": "everything",
|
"choco": "everything",
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"WPFTweaksDeleteTempFiles",
|
"WPFTweaksDeleteTempFiles",
|
||||||
"WPFTweaksEndTaskOnTaskbar",
|
"WPFTweaksEndTaskOnTaskbar",
|
||||||
"WPFTweaksRestorePoint",
|
"WPFTweaksRestorePoint",
|
||||||
"WPFTweaksTeredo",
|
"WPFTweaksIPv46",
|
||||||
"WPFTweaksPowershell7Tele"
|
"WPFTweaksPowershell7Tele"
|
||||||
],
|
],
|
||||||
"Minimal": [
|
"Minimal": [
|
||||||
|
@ -1,220 +1,170 @@
|
|||||||
{
|
{
|
||||||
"Classic": {
|
"_default": {
|
||||||
"CustomDialogFontSize": "12",
|
"CustomDialogFontSize": "12",
|
||||||
"CustomDialogFontSizeHeader": "14",
|
"CustomDialogFontSizeHeader": "14",
|
||||||
"CustomDialogIconSize": "25",
|
"CustomDialogIconSize": "25",
|
||||||
"CustomDialogWidth": "400",
|
"CustomDialogWidth": "400",
|
||||||
"CustomDialogHeight": "200",
|
"CustomDialogHeight": "200",
|
||||||
|
|
||||||
"FontSize": "12",
|
"FontSize": "12",
|
||||||
"FontFamily": "Arial",
|
"FontFamily": "Arial",
|
||||||
"FontSizeHeading": "14",
|
"FontSizeHeading": "16",
|
||||||
"HeaderFontFamily": "Consolas, Monaco",
|
"HeaderFontFamily": "Consolas, Monaco",
|
||||||
|
|
||||||
"CheckBoxBulletDecoratorFontSize": "14",
|
"CheckBoxBulletDecoratorSize": "14",
|
||||||
"CheckBoxMargin": "15,0,0,2",
|
"CheckBoxMargin": "15,0,0,2",
|
||||||
|
|
||||||
"TabButtonFontSize": "14",
|
"TabContentMargin": "5",
|
||||||
"TabButtonWidth": "100",
|
"TabButtonFontSize": "14",
|
||||||
"TabButtonHeight": "25",
|
"TabButtonWidth": "100",
|
||||||
"TabRowHeightInPixels": "50",
|
"TabButtonHeight": "25",
|
||||||
"IconFontSize": "14",
|
"TabRowHeightInPixels": "50",
|
||||||
"IconButtonSize": "35",
|
"IconFontSize": "14",
|
||||||
"WinUtilIconSize": "Auto",
|
"IconButtonSize": "35",
|
||||||
"SettingsIconFontSize": "18",
|
"WinUtilIconSize": "Auto",
|
||||||
|
"SettingsIconFontSize": "18",
|
||||||
|
"CloseIconFontSize": "18",
|
||||||
|
|
||||||
"MicroWinLogoSize": "10",
|
"MicroWinLogoSize": "10",
|
||||||
|
"MicrowinCheckBoxMargin": "-10,5,0,0",
|
||||||
|
|
||||||
"ProgressBarForegroundColor": "#FFAC1C",
|
"ProgressBarForegroundColor": "#FFAC1C",
|
||||||
"ProgressBarBackgroundColor": "Transparent",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
"ProgressBarTextColor": "#000000",
|
"ProgressBarTextColor": "#000000",
|
||||||
|
|
||||||
"ComboBoxBackgroundColor": "#FFFFFF",
|
"ComboBoxBackgroundColor": "#FFFFFF",
|
||||||
"LabelboxForegroundColor": "#000000",
|
"LabelboxForegroundColor": "#000000",
|
||||||
"MainForegroundColor": "#000000",
|
"MainForegroundColor": "#000000",
|
||||||
"MainBackgroundColor": "#FFFFFF",
|
"MainBackgroundColor": "#FFFFFF",
|
||||||
"LabelBackgroundColor": "#FAFAFA",
|
"LabelBackgroundColor": "#FFFFFF",
|
||||||
"LinkForegroundColor": "#000000",
|
"LinkForegroundColor": "#000000",
|
||||||
"LinkHoverForegroundColor": "#000000",
|
"LinkHoverForegroundColor": "#000000",
|
||||||
"GroupBorderBackgroundColor": "#000000",
|
"GroupBorderBackgroundColor": "#000000",
|
||||||
"ComboBoxForegroundColor": "#000000",
|
"ComboBoxForegroundColor": "#000000",
|
||||||
|
|
||||||
"ButtonFontSize": "12",
|
"ButtonFontSize": "12",
|
||||||
"ButtonFontFamily": "Arial",
|
"ButtonFontFamily": "Arial",
|
||||||
"ButtonWidth": "200",
|
"ButtonWidth": "200",
|
||||||
"ButtonHeight": "25",
|
"ButtonHeight": "25",
|
||||||
"ConfigTabButtonFontSize": "16",
|
"ConfigTabButtonFontSize": "16",
|
||||||
|
|
||||||
"SearchBarWidth": "200",
|
"SearchBarWidth": "200",
|
||||||
"SearchBarHeight": "25",
|
"SearchBarHeight": "25",
|
||||||
"SearchBarTextBoxFontSize": "16",
|
"SearchBarTextBoxFontSize": "12",
|
||||||
"SearchBarClearButtonFontSize": "14",
|
"SearchBarClearButtonFontSize": "14",
|
||||||
|
|
||||||
"ButtonInstallBackgroundColor": "#FFFFFF",
|
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||||
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
||||||
"ButtonConfigBackgroundColor": "#FFFFFF",
|
"ButtonConfigBackgroundColor": "#FFFFFF",
|
||||||
"ButtonUpdatesBackgroundColor": "#FFFFFF",
|
"ButtonUpdatesBackgroundColor": "#FFFFFF",
|
||||||
"ButtonInstallForegroundColor": "#000000",
|
"ButtonInstallForegroundColor": "#000000",
|
||||||
"ButtonTweaksForegroundColor": "#000000",
|
"ButtonTweaksForegroundColor": "#000000",
|
||||||
"ButtonConfigForegroundColor": "#000000",
|
"ButtonConfigForegroundColor": "#000000",
|
||||||
"ButtonUpdatesForegroundColor": "#000000",
|
"ButtonUpdatesForegroundColor": "#000000",
|
||||||
"ButtonBackgroundColor": "#F5F5F5",
|
"ButtonBackgroundColor": "#F5F5F5",
|
||||||
"ButtonBackgroundPressedColor": "#1A1A1A",
|
"ButtonBackgroundPressedColor": "#1A1A1A",
|
||||||
"CheckboxMouseOverColor": "#999999",
|
"CheckboxMouseOverColor": "#999999",
|
||||||
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
||||||
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||||
"ButtonForegroundColor": "#000000",
|
"ButtonForegroundColor": "#000000",
|
||||||
"ToggleButtonOnColor": "#2e77ff",
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
"ButtonBorderThickness": "1",
|
"ButtonBorderThickness": "1",
|
||||||
"ButtonMargin": "1",
|
"ButtonMargin": "1",
|
||||||
"ButtonCornerRadius": "2",
|
"ButtonCornerRadius": "2",
|
||||||
"BorderColor": "#000000",
|
"BorderColor": "#000000",
|
||||||
"BorderOpacity": "0.2",
|
"BorderOpacity": "0.2",
|
||||||
"ShadowPulse": "Forever"
|
"ShadowPulse": "Forever"
|
||||||
},
|
},
|
||||||
"Matrix": {
|
"Classic": {
|
||||||
"CustomDialogFontSize": "12",
|
"ComboBoxBackgroundColor": "#FFFFFF",
|
||||||
"CustomDialogFontSizeHeader": "14",
|
"LabelboxForegroundColor": "#000000",
|
||||||
"CustomDialogIconSize": "25",
|
"MainForegroundColor": "#000000",
|
||||||
"CustomDialogWidth": "400",
|
"MainBackgroundColor": "#FFFFFF",
|
||||||
"CustomDialogHeight": "200",
|
"LabelBackgroundColor": "#FFFFFF",
|
||||||
|
"LinkForegroundColor": "#000000",
|
||||||
|
"LinkHoverForegroundColor": "#000000",
|
||||||
|
"GroupBorderBackgroundColor": "#000000",
|
||||||
|
"ComboBoxForegroundColor": "#000000",
|
||||||
|
|
||||||
"FontSize": "12",
|
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||||
"FontFamily": "Arial",
|
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
||||||
"FontSizeHeading": "14",
|
"ButtonConfigBackgroundColor": "#FFFFFF",
|
||||||
"HeaderFontFamily": "Consolas, Monaco",
|
"ButtonUpdatesBackgroundColor": "#FFFFFF",
|
||||||
|
"ButtonInstallForegroundColor": "#000000",
|
||||||
|
"ButtonTweaksForegroundColor": "#000000",
|
||||||
|
"ButtonConfigForegroundColor": "#000000",
|
||||||
|
"ButtonUpdatesForegroundColor": "#000000",
|
||||||
|
"ButtonBackgroundColor": "#F5F5F5",
|
||||||
|
"ButtonBackgroundPressedColor": "#1A1A1A",
|
||||||
|
"CheckboxMouseOverColor": "#999999",
|
||||||
|
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
||||||
|
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||||
|
"ButtonForegroundColor": "#000000",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff"
|
||||||
|
},
|
||||||
|
"Matrix": {
|
||||||
|
"ComboBoxBackgroundColor": "#000000",
|
||||||
|
"LabelboxForegroundColor": "#FFEE58",
|
||||||
|
"MainForegroundColor": "#9CCC65",
|
||||||
|
"MainBackgroundColor": "#000000",
|
||||||
|
"LabelBackgroundColor": "#000000",
|
||||||
|
"LinkForegroundColor": "#add8e6",
|
||||||
|
"LinkHoverForegroundColor": "#FFFFFF",
|
||||||
|
"ComboBoxForegroundColor": "#FFEE58",
|
||||||
|
|
||||||
"CheckBoxBulletDecoratorFontSize": "14",
|
"ProgressBarForegroundColor": "#222222",
|
||||||
"CheckBoxMargin": "15,0,0,2",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
|
"ProgressBarTextColor": "#cccccc",
|
||||||
|
|
||||||
"TabButtonFontSize": "14",
|
"ButtonInstallBackgroundColor": "#222222",
|
||||||
"TabButtonWidth": "100",
|
"ButtonTweaksBackgroundColor": "#333333",
|
||||||
"TabButtonHeight": "25",
|
"ButtonConfigBackgroundColor": "#444444",
|
||||||
"TabRowHeightInPixels": "50",
|
"ButtonUpdatesBackgroundColor": "#555555",
|
||||||
"IconFontSize": "14",
|
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||||
"IconButtonSize": "35",
|
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||||
"WinUtilIconSize": "Auto",
|
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||||
"SettingsIconFontSize": "18",
|
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundColor": "#000019",
|
||||||
|
"ButtonBackgroundPressedColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundMouseoverColor": "#A55A64",
|
||||||
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
"MicroWinLogoSize": "10",
|
"BorderColor": "#FFAC1C",
|
||||||
|
"BorderOpacity": "0.8",
|
||||||
|
"ShadowPulse": "0:0:3"
|
||||||
|
},
|
||||||
|
"Dark": {
|
||||||
|
"ComboBoxBackgroundColor": "#000000",
|
||||||
|
"LabelboxForegroundColor": "#FFEE58",
|
||||||
|
"MainForegroundColor": "#9CCC65",
|
||||||
|
"MainBackgroundColor": "#000000",
|
||||||
|
"LabelBackgroundColor": "#000000",
|
||||||
|
"LinkForegroundColor": "#add8e6",
|
||||||
|
"LinkHoverForegroundColor": "#FFFFFF",
|
||||||
|
"ComboBoxForegroundColor": "#FFEE58",
|
||||||
|
|
||||||
"ProgressBarForegroundColor": "#222222",
|
"ProgressBarForegroundColor": "#222222",
|
||||||
"ProgressBarBackgroundColor": "Transparent",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
"ProgressBarTextColor": "#cccccc",
|
"ProgressBarTextColor": "#cccccc",
|
||||||
|
|
||||||
"ComboBoxBackgroundColor": "#000000",
|
"ButtonInstallBackgroundColor": "#222222",
|
||||||
"LabelboxForegroundColor": "#FFEE58",
|
"ButtonTweaksBackgroundColor": "#333333",
|
||||||
"MainForegroundColor": "#9CCC65",
|
"ButtonConfigBackgroundColor": "#444444",
|
||||||
"MainBackgroundColor": "#000000",
|
"ButtonUpdatesBackgroundColor": "#555555",
|
||||||
"LabelBackgroundColor": "#000000",
|
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||||
"LinkForegroundColor": "#add8e6",
|
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||||
"LinkHoverForegroundColor": "#FFFFFF",
|
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||||
"ComboBoxForegroundColor": "#FFEE58",
|
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||||
|
"ButtonBackgroundColor": "#000019",
|
||||||
|
"ButtonBackgroundPressedColor": "#9CCC65",
|
||||||
|
"ButtonBackgroundMouseoverColor": "#FF5733",
|
||||||
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
|
|
||||||
"ButtonFontSize": "12",
|
"BorderColor": "#FFAC1C"
|
||||||
"ButtonFontFamily": "Arial",
|
}
|
||||||
"ButtonWidth": "200",
|
|
||||||
"ButtonHeight": "25",
|
|
||||||
"ConfigTabButtonFontSize": "16",
|
|
||||||
|
|
||||||
"SearchBarWidth": "200",
|
|
||||||
"SearchBarHeight": "25",
|
|
||||||
"SearchBarTextBoxFontSize": "16",
|
|
||||||
"SearchBarClearButtonFontSize": "14",
|
|
||||||
|
|
||||||
"ButtonInstallBackgroundColor": "#222222",
|
|
||||||
"ButtonTweaksBackgroundColor": "#333333",
|
|
||||||
"ButtonConfigBackgroundColor": "#444444",
|
|
||||||
"ButtonUpdatesBackgroundColor": "#555555",
|
|
||||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonBackgroundColor": "#000019",
|
|
||||||
"ButtonBackgroundPressedColor": "#FFFFFF",
|
|
||||||
"ButtonBackgroundMouseoverColor": "#A55A64",
|
|
||||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
|
||||||
"ButtonForegroundColor": "#9CCC65",
|
|
||||||
"ToggleButtonOnColor": "#2e77ff",
|
|
||||||
|
|
||||||
"ButtonBorderThickness": "1",
|
|
||||||
"ButtonMargin": "1",
|
|
||||||
"ButtonCornerRadius": "2",
|
|
||||||
"BorderColor": "#FFAC1C",
|
|
||||||
"BorderOpacity": "0.8",
|
|
||||||
"ShadowPulse": "0:0:3"
|
|
||||||
},
|
|
||||||
"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",
|
|
||||||
|
|
||||||
"ProgressBarForegroundColor": "#222222",
|
|
||||||
"ProgressBarBackgroundColor": "Transparent",
|
|
||||||
"ProgressBarTextColor": "#FFFFFF",
|
|
||||||
|
|
||||||
"ComboBoxBackgroundColor": "#000000",
|
|
||||||
"LabelboxForegroundColor": "#FFEE58",
|
|
||||||
"MainForegroundColor": "#9CCC65",
|
|
||||||
"MainBackgroundColor": "#000000",
|
|
||||||
"LabelBackgroundColor": "#000000",
|
|
||||||
"LinkForegroundColor": "#add8e6",
|
|
||||||
"LinkHoverForegroundColor": "#FFFFFF",
|
|
||||||
"ComboBoxForegroundColor": "#FFEE58",
|
|
||||||
|
|
||||||
"ButtonFontSize": "12",
|
|
||||||
"ButtonFontFamily": "Arial",
|
|
||||||
"ButtonWidth": "200",
|
|
||||||
"ButtonHeight": "25",
|
|
||||||
"ConfigTabButtonFontSize": "16",
|
|
||||||
|
|
||||||
"SearchBarWidth": "200",
|
|
||||||
"SearchBarHeight": "25",
|
|
||||||
"SearchBarTextBoxFontSize": "16",
|
|
||||||
"SearchBarClearButtonFontSize": "14",
|
|
||||||
|
|
||||||
"ButtonInstallBackgroundColor": "#222222",
|
|
||||||
"ButtonTweaksBackgroundColor": "#333333",
|
|
||||||
"ButtonConfigBackgroundColor": "#444444",
|
|
||||||
"ButtonUpdatesBackgroundColor": "#555555",
|
|
||||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
|
||||||
"ButtonBackgroundColor": "#000019",
|
|
||||||
"ButtonBackgroundPressedColor": "#9CCC65",
|
|
||||||
"ButtonBackgroundMouseoverColor": "#FF5733",
|
|
||||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
|
||||||
"ButtonForegroundColor": "#9CCC65",
|
|
||||||
"ToggleButtonOnColor": "#2e77ff",
|
|
||||||
|
|
||||||
"ButtonBorderThickness": "1",
|
|
||||||
"ButtonMargin": "1",
|
|
||||||
"ButtonCornerRadius": "2",
|
|
||||||
"BorderColor": "#FFAC1C",
|
|
||||||
"BorderOpacity": "0.2",
|
|
||||||
"ShadowPulse": "Forever"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -2713,6 +2713,9 @@
|
|||||||
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
||||||
reg unload \"hku\\Default\"
|
reg unload \"hku\\Default\"
|
||||||
|
|
||||||
|
Write-Host \"Removing autostart key\"
|
||||||
|
reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDrive\" /f
|
||||||
|
|
||||||
Write-Host \"Removing startmenu entry\"
|
Write-Host \"Removing startmenu entry\"
|
||||||
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
||||||
|
|
||||||
@ -3141,12 +3144,29 @@
|
|||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DVR"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DVR"
|
||||||
},
|
},
|
||||||
"WPFTweaksTeredo": {
|
"WPFTweaksIPv46": {
|
||||||
"Content": "Disable Teredo",
|
"Content": "Prefer IPv4 over IPv6",
|
||||||
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency.",
|
"Description": "To set the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a005_",
|
"Order": "a005_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
|
"Name": "DisabledComponents",
|
||||||
|
"Value": "32",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/IPv46"
|
||||||
|
},
|
||||||
|
"WPFTweaksTeredo": {
|
||||||
|
"Content": "Disable Teredo",
|
||||||
|
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a023_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
@ -3162,7 +3182,7 @@
|
|||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"netsh interface teredo set state default"
|
"netsh interface teredo set state default"
|
||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Teredo"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo"
|
||||||
},
|
},
|
||||||
"WPFTweaksDisableipsix": {
|
"WPFTweaksDisableipsix": {
|
||||||
"Content": "Disable IPv6",
|
"Content": "Disable IPv6",
|
||||||
@ -3382,22 +3402,6 @@
|
|||||||
"ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult",
|
"ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult",
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns"
|
||||||
},
|
},
|
||||||
"WPFTweaksbutton": {
|
|
||||||
"Content": "Run Tweaks",
|
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
|
||||||
"panel": "1",
|
|
||||||
"Order": "a041_",
|
|
||||||
"Type": "Button",
|
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/button"
|
|
||||||
},
|
|
||||||
"WPFUndoall": {
|
|
||||||
"Content": "Undo Selected Tweaks",
|
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
|
||||||
"panel": "1",
|
|
||||||
"Order": "a042_",
|
|
||||||
"Type": "Button",
|
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall"
|
|
||||||
},
|
|
||||||
"WPFAddUltPerf": {
|
"WPFAddUltPerf": {
|
||||||
"Content": "Add and Activate Ultimate Performance Profile",
|
"Content": "Add and Activate Ultimate Performance Profile",
|
||||||
"category": "Performance Plans",
|
"category": "Performance Plans",
|
||||||
|
63
docs/dev/tweaks/Essential-Tweaks/IPv46.md
Normal file
63
docs/dev/tweaks/Essential-Tweaks/IPv46.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Prefer IPv4 over IPv6
|
||||||
|
|
||||||
|
Last Updated: 2024-08-27
|
||||||
|
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
|
## Description
|
||||||
|
|
||||||
|
To set the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.
|
||||||
|
|
||||||
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Preview Code</summary>
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Content": "Prefer IPv4 over IPv6",
|
||||||
|
"Description": "To set the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a005_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
|
"Name": "DisabledComponents",
|
||||||
|
"Value": "32",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/IPv46"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Registry Changes
|
||||||
|
Applications and System Components store and retrieve configuration data to modify windows settings, so we can use the registry to change many settings in one place.
|
||||||
|
|
||||||
|
|
||||||
|
You can find information about the registry on [Wikipedia](https://www.wikiwand.com/en/Windows_Registry) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry).
|
||||||
|
|
||||||
|
### Registry Key: DisabledComponents
|
||||||
|
|
||||||
|
**Type:** DWord
|
||||||
|
|
||||||
|
**Original Value:** 0
|
||||||
|
|
||||||
|
**New Value:** 32
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- BEGIN SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
<!-- END SECOND CUSTOM CONTENT -->
|
||||||
|
|
||||||
|
|
||||||
|
[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json)
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
# Disable Teredo
|
# Disable Teredo
|
||||||
|
|
||||||
Last Updated: 2024-08-07
|
Last Updated: 2024-08-27
|
||||||
|
|
||||||
|
|
||||||
!!! info
|
!!! info
|
||||||
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
The Development Documentation is auto generated for every compilation of WinUtil, meaning a part of it will always stay up-to-date. **Developers do have the ability to add custom content, which won't be updated automatically.**
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
Teredo network tunneling is a ipv6 feature that can cause additional latency.
|
Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games
|
||||||
|
|
||||||
<!-- BEGIN CUSTOM CONTENT -->
|
<!-- BEGIN CUSTOM CONTENT -->
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ Teredo network tunneling is a ipv6 feature that can cause additional latency.
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"Content": "Disable Teredo",
|
"Content": "Disable Teredo",
|
||||||
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency.",
|
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games",
|
||||||
"category": "Essential Tweaks",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a005_",
|
"Order": "a023_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
@ -38,7 +38,7 @@ Teredo network tunneling is a ipv6 feature that can cause additional latency.
|
|||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"netsh interface teredo set state default"
|
"netsh interface teredo set state default"
|
||||||
],
|
],
|
||||||
"link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Teredo"
|
"link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
@ -13,6 +13,7 @@
|
|||||||
- [Disable IPv6](dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md)
|
- [Disable IPv6](dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md)
|
||||||
- [Disable Microsoft Copilot](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md)
|
- [Disable Microsoft Copilot](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md)
|
||||||
- [Disable Notification Tray/Calendar](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md)
|
- [Disable Notification Tray/Calendar](dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md)
|
||||||
|
- [Disable Teredo](dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md)
|
||||||
- [DNS](dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md)
|
- [DNS](dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md)
|
||||||
- [Remove ALL MS Store Apps - NOT RECOMMENDED](dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md)
|
- [Remove ALL MS Store Apps - NOT RECOMMENDED](dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md)
|
||||||
- [Remove Home and Gallery from explorer](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md)
|
- [Remove Home and Gallery from explorer](dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md)
|
||||||
@ -30,6 +31,7 @@
|
|||||||
- [Create Restore Point](dev/tweaks/Essential-Tweaks/RestorePoint.md)
|
- [Create Restore Point](dev/tweaks/Essential-Tweaks/RestorePoint.md)
|
||||||
- [Debloat Edge](dev/tweaks/Essential-Tweaks/EdgeDebloat.md)
|
- [Debloat Edge](dev/tweaks/Essential-Tweaks/EdgeDebloat.md)
|
||||||
- [Delete Temporary Files](dev/tweaks/Essential-Tweaks/DeleteTempFiles.md)
|
- [Delete Temporary Files](dev/tweaks/Essential-Tweaks/DeleteTempFiles.md)
|
||||||
|
- [Prefer IPv4 over IPv6](dev/tweaks/Essential-Tweaks/IPv46.md)
|
||||||
- [Disable Activity History](dev/tweaks/Essential-Tweaks/AH.md)
|
- [Disable Activity History](dev/tweaks/Essential-Tweaks/AH.md)
|
||||||
- [Disable ConsumerFeatures](dev/tweaks/Essential-Tweaks/ConsumerFeatures.md)
|
- [Disable ConsumerFeatures](dev/tweaks/Essential-Tweaks/ConsumerFeatures.md)
|
||||||
- [Disable GameDVR](dev/tweaks/Essential-Tweaks/DVR.md)
|
- [Disable GameDVR](dev/tweaks/Essential-Tweaks/DVR.md)
|
||||||
@ -39,7 +41,6 @@
|
|||||||
- [Disable Powershell 7 Telemetry](dev/tweaks/Essential-Tweaks/Powershell7Tele.md)
|
- [Disable Powershell 7 Telemetry](dev/tweaks/Essential-Tweaks/Powershell7Tele.md)
|
||||||
- [Disable Storage Sense](dev/tweaks/Essential-Tweaks/Storage.md)
|
- [Disable Storage Sense](dev/tweaks/Essential-Tweaks/Storage.md)
|
||||||
- [Disable Telemetry](dev/tweaks/Essential-Tweaks/Tele.md)
|
- [Disable Telemetry](dev/tweaks/Essential-Tweaks/Tele.md)
|
||||||
- [Disable Teredo](dev/tweaks/Essential-Tweaks/Teredo.md)
|
|
||||||
- [Disable Wifi-Sense](dev/tweaks/Essential-Tweaks/Wifi.md)
|
- [Disable Wifi-Sense](dev/tweaks/Essential-Tweaks/Wifi.md)
|
||||||
- [Enable End Task With Right Click](dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md)
|
- [Enable End Task With Right Click](dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md)
|
||||||
- [Run Disk Cleanup](dev/tweaks/Essential-Tweaks/DiskCleanup.md)
|
- [Run Disk Cleanup](dev/tweaks/Essential-Tweaks/DiskCleanup.md)
|
||||||
|
@ -1,221 +0,0 @@
|
|||||||
function Get-TabXaml {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Generates XAML for a tab in the WinUtil GUI
|
|
||||||
This function is used to generate the XAML for the applications tab in the WinUtil GUI
|
|
||||||
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
|
|
||||||
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
|
|
||||||
The number of columns to display the applications in, default is 0
|
|
||||||
|
|
||||||
.OUTPUTS
|
|
||||||
The XAML for the tab
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Get-TabXaml "applications" 3
|
|
||||||
#>
|
|
||||||
|
|
||||||
|
|
||||||
param(
|
|
||||||
[Parameter(Mandatory, position=0)]
|
|
||||||
[string]$tabname,
|
|
||||||
|
|
||||||
[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 = @{}
|
|
||||||
# Iterate through JSON data and organize by panel and category
|
|
||||||
foreach ($appName in $sync.configs.$tabname.PSObject.Properties.Name) {
|
|
||||||
$appInfo = $sync.configs.$tabname.$appName
|
|
||||||
|
|
||||||
# Create an object for the application
|
|
||||||
$appObject = [PSCustomObject]@{
|
|
||||||
Name = $appName
|
|
||||||
Category = $appInfo.Category
|
|
||||||
Content = $appInfo.Content
|
|
||||||
Choco = $appInfo.choco
|
|
||||||
Winget = $appInfo.winget
|
|
||||||
Panel = if ($columncount -gt 0 ) { "0" } else {$appInfo.panel}
|
|
||||||
Link = $appInfo.link
|
|
||||||
Description = $appInfo.description
|
|
||||||
# Type is (Checkbox,Toggle,Button,Combobox ) (Default is Checkbox)
|
|
||||||
Type = $appInfo.type
|
|
||||||
ComboItems = $appInfo.ComboItems
|
|
||||||
# Checked is the property to set startup checked status of checkbox (Default is false)
|
|
||||||
Checked = $appInfo.Checked
|
|
||||||
ButtonWidth = $appInfo.ButtonWidth
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not $organizedData.ContainsKey($appObject.panel)) {
|
|
||||||
$organizedData[$appObject.panel] = @{}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not $organizedData[$appObject.panel].ContainsKey($appObject.Category)) {
|
|
||||||
$organizedData[$appObject.panel][$appObject.Category] = @{}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Store application data in a sub-array under the category
|
|
||||||
# Add Order property to keep the original order of tweaks and features
|
|
||||||
$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
|
|
||||||
$paneltotal = $organizedData.Keys.Count
|
|
||||||
if ($columncount -gt 0) {
|
|
||||||
$appcount = $sync.configs.$tabname.PSObject.Properties.Name.count + $organizedData["0"].Keys.count
|
|
||||||
$maxcount = [Math]::Round( $appcount / $columncount + 0.5)
|
|
||||||
$paneltotal = $columncount
|
|
||||||
}
|
|
||||||
# add ColumnDefinitions to evenly draw colums
|
|
||||||
$blockXml = "<Grid.ColumnDefinitions>"
|
|
||||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat) +
|
|
||||||
"<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
|
|
||||||
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
|
||||||
$blockXml += $precal_indent_m1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
|
||||||
$blockXml += $precal_indent + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
|
||||||
$panelcount++
|
|
||||||
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
|
||||||
$count++
|
|
||||||
if ($columncount -gt 0) {
|
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
|
||||||
$blockXml += $precal_indent_p2 + "</StackPanel>" + "`r`n"
|
|
||||||
$blockXml += $precal_indent_p1 + "</Border>" + "`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++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Dot-source the Get-WPFObjectName function
|
|
||||||
. "$($sync.PSScriptRoot)\functions\private\Get-WPFObjectName.ps1"
|
|
||||||
|
|
||||||
$categorycontent = $($category -replace '^.__', '')
|
|
||||||
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
|
||||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat)) +
|
|
||||||
"<Label Name=""$categoryname"" Content=""$categorycontent""" + " " +
|
|
||||||
"FontSize=""{FontSizeHeading}"" FontFamily=""{HeaderFontFamily}""/>" + "`r`n" + "`r`n"
|
|
||||||
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
|
||||||
foreach ($appName in $sortedApps) {
|
|
||||||
$count++
|
|
||||||
|
|
||||||
if ($columncount -gt 0) {
|
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
|
||||||
# Verify the indentation actually works...
|
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
|
||||||
$blockXml += $precal_indent_m1 +
|
|
||||||
"</StackPanel>" + "`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++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$appInfo = $organizedData[$panel][$category][$appName]
|
|
||||||
switch ($appInfo.Type) {
|
|
||||||
"Toggle" {
|
|
||||||
$blockXml += $precal_indent_m1 +
|
|
||||||
"<DockPanel LastChildFill=""True"">" + "`r`n"
|
|
||||||
$blockXml += $precal_indent +
|
|
||||||
"<CheckBox Name=""$($appInfo.Name)"" Style=""{StaticResource ColorfulToggleSwitchStyle}"" Margin=""4,0""" + " " +
|
|
||||||
"HorizontalAlignment=""Right"" FontSize=""{FontSize}""/>" + "`r`n"
|
|
||||||
$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 " ")) {
|
|
||||||
$blockXml += $precal_indent_p1 +
|
|
||||||
"<ComboBoxItem $addfirst Content=""$comboitem"" FontSize=""{FontSize}""/>" + "`r`n"
|
|
||||||
$addfirst=""
|
|
||||||
}
|
|
||||||
|
|
||||||
$blockXml += $precal_indent_p1 + "</ComboBox>" + "`r`n"
|
|
||||||
$blockXml += $precal_indent + "</StackPanel>" + "`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
|
|
||||||
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 {
|
|
||||||
$blockXml += $precal_indent +
|
|
||||||
"<StackPanel Orientation=""Horizontal"">" + "`r`n"
|
|
||||||
$blockXml += $precal_indent_p1 +
|
|
||||||
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus)" + " " +
|
|
||||||
"ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/>" + "`r`n"
|
|
||||||
$blockXml += $precal_indent_p1 +
|
|
||||||
"<TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)""" + " " +
|
|
||||||
"ToolTip=""$($appInfo.Link)""/>" + "`r`n"
|
|
||||||
$blockXml += $precal_indent +
|
|
||||||
"</StackPanel>" + "`r`n"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$blockXml += $precal_indent_p1 + "</StackPanel>" + "`r`n"
|
|
||||||
$blockXml += $precal_indent + "</Border>" + "`r`n"
|
|
||||||
}
|
|
||||||
return ($blockXml)
|
|
||||||
}
|
|
@ -7,7 +7,9 @@ function Invoke-WinUtilGPU {
|
|||||||
"*NVIDIA GeForce*Laptop*",
|
"*NVIDIA GeForce*Laptop*",
|
||||||
"*NVIDIA GeForce*GT*",
|
"*NVIDIA GeForce*GT*",
|
||||||
"*AMD Radeon(TM)*",
|
"*AMD Radeon(TM)*",
|
||||||
|
"*Intel(R) HD Graphics*",
|
||||||
"*UHD*"
|
"*UHD*"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
foreach ($gpu in $gpuInfo) {
|
||||||
@ -18,4 +20,4 @@ function Invoke-WinUtilGPU {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
@ -109,6 +109,7 @@ function Remove-Features() {
|
|||||||
Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources."
|
Write-Host "You can re-enable the disabled features at any time, using either Windows Update or the SxS folder in <installation media>\Sources."
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Unable to get information about the features. MicroWin processing will continue, but features will not be processed"
|
Write-Host "Unable to get information about the features. MicroWin processing will continue, but features will not be processed"
|
||||||
|
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,6 +157,8 @@ function Remove-Packages {
|
|||||||
$_ -NotLike "*Wifi*"
|
$_ -NotLike "*Wifi*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$failedCount = 0
|
||||||
|
|
||||||
foreach ($pkg in $pkglist) {
|
foreach ($pkg in $pkglist) {
|
||||||
try {
|
try {
|
||||||
$status = "Removing $pkg"
|
$status = "Removing $pkg"
|
||||||
@ -164,12 +167,18 @@ function Remove-Packages {
|
|||||||
} catch {
|
} catch {
|
||||||
# This can happen if the package that is being removed is a permanent one, like FodMetadata
|
# This can happen if the package that is being removed is a permanent one, like FodMetadata
|
||||||
Write-Host "Could not remove OS package $($pkg)"
|
Write-Host "Could not remove OS package $($pkg)"
|
||||||
|
$failedCount += 1
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
|
Write-Progress -Activity "Removing Apps" -Status "Ready" -Completed
|
||||||
|
if ($failedCount -gt 0)
|
||||||
|
{
|
||||||
|
Write-Host "Some packages could not be removed. Do not worry: your image will still work fine. This can happen if the package is permanent or has been superseded by a newer one."
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed"
|
Write-Host "Unable to get information about the packages. MicroWin processing will continue, but packages will not be processed"
|
||||||
|
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,6 +234,7 @@ function Remove-ProvisionedPackages() {
|
|||||||
{
|
{
|
||||||
# This can happen if getting AppX packages fails
|
# This can happen if getting AppX packages fails
|
||||||
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
|
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
|
||||||
|
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ function Invoke-WinUtilSnapFlyout {
|
|||||||
Write-Host "Disabling Snap Assist Flyout On startup"
|
Write-Host "Disabling Snap Assist Flyout On startup"
|
||||||
$value = 0
|
$value = 0
|
||||||
}
|
}
|
||||||
# taskkill.exe /F /IM "explorer.exe"
|
|
||||||
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
taskkill.exe /F /IM "explorer.exe"
|
taskkill.exe /F /IM "explorer.exe"
|
||||||
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
|
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
|
||||||
|
83
functions/private/Set-WinUtilUITheme.ps1
Normal file
83
functions/private/Set-WinUtilUITheme.ps1
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
function Set-WinUtilUITheme {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Sets the theme of the XAML file
|
||||||
|
|
||||||
|
.PARAMETER inputXML
|
||||||
|
A string representing the XAML object to modify
|
||||||
|
|
||||||
|
.PARAMETER customThemeName
|
||||||
|
The name of the custom theme to set the XAML to. Defaults to 'matrix'
|
||||||
|
|
||||||
|
.PARAMETER defaultThemeName
|
||||||
|
The name of the default theme to use when setting the XAML. Defaults to '_default'
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
$returnVal = Set-WinUtilUITheme -inputXAML $inputXAML
|
||||||
|
if ($returnVal[0] -eq "") {
|
||||||
|
Write-Host "Failed to process inputXML"
|
||||||
|
} else {
|
||||||
|
$inputXML = $returnVal[0]
|
||||||
|
}
|
||||||
|
# to know which theme this function has used, access the second item in returned value.
|
||||||
|
Write-Host "Theme used in processing: $($returnVal[1])"
|
||||||
|
#>
|
||||||
|
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$inputXML,
|
||||||
|
|
||||||
|
[Parameter(position=1)]
|
||||||
|
[string]$customThemeName = 'matrix',
|
||||||
|
|
||||||
|
[Parameter(position=2)]
|
||||||
|
[string]$defaultThemeName = '_default'
|
||||||
|
)
|
||||||
|
|
||||||
|
try {
|
||||||
|
# Note:
|
||||||
|
# Reason behind not caching the '$sync.configs.themes` object into a variable,
|
||||||
|
# because this code can modify the themes object.. meaning it's better to access it
|
||||||
|
# using the more verbose way, rather than introduce possible bugs into the code, just for the sake of readability.
|
||||||
|
#
|
||||||
|
if (-NOT $sync.configs.themes) {
|
||||||
|
throw [GenericException]::new("[Set-WinUtilTheme] Did not find 'config.themes' inside `$sync variable.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-NOT $sync.configs.themes.$defaultThemeName) {
|
||||||
|
throw [GenericException]::new("[Set-WinUtilTheme] Did not find '$defaultThemeName' theme in the themes config file.")
|
||||||
|
}
|
||||||
|
|
||||||
|
$themeToUse = $customThemeName
|
||||||
|
if ($sync.configs.themes.$themeToUse) {
|
||||||
|
# Loop through every default theme option, and modify the custom theme in $sync variable,
|
||||||
|
# so that it has full options available for other functions to use.
|
||||||
|
foreach ($option in $sync.configs.themes.$defaultThemeName.PSObject.Properties) {
|
||||||
|
$optionName = $option.Name
|
||||||
|
$optionValue = $option.Value
|
||||||
|
if (-NOT $sync.configs.themes.$themeToUse.$optionName) {
|
||||||
|
$sync.configs.themes.$themeToUse | Add-Member -MemberType NoteProperty -Name $optionName -Value $optionValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Debug "[Set-WinUtilTheme] Theme '$customThemeName' was not found, using '$defaultThemeName' instead."
|
||||||
|
$themeToUse = $defaultThemeName
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($property in $sync.configs.themes.$themeToUse.PSObject.Properties) {
|
||||||
|
$key = $property.Name
|
||||||
|
$value = $property.Value
|
||||||
|
# Add curly braces around the key
|
||||||
|
$formattedKey = "{$key}"
|
||||||
|
# Replace the key with the value in the input XML
|
||||||
|
$inputXML = $inputXML.Replace($formattedKey, $value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "[Set-WinUtilTheme] Unable to apply theme" -ForegroundColor Red
|
||||||
|
Write-Host "$($psitem.Exception.Message)" -ForegroundColor Red
|
||||||
|
$inputXML = "" # Make inputXML equal an empty string, indicating something went wrong to the function caller.
|
||||||
|
}
|
||||||
|
|
||||||
|
return @($inputXML, $themeToUse);
|
||||||
|
}
|
@ -1,50 +0,0 @@
|
|||||||
function Set-WinUtilUITheme {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Sets the theme of the XAML file
|
|
||||||
|
|
||||||
.PARAMETER inputXML
|
|
||||||
A string representing the XAML object to modify
|
|
||||||
|
|
||||||
.PARAMETER themeName
|
|
||||||
The name of the theme to set the XAML to. Defaults to 'matrix'
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Set-WinUtilUITheme -inputXAML $inputXAML
|
|
||||||
#>
|
|
||||||
|
|
||||||
param
|
|
||||||
(
|
|
||||||
[Parameter(Mandatory, position=0)]
|
|
||||||
[string]$inputXML,
|
|
||||||
[Parameter(position=1)]
|
|
||||||
[string]$themeName = 'matrix'
|
|
||||||
)
|
|
||||||
|
|
||||||
try {
|
|
||||||
# Convert the JSON to a PowerShell object
|
|
||||||
$themes = $sync.configs.themes
|
|
||||||
# Select the specified theme
|
|
||||||
$selectedTheme = $themes.$themeName
|
|
||||||
|
|
||||||
if ($selectedTheme) {
|
|
||||||
# Loop through all key-value pairs in the selected theme
|
|
||||||
foreach ($property in $selectedTheme.PSObject.Properties) {
|
|
||||||
$key = $property.Name
|
|
||||||
$value = $property.Value
|
|
||||||
# Add curly braces around the key
|
|
||||||
$formattedKey = "{$key}"
|
|
||||||
# Replace the key with the value in the input XML
|
|
||||||
$inputXML = $inputXML.Replace($formattedKey, $value)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Theme '$themeName' not found."
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Warning "Unable to apply theme"
|
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
|
||||||
}
|
|
||||||
|
|
||||||
return $inputXML;
|
|
||||||
}
|
|
@ -11,7 +11,7 @@ Function Update-WinUtilProgramWinget {
|
|||||||
|
|
||||||
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
$host.ui.RawUI.WindowTitle = """Winget Install"""
|
||||||
|
|
||||||
Start-Transcript $ENV:TEMP\winget-update.log -Append
|
Start-Transcript "$logdir\winget-update_$dateTime.log" -Append
|
||||||
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
|
winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,13 @@ function Invoke-WPFButton {
|
|||||||
Switch -Wildcard ($Button) {
|
Switch -Wildcard ($Button) {
|
||||||
|
|
||||||
"WPFTab?BT" {Invoke-WPFTab $Button}
|
"WPFTab?BT" {Invoke-WPFTab $Button}
|
||||||
"WPFinstall" {Invoke-WPFInstall}
|
"WPFInstall" {Invoke-WPFInstall}
|
||||||
"WPFuninstall" {Invoke-WPFUnInstall}
|
"WPFUninstall" {Invoke-WPFUnInstall}
|
||||||
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
||||||
"WPFstandard" {Invoke-WPFPresets "Standard"}
|
"WPFStandard" {Invoke-WPFPresets "Standard" -checkboxfilterpattern "WPFTweak*"}
|
||||||
"WPFminimal" {Invoke-WPFPresets "Minimal"}
|
"WPFMinimal" {Invoke-WPFPresets "Minimal" -checkboxfilterpattern "WPFTweak*"}
|
||||||
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
"WPFClearTweaksSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFTweak*"}
|
||||||
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
"WPFClearInstallSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*"}
|
||||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||||
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"}
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"}
|
||||||
|
@ -41,6 +41,8 @@ function Invoke-WPFImpex {
|
|||||||
if ($type -eq "export") {
|
if ($type -eq "export") {
|
||||||
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
|
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
|
||||||
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
||||||
|
$runscript = "iex ""& { `$(irm christitus.com/win) } -Config '$($FileBrowser.FileName)'"""
|
||||||
|
$runscript | Set-Clipboard
|
||||||
}
|
}
|
||||||
if ($type -eq "import") {
|
if ($type -eq "import") {
|
||||||
$jsonFile = Get-Content $Config | ConvertFrom-Json
|
$jsonFile = Get-Content $Config | ConvertFrom-Json
|
||||||
|
@ -10,29 +10,36 @@ function Invoke-WPFPresets {
|
|||||||
.PARAMETER imported
|
.PARAMETER imported
|
||||||
If the preset is imported from a file, defaults to false
|
If the preset is imported from a file, defaults to false
|
||||||
|
|
||||||
.PARAMETER checkbox
|
.PARAMETER checkboxfilterpattern
|
||||||
The checkbox to set the options to, defaults to 'WPFTweaks'
|
The Pattern to use when filtering through CheckBoxes, defaults to "**"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param (
|
||||||
$preset,
|
[Parameter(position=0)]
|
||||||
[bool]$imported = $false
|
[string]$preset = "",
|
||||||
|
|
||||||
|
[Parameter(position=1)]
|
||||||
|
[bool]$imported = $false,
|
||||||
|
|
||||||
|
[Parameter(position=2)]
|
||||||
|
[string]$checkboxfilterpattern = "**"
|
||||||
)
|
)
|
||||||
|
|
||||||
if($imported -eq $true) {
|
if ($imported -eq $true) {
|
||||||
$CheckBoxesToCheck = $preset
|
$CheckBoxesToCheck = $preset
|
||||||
} else {
|
} else {
|
||||||
$CheckBoxesToCheck = $sync.configs.preset.$preset
|
$CheckBoxesToCheck = $sync.configs.preset.$preset
|
||||||
}
|
}
|
||||||
|
|
||||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" }
|
$CheckBoxes = ($sync.GetEnumerator()).where{ $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" -and $_.Name -like "$checkboxfilterpattern"}
|
||||||
Write-Debug "Getting checkboxes to set $($CheckBoxes.Count)"
|
Write-Debug "Getting checkboxes to set, number of checkboxes: $($CheckBoxes.Count)"
|
||||||
|
|
||||||
$CheckBoxesToCheck | ForEach-Object {
|
if ($CheckBoxesToCheck -ne "") {
|
||||||
if ($_ -ne $null) {
|
$debugMsg = "CheckBoxes to Check are: "
|
||||||
Write-Debug $_
|
$CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " }
|
||||||
}
|
$debugMsg = $debugMsg -replace (',\s*$', '')
|
||||||
|
Write-Debug "$debugMsg"
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($CheckBox in $CheckBoxes) {
|
foreach ($CheckBox in $CheckBoxes) {
|
||||||
|
@ -15,23 +15,25 @@ function Invoke-WPFToggle {
|
|||||||
# Use this to get the name of the button
|
# Use this to get the name of the button
|
||||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
||||||
|
|
||||||
|
$ToggleStatus = (Get-WinUtilToggleStatus $Button)
|
||||||
|
|
||||||
Switch -Wildcard ($Button) {
|
Switch -Wildcard ($Button) {
|
||||||
|
|
||||||
"WPFToggleDarkMode" {Invoke-WinUtilDarkMode -DarkMoveEnabled $(Get-WinUtilToggleStatus WPFToggleDarkMode)}
|
"WPFToggleDarkMode" {Invoke-WinUtilDarkMode $ToggleStatus}
|
||||||
"WPFToggleBingSearch" {Invoke-WinUtilBingSearch $(Get-WinUtilToggleStatus WPFToggleBingSearch)}
|
"WPFToggleBingSearch" {Invoke-WinUtilBingSearch $ToggleStatus}
|
||||||
"WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)}
|
"WPFToggleNumLock" {Invoke-WinUtilNumLock $ToggleStatus}
|
||||||
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)}
|
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $ToggleStatus}
|
||||||
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
|
"WPFToggleShowExt" {Invoke-WinUtilShowExt $ToggleStatus}
|
||||||
"WPFToggleSnapWindow" {Invoke-WinUtilSnapWindow $(Get-WinUtilToggleStatus WPFToggleSnapWindow)}
|
"WPFToggleSnapWindow" {Invoke-WinUtilSnapWindow $ToggleStatus}
|
||||||
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
|
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $ToggleStatus}
|
||||||
"WPFToggleSnapSuggestion" {Invoke-WinUtilSnapSuggestion $(Get-WinUtilToggleStatus WPFToggleSnapSuggestion)}
|
"WPFToggleSnapSuggestion" {Invoke-WinUtilSnapSuggestion $ToggleStatus}
|
||||||
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $ToggleStatus}
|
||||||
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $ToggleStatus}
|
||||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $ToggleStatus}
|
||||||
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)}
|
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $ToggleStatus}
|
||||||
"WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)}
|
"WPFToggleTaskView" {Invoke-WinUtilTaskView $ToggleStatus}
|
||||||
"WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $(Get-WinUtilToggleStatus WPFToggleHiddenFiles)}
|
"WPFToggleHiddenFiles" {Invoke-WinUtilHiddenFiles $ToggleStatus}
|
||||||
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $(Get-WinUtilToggleStatus WPFToggleTaskbarAlignment)}
|
"WPFToggleTaskbarAlignment" {Invoke-WinUtilTaskbarAlignment $ToggleStatus}
|
||||||
"WPFToggleDetailedBSoD" {Invoke-WinUtilDetailedBSoD $(Get-WinUtilToggleStatus WPFToggleDetailedBSoD)}
|
"WPFToggleDetailedBSoD" {Invoke-WinUtilDetailedBSoD $ToggleStatus}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
326
functions/public/Invoke-WPFUIElements.ps1
Normal file
326
functions/public/Invoke-WPFUIElements.ps1
Normal file
@ -0,0 +1,326 @@
|
|||||||
|
function Invoke-WPFUIElements {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Adds UI elements to a specified Grid in the WinUtil GUI based on a JSON configuration.
|
||||||
|
.PARAMETER configVariable
|
||||||
|
The variable/link containing the JSON configuration.
|
||||||
|
.PARAMETER targetGridName
|
||||||
|
The name of the grid to which the UI elements should be added.
|
||||||
|
.PARAMETER columncount
|
||||||
|
The number of columns to be used in the Grid. If not provided, a default value is used based on the panel.
|
||||||
|
.EXAMPLE
|
||||||
|
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "install" -columncount 5
|
||||||
|
.NOTES
|
||||||
|
Future me/contributer: If possible please wrap this into a runspace to make it load all panels at the same time.
|
||||||
|
#>
|
||||||
|
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[PSCustomObject]$configVariable,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[string]$targetGridName,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=2)]
|
||||||
|
[int]$columncount
|
||||||
|
)
|
||||||
|
|
||||||
|
$window = $sync["Form"]
|
||||||
|
|
||||||
|
$theme = $sync.configs.themes.$ctttheme
|
||||||
|
$borderstyle = $window.FindResource("BorderStyle")
|
||||||
|
$HoverTextBlockStyle = $window.FindResource("HoverTextBlockStyle")
|
||||||
|
$ColorfulToggleSwitchStyle = $window.FindResource("ColorfulToggleSwitchStyle")
|
||||||
|
|
||||||
|
if (!$borderstyle -or !$HoverTextBlockStyle -or !$ColorfulToggleSwitchStyle) {
|
||||||
|
throw "Failed to retrieve Styles using 'FindResource' from main window element."
|
||||||
|
}
|
||||||
|
|
||||||
|
$targetGrid = $window.FindName($targetGridName)
|
||||||
|
|
||||||
|
if (!$targetGrid) {
|
||||||
|
throw "Failed to retrieve Target Grid by name, provided name: $targetGrid"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear existing ColumnDefinitions and Children
|
||||||
|
$targetGrid.ColumnDefinitions.Clear() | Out-Null
|
||||||
|
$targetGrid.Children.Clear() | Out-Null
|
||||||
|
|
||||||
|
# Add ColumnDefinitions to the target Grid
|
||||||
|
for ($i = 0; $i -lt $columncount; $i++) {
|
||||||
|
$colDef = New-Object Windows.Controls.ColumnDefinition
|
||||||
|
$colDef.Width = New-Object Windows.GridLength(1, [Windows.GridUnitType]::Star)
|
||||||
|
$targetGrid.ColumnDefinitions.Add($colDef) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Convert PSCustomObject to Hashtable
|
||||||
|
$configHashtable = @{}
|
||||||
|
$configVariable.PSObject.Properties.Name | ForEach-Object {
|
||||||
|
$configHashtable[$_] = $configVariable.$_
|
||||||
|
}
|
||||||
|
|
||||||
|
$organizedData = @{}
|
||||||
|
# Iterate through JSON data and organize by panel and category
|
||||||
|
foreach ($entry in $configHashtable.Keys) {
|
||||||
|
$entryInfo = $configHashtable[$entry]
|
||||||
|
|
||||||
|
# Create an object for the application
|
||||||
|
$entryObject = [PSCustomObject]@{
|
||||||
|
Name = $entry
|
||||||
|
Order = $entryInfo.order
|
||||||
|
Category = $entryInfo.Category
|
||||||
|
Content = $entryInfo.Content
|
||||||
|
Choco = $entryInfo.choco
|
||||||
|
Winget = $entryInfo.winget
|
||||||
|
Panel = if ($entryInfo.Panel) { $entryInfo.Panel } else { "0" }
|
||||||
|
Link = $entryInfo.link
|
||||||
|
Description = $entryInfo.description
|
||||||
|
Type = $entryInfo.type
|
||||||
|
ComboItems = $entryInfo.ComboItems
|
||||||
|
Checked = $entryInfo.Checked
|
||||||
|
ButtonWidth = $entryInfo.ButtonWidth
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $organizedData.ContainsKey($entryObject.Panel)) {
|
||||||
|
$organizedData[$entryObject.Panel] = @{}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $organizedData[$entryObject.Panel].ContainsKey($entryObject.Category)) {
|
||||||
|
$organizedData[$entryObject.Panel][$entryObject.Category] = @()
|
||||||
|
}
|
||||||
|
|
||||||
|
# Store application data in an array under the category
|
||||||
|
$organizedData[$entryObject.Panel][$entryObject.Category] += $entryObject
|
||||||
|
|
||||||
|
# Only apply the logic for distributing entries across columns if the targetGridName is "appspanel"
|
||||||
|
if ($targetGridName -eq "appspanel") {
|
||||||
|
$panelcount = 0
|
||||||
|
$entrycount = $configHashtable.Keys.Count + $organizedData["0"].Keys.Count
|
||||||
|
$maxcount = [Math]::Round($entrycount / $columncount + 0.5)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Iterate through 'organizedData' by panel, category, and application
|
||||||
|
$count = 0
|
||||||
|
foreach ($panelKey in ($organizedData.Keys | Sort-Object)) {
|
||||||
|
# Create a Border for each column
|
||||||
|
$border = New-Object Windows.Controls.Border
|
||||||
|
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
||||||
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
|
$border.style = $borderstyle
|
||||||
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
|
|
||||||
|
# Create a StackPanel inside the Border
|
||||||
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
|
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
||||||
|
$border.Child = $stackPanel
|
||||||
|
$panelcount++
|
||||||
|
|
||||||
|
foreach ($category in ($organizedData[$panelKey].Keys | Sort-Object)) {
|
||||||
|
$count++
|
||||||
|
if ($targetGridName -eq "appspanel" -and $columncount -gt 0) {
|
||||||
|
$panelcount2 = [Int](($count) / $maxcount - 0.5)
|
||||||
|
if ($panelcount -eq $panelcount2) {
|
||||||
|
# Create a new Border for the new column
|
||||||
|
$border = New-Object Windows.Controls.Border
|
||||||
|
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
||||||
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
|
$border.style = $borderstyle
|
||||||
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
|
|
||||||
|
# Create a new StackPanel inside the Border
|
||||||
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
|
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
||||||
|
$border.Child = $stackPanel
|
||||||
|
$panelcount++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$label = New-Object Windows.Controls.Label
|
||||||
|
$label.Content = $category -replace ".*__", ""
|
||||||
|
$label.FontSize = $theme.FontSizeHeading
|
||||||
|
$label.FontFamily = $theme.HeaderFontFamily
|
||||||
|
$stackPanel.Children.Add($label) | Out-Null
|
||||||
|
|
||||||
|
$sync[$category] = $label
|
||||||
|
|
||||||
|
# Sort entries by Order and then by Name, but only display Name
|
||||||
|
$entries = $organizedData[$panelKey][$category] | Sort-Object Order, Name
|
||||||
|
foreach ($entryInfo in $entries) {
|
||||||
|
$count++
|
||||||
|
if ($targetGridName -eq "appspanel" -and $columncount -gt 0) {
|
||||||
|
$panelcount2 = [Int](($count) / $maxcount - 0.5)
|
||||||
|
if ($panelcount -eq $panelcount2) {
|
||||||
|
# Create a new Border for the new column
|
||||||
|
$border = New-Object Windows.Controls.Border
|
||||||
|
$border.VerticalAlignment = "Stretch" # Ensure the border stretches vertically
|
||||||
|
[System.Windows.Controls.Grid]::SetColumn($border, $panelcount)
|
||||||
|
$border.style = $borderstyle
|
||||||
|
$targetGrid.Children.Add($border) | Out-Null
|
||||||
|
|
||||||
|
# Create a new StackPanel inside the Border
|
||||||
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
|
$stackPanel.Background = [Windows.Media.Brushes]::Transparent
|
||||||
|
$stackPanel.SnapsToDevicePixels = $true
|
||||||
|
$stackPanel.VerticalAlignment = "Stretch" # Ensure the stack panel stretches vertically
|
||||||
|
$border.Child = $stackPanel
|
||||||
|
$panelcount++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($entryInfo.Type) {
|
||||||
|
"Toggle" {
|
||||||
|
$dockPanel = New-Object Windows.Controls.DockPanel
|
||||||
|
$checkBox = New-Object Windows.Controls.CheckBox
|
||||||
|
$checkBox.Name = $entryInfo.Name
|
||||||
|
$checkBox.HorizontalAlignment = "Right"
|
||||||
|
$dockPanel.Children.Add($checkBox) | Out-Null
|
||||||
|
$checkBox.Style = $ColorfulToggleSwitchStyle
|
||||||
|
|
||||||
|
$label = New-Object Windows.Controls.Label
|
||||||
|
$label.Content = $entryInfo.Content
|
||||||
|
$label.ToolTip = $entryInfo.Description
|
||||||
|
$label.HorizontalAlignment = "Left"
|
||||||
|
$label.FontSize = $theme.FontSize
|
||||||
|
$label.Foreground = $theme.MainForegroundColor
|
||||||
|
$dockPanel.Children.Add($label) | Out-Null
|
||||||
|
$stackPanel.Children.Add($dockPanel) | Out-Null
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name] = $checkBox
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name].IsChecked = Get-WinUtilToggleStatus $sync[$entryInfo.Name].Name
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name].Add_Click({
|
||||||
|
[System.Object]$Sender = $args[0]
|
||||||
|
Invoke-WPFToggle $Sender.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
"ToggleButton" {
|
||||||
|
$toggleButton = New-Object Windows.Controls.ToggleButton
|
||||||
|
$toggleButton.Name = $entryInfo.Name
|
||||||
|
$toggleButton.Name = "WPFTab" + ($stackPanel.Children.Count + 1) + "BT"
|
||||||
|
$toggleButton.HorizontalAlignment = "Left"
|
||||||
|
$toggleButton.Height = $theme.TabButtonHeight
|
||||||
|
$toggleButton.Width = $theme.TabButtonWidth
|
||||||
|
$toggleButton.Background = $theme.ButtonInstallBackgroundColor
|
||||||
|
$toggleButton.Foreground = [Windows.Media.Brushes]::White
|
||||||
|
$toggleButton.FontWeight = [Windows.FontWeights]::Bold
|
||||||
|
|
||||||
|
$textBlock = New-Object Windows.Controls.TextBlock
|
||||||
|
$textBlock.FontSize = $theme.TabButtonFontSize
|
||||||
|
$textBlock.Background = [Windows.Media.Brushes]::Transparent
|
||||||
|
$textBlock.Foreground = $theme.ButtonInstallForegroundColor
|
||||||
|
|
||||||
|
$underline = New-Object Windows.Documents.Underline
|
||||||
|
$underline.Inlines.Add($entryInfo.name -replace "(.).*", "`$1")
|
||||||
|
|
||||||
|
$run = New-Object Windows.Documents.Run
|
||||||
|
$run.Text = $entryInfo.name -replace "^.", ""
|
||||||
|
|
||||||
|
$textBlock.Inlines.Add($underline)
|
||||||
|
$textBlock.Inlines.Add($run)
|
||||||
|
|
||||||
|
$toggleButton.Content = $textBlock
|
||||||
|
|
||||||
|
$stackPanel.Children.Add($toggleButton) | Out-Null
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name] = $toggleButton
|
||||||
|
}
|
||||||
|
|
||||||
|
"Combobox" {
|
||||||
|
$horizontalStackPanel = New-Object Windows.Controls.StackPanel
|
||||||
|
$horizontalStackPanel.Orientation = "Horizontal"
|
||||||
|
$horizontalStackPanel.Margin = "0,5,0,0"
|
||||||
|
|
||||||
|
$label = New-Object Windows.Controls.Label
|
||||||
|
$label.Content = $entryInfo.Content
|
||||||
|
$label.HorizontalAlignment = "Left"
|
||||||
|
$label.VerticalAlignment = "Center"
|
||||||
|
$label.FontSize = $theme.ButtonFontSize
|
||||||
|
$horizontalStackPanel.Children.Add($label) | Out-Null
|
||||||
|
|
||||||
|
$comboBox = New-Object Windows.Controls.ComboBox
|
||||||
|
$comboBox.Name = $entryInfo.Name
|
||||||
|
$comboBox.Height = $theme.ButtonHeight
|
||||||
|
$comboBox.Width = $theme.ButtonWidth
|
||||||
|
$comboBox.HorizontalAlignment = "Left"
|
||||||
|
$comboBox.VerticalAlignment = "Center"
|
||||||
|
$comboBox.Margin = $theme.ButtonMargin
|
||||||
|
|
||||||
|
foreach ($comboitem in ($entryInfo.ComboItems -split " ")) {
|
||||||
|
$comboBoxItem = New-Object Windows.Controls.ComboBoxItem
|
||||||
|
$comboBoxItem.Content = $comboitem
|
||||||
|
$comboBoxItem.FontSize = $theme.ButtonFontSize
|
||||||
|
$comboBox.Items.Add($comboBoxItem) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
$horizontalStackPanel.Children.Add($comboBox) | Out-Null
|
||||||
|
$stackPanel.Children.Add($horizontalStackPanel) | Out-Null
|
||||||
|
|
||||||
|
$comboBox.SelectedIndex = 0
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name] = $comboBox
|
||||||
|
}
|
||||||
|
|
||||||
|
"Button" {
|
||||||
|
$button = New-Object Windows.Controls.Button
|
||||||
|
$button.Name = $entryInfo.Name
|
||||||
|
$button.Content = $entryInfo.Content
|
||||||
|
$button.HorizontalAlignment = "Left"
|
||||||
|
$button.Margin = $theme.ButtonMargin
|
||||||
|
$button.FontSize = $theme.ButtonFontSize
|
||||||
|
if ($entryInfo.ButtonWidth) {
|
||||||
|
$button.Width = $entryInfo.ButtonWidth
|
||||||
|
}
|
||||||
|
$stackPanel.Children.Add($button) | Out-Null
|
||||||
|
|
||||||
|
$sync[$entryInfo.Name] = $button
|
||||||
|
}
|
||||||
|
|
||||||
|
default {
|
||||||
|
$horizontalStackPanel = New-Object Windows.Controls.StackPanel
|
||||||
|
$horizontalStackPanel.Orientation = "Horizontal"
|
||||||
|
|
||||||
|
$checkBox = New-Object Windows.Controls.CheckBox
|
||||||
|
$checkBox.Name = $entryInfo.Name
|
||||||
|
$checkBox.Content = $entryInfo.Content
|
||||||
|
$checkBox.FontSize = $theme.FontSize
|
||||||
|
$checkBox.ToolTip = $entryInfo.Description
|
||||||
|
$checkBox.Margin = $theme.CheckBoxMargin
|
||||||
|
if ($entryInfo.Checked) {
|
||||||
|
$checkBox.IsChecked = $entryInfo.Checked
|
||||||
|
}
|
||||||
|
$horizontalStackPanel.Children.Add($checkBox) | Out-Null
|
||||||
|
|
||||||
|
if ($entryInfo.Link) {
|
||||||
|
$textBlock = New-Object Windows.Controls.TextBlock
|
||||||
|
$textBlock.Name = $checkBox.Name + "Link"
|
||||||
|
$textBlock.Text = "(?)"
|
||||||
|
$textBlock.ToolTip = $entryInfo.Link
|
||||||
|
$textBlock.Style = $HoverTextBlockStyle
|
||||||
|
|
||||||
|
# Add event handler for click to open link
|
||||||
|
$handler = [System.Windows.Input.MouseButtonEventHandler]{
|
||||||
|
param($sender, $e)
|
||||||
|
Start-Process $sender.ToolTip.ToString()
|
||||||
|
}
|
||||||
|
$textBlock.AddHandler([Windows.Controls.TextBlock]::MouseLeftButtonUpEvent, $handler)
|
||||||
|
|
||||||
|
$horizontalStackPanel.Children.Add($textBlock) | Out-Null
|
||||||
|
|
||||||
|
$sync[$textBlock.Name] = $textBlock
|
||||||
|
}
|
||||||
|
|
||||||
|
$stackPanel.Children.Add($horizontalStackPanel) | Out-Null
|
||||||
|
$sync[$entryInfo.Name] = $checkBox
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,12 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
{{ super() }}
|
||||||
|
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
|
||||||
|
<strong>Announcement:</strong> We are currently not adding any applications to WinUtil and any apps that will be added through a PR will be declined by the maintainer.
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{# Empty block to override the footer #}
|
{# Empty block to override the footer #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -37,6 +37,12 @@ Describe "Config Files" -ForEach @(
|
|||||||
$result = New-Object System.Collections.Generic.List[System.Object]
|
$result = New-Object System.Collections.Generic.List[System.Object]
|
||||||
Foreach ($application in $applications) {
|
Foreach ($application in $applications) {
|
||||||
$compare = $global:importedconfigs.$name.$application | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
$compare = $global:importedconfigs.$name.$application | Get-Member -MemberType NoteProperty | Select-Object -ExpandProperty name
|
||||||
|
if (-not $compare) {
|
||||||
|
throw "Comparison object for application '$application' is null."
|
||||||
|
}
|
||||||
|
if (-not $template) {
|
||||||
|
throw "Template object for application '$application' is null."
|
||||||
|
}
|
||||||
if ($(Compare-Object $compare $template) -ne $null) {
|
if ($(Compare-Object $compare $template) -ne $null) {
|
||||||
$result.Add($application)
|
$result.Add($application)
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ $sync.runspace.Open()
|
|||||||
|
|
||||||
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||||
|
|
||||||
|
$defaulttheme = '_default'
|
||||||
if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
|
if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
|
||||||
if (Invoke-WinUtilGPU -eq $True) {
|
if (Invoke-WinUtilGPU -eq $True) {
|
||||||
$ctttheme = 'Matrix'
|
$ctttheme = 'Matrix'
|
||||||
@ -61,26 +62,54 @@ if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
|
|||||||
} else {
|
} else {
|
||||||
$ctttheme = 'Classic'
|
$ctttheme = 'Classic'
|
||||||
}
|
}
|
||||||
$inputXML = Set-WinUtilUITheme -inputXML $inputXML -themeName $ctttheme
|
|
||||||
|
$returnVal = Set-WinUtilUITheme -inputXML $inputXML -customThemeName $ctttheme -defaultThemeName $defaulttheme
|
||||||
|
if ($returnVal[0] -eq "") {
|
||||||
|
Write-Host "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages." -ForegroundColor Red
|
||||||
|
Write-Host "Quitting winutil..." -ForegroundColor Red
|
||||||
|
$sync.runspace.Dispose()
|
||||||
|
$sync.runspace.Close()
|
||||||
|
[System.GC]::Collect()
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
$inputXML = $returnVal[0]
|
||||||
|
$ctttheme = $returnVal[1]
|
||||||
|
|
||||||
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
|
||||||
[xml]$XAML = $inputXML
|
[xml]$XAML = $inputXML
|
||||||
|
|
||||||
# Read the XAML file
|
# Read the XAML file
|
||||||
|
$readerOperationSuccessful = $false # There's more cases of failure then success.
|
||||||
$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 )
|
||||||
|
$readerOperationSuccessful = $true
|
||||||
} 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-Host "We ran into a problem with the XAML code. Check the syntax for this control..." -ForegroundColor Red
|
||||||
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 <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
|
write-Host "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n" -ForegroundColor Red
|
||||||
}
|
}
|
||||||
} 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." -ForegroundColor Red
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (-NOT ($readerOperationSuccessful)) {
|
||||||
|
Write-Host "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method." -ForegroundColor Red
|
||||||
|
Write-Host "Quitting winutil..." -ForegroundColor Red
|
||||||
|
$sync.runspace.Dispose()
|
||||||
|
$sync.runspace.Close()
|
||||||
|
[System.GC]::Collect()
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Load the configuration files
|
||||||
|
#Invoke-WPFUIElements -configVariable $sync.configs.nav -targetGridName "WPFMainGrid"
|
||||||
|
Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5
|
||||||
|
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
|
||||||
|
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
# Store Form Objects In PowerShell
|
# Store Form Objects In PowerShell
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
@ -89,16 +118,6 @@ $xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"]
|
|||||||
|
|
||||||
$sync.keys | ForEach-Object {
|
$sync.keys | ForEach-Object {
|
||||||
if($sync.$psitem) {
|
if($sync.$psitem) {
|
||||||
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "CheckBox" `
|
|
||||||
-and $sync["$psitem"].Name -like "WPFToggle*") {
|
|
||||||
$sync["$psitem"].IsChecked = Get-WinUtilToggleStatus $sync["$psitem"].Name
|
|
||||||
|
|
||||||
$sync["$psitem"].Add_Click({
|
|
||||||
[System.Object]$Sender = $args[0]
|
|
||||||
Invoke-WPFToggle $Sender.name
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "ToggleButton") {
|
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "ToggleButton") {
|
||||||
$sync["$psitem"].Add_Click({
|
$sync["$psitem"].Add_Click({
|
||||||
[System.Object]$Sender = $args[0]
|
[System.Object]$Sender = $args[0]
|
||||||
@ -388,7 +407,6 @@ $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["SearchBar"].Add_TextChanged({
|
||||||
|
|
||||||
if ($sync.SearchBar.Text -ne "") {
|
if ($sync.SearchBar.Text -ne "") {
|
||||||
$sync.SearchBarClearButton.Visibility = "Visible"
|
$sync.SearchBarClearButton.Visibility = "Visible"
|
||||||
} else {
|
} else {
|
||||||
@ -397,13 +415,14 @@ $sync["SearchBar"].Add_TextChanged({
|
|||||||
|
|
||||||
$activeApplications = @()
|
$activeApplications = @()
|
||||||
|
|
||||||
|
$textToSearch = $sync.SearchBar.Text.ToLower()
|
||||||
|
|
||||||
foreach ($CheckBox in $CheckBoxes) {
|
foreach ($CheckBox in $CheckBoxes) {
|
||||||
# Check if the checkbox is null or if it doesn't have content
|
# Check if the checkbox is null or if it doesn't have content
|
||||||
if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null) {
|
if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
$textToSearch = $sync.SearchBar.Text.ToLower()
|
|
||||||
$checkBoxName = $CheckBox.Key
|
$checkBoxName = $CheckBox.Key
|
||||||
$textBlockName = $checkBoxName + "Link"
|
$textBlockName = $checkBoxName + "Link"
|
||||||
|
|
||||||
@ -413,23 +432,23 @@ $sync["SearchBar"].Add_TextChanged({
|
|||||||
if ($CheckBox.Value.Content.ToLower().Contains($textToSearch)) {
|
if ($CheckBox.Value.Content.ToLower().Contains($textToSearch)) {
|
||||||
$CheckBox.Value.Visibility = "Visible"
|
$CheckBox.Value.Visibility = "Visible"
|
||||||
$activeApplications += $sync.configs.applications.$checkboxName
|
$activeApplications += $sync.configs.applications.$checkboxName
|
||||||
# Set the corresponding text block visibility
|
# Set the corresponding text block visibility
|
||||||
if ($textBlock -ne $null) {
|
if ($textBlock -ne $null -and $textBlock -is [System.Windows.Controls.TextBlock]) {
|
||||||
$textBlock.Visibility = "Visible"
|
$textBlock.Visibility = "Visible"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$CheckBox.Value.Visibility = "Collapsed"
|
$CheckBox.Value.Visibility = "Collapsed"
|
||||||
# Set the corresponding text block visibility
|
# Set the corresponding text block visibility
|
||||||
if ($textBlock -ne $null) {
|
if ($textBlock -ne $null -and $textBlock -is [System.Windows.Controls.TextBlock]) {
|
||||||
$textBlock.Visibility = "Collapsed"
|
$textBlock.Visibility = "Collapsed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$activeCategories = $activeApplications | Select-Object -ExpandProperty category -Unique
|
$activeCategories = $activeApplications | Select-Object -ExpandProperty category -Unique
|
||||||
|
|
||||||
foreach ($category in $activeCategories) {
|
foreach ($category in $activeCategories) {
|
||||||
$label = $labels[$(Get-WPFObjectName -type "Label" -name $category)]
|
$sync[$category].Visibility = "Visible"
|
||||||
$label.Visibility = "Visible"
|
|
||||||
}
|
}
|
||||||
if ($activeCategories) {
|
if ($activeCategories) {
|
||||||
$inactiveCategories = Compare-Object -ReferenceObject $allCategories -DifferenceObject $activeCategories -PassThru
|
$inactiveCategories = Compare-Object -ReferenceObject $allCategories -DifferenceObject $activeCategories -PassThru
|
||||||
@ -437,8 +456,14 @@ $sync["SearchBar"].Add_TextChanged({
|
|||||||
$inactiveCategories = $allCategories
|
$inactiveCategories = $allCategories
|
||||||
}
|
}
|
||||||
foreach ($category in $inactiveCategories) {
|
foreach ($category in $inactiveCategories) {
|
||||||
$label = $labels[$(Get-WPFObjectName -type "Label" -name $category)]
|
$sync[$category].Visibility = "Collapsed"
|
||||||
$label.Visibility = "Collapsed"}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$sync["Form"].Add_Loaded({
|
||||||
|
param($e)
|
||||||
|
$sync["Form"].MaxWidth = [Double]::PositiveInfinity
|
||||||
|
$sync["Form"].MaxHeight = [Double]::PositiveInfinity
|
||||||
})
|
})
|
||||||
|
|
||||||
# Initialize the hashtable
|
# Initialize the hashtable
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
GitHub : https://github.com/ChrisTitusTech
|
GitHub : https://github.com/ChrisTitusTech
|
||||||
Version : #{replaceme}
|
Version : #{replaceme}
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param (
|
param (
|
||||||
[switch]$Debug,
|
[switch]$Debug,
|
||||||
[string]$Config,
|
[string]$Config,
|
||||||
@ -27,12 +28,6 @@ if ($Run) {
|
|||||||
$PARAM_RUN = $true
|
$PARAM_RUN = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(Test-Path -Path $ENV:TEMP)) {
|
|
||||||
New-Item -ItemType Directory -Force -Path $ENV:TEMP
|
|
||||||
}
|
|
||||||
|
|
||||||
Start-Transcript $ENV:TEMP\Winutil.log -Append
|
|
||||||
|
|
||||||
# Load DLLs
|
# Load DLLs
|
||||||
Add-Type -AssemblyName PresentationFramework
|
Add-Type -AssemblyName PresentationFramework
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
@ -44,15 +39,38 @@ $sync.version = "#{replaceme}"
|
|||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
$sync.ProcessRunning = $false
|
$sync.ProcessRunning = $false
|
||||||
|
|
||||||
# If script isn't running as admin, show error message and quit
|
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||||
If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544") {
|
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
$argList = @()
|
||||||
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
|
|
||||||
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
|
$PSBoundParameters.GetEnumerator() | ForEach-Object {
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
$argList += if ($_.Value -is [switch] -and $_.Value) {
|
||||||
|
"-$($_.Key)"
|
||||||
|
} elseif ($_.Value) {
|
||||||
|
"-$($_.Key) `"$($_.Value)`""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$script = if ($MyInvocation.MyCommand.Path) {
|
||||||
|
"& { & '$($MyInvocation.MyCommand.Path)' $argList }"
|
||||||
|
} else {
|
||||||
|
"iex '& { $(irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1) } $argList'"
|
||||||
|
}
|
||||||
|
|
||||||
|
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||||
|
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
||||||
|
|
||||||
|
Start-Process $processCmd -ArgumentList "$powershellcmd -ExecutionPolicy Bypass -NoProfile -Command $script" -Verb RunAs
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
|
||||||
|
|
||||||
|
$logdir = "$env:localappdata\winutil\logs"
|
||||||
|
[System.IO.Directory]::CreateDirectory("$logdir") | Out-Null
|
||||||
|
Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-Null
|
||||||
|
|
||||||
# Set PowerShell window title
|
# Set PowerShell window title
|
||||||
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
||||||
clear-host
|
clear-host
|
||||||
|
23
windev.ps1
23
windev.ps1
@ -12,6 +12,25 @@
|
|||||||
Run in Admin Powershell > ./windev.ps1
|
Run in Admin Powershell > ./windev.ps1
|
||||||
#>
|
#>
|
||||||
|
|
||||||
|
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||||
|
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||||
|
# Capture all the arguments passed to the script
|
||||||
|
$argList = $args -join ' '
|
||||||
|
|
||||||
|
$script = if ($MyInvocation.MyCommand.Path) {
|
||||||
|
"& { & '$($MyInvocation.MyCommand.Path)' $argList }"
|
||||||
|
} else {
|
||||||
|
"iex '& { $(irm https://github.com/ChrisTitusTech/winutil/raw/main/windev.ps1) } $argList'"
|
||||||
|
}
|
||||||
|
|
||||||
|
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||||
|
$processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd }
|
||||||
|
|
||||||
|
Start-Process $processCmd -ArgumentList "$powershellcmd -ExecutionPolicy Bypass -NoProfile -Command $script" -Verb RunAs
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
# Function to fetch the latest release tag from the GitHub API
|
# Function to fetch the latest release tag from the GitHub API
|
||||||
function Get-LatestRelease {
|
function Get-LatestRelease {
|
||||||
try {
|
try {
|
||||||
@ -34,9 +53,9 @@ function RedirectToLatestPreRelease {
|
|||||||
Write-Host "Using latest Full Release"
|
Write-Host "Using latest Full Release"
|
||||||
$url = "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1"
|
$url = "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1"
|
||||||
}
|
}
|
||||||
Invoke-RestMethod $url | Invoke-Expression
|
|
||||||
|
iex "& { $(irm $url) } $argList"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call the redirect function
|
# Call the redirect function
|
||||||
|
|
||||||
RedirectToLatestPreRelease
|
RedirectToLatestPreRelease
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
UseLayoutRounding="True"
|
UseLayoutRounding="True"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
Title="Chris Titus Tech's Windows Utility" Height="800" Width="1280">
|
Width="Auto"
|
||||||
|
Height="Auto"
|
||||||
|
MaxWidth="1280"
|
||||||
|
MaxHeight="800"
|
||||||
|
Title="Chris Titus Tech's Windows Utility">
|
||||||
<WindowChrome.WindowChrome>
|
<WindowChrome.WindowChrome>
|
||||||
<WindowChrome CaptionHeight="0" CornerRadius="10"/>
|
<WindowChrome CaptionHeight="0" CornerRadius="10"/>
|
||||||
</WindowChrome.WindowChrome>
|
</WindowChrome.WindowChrome>
|
||||||
@ -284,12 +288,12 @@
|
|||||||
<Setter Property="Padding" Value="0"/>
|
<Setter Property="Padding" Value="0"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
<Setter Property="Cursor" Value="Hand"/>
|
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Foreground" Value="Red"/>
|
<Setter Property="Foreground" Value="Red"/>
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="10"/>
|
<Setter Property="BorderThickness" Value="10"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
@ -305,17 +309,17 @@
|
|||||||
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}">
|
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}">
|
||||||
<BulletDecorator Background="Transparent">
|
<BulletDecorator Background="Transparent">
|
||||||
<BulletDecorator.Bullet>
|
<BulletDecorator.Bullet>
|
||||||
<Grid Width="{CheckBoxBulletDecoratorFontSize}" Height="{CheckBoxBulletDecoratorFontSize}">
|
<Grid Width="{CheckBoxBulletDecoratorSize}" Height="{CheckBoxBulletDecoratorSize}">
|
||||||
<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="{Binding Path={CheckBoxBulletDecoratorSize}-2}"
|
||||||
Height="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}"
|
Height="{Binding Path={CheckBoxBulletDecoratorSize}-2}"
|
||||||
Margin="2"
|
Margin="2"
|
||||||
SnapsToDevicePixels="True"/>
|
SnapsToDevicePixels="True"/>
|
||||||
<Path x:Name="CheckMark"
|
<Path x:Name="CheckMark"
|
||||||
Stroke="{TemplateBinding Foreground}"
|
Stroke="{ToggleButtonOnColor}"
|
||||||
StrokeThickness="2"
|
StrokeThickness="2"
|
||||||
Data="M 0 5 L 5 10 L 12 0"
|
Data="M 0 5 L 5 10 L 12 0"
|
||||||
Visibility="Collapsed"/>
|
Visibility="Collapsed"/>
|
||||||
@ -468,7 +472,11 @@
|
|||||||
Width="34" Height="17">
|
Width="34" Height="17">
|
||||||
<Ellipse x:Name="Ellipse" Fill="{MainForegroundColor}" Stretch="Uniform"
|
<Ellipse x:Name="Ellipse" Fill="{MainForegroundColor}" Stretch="Uniform"
|
||||||
Margin="2,2,2,1"
|
Margin="2,2,2,1"
|
||||||
HorizontalAlignment="Left" Width="12">
|
HorizontalAlignment="Left" Width="10.8"
|
||||||
|
RenderTransformOrigin="0.5, 0.5">
|
||||||
|
<Ellipse.RenderTransform>
|
||||||
|
<ScaleTransform ScaleX="1" ScaleY="1" />
|
||||||
|
</Ellipse.RenderTransform>
|
||||||
</Ellipse>
|
</Ellipse>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -479,12 +487,35 @@
|
|||||||
<Setter TargetName="Border" Property="Background" Value="{LinkHoverForegroundColor}"/>
|
<Setter TargetName="Border" Property="Background" Value="{LinkHoverForegroundColor}"/>
|
||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Panel.ZIndex" Value="1000"/>
|
<Setter Property="Panel.ZIndex" Value="1000"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
||||||
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||||||
|
To="1.1" Duration="0:0:0.1" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
||||||
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||||||
|
To="1.1" Duration="0:0:0.1" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
||||||
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
|
||||||
|
To="1.0" Duration="0:0:0.1" />
|
||||||
|
<DoubleAnimation Storyboard.TargetName="Ellipse"
|
||||||
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
|
||||||
|
To="1.0" Duration="0:0:0.1" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</Trigger.ExitActions>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
||||||
<Setter TargetName="Border" Property="Background" Value="{MainBackgroundColor}" />
|
<Setter TargetName="Border" Property="Background" Value="{MainBackgroundColor}" />
|
||||||
<Setter TargetName="Border" Property="BorderBrush" Value="{MainForegroundColor}" />
|
<Setter TargetName="Border" Property="BorderBrush" Value="#707070" />
|
||||||
<Setter TargetName="Ellipse" Property="Fill" Value="{MainForegroundColor}" />
|
<Setter TargetName="Ellipse" Property="Fill" Value="#707070" />
|
||||||
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
@ -543,7 +574,7 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="Border">
|
<Style x:Key="BorderStyle" TargetType="Border">
|
||||||
<Setter Property="Background" Value="{MainBackgroundColor}"/>
|
<Setter Property="Background" Value="{MainBackgroundColor}"/>
|
||||||
<Setter Property="BorderBrush" Value="{BorderColor}"/>
|
<Setter Property="BorderBrush" Value="{BorderColor}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
@ -703,10 +734,10 @@
|
|||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/> <!-- Main content area -->
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="Auto"/> <!-- Space for options button -->
|
||||||
<ColumnDefinition Width="50px"/>
|
<ColumnDefinition Width="Auto"/> <!-- Space for close button -->
|
||||||
<ColumnDefinition Width="50px"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@ -718,25 +749,26 @@
|
|||||||
Consider using a Math Solver, will help in making
|
Consider using a Math Solver, will help in making
|
||||||
development of these things much easier
|
development of these things much easier
|
||||||
-->
|
-->
|
||||||
<!-- Changed the font size from {SearchBarTextBoxFontSize} to 12. This now display the text box correctly in the text box.-->
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="{SearchBarWidth}"
|
Width="{SearchBarWidth}"
|
||||||
Height="{SearchBarHeight}"
|
Height="{SearchBarHeight}"
|
||||||
FontSize="12"
|
FontSize="{SearchBarTextBoxFontSize}"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Name="SearchBar"
|
Name="SearchBar"
|
||||||
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
||||||
|
Padding="3,3,30,0"
|
||||||
|
Margin="5,0,0,0"
|
||||||
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>
|
||||||
<!--Changed the margin from 16 to 180, which now places the magnifying glass icon on the right side of the text box. Now able to see what is been searched for.-->
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
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="{IconFontSize}"
|
||||||
Margin="180,0,0,0"></TextBlock>
|
Margin="180,0,0,0">
|
||||||
|
</TextBlock>
|
||||||
<!--
|
<!--
|
||||||
TODO:
|
TODO:
|
||||||
Make this ClearButton Positioning react to
|
Make this ClearButton Positioning react to
|
||||||
@ -744,12 +776,12 @@
|
|||||||
Consider using a Math Solver, will help in making
|
Consider using a Math Solver, will help in making
|
||||||
development of these things much easier
|
development of these things much easier
|
||||||
-->
|
-->
|
||||||
<!-- changed the {SearchBarClearButtonMargin} value from 193 to 205, which now places the clear button on the outside of the text box. -->
|
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Name="SearchBarClearButton"
|
Name="SearchBarClearButton"
|
||||||
Style="{StaticResource SearchBarClearButtonStyle}"
|
Style="{StaticResource SearchBarClearButtonStyle}"
|
||||||
Margin="205,0,0,0" Visibility="Collapsed"/>
|
Margin="210,0,0,0" Visibility="Collapsed">
|
||||||
|
</Button>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@ -788,7 +820,7 @@
|
|||||||
FontSize="{SettingsIconFontSize}"
|
FontSize="{SettingsIconFontSize}"
|
||||||
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||||
Margin="0,5,5,0"
|
Margin="5,5,5,0"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Content=""/>
|
Content=""/>
|
||||||
<Popup Grid.Column="2" Name="SettingsPopup"
|
<Popup Grid.Column="2" Name="SettingsPopup"
|
||||||
@ -797,8 +829,16 @@
|
|||||||
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 FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}">
|
||||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
<MenuItem.ToolTip>
|
||||||
|
<ToolTip Content="Import Configuration from exported file."/>
|
||||||
|
</MenuItem.ToolTip>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}">
|
||||||
|
<MenuItem.ToolTip>
|
||||||
|
<ToolTip Content="Export Selected Elements and copy execution command to clipboard."/>
|
||||||
|
</MenuItem.ToolTip>
|
||||||
|
</MenuItem>
|
||||||
<Separator/>
|
<Separator/>
|
||||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||||
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
||||||
@ -815,7 +855,7 @@
|
|||||||
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="{CloseIconFontSize}" Name="WPFCloseButton" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
@ -828,81 +868,97 @@
|
|||||||
<RowDefinition Height="45px"/>
|
<RowDefinition Height="45px"/>
|
||||||
<RowDefinition Height="0.95*"/>
|
<RowDefinition Height="0.95*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="{TabContentMargin}">
|
||||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
<Button Name="WPFInstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||||
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
<Button Name="WPFUninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
<Button Name="WPFClearInstallSelection" Content=" Clear Selection" Margin="2"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Margin="{TabContentMargin}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||||
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid Name="appspanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
{{InstallPanel_applications}}
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
<Rectangle Grid.Row="1" Grid.Column="0" Width="22" Height="22" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<Grid>
|
||||||
<Grid Background="Transparent">
|
<!-- Main content area with a ScrollViewer -->
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="45px"/>
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height=".70*"/>
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height=".10*"/>
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
{{InstallPanel_tweaks}}
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="0" Margin="{TabContentMargin}">
|
||||||
<Label Content="Recommended Selections:" FontSize="{FontSize}" VerticalAlignment="Center" Margin="2"/>
|
<Grid Background="Transparent">
|
||||||
<Button Name="WPFstandard" Content=" Standard " Margin="2"/>
|
<Grid.RowDefinitions>
|
||||||
<Button Name="WPFminimal" Content=" Minimal " Margin="2"/>
|
<RowDefinition Height="45px"/>
|
||||||
<Button Name="WPFclear" Content=" Clear " Margin="2"/>
|
<RowDefinition Height="*"/>
|
||||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</StackPanel>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0">
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
|
||||||
<TextBlock Padding="10">
|
<Label Content="Recommended Selections:" FontSize="{FontSize}" VerticalAlignment="Center" Margin="2"/>
|
||||||
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
<Button Name="WPFstandard" Content=" Standard " Margin="2"/>
|
||||||
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
<Button Name="WPFminimal" Content=" Minimal " Margin="2"/>
|
||||||
</TextBlock>
|
<Button Name="WPFClearTweaksSelection" Content=" Clear " Margin="2"/>
|
||||||
|
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Grid Name="tweakspanel" Grid.Row="1">
|
||||||
|
<!-- Your tweakspanel content goes here -->
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0" Style="{StaticResource BorderStyle}">
|
||||||
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
|
<TextBlock Padding="10">
|
||||||
|
Note: Hover over items to get a better description. Please be careful as many of these tweaks will heavily modify your system.
|
||||||
|
<LineBreak/>Recommended selections are for normal users and if you are unsure do NOT check anything else!
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
<Border Grid.Row="1" Background="{MainBackgroundColor}" BorderBrush="{BorderColor}" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" Padding="10">
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0">
|
||||||
|
<Button Name="WPFTweaksbutton" Content="Run Tweaks" Margin="5"/>
|
||||||
|
<Button Name="WPFUndoall" Content="Undo Selected Tweaks" Margin="5"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Config" Visibility="Collapsed" Name="WPFTab3">
|
<TabItem Header="Config" Visibility="Collapsed" Name="WPFTab3">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{TabContentMargin}">
|
||||||
<Grid Background="Transparent">
|
<Grid Name="featurespanel" Grid.Row="1" Background="Transparent">
|
||||||
{{InstallPanel_features}}
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4">
|
<TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{TabContentMargin}">
|
||||||
<Grid Background="Transparent">
|
<Grid Background="Transparent">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Grid.Row="0" Grid.Column="0">
|
<Border Grid.Row="0" Grid.Column="0" Style="{StaticResource BorderStyle}">
|
||||||
<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="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" 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" Style="{StaticResource BorderStyle}">
|
||||||
<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="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" 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" Style="{StaticResource BorderStyle}">
|
||||||
<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="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" 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>
|
||||||
@ -913,7 +969,7 @@
|
|||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5">
|
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5">
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{TabContentMargin}">
|
||||||
<Grid Width="Auto" Height="Auto">
|
<Grid Width="Auto" Height="Auto">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
@ -923,16 +979,17 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border Grid.Row="0" Grid.Column="0"
|
<Border Grid.Row="0" Grid.Column="0"
|
||||||
|
Style="{StaticResource BorderStyle}"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
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="{MicrowinCheckBoxMargin}" />
|
||||||
<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="{MicrowinCheckBoxMargin}"
|
||||||
ToolTip="Use ISO directory for ScratchDir " />
|
ToolTip="Use ISO directory for ScratchDir " />
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@ -983,7 +1040,7 @@
|
|||||||
<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" />
|
||||||
<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="{MicrowinCheckBoxMargin}" 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=""
|
||||||
@ -992,9 +1049,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="{MicrowinCheckBoxMargin}" 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="{MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock>
|
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock>
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock>
|
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock>
|
||||||
@ -1024,6 +1081,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<Border
|
<Border
|
||||||
|
Style="{StaticResource BorderStyle}"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Grid.Row="0" Grid.Column="1">
|
Grid.Row="0" Grid.Column="1">
|
||||||
|
Loading…
Reference in New Issue
Block a user