diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2a267c93a6..52fce025a4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,59 +1,2 @@ -# This is a comment. -# Each line is a file pattern followed by one or more owners. - -# These owners will be the default owners for everything in -# the repo. Unless a later match takes precedence, -# @global-owner1 and @global-owner2 will be requested for -# review when someone opens a pull request. -* @ChrisTitusTech - -# Order is important; the last matching pattern takes the most -# precedence. When someone opens a pull request that only -# modifies JS files, only @js-owner and not the global -# owner(s) will be requested for a review. -# *.js @js-owner #This is an inline comment. - -# You can also use email addresses if you prefer. They'll be -# used to look up users just like we do for commit author -# emails. -# *.go docs@example.com - -# Teams can be specified as code owners as well. Teams should -# be identified in the format @org/team-name. Teams must have -# explicit write access to the repository. In this example, -# the octocats team in the octo-org organization owns all .txt files. -# *.txt @octo-org/octocats - -# In this example, @doctocat owns any files in the build/logs -# directory at the root of the repository and any of its -# subdirectories. -# /build/logs/ @doctocat - -# The `docs/*` pattern will match files like -# `docs/getting-started.md` but not further nested files like -# `docs/build-app/troubleshooting.md`. -# docs/* docs@example.com - -# In this example, @octocat owns any file in an apps directory -# anywhere in your repository. -# apps/ @octocat - -# In this example, @doctocat owns any file in the `/docs` -# directory in the root of your repository and any of its -# subdirectories. -# /docs/ @doctocat - -# In this example, any change inside the `/scripts` directory -# will require approval from @doctocat or @octocat. -# /scripts/ @doctocat @octocat - -# In this example, @octocat owns any file in a `/logs` directory such as -# `/build/logs`, `/scripts/logs`, and `/deeply/nested/logs`. Any changes -# in a `/logs` directory will require approval from @octocat. -# **/logs @octocat - -# In this example, @octocat owns any file in the `/apps` -# directory in the root of your repository except for the `/apps/github` -# subdirectory, as its owners are left empty. -# /apps/ @octocat -# /apps/github \ No newline at end of file +# Chris rules EVERYTHING (including paths listed below) +* @ChrisTitusTech \ No newline at end of file diff --git a/docs/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 84% rename from docs/CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 2be4e4a9c8..ac8147a4f1 100644 --- a/docs/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -21,12 +21,14 @@ * Pull requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub. -* If you're doing code changes, then you can submit a PR to `main` branch, but I am very selective about these. +* If you're doing code changes, then you can submit a PR to the `main` branch. !!! warning "Important" Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN PULL REQUEST! + Do not open a pull request that adds support for other languages to WinUtil for now, until we decide how we want to move forward with language support. + * When creating pull requests, it is essential to thoroughly document all changes made. This includes, but is not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes. Document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in the denial of the pull request. Additionally, any code lacking sufficient documentation may also be denied. * By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented. @@ -68,9 +70,9 @@ graph TD ### Fork the Repo * Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your repository list. -![Fork Image](assets/Fork-Button-Dark.png#only-dark#gh-dark-mode-only) +![Fork Image](/docs/assets/images/Fork-Button-Dark.png#gh-dark-mode-only) -![Fork Image](assets/Fork-Button-Light.png#only-light#gh-light-mode-only) +![Fork Image](/docs/assets/images/Fork-Button-Light.png#only-light#gh-light-mode-only) ### Clone the Fork !!! tip @@ -87,31 +89,31 @@ graph TD ### Testing your changes -* To test to see if your changes work as intended run following commands in a powershell teminal as admin: +* To test to see if your changes work as intended, run the following commands in a PowerShell terminal as admin: * Change the directory where you are running the commands to the forked project. * `cd {path to the folder with the compile.ps1}` * Run the following command to compile and run WinUtil: * `.\Compile.ps1 -run` -![Compile](assets/Compile.png) +![Compile](/docs/assets/images/Complie.png) * After seeing that your changes work properly, feel free to commit the changes to the repository and make a PR. For help on that, follow the documentation below. ### Committing the changes * Before committing your changes, please discard changes made to the `winutil.ps1` file, like the following: -![Push Commit Image](assets/Discard-GHD.png) +![Push Commit Image](/docs/assets/images/Discard-GHD.png) * Now, commit your changes once you are happy with the result. -![Commit Image](assets/Commit-GHD.png) +![Commit Image](/docs/assets/images/Commit-GHD.png) * Push the changes to upload them to your fork on github.com. -![Push Commit Image](assets/Push-Commit.png) +![Push Commit Image](/docs/assets/images/Push-Commit.png) ### Making a PR -* To make a PR on your repo under a new branch linking to the main branch, a button will show and say Preview and Create pull request. Click that button and fill in all the information that is provided on the template. Once all the information is filled in correctly, check your PR to make sure there is not a WinUtil.ps1 file attached to the PR. Once everything is good, make the PR and wait for Chris (the maintainer) to accept or deny your PR. Once it is accepted by Chris, you will be able to see your changes in the "/windev" build. +* To make a PR on your repo under a new branch linking to the main branch, a button will show and say Preview and Create pull request. Click that button and fill in all the information that is provided on the template. Once all the information is filled in correctly, check your PR to make sure there is no WinUtil.ps1 file attached to the PR. Once everything is good, make the PR and wait for Chris (the maintainer) to accept or deny your PR. Once it is accepted by Chris, you will be able to see your changes in the "/windev" build. * If you do not see your feature in the main "/win" build, that is fine. All new changes go into the /windev build to make sure everything is working OK before going fully public. * Congratulations! You just submitted your first PR. Thank you so much for contributing to WinUtil. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 063c005f18..0000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: 'bug' -assignees: '' ---- - -## Describe the bug - - -## Steps to reproduce -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See the error. - -## Expected behavior - - -## Screenshots - - -## Additional context - - -## Issue validation -- [ ] I checked for duplicate issues. -- [ ] I checked for already existing discussions. -- [ ] I checked for an already existing pull request addressing the issue. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000000..6c6ff5db83 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,36 @@ +name: "Bug report" +description: "Report a bug to help us identify and fix issues in the project." +labels: ["bug"] + +body: + - type: markdown + attributes: + value: | + - Remember, we only support Windows 11. If you encounter problems on Windows 10, please consider upgrading to Windows 11. + - For general questions, join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ). + + - type: dropdown + id: affected_part + attributes: + label: What part of Winutil are you having issues with? + options: + - Program Install Tab + - Tweaks Tab + - Config Tab + - Updates Tab + - Win11 Creator Tab + validations: + required: false + + - type: textarea + id: issue_description + attributes: + label: Provide a clear and concise description of the issue. + validations: + required: true + + - type: textarea + id: error_output + attributes: + label: Paste the full error output (if available) or Screenshot. + placeholder: "Include any relevant logs or error messages." diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..024473d8e1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: 💻 Community Discord + url: https://discord.gg/RUbZUZyByQ + about: Join our Community Discord server to chat with other users in the Winutil community. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index f987414241..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: 'enhancement' -assignees: '' ---- - -## Is your feature request related to a problem? Please describe - - -## Describe the solution you'd like - - -## Describe alternatives you've considered - - -## Additional context - - -## Issue validation -- [ ] I checked for duplicate issues. -- [ ] I checked for already existing discussions. -- [ ] I checked for an already existing pull request addressing the issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000000..aeff5983e3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,22 @@ +name: "Feature request" +description: "Suggest a new feature or improvement for the project." +labels: ["enhancement"] + +body: + - type: markdown + attributes: + value: | + # ✨ **Feature request** + Thank you for taking the time to suggest a feature! Please provide as much detail as possible to help us understand and evaluate your request. + + ## ⚠️ **IMPORTANT** + - 🛠️ **Supported environments only:** We only support Windows 11. + - 💡 For general questions, use the [Discussions section](https://github.com/Christitustech/winutil/discussions) or join our Community-driven [Discord Server](https://discord.gg/RUbZUZyByQ). + + - type: textarea + id: proposed_solution + attributes: + label: 💡 Describe the solution you'd like + placeholder: "Provide a clear and concise description." + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ef3fa33ed6..b7a1e9406c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,33 +1,16 @@ - + ## Type of Change - [ ] New feature - [ ] Bug fix - [ ] Documentation update -- [ ] Refactoring -- [ ] Hotfix -- [ ] Security patch - [ ] UI/UX improvement -## Description - - -## Testing - + -## Impact - +## Description + ## Issue related to PR - + - Resolves # - -## Additional Information - - -## Checklist -- [ ] My code adheres to the coding and style guidelines of the project. -- [ ] I have performed a self-review of my own code. -- [ ] I have commented my code, particularly in hard-to-understand areas. -- [ ] I have made corresponding changes to the documentation. -- [ ] My changes generate no errors/warnings/merge conflicts. diff --git a/.github/mkdocs.yml b/.github/mkdocs.yml deleted file mode 100644 index 6c03100492..0000000000 --- a/.github/mkdocs.yml +++ /dev/null @@ -1,91 +0,0 @@ -site_name: WinUtil Documentation -docs_dir: '../docs' -repo_url: https://github.com/ChrisTitusTech/winutil - -nav: - - Introduction: 'index.md' - - User Guide: 'userguide.md' - - Contributing Guide: 'CONTRIBUTING.md' - - Documentation: - - Dev Docs: 'devdocs.md' - - Known Issues: 'KnownIssues.md' - - FAQ: 'faq.md' - -not_in_nav: | - dev/ - -theme: - name: material - custom_dir: '../overrides' - features: - - navigation.tabs - - navigation.sections - - toc.integrate - - navigation.top - - search.suggest - - search.highlight - - content.tabs.link - - content.code.annotation - - content.code.copy - language: en - logo: assets/favicon.png - favicon: assets/favicon.png - palette: - # Palette toggle for automatic mode - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: Switch to light mode - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - accent: blue - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: black - accent: blue - toggle: - icon: material/weather-night - name: Switch to light mode -markdown_extensions: - - admonition - - pymdownx.details - - pymdownx.superfences - - pymdownx.superfences: - custom_fences: - - name: mermaid - class: mermaid - format: !!python/name:pymdownx.superfences.fence_code_format - - abbr - - attr_list - - pymdownx.snippets - - md_in_html - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.inlinehilite - - def_list - - pymdownx.tasklist: - custom_checkbox: true - - toc: - permalink: true - -plugins: - - search - - awesome-pages - - git-revision-date-localized - - minify: - minify_html: true - htmlmin_opts: - remove_comments: true - cache_safe: true diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 06b8ced8ed..a58e6e227e 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -4,15 +4,16 @@ categories: labels: - 'feature' - 'enhancement' + - 'new feature' - title: '🐛 Bug Fixes' labels: - - 'fix' + - 'hotfix' - 'bugfix' - 'bug' - title: '📚 Documentation' label: 'documentation' - - title: '🔒 Security' - label: 'security' + - title: '🎨 UI/UX Improvements' + label: 'ui update' change-template: '- $TITLE @$AUTHOR (#$NUMBER)' template: | ## Changes @@ -31,7 +32,7 @@ autolabeler: - '/fix\/.+/' title: - '/fix/i' - - label: 'enhancement' + - label: 'new feature' branch: - '/feature\/.+/' body: @@ -40,9 +41,6 @@ autolabeler: files: - '**/*.md' - 'docs/**/*' - - label: 'security' - branch: - - '/security\/.+/' replacers: - search: /"/g replace: '' diff --git a/.github/requirements.txt b/.github/requirements.txt deleted file mode 100644 index 04fb49b90e..0000000000 --- a/.github/requirements.txt +++ /dev/null @@ -1,51 +0,0 @@ -Babel==2.15.0 -bracex==2.5 -cairocffi==1.7.1 -CairoSVG==2.7.1 -certifi==2024.7.4 -cffi==1.17.0 -charset-normalizer==3.3.2 -click==8.1.7 -colorama==0.4.6 -csscompressor==0.9.5 -cssselect2==0.7.0 -defusedxml==0.7.1 -ghp-import==2.1.0 -gitdb==4.0.11 -GitPython==3.1.43 -htmlmin2==0.1.13 -idna==3.7 -Jinja2==3.1.5 -jsmin==3.0.1 -Markdown==3.6 -MarkupSafe==2.1.5 -mergedeep==1.3.4 -mkdocs==1.6.0 -mkdocs-awesome-pages-plugin==2.9.3 -mkdocs-get-deps==0.2.0 -mkdocs-git-revision-date-localized-plugin==1.2.6 -mkdocs-material==9.5.31 -mkdocs-material-extensions==1.3.1 -mkdocs-minify-plugin==0.8.0 -natsort==8.4.0 -packaging==24.1 -paginate==0.5.6 -pathspec==0.12.1 -pillow==10.4.0 -platformdirs==4.2.2 -pycparser==2.22 -Pygments==2.18.0 -pymdown-extensions==10.9 -python-dateutil==2.9.0.post0 -pytz==2024.1 -PyYAML==6.0.2 -pyyaml_env_tag==0.1 -regex==2024.7.24 -requests==2.32.3 -six==1.16.0 -smmap==5.0.1 -tinycss2==1.3.0 -urllib3==2.2.2 -watchdog==4.0.1 -wcmatch==9.0 -webencodings==0.5.1 diff --git a/.github/workflows/auto-merge-docs.yaml b/.github/workflows/auto-merge-docs.yaml new file mode 100644 index 0000000000..c66360fe3d --- /dev/null +++ b/.github/workflows/auto-merge-docs.yaml @@ -0,0 +1,31 @@ +name: Auto-merge Docs PRs + +on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - main + +jobs: + auto-merge: + if: github.event.pull_request.head.ref == 'docs-update' && (github.event.pull_request.user.login == 'ChrisTitusTech' || github.event.pull_request.user.login == 'github-actions[bot]') + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Auto-approve PR + if: github.event.pull_request.user.login == 'github-actions[bot]' + run: gh pr review "$PR_NUMBER" --approve + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.AUTO_MERGE }} + + - name: Enable auto-merge + run: gh pr merge "$PR_NUMBER" --squash --delete-branch --admin + env: + PR_NUMBER: ${{ github.event.pull_request.number }} + GH_TOKEN: ${{ secrets.AUTO_MERGE }} diff --git a/.github/workflows/close-discussion-on-pr.yaml b/.github/workflows/close-discussion-on-pr.yaml index 5ffeec42f8..316a4bf18e 100644 --- a/.github/workflows/close-discussion-on-pr.yaml +++ b/.github/workflows/close-discussion-on-pr.yaml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Check if PR was merged if: github.event.pull_request.merged == true diff --git a/.github/workflows/close-old-issues.yaml b/.github/workflows/close-old-issues.yaml index ac6e372ff6..3a70a06bfd 100644 --- a/.github/workflows/close-old-issues.yaml +++ b/.github/workflows/close-old-issues.yaml @@ -14,7 +14,7 @@ jobs: contents: none steps: - name: Close inactive issues - uses: actions/stale@v8 + uses: actions/stale@v10 with: # A list of labels to reference when looking through issues, # and only when one (or even more) of these labels are found.. diff --git a/.github/workflows/compile-check.yaml b/.github/workflows/compile-check.yaml index 394e558e7a..6a8604f395 100644 --- a/.github/workflows/compile-check.yaml +++ b/.github/workflows/compile-check.yaml @@ -13,7 +13,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Compile and Syntaxcheck winutil.ps1 shell: pwsh diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000000..c990c7513e --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,120 @@ +name: Deploy Hugo site to Pages + +on: + push: + branches: + - main + paths: + - "docs/**" + - "config/tweaks.json" + - "config/feature.json" + - "functions/**" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + pull-requests: write + +concurrency: + group: "pages" + cancel-in-progress: false + +defaults: + run: + shell: bash + +jobs: + build: + if: github.repository == 'ChrisTitusTech/winutil' + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.156.0 + HUGO_ENVIRONMENT: production + TZ: America/Chicago + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: recursive + fetch-depth: 0 + persist-credentials: false + - name: Setup Pages + id: pages + uses: actions/configure-pages@v6 + + - name: Generate Dev Docs from JSON + shell: pwsh + run: | + Set-Location tools + ./devdocs-generator.ps1 + + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v8 + with: + token: ${{ secrets.AUTO_MERGE }} + commit-message: 'chore: Update generated dev docs' + title: 'chore: Update Generated Dev Docs' + body: 'Automated update of generated documentation from JSON sources' + branch: docs-update + delete-branch: true + add-paths: | + docs/content/dev/ + config/tweaks.json + config/feature.json + labels: | + automated + documentation + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + + - name: Install Node.js dependencies + run: "cd docs && [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Cache Restore + id: cache-restore + uses: actions/cache/restore@v5 + with: + path: | + ${{ runner.temp }}/hugo_cache + key: hugo-${{ github.run_id }} + restore-keys: hugo- + - name: Build with Hugo + run: | + hugo \ + --gc \ + --minify \ + --cleanDestinationDir \ + --source docs \ + --cacheDir "${{ runner.temp }}/hugo_cache" + - name: Cache Save + id: cache-save + uses: actions/cache/save@v5 + with: + path: | + ${{ runner.temp }}/hugo_cache + key: ${{ steps.cache-restore.outputs.cache-primary-key }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 + with: + path: ./docs/public + + deploy: + if: github.repository == 'ChrisTitusTech/winutil' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/github-pages.yaml b/.github/workflows/github-pages.yaml deleted file mode 100644 index 7544820925..0000000000 --- a/.github/workflows/github-pages.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: GitHub Pages Deploy - -on: - push: - paths: - - '.github/mkdocs.yml' - - '.github/requirements.txt' - - 'docs/**' - - 'overrides/**' - - '.github/CONTRIBUTING.md' - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - with: - fetch-depth: '0' # Fetch all commit history for all branches as well as tags. - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.x # Install latest Stable release of Python 3 - cache: 'pip' # Caching pip dependencies - - - name: Install Necessary Dependencies - run: pip install -r .github/requirements.txt - - - name: Build & Deploy using mkdocs - run: mkdocs gh-deploy --force -f .github/mkdocs.yml diff --git a/.github/workflows/issue-slash-commands.yaml b/.github/workflows/issue-slash-commands.yaml index 08fedba93a..6e299e7a56 100644 --- a/.github/workflows/issue-slash-commands.yaml +++ b/.github/workflows/issue-slash-commands.yaml @@ -67,7 +67,7 @@ jobs: id: check_user if: env.command == 'true' run: | - ALLOWED_USERS=("ChrisTitusTech" "og-mrk" "Marterich" "MyDrift-user" "Real-MullaC" "CodingWonders") + ALLOWED_USERS=("ChrisTitusTech" "og-mrk" "Marterich" "MyDrift-user" "Real-MullaC" "CodingWonders" "GabiNun") if [[ " ${ALLOWED_USERS[@]} " =~ " ${{ github.event.comment.user.login }} " ]]; then echo "user=true" >> $GITHUB_ENV else diff --git a/.github/workflows/label-pr.yaml b/.github/workflows/label-pr.yaml new file mode 100644 index 0000000000..72152ab84f --- /dev/null +++ b/.github/workflows/label-pr.yaml @@ -0,0 +1,45 @@ +name: Label PRs by Type of Change + +on: + pull_request_target: + types: [opened, edited, synchronize] + +jobs: + label-pr: + runs-on: ubuntu-latest + permissions: + pull-requests: write + issues: write + contents: read # Often needed for github-script + steps: + - name: Check PR body for Type of Change + uses: actions/github-script@v8 + with: + script: | + const prBody = context.payload.pull_request.body || ''; + const labelsToAdd = []; + + if (/\[x\]\s*New feature/i.test(prBody)) { + labelsToAdd.push('new feature'); + } + if (/\[x\]\s*Bug fix/i.test(prBody)) { + labelsToAdd.push('bug'); + } + if (/\[x\]\s*Documentation update/i.test(prBody)) { + labelsToAdd.push('documentation'); + } + if (/\[x\]\s*Hotfix/i.test(prBody)) { + labelsToAdd.push('hotfix'); + } + if (/\[x\]\s*UI\/UX improvement/i.test(prBody)) { + labelsToAdd.push('ui update'); + } + + if (labelsToAdd.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: labelsToAdd + }); + } diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 6682e3001c..0819167838 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -3,6 +3,7 @@ name: Pre-Release WinUtil permissions: contents: write actions: read + pull-requests: write on: workflow_dispatch: # Manual trigger added @@ -10,11 +11,19 @@ on: jobs: build-runspace: runs-on: windows-latest + outputs: + version: ${{ steps.extract_version.outputs.version }} env: CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }} steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 + + - name: Generate Dev Docs and Update JSON Links + shell: pwsh + run: | + Set-Location tools + ./devdocs-generator.ps1 - name: Compile project shell: pwsh @@ -22,11 +31,35 @@ jobs: Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1 continue-on-error: false # Directly fail the job on error, removing the need for a separate check + - name: Create Pull Request for Updated JSON Links + id: cpr + uses: peter-evans/create-pull-request@v8 + with: + token: ${{ secrets.AUTO_MERGE }} + commit-message: 'chore: Update documentation links in JSON configs' + title: 'chore: Update Generated Dev Docs' + body: 'Automated update of documentation links in JSON configs from pre-release build' + branch: docs-update + delete-branch: true + add-paths: | + config/tweaks.json + config/feature.json + labels: | + automated + documentation + + - name: Check outputs + shell: bash + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + - name: Set Version to Todays Date id: extract_version run: | $version = (Get-Date -Format "yy.MM.dd") echo "VERSION=$version" >> $env:GITHUB_ENV + echo "version=$version" >> $env:GITHUB_OUTPUT shell: pwsh - name: Create Tag @@ -49,39 +82,32 @@ jobs: } shell: pwsh - - name: Create and import code signing certificate - shell: pwsh - run: | - [System.IO.File]::WriteAllBytes("$env:USERPROFILE\code-signing-cert.pfx", [System.Convert]::FromBase64String("$env:CERTIFICATE_BASE64")) - Import-PfxCertificate -FilePath "$env:USERPROFILE\code-signing-cert.pfx" -CertStoreLocation Cert:\CurrentUser\My - - - name: Code sign winutil.ps1 - shell: pwsh - run: | - $cert = Get-ChildItem -Path Cert:\CurrentUser\My -CodeSigningCert | Select-Object -First 1 - if ($null -eq $cert) { throw "Code signing certificate not found" } - Set-AuthenticodeSignature -FilePath ./winutil.ps1 -Certificate $cert -TimeStampServer "http://timestamp.digicert.com" - - - name: Verify code signature - shell: pwsh - run: | - $signature = Get-AuthenticodeSignature -FilePath ./winutil.ps1 - if ($signature.Status -ne 'Valid') { throw "Code signing failed" } - - - name: Upload winutil.ps1 as artifact - uses: actions/upload-artifact@v4 + - name: Upload compiled script + uses: actions/upload-artifact@v7 with: - name: winutil + name: winutil-ps1 path: ./winutil.ps1 + release: + needs: build-runspace + runs-on: ubuntu-latest + steps: + - name: Download compiled script + uses: actions/download-artifact@v8 + with: + name: winutil-ps1 + + - name: Set version from build job + run: echo "VERSION=${{ needs.build-runspace.outputs.version }}" >> $GITHUB_ENV + - name: Generate Release Notes id: generate_notes - uses: release-drafter/release-drafter@v6 + uses: release-drafter/release-drafter@v7 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: config-name: release-drafter.yml - version: ${{ env.VERSION }} # Pass the version variable + version: ${{ env.VERSION }} - name: Create and Upload Release id: create_release diff --git a/.github/workflows/remove-winutil.yaml b/.github/workflows/remove-winutil.yaml index 5dedbe937c..151b6de8bb 100644 --- a/.github/workflows/remove-winutil.yaml +++ b/.github/workflows/remove-winutil.yaml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Check if winutil.ps1 exists id: check_existence diff --git a/.github/workflows/sponsors.yaml b/.github/workflows/sponsors.yaml index b6b21d18d4..c6bad426ab 100644 --- a/.github/workflows/sponsors.yaml +++ b/.github/workflows/sponsors.yaml @@ -5,13 +5,16 @@ on: - cron: 30 15 * * 0-6 permissions: contents: write + pull-requests: write jobs: deploy: runs-on: ubuntu-latest if: (github.event_name == 'schedule' && github.repository == 'ChrisTitusTech/winutil') || (github.event_name != 'schedule') steps: - name: Checkout 🛎️ - uses: actions/checkout@v4 + uses: actions/checkout@v6 + with: + persist-credentials: false - name: Generate Sponsors 💖 uses: JamesIves/github-sponsors-readme-action@v1 @@ -19,8 +22,19 @@ jobs: token: ${{ secrets.PAT }} file: 'README.md' - - name: Deploy to GitHub Pages 🚀 - uses: JamesIves/github-pages-deploy-action@v4 + - name: Create Pull Request 🚀 + id: cpr + uses: peter-evans/create-pull-request@v8 with: - branch: main - folder: '.' + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Update sponsors in README' + title: 'chore: Update Sponsors README' + body: 'Automated update of sponsors section' + branch: sponsors-update + delete-branch: true + labels: automated + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 5e1f2b0f40..ddeb6ce279 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -8,7 +8,7 @@ jobs: name: PS Script Analyzer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: lint uses: devblackops/github-action-psscriptanalyzer@master with: @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Pester run: | diff --git a/.gitignore b/.gitignore index 0818487574..8e4258aa0d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ # Configuration folder .vscode/ +.idea/ ### Visual Studio ### @@ -10,6 +11,9 @@ winutil.pdb +### Preprocessor Hashes ### +.preprocessor_hashes.json + ### Windows ### # Folder config file @@ -41,9 +45,18 @@ Microsoft.PowerShell.ConsoleHost.dll # General .DS_Store -microwin.log True test.ps1 winutil.ps1 -binary/ \ No newline at end of file +# temporary excludes for docs +.github/site/ + +binary/ + +.preprocessor_hashes.json + +# Hugo Files +docs/public/ +docs/.hugo_build.lock +docs/resources/ diff --git a/Compile.ps1 b/Compile.ps1 index e011b6b5e1..ba23652a04 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -1,7 +1,5 @@ param ( - [switch]$Debug, [switch]$Run, - [switch]$SkipPreprocessing, [string]$Arguments ) @@ -13,12 +11,8 @@ $OFS = "`r`n" $scriptname = "winutil.ps1" $workingdir = $PSScriptRoot -Push-Location -Set-Location $workingdir - # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) -$sync.PSScriptRoot = $workingdir $sync.configs = @{} function Update-Progress { @@ -37,33 +31,36 @@ function Update-Progress { Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent } -$header = @" -################################################################################################################ -### ### -### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ### -### ### -################################################################################################################ -"@ +Update-Progress "Pre-req: Running Preprocessor..." 0 -if (-NOT $SkipPreprocessing) { - Update-Progress "Pre-req: Running Preprocessor..." 0 +# Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script +$preprocessingFilePath = ".\tools\Invoke-Preprocessing.ps1" +. $preprocessingFilePath - # Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script - $preprocessingFilePath = ".\tools\Invoke-Preprocessing.ps1" - . $preprocessingFilePath +$excludedFiles = @() - $excludedFiles = @('.\.git\', '.\.gitignore', '.\.gitattributes', '.\.github\CODEOWNERS', '.\LICENSE', "$preprocessingFilePath", '*.png', '*.exe') - $msg = "Pre-req: Code Formatting" - Invoke-Preprocessing -WorkingDir "$workingdir" -ExcludedFiles $excludedFiles -ProgressStatusMessage $msg -ThrowExceptionOnEmptyFilesList -} +# Add directories only if they exist +if (Test-Path '.\.git\') { $excludedFiles += '.\.git\' } +if (Test-Path '.\binary\') { $excludedFiles += '.\binary\' } + +# Add files that should always be excluded +$excludedFiles += @( + '.\.gitignore', + '.\.gitattributes', + '.\.github\CODEOWNERS', + '.\LICENSE', + "$preprocessingFilePath", + '*.png', + '.\.preprocessor_hashes.json' +) + +$msg = "Pre-req: Code Formatting" +Invoke-Preprocessing -WorkingDir "$workingdir" -ExcludedFiles $excludedFiles -ProgressStatusMessage $msg # Create the script in memory. Update-Progress "Pre-req: Allocating Memory" 0 $script_content = [System.Collections.Generic.List[string]]::new() -Update-Progress "Adding: Header" 5 -$script_content.Add($header) - Update-Progress "Adding: Version" 10 $script_content.Add($(Get-Content "scripts\start.ps1").replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)")) @@ -106,19 +103,26 @@ $xaml '@ "@) +Update-Progress "Adding: autounattend.xml" 95 +$autounattendRaw = Get-Content "$workingdir\tools\autounattend.xml" -Raw +# Strip XML comments (, including multi-line) +$autounattendRaw = [regex]::Replace($autounattendRaw, '', '', [System.Text.RegularExpressions.RegexOptions]::Singleline) +# Drop blank lines and trim trailing whitespace per line +$autounattendXml = ($autounattendRaw -split "`r?`n" | + Where-Object { $_.Trim() -ne '' } | + ForEach-Object { $_.TrimEnd() }) -join "`r`n" +$script_content.Add(@" +`$WinUtilAutounattendXml = @' +$autounattendXml +'@ +"@) + $script_content.Add($(Get-Content "scripts\main.ps1")) -if ($Debug) { - Update-Progress "Writing debug files" 95 - $appXamlContent | Out-File -FilePath "xaml\inputApp.xaml" -Encoding ascii - $tweaksXamlContent | Out-File -FilePath "xaml\inputTweaks.xaml" -Encoding ascii - $featuresXamlContent | Out-File -FilePath "xaml\inputFeatures.xaml" -Encoding ascii -} else { - Update-Progress "Removing temporary files" 99 - Remove-Item "xaml\inputApp.xaml" -ErrorAction SilentlyContinue - Remove-Item "xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue - Remove-Item "xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue -} +Update-Progress "Removing temporary files" 99 +Remove-Item "xaml\inputApp.xaml" -ErrorAction SilentlyContinue +Remove-Item "xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue +Remove-Item "xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue Set-Content -Path "$scriptname" -Value ($script_content -join "`r`n") -Encoding ascii Write-Progress -Activity "Compiling" -Completed @@ -129,19 +133,12 @@ try { } catch { Write-Warning "Syntax Validation for 'winutil.ps1' has failed" Write-Host "$($Error[0])" -ForegroundColor Red - Pop-Location # Restore previous location before exiting... exit 1 } Write-Progress -Activity "Validating" -Completed if ($run) { - $script = "& '$workingdir\$scriptname' $Arguments" - - $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" - + Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass + .\Winutil.ps1 $Arguments break } -Pop-Location diff --git a/README.md b/README.md index 1f6e9f4f48..9896ad172d 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ [![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/winutil/releases/latest) ![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/winutil.ps1?label=Total%20Downloads&style=for-the-badge) [![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ) +[![Static Badge](https://img.shields.io/badge/Documentation-_?style=for-the-badge&logo=bookstack&color=grey)](https://winutil.christitus.com/) This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient. -![screen-install](./docs/assets/Title-Screen.png) +![screen-install](/docs/assets/images/Title-Screen.png) ## 💡 Usage @@ -34,16 +35,39 @@ irm "https://christitus.com/win" | iex irm "https://christitus.com/windev" | iex ``` -If you have Issues, refer to [Known Issues](https://christitustech.github.io/winutil/KnownIssues/) +If you have Issues, refer to [Known Issues](https://winutil.christitus.com/knownissues/) or [Create Issue](https://github.com/ChrisTitusTech/winutil/issues) ## 🎓 Documentation -### [WinUtil Official Documentation](https://christitustech.github.io/winutil/) +### [WinUtil Official Documentation](https://winutil.christitus.com/) ### [YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA) ### [ChrisTitus.com Article](https://christitus.com/windows-tool/) +## 🛠️ Build & Develop + +> [!NOTE] +> Winutil is a relatively large script, so it's split into multiple files which're combined into a single `.ps1` file using a custom compiler. This makes maintaining the project a lot easier. + +Get a copy of the source code. This can be done using GitHub UI (**Code** > **Download ZIP**), or by cloning (downloading) the repo using git. + +If git is installed, run the following commands under a PowerShell window to clone and move into the project's directory: +```ps1 +git clone --depth 1 "https://github.com/ChrisTitusTech/winutil.git" +cd winutil +``` + +To build the project, run the Compile Script under a PowerShell window (admin permissions IS NOT required): +```ps1 +.\Compile.ps1 +``` + +You'll see a new file named `winutil.ps1`, which was created by `Compile.ps1` script. Now you can run it as admin, and a new window will pop up. Enjoy your own compiled version of WinUtil :) + +> [!TIP] +> For more info on using WinUtil and how to develop for it, please consider reading [the Contribution Guidelines](https://winutil.christitus.com/contributing/). If you don't know where to start, or have questions, you can ask over on our [Discord Community Server](https://discord.gg/RUbZUZyByQ), and active project members will answer when they can. + ## 💖 Support - To morally and mentally support the project, make sure to leave a ⭐️! - EXE Wrapper for $10 @ https://www.cttstore.com/windows-toolbox @@ -52,7 +76,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. -User avatar: TriHyderaUser avatar: User avatar: User avatar: Mark AmosUser avatar: User avatar: Martin StockzellUser avatar: Jason A. DiegmuellerUser avatar: User avatar: RMSUser avatar: StefanUser avatar: PaulUser avatar: Dave JonesUser avatar: Anthony MendezUser avatar: ClaudemodsUser avatar: User avatar: MaxUser avatar: DursleyGuyUser avatar: Phillip WatersUser avatar: User avatar: +User avatar: User avatar: Martin StockzellUser avatar: Jason A. DiegmuellerUser avatar: RMSUser avatar: PaulUser avatar: Dave J  (WhamGeek)User avatar: Anthony MendezUser avatar: User avatar: DursleyGuyUser avatar: User avatar: Kiera MeredithUser avatar: Miguel DiazUser avatar: Andrew PUser avatar: Enzo Ferroni ## 🏅 Thanks to all Contributors Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. diff --git a/Test-WingetInstall.ps1 b/Test-WingetInstall.ps1 deleted file mode 100644 index ba300eacaa..0000000000 --- a/Test-WingetInstall.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -# Import the function (adjust the path according to your setup) -. "./functions/private/Get-WinUtilWingetLatest.ps1" - -# Set up Information stream to be visible -$InformationPreference = "Continue" - -Write-Host "Starting Winget installation test..." -ForegroundColor Cyan - -try { - # Test the function with verbose output - Write-Host "Attempting to run Get-WinUtilWingetLatest..." -ForegroundColor Cyan - Get-WinUtilWingetLatest -Verbose - - # Verify Winget is working - if (Get-Command winget -ErrorAction SilentlyContinue) { - Write-Host "Success! Winget is installed and accessible." -ForegroundColor Green - - # Display Winget version - Write-Host "`nWinget version:" -ForegroundColor Cyan - winget --version - } else { - Write-Host "Warning: Winget is installed but not accessible in the current session. You may need to restart your terminal." -ForegroundColor Yellow - } -} catch { - Write-Host "Error occurred during testing: $($_.Exception.Message)" -ForegroundColor Red - Write-Host "Stack Trace:" -ForegroundColor Red - $_.ScriptStackTrace -} diff --git a/config/applications.json b/config/applications.json index 800e1d73e9..fe7d031693 100644 --- a/config/applications.json +++ b/config/applications.json @@ -13,7 +13,8 @@ "content": "7-Zip", "description": "7-Zip is a free and open-source file archiver utility. It supports several compression formats and provides a high compression ratio, making it a popular choice for file compression.", "link": "https://www.7-zip.org/", - "winget": "7zip.7zip" + "winget": "7zip.7zip", + "foss": true }, "adobe": { "category": "Document", @@ -35,9 +36,19 @@ "category": "Document", "choco": "na", "content": "AFFiNE", - "description": "AFFiNE is an open source alternative to Notion. Write, draw, plan all at once. Selfhost it to sync across devices.", + "description": "AFFiNE is an open-source alternative to Notion. Write, draw, plan all at once. Self-host it to sync across devices.", "link": "https://affine.pro/", - "winget": "ToEverything.AFFiNE" + "winget": "ToEverything.AFFiNE", + "foss": true + }, + "ai-as-workspace": { + "category": "AI-Automation", + "choco": "na", + "content": "AI as Workspace", + "description": "Workspace-style AI chat client with multiple workspaces, plugins, and local-first design; open-source (BSD-3-Clause).", + "link": "https://aiaw.app/", + "winget": "NitroRCr.AIasWorkspace", + "foss": true }, "aimp": { "category": "Multimedia Tools", @@ -53,7 +64,8 @@ "content": "Alacritty Terminal", "description": "Alacritty is a fast, cross-platform, and GPU-accelerated terminal emulator. It is designed for performance and aims to be the fastest terminal emulator available.", "link": "https://alacritty.org/", - "winget": "Alacritty.Alacritty" + "winget": "Alacritty.Alacritty", + "foss": true }, "anaconda3": { "category": "Development", @@ -69,7 +81,8 @@ "content": "Angry IP Scanner", "description": "Angry IP Scanner is an open-source and cross-platform network scanner. It is used to scan IP addresses and ports, providing information about network connectivity.", "link": "https://angryip.org/", - "winget": "angryziber.AngryIPScanner" + "winget": "angryziber.AngryIPScanner", + "foss": true }, "anki": { "category": "Document", @@ -77,7 +90,8 @@ "content": "Anki", "description": "Anki is a flashcard application that helps you memorize information with intelligent spaced repetition.", "link": "https://apps.ankiweb.net/", - "winget": "Anki.Anki" + "winget": "Anki.Anki", + "foss": true }, "anydesk": { "category": "Utilities", @@ -85,7 +99,16 @@ "content": "AnyDesk", "description": "AnyDesk is a remote desktop software that enables users to access and control computers remotely. It is known for its fast connection and low latency.", "link": "https://anydesk.com/", - "winget": "AnyDeskSoftwareGmbH.AnyDesk" + "winget": "AnyDesk.AnyDesk" + }, + "anythingllm": { + "category": "AI-Automation", + "choco": "na", + "content": "AnythingLLM", + "description": "Desktop AI application for chat with documents (RAG) and agent workflows; offers a Windows installer and an open-source codebase.", + "link": "https://anythingllm.com/", + "winget": "na", + "foss": true }, "audacity": { "category": "Multimedia Tools", @@ -93,13 +116,14 @@ "content": "Audacity", "description": "Audacity is a free and open-source audio editing software known for its powerful recording and editing capabilities.", "link": "https://www.audacityteam.org/", - "winget": "Audacity.Audacity" + "winget": "Audacity.Audacity", + "foss": true }, "autoruns": { "category": "Microsoft Tools", "choco": "autoruns", "content": "Autoruns", - "description": "This utility shows you what programs are configured to run during system bootup or login", + "description": "This utility shows you what programs are configured to run during system bootup or login.", "link": "https://learn.microsoft.com/en-us/sysinternals/downloads/autoruns", "winget": "Microsoft.Sysinternals.Autoruns" }, @@ -117,7 +141,17 @@ "content": "AutoHotkey", "description": "AutoHotkey is a scripting language for Windows that allows users to create custom automation scripts and macros. It is often used for automating repetitive tasks and customizing keyboard shortcuts.", "link": "https://www.autohotkey.com/", - "winget": "AutoHotkey.AutoHotkey" + "winget": "AutoHotkey.AutoHotkey", + "foss": true + }, + "autoit": { + "category": "AI-Automation", + "choco": "autoit.install", + "content": "AutoIt", + "description": "Windows GUI automation scripting tool (freeware) used to automate keystrokes, mouse actions, and window/control interactions.", + "link": "https://www.autoitscript.com/site/autoit/", + "winget": "na", + "foss": false }, "azuredatastudio": { "category": "Microsoft Tools", @@ -133,7 +167,8 @@ "content": "Barrier", "description": "Barrier is an open-source software KVM (keyboard, video, and mouseswitch). It allows users to control multiple computers with a single keyboard and mouse, even if they have different operating systems.", "link": "https://github.com/debauchee/barrier", - "winget": "DebaucheeOpenSourceGroup.Barrier" + "winget": "DebaucheeOpenSourceGroup.Barrier", + "foss": true }, "bat": { "category": "Utilities", @@ -141,7 +176,16 @@ "content": "Bat (Cat)", "description": "Bat is a cat command clone with syntax highlighting. It provides a user-friendly and feature-rich alternative to the traditional cat command for viewing and concatenating files.", "link": "https://github.com/sharkdp/bat", - "winget": "sharkdp.bat" + "winget": "sharkdp.bat", + "foss": true + }, + "beeper": { + "category": "Communications", + "choco": "na", + "content": "Beeper", + "description": "All your chats in one app.", + "link": "https://www.beeper.com/", + "winget": "Beeper.Beeper" }, "bitwarden": { "category": "Utilities", @@ -149,15 +193,17 @@ "content": "Bitwarden", "description": "Bitwarden is an open-source password management solution. It allows users to store and manage their passwords in a secure and encrypted vault, accessible across multiple devices.", "link": "https://bitwarden.com/", - "winget": "Bitwarden.Bitwarden" + "winget": "Bitwarden.Bitwarden", + "foss": true }, "bleachbit": { "category": "Utilities", "choco": "bleachbit", "content": "BleachBit", - "description": "Clean Your System and Free Disk Space", + "description": "Clean Your System and Free Disk Space.", "link": "https://www.bleachbit.org/", - "winget": "BleachBit.BleachBit" + "winget": "BleachBit.BleachBit", + "foss": true }, "blender": { "category": "Multimedia Tools", @@ -165,7 +211,8 @@ "content": "Blender (3D Graphics)", "description": "Blender is a powerful open-source 3D creation suite, offering modeling, sculpting, animation, and rendering tools.", "link": "https://www.blender.org/", - "winget": "BlenderFoundation.Blender" + "winget": "BlenderFoundation.Blender", + "foss": true }, "brave": { "category": "Browsers", @@ -173,7 +220,8 @@ "content": "Brave", "description": "Brave is a privacy-focused web browser that blocks ads and trackers, offering a faster and safer browsing experience.", "link": "https://www.brave.com", - "winget": "Brave.Brave" + "winget": "Brave.Brave", + "foss": true }, "bulkcrapuninstaller": { "category": "Utilities", @@ -181,7 +229,8 @@ "content": "Bulk Crap Uninstaller", "description": "Bulk Crap Uninstaller is a free and open-source uninstaller utility for Windows. It helps users remove unwanted programs and clean up their system by uninstalling multiple applications at once.", "link": "https://www.bcuninstaller.com/", - "winget": "Klocman.BulkCrapUninstaller" + "winget": "Klocman.BulkCrapUninstaller", + "foss": true }, "bulkrenameutility": { "category": "Utilities", @@ -191,6 +240,15 @@ "link": "https://www.bulkrenameutility.co.uk", "winget": "TGRMNSoftware.BulkRenameUtility" }, + "buzz": { + "category": "AI-Automation", + "choco": "na", + "content": "Buzz", + "description": "Offline audio transcription and translation desktop app powered by Whisper, packaged for Windows and available via WinGet.", + "link": "https://github.com/chidiwilliams/buzz", + "winget": "ChidiWilliams.Buzz", + "foss": true + }, "AdvancedRenamer": { "category": "Utilities", "choco": "advanced-renamer", @@ -199,13 +257,31 @@ "link": "https://www.advancedrenamer.com/", "winget": "HulubuluSoftware.AdvancedRenamer" }, + "cryptomator": { + "category": "Utilities", + "choco": "cryptomator", + "content": "Cryptomator", + "description": "Cryptomator for Windows, macOS, and Linux: Secure client-side encryption for your cloud storage, ensuring privacy and control over your data.", + "link": "https://github.com/cryptomator/cryptomator/", + "winget": "Cryptomator.Cryptomator", + "foss": true + }, + "citrixworkspaceapp": { + "category": "Utilities", + "choco": "citrix-workspace", + "content": "Citrix Workspace app", + "description": "A secure, unified client application that provides instant access to virtual desktops, SaaS, web, and Windows apps from any device (Windows, macOS, Linux, iOS, Android) or browser.", + "link": "https://www.citrix.com/downloads/workspace-app/", + "winget": "Citrix.Workspace" + }, "calibre": { "category": "Document", "choco": "calibre", "content": "Calibre", "description": "Calibre is a powerful and easy-to-use e-book manager, viewer, and converter.", "link": "https://calibre-ebook.com/", - "winget": "calibre.calibre" + "winget": "calibre.calibre", + "foss": true }, "carnac": { "category": "Utilities", @@ -213,7 +289,8 @@ "content": "Carnac", "description": "Carnac is a keystroke visualizer for Windows. It displays keystrokes in an overlay, making it useful for presentations, tutorials, and live demonstrations.", "link": "https://carnackeys.com/", - "winget": "code52.Carnac" + "winget": "code52.Carnac", + "foss": true }, "cemu": { "category": "Games", @@ -221,7 +298,16 @@ "content": "Cemu", "description": "Cemu is a highly experimental software to emulate Wii U applications on PC.", "link": "https://cemu.info/", - "winget": "Cemu.Cemu" + "winget": "Cemu.Cemu", + "foss": true + }, + "chatgpt": { + "category": "AI-Automation", + "choco": "na", + "content": "ChatGPT", + "description": "ChatGPT desktop app provides direct access to OpenAI's conversational AI assistant for writing, analysis, and productivity tasks.", + "link": "https://openai.com/chatgpt/desktop/", + "winget": "OpenAI.ChatGPT" }, "chatterino": { "category": "Communications", @@ -229,7 +315,8 @@ "content": "Chatterino", "description": "Chatterino is a chat client for Twitch chat that offers a clean and customizable interface for a better streaming experience.", "link": "https://www.chatterino.com/", - "winget": "ChatterinoTeam.Chatterino" + "winget": "ChatterinoTeam.Chatterino", + "foss": true }, "chrome": { "category": "Browsers", @@ -245,15 +332,26 @@ "content": "Chromium", "description": "Chromium is the open-source project that serves as the foundation for various web browsers, including Chrome.", "link": "https://github.com/Hibbiki/chromium-win64", - "winget": "Hibbiki.Chromium" - }, - "arc": { - "category": "Browsers", - "choco": "na", - "content": "Arc", - "description": "Arc is a Chromium based browser, known for it's clean and modern design.", - "link": "https://arc.net/", - "winget": "TheBrowserCompany.Arc" + "winget": "Hibbiki.Chromium", + "foss": true + }, + "claude": { + "category": "AI-Automation", + "choco": "claude", + "content": "Claude", + "description": "Anthropic's Claude desktop application for Windows, designed for focused AI-assisted work and chat.", + "link": "https://claude.ai/", + "winget": "Anthropic.Claude", + "foss": false + }, + "claude-code": { + "category": "AI-Automation", + "choco": "claude-code", + "content": "Claude Code", + "description": "Anthropic's agentic coding tool for the terminal/IDE workflows, available on Windows and distributed via WinGet.", + "link": "https://code.claude.com/", + "winget": "Anthropic.ClaudeCode", + "foss": false }, "clementine": { "category": "Multimedia Tools", @@ -261,15 +359,17 @@ "content": "Clementine", "description": "Clementine is a modern music player and library organizer, supporting various audio formats and online radio services.", "link": "https://www.clementine-player.org/", - "winget": "Clementine.Clementine" + "winget": "Clementine.Clementine", + "foss": true }, "clink": { "category": "Development", "choco": "clink", "content": "Clink", - "description": "Clink is a powerful Bash-compatible command-line interface (CLIenhancement for Windows, adding features like syntax highlighting and improved history).", + "description": "Clink is a powerful Bash-compatible command-line interface (CLI enhancement for Windows, adding features like syntax highlighting and improved history).", "link": "https://mridgers.github.io/clink/", - "winget": "chrisant996.Clink" + "winget": "chrisant996.Clink", + "foss": true }, "clonehero": { "category": "Games", @@ -285,7 +385,8 @@ "content": "CMake", "description": "CMake is an open-source, cross-platform family of tools designed to build, test and package software.", "link": "https://cmake.org/", - "winget": "Kitware.CMake" + "winget": "Kitware.CMake", + "foss": true }, "copyq": { "category": "Utilities", @@ -293,7 +394,8 @@ "content": "CopyQ (Clipboard Manager)", "description": "CopyQ is a clipboard manager with advanced features, allowing you to store, edit, and retrieve clipboard history.", "link": "https://copyq.readthedocs.io/", - "winget": "hluk.CopyQ" + "winget": "hluk.CopyQ", + "foss": true }, "cpuz": { "category": "Utilities", @@ -309,7 +411,8 @@ "content": "Crystal Disk Info", "description": "Crystal Disk Info is a disk health monitoring tool that provides information about the status and performance of hard drives. It helps users anticipate potential issues and monitor drive health.", "link": "https://crystalmark.info/en/software/crystaldiskinfo/", - "winget": "CrystalDewWorld.CrystalDiskInfo" + "winget": "CrystalDewWorld.CrystalDiskInfo", + "foss": true }, "capframex": { "category": "Utilities", @@ -317,7 +420,8 @@ "content": "CapFrameX", "description": "Frametimes capture and analysis tool based on Intel's PresentMon. Overlay provided by Rivatuner Statistics Server.", "link": "https://www.capframex.com/", - "winget": "CXWorld.CapFrameX" + "winget": "CXWorld.CapFrameX", + "foss": true }, "crystaldiskmark": { "category": "Utilities", @@ -325,7 +429,17 @@ "content": "Crystal Disk Mark", "description": "Crystal Disk Mark is a disk benchmarking tool that measures the read and write speeds of storage devices. It helps users assess the performance of their hard drives and SSDs.", "link": "https://crystalmark.info/en/software/crystaldiskmark/", - "winget": "CrystalDewWorld.CrystalDiskMark" + "winget": "CrystalDewWorld.CrystalDiskMark", + "foss": true + }, + "cursor": { + "category": "Development", + "choco": "cursoride", + "content": "Cursor", + "description": "AI-powered code editor (VS Code-based) with agentic coding features and integrated AI assistance for development workflows.", + "link": "https://cursor.com/", + "winget": "Anysphere.Cursor", + "foss": false }, "darktable": { "category": "Multimedia Tools", @@ -333,7 +447,8 @@ "content": "darktable", "description": "Open-source photo editing tool, offering an intuitive interface, advanced editing capabilities, and a non-destructive workflow for seamless image enhancement.", "link": "https://www.darktable.org/install/", - "winget": "darktable.darktable" + "winget": "darktable.darktable", + "foss": true }, "DaxStudio": { "category": "Development", @@ -341,7 +456,8 @@ "content": "DaxStudio", "description": "DAX (Data Analysis eXpressions) Studio is the ultimate tool for executing and analyzing DAX queries against Microsoft Tabular models.", "link": "https://daxstudio.org/", - "winget": "DaxStudio.DaxStudio" + "winget": "DaxStudio.DaxStudio", + "foss": true }, "ddu": { "category": "Utilities", @@ -349,7 +465,16 @@ "content": "Display Driver Uninstaller", "description": "Display Driver Uninstaller (DDU) is a tool for completely uninstalling graphics drivers from NVIDIA, AMD, and Intel. It is useful for troubleshooting graphics driver-related issues.", "link": "https://www.wagnardsoft.com/display-driver-uninstaller-DDU-", - "winget": "ddu" + "winget": "Wagnardsoft.DisplayDriverUninstaller" + }, + "deepl": { + "category": "AI-Automation", + "choco": "deepl", + "content": "DeepL", + "description": "DeepL desktop translation and writing assistant for Windows, including shortcuts and in-app writing improvement features.", + "link": "https://www.deepl.com/en/windows-app", + "winget": "DeepL.DeepL", + "foss": false }, "deluge": { "category": "Utilities", @@ -357,7 +482,8 @@ "content": "Deluge", "description": "Deluge is a free and open-source BitTorrent client. It features a user-friendly interface, support for plugins, and the ability to manage torrents remotely.", "link": "https://deluge-torrent.org/", - "winget": "DelugeTeam.Deluge" + "winget": "DelugeTeam.Deluge", + "foss": true }, "devtoys": { "category": "Utilities", @@ -365,7 +491,8 @@ "content": "DevToys", "description": "DevToys is a collection of development-related utilities and tools for Windows. It includes tools for file management, code formatting, and productivity enhancements for developers.", "link": "https://devtoys.app/", - "winget": "DevToys-app.DevToys" + "winget": "DevToys-app.DevToys", + "foss": true }, "digikam": { "category": "Multimedia Tools", @@ -373,7 +500,8 @@ "content": "digiKam", "description": "digiKam is an advanced open-source photo management software with features for organizing, editing, and sharing photos.", "link": "https://www.digikam.org/", - "winget": "KDE.digikam" + "winget": "KDE.digikam", + "foss": true }, "discord": { "category": "Communications", @@ -383,13 +511,40 @@ "link": "https://discord.com/", "winget": "Discord.Discord" }, + "dismtools": { + "category": "Microsoft Tools", + "choco": "na", + "content": "DISMTools", + "description": "DISMTools is a fast, customizable GUI for the DISM utility, supporting Windows images from Windows 7 onward. It handles installations on any drive, offers project support, and lets users tweak settings like color modes, language, and DISM versions; powered by both native DISM and a managed DISM API.", + "link": "https://github.com/CodingWonders/DISMTools", + "winget": "CodingWondersSoftware.DISMTools.Stable", + "foss": true + }, + "ntlite": { + "category": "Microsoft Tools", + "choco": "ntlite-free", + "content": "NTLite", + "description": "Integrate updates, drivers, automate Windows and application setup, speedup Windows deployment process and have it all set for the next time.", + "link": "https://ntlite.com", + "winget": "Nlitesoft.NTLite" + }, + "dorion": { + "category": "Communications", + "choco": "na", + "content": "Dorion", + "description": "Tiny alternative Discord client with a smaller footprint, snappier startup, themes, plugins and more!", + "link": "https://github.com/SpikeHD/Dorion", + "winget": "SpikeHD.Dorion", + "foss": true + }, "ditto": { "category": "Utilities", "choco": "ditto", "content": "Ditto", - "description": "Ditto is an extension to the standard windows clipboard.", + "description": "Ditto is an extension to the standard Windows Clipboard.", "link": "https://github.com/sabrogden/Ditto", - "winget": "Ditto.Ditto" + "winget": "Ditto.Ditto", + "foss": true }, "dockerdesktop": { "category": "Development", @@ -447,13 +602,22 @@ "link": "https://dotnet.microsoft.com/download/dotnet/9.0", "winget": "Microsoft.DotNet.DesktopRuntime.9" }, + "dotnet10": { + "category": "Microsoft Tools", + "choco": "dotnet-10.0-runtime", + "content": ".NET Desktop Runtime 10", + "description": ".NET Desktop Runtime 10 is a runtime environment required for running applications developed with .NET 10.", + "link": "https://dotnet.microsoft.com/download/dotnet/10.0", + "winget": "Microsoft.DotNet.DesktopRuntime.10" + }, "dmt": { "winget": "GNE.DualMonitorTools", "choco": "dual-monitor-tools", "category": "Utilities", "content": "Dual Monitor Tools", "link": "https://dualmonitortool.sourceforge.net/", - "description": "Dual Monitor Tools (DMT) is a FOSS app that allows you to customize the handling of multiple monitors. Useful for fullscreen games and apps that handle a second monitor poorly and can improve your workflow." + "description": "Dual Monitor Tools (DMT) is a FOSS app that allows you to customize the handling of multiple monitors. Useful for fullscreen games and apps that handle a second monitor poorly and can improve your workflow.", + "foss": true }, "duplicati": { "category": "Utilities", @@ -461,7 +625,16 @@ "content": "Duplicati", "description": "Duplicati is an open-source backup solution that supports encrypted, compressed, and incremental backups. It is designed to securely store data on cloud storage services.", "link": "https://www.duplicati.com/", - "winget": "Duplicati.Duplicati" + "winget": "Duplicati.Duplicati", + "foss": true + }, + "ecm": { + "category": "Utilities", + "choco": "ecm", + "content": "Easy Context Menu", + "description": "Easy Context Menu (ECM) lets you add a variety of useful commands and tweaks to the Desktop, My Computer, Drives, File and Folder right-click context menus. This enables you to access the most used Windows components quickly and easily. Simply check the box next to the items you wish to add. Once added, just right click and the select the component shortcut to launch it. Easy Context Menu is both portable and freeware.", + "link": "https://www.sordum.org/7615/easy-context-menu-v1-6/", + "winget": "sordum.EasyContextMenu" }, "eaapp": { "category": "Games", @@ -477,7 +650,8 @@ "content": "EarTrumpet (Audio)", "description": "EarTrumpet is an audio control app for Windows, providing a simple and intuitive interface for managing sound settings.", "link": "https://eartrumpet.app/", - "winget": "File-New-Project.EarTrumpet" + "winget": "File-New-Project.EarTrumpet", + "foss": true }, "edge": { "category": "Browsers", @@ -501,7 +675,17 @@ "content": "Emulation Station", "description": "Emulation Station is a graphical and themeable emulator front-end that allows you to access all your favorite games in one place.", "link": "https://emulationstation.org/", - "winget": "Emulationstation.Emulationstation" + "winget": "Emulationstation.Emulationstation", + "foss": true + }, + "enteauth": { + "category": "Utilities", + "choco": "ente-auth", + "content": "Ente Auth", + "description": "Ente Auth is a free, cross-platform, end-to-end encrypted authenticator app.", + "link": "https://ente.io/auth/", + "winget": "ente-io.auth-desktop", + "foss": true }, "epicgames": { "category": "Games", @@ -523,17 +707,19 @@ "category": "Utilities", "choco": "espanso", "content": "Espanso", - "description": "Cross-platform and open-source Text Expander written in Rust", + "description": "Cross-platform and open-source Text Expander written in Rust.", "link": "https://espanso.org/", - "winget": "Espanso.Espanso" + "winget": "Espanso.Espanso", + "foss": true }, - "etcher": { + "ffmpeg": { "category": "Utilities", - "choco": "etcher", - "content": "Etcher USB Creator", - "description": "Etcher is a powerful tool for creating bootable USB drives with ease.", - "link": "https://www.balena.io/etcher/", - "winget": "Balena.Etcher" + "choco": "na", + "content": "FFmpeg Batch AV Converter", + "description": "FFmpeg Batch AV Converter is a universal audio and video encoder, that allows to use the full potential of ffmpeg command line with a few mouse clicks in a convenient GUI with drag and drop, progress information.", + "link": "https://ffmpeg-batch.sourceforge.io/", + "winget": "eibol.FFmpegBatchAVConverter", + "foss": true }, "falkon": { "category": "Browsers", @@ -541,15 +727,17 @@ "content": "Falkon", "description": "Falkon is a lightweight and fast web browser with a focus on user privacy and efficiency.", "link": "https://www.falkon.org/", - "winget": "KDE.Falkon" + "winget": "KDE.Falkon", + "foss": true }, "fastfetch": { "category": "Utilities", "choco": "na", "content": "Fastfetch", - "description": "Fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way", + "description": "Fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way.", "link": "https://github.com/fastfetch-cli/fastfetch/", - "winget": "Fastfetch-cli.Fastfetch" + "winget": "Fastfetch-cli.Fastfetch", + "foss": true }, "ferdium": { "category": "Communications", @@ -557,13 +745,14 @@ "content": "Ferdium", "description": "Ferdium is a messaging application that combines multiple messaging services into a single app for easy management.", "link": "https://ferdium.org/", - "winget": "Ferdium.Ferdium" + "winget": "Ferdium.Ferdium", + "foss": true }, - "ffmpeg": { + "ffmpeg-full": { "category": "Multimedia Tools", "choco": "ffmpeg-full", "content": "FFmpeg (full)", - "description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats.", + "description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats. | Note: FFmpeg can not be uninstalled using WinGet.", "link": "https://ffmpeg.org/", "winget": "Gyan.FFmpeg" }, @@ -571,9 +760,10 @@ "category": "Utilities", "choco": "file-converter", "content": "File-Converter", - "description": "File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in windows explorer.", + "description": "File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in Windows Explorer.", "link": "https://file-converter.io/", - "winget": "AdrienAllard.FileConverter" + "winget": "AdrienAllard.FileConverter", + "foss": true }, "files": { "category": "Utilities", @@ -581,7 +771,8 @@ "content": "Files", "description": "Alternative file explorer.", "link": "https://github.com/files-community/Files", - "winget": "na" + "winget": "na", + "foss": true }, "firealpaca": { "category": "Multimedia Tools", @@ -597,7 +788,8 @@ "content": "Firefox", "description": "Mozilla Firefox is an open-source web browser known for its customization options, privacy features, and extensions.", "link": "https://www.mozilla.org/en-US/firefox/new/", - "winget": "Mozilla.Firefox" + "winget": "Mozilla.Firefox", + "foss": true }, "firefoxesr": { "category": "Browsers", @@ -605,7 +797,8 @@ "content": "Firefox ESR", "description": "Mozilla Firefox is an open-source web browser known for its customization options, privacy features, and extensions. Firefox ESR (Extended Support Release) receives major updates every 42 weeks with minor updates such as crash fixes, security fixes and policy updates as needed, but at least every four weeks.", "link": "https://www.mozilla.org/en-US/firefox/enterprise/", - "winget": "Mozilla.Firefox.ESR" + "winget": "Mozilla.Firefox.ESR", + "foss": true }, "flameshot": { "category": "Multimedia Tools", @@ -613,13 +806,14 @@ "content": "Flameshot (Screenshots)", "description": "Flameshot is a powerful yet simple to use screenshot software, offering annotation and editing features.", "link": "https://flameshot.org/", - "winget": "Flameshot.Flameshot" + "winget": "Flameshot.Flameshot", + "foss": true }, "lightshot": { "category": "Multimedia Tools", "choco": "lightshot", "content": "Lightshot (Screenshots)", - "description": "Ligthshot is an Easy-to-use, light-weight screenshot software tool, where you can optionally edit your screenshots using different tools, share them via Internet and/or save to disk, and customize the available options.", + "description": "Lightshot is an easy-to-use, light-weight screenshot software tool, where you can optionally edit your screenshots using different tools, share them via Internet and/or save to disk, and customize the available options.", "link": "https://app.prntscr.com/", "winget": "Skillbrains.Lightshot" }, @@ -629,7 +823,8 @@ "content": "Floorp", "description": "Floorp is an open-source web browser project that aims to provide a simple and fast browsing experience.", "link": "https://floorp.app/", - "winget": "Ablaze.Floorp" + "winget": "Ablaze.Floorp", + "foss": true }, "flow": { "category": "Utilities", @@ -637,7 +832,8 @@ "content": "Flow launcher", "description": "Keystroke launcher for Windows to search, manage and launch files, folders bookmarks, websites and more.", "link": "https://www.flowlauncher.com/", - "winget": "Flow-Launcher.Flow-Launcher" + "winget": "Flow-Launcher.Flow-Launcher", + "foss": true }, "flux": { "category": "Utilities", @@ -677,23 +873,26 @@ "content": "FreeCAD", "description": "FreeCAD is a parametric 3D CAD modeler, designed for product design and engineering tasks, with a focus on flexibility and extensibility.", "link": "https://www.freecadweb.org/", - "winget": "FreeCAD.FreeCAD" + "winget": "FreeCAD.FreeCAD", + "foss": true }, "fxsound": { "category": "Multimedia Tools", "choco": "fxsound", "content": "FxSound", - "description": "FxSound is a cutting-edge audio enhancement software that elevates your listening experience across all media.", + "description": "FxSound is free open-source software to boost sound quality, volume, and bass. Including an equalizer, effects, and presets for customized audio.", "link": "https://www.fxsound.com/", - "winget": "FxSoundLLC.FxSound" + "winget": "FxSound.FxSound", + "foss": true }, "fzf": { "category": "Utilities", "choco": "fzf", "content": "Fzf", - "description": "A command-line fuzzy finder", + "description": "A command-line fuzzy finder.", "link": "https://github.com/junegunn/fzf/", - "winget": "junegunn.fzf" + "winget": "junegunn.fzf", + "foss": true }, "geforcenow": { "category": "Games", @@ -709,7 +908,8 @@ "content": "GIMP (Image Editor)", "description": "GIMP is a versatile open-source raster graphics editor used for tasks such as photo retouching, image editing, and image composition.", "link": "https://www.gimp.org/", - "winget": "GIMP.GIMP" + "winget": "GIMP.GIMP.3", + "foss": true }, "git": { "category": "Development", @@ -717,7 +917,8 @@ "content": "Git", "description": "Git is a distributed version control system widely used for tracking changes in source code during software development.", "link": "https://git-scm.com/", - "winget": "Git.Git" + "winget": "Git.Git", + "foss": true }, "gitbutler": { "category": "Development", @@ -741,7 +942,17 @@ "content": "GitHub CLI", "description": "GitHub CLI is a command-line tool that simplifies working with GitHub directly from the terminal.", "link": "https://cli.github.com/", - "winget": "GitHub.cli" + "winget": "GitHub.cli", + "foss": true + }, + "github-copilot-cli": { + "category": "AI-Automation", + "choco": "na", + "content": "GitHub Copilot CLI", + "description": "GitHub Copilot experience for the command line: natural-language assistance for commands and development tasks; distributed via WinGet.", + "link": "https://github.com/github/copilot-cli", + "winget": "GitHub.Copilot", + "foss": false }, "githubdesktop": { "category": "Development", @@ -749,7 +960,8 @@ "content": "GitHub Desktop", "description": "GitHub Desktop is a visual Git client that simplifies collaboration on GitHub repositories with an easy-to-use interface.", "link": "https://desktop.github.com/", - "winget": "GitHub.GitHubDesktop" + "winget": "GitHub.GitHubDesktop", + "foss": true }, "gitkrakenclient": { "category": "Development", @@ -773,7 +985,8 @@ "content": "Godot Engine", "description": "Godot Engine is a free, open-source 2D and 3D game engine with a focus on usability and flexibility.", "link": "https://godotengine.org/", - "winget": "GodotEngine.GodotEngine" + "winget": "GodotEngine.GodotEngine", + "foss": true }, "gog": { "category": "Games", @@ -789,7 +1002,8 @@ "content": "Gitify", "description": "GitHub notifications on your menu bar.", "link": "https://www.gitify.io/", - "winget": "Gitify.Gitify" + "winget": "Gitify.Gitify", + "foss": true }, "golang": { "category": "Development", @@ -797,16 +1011,26 @@ "content": "Go", "description": "Go (or Golang) is a statically typed, compiled programming language designed for simplicity, reliability, and efficiency.", "link": "https://go.dev/", - "winget": "GoLang.Go" + "winget": "GoLang.Go", + "foss": true }, "googledrive": { "category": "Utilities", "choco": "googledrive", "content": "Google Drive", - "description": "File syncing across devices all tied to your google account", + "description": "File syncing across devices all tied to your Google account.", "link": "https://www.google.com/drive/", "winget": "Google.GoogleDrive" }, + "gpt4all": { + "category": "AI-Automation", + "choco": "gpt4all", + "content": "GPT4All", + "description": "Open-source desktop application to run LLMs locally with an emphasis on privacy (MIT-licensed codebase).", + "link": "https://nomic.ai/gpt4all", + "winget": "nomic.gpt4all", + "foss": true + }, "gpuz": { "category": "Utilities", "choco": "gpu-z", @@ -821,7 +1045,8 @@ "content": "Greenshot (Screenshots)", "description": "Greenshot is a light-weight screenshot software tool with built-in image editor and customizable capture options.", "link": "https://getgreenshot.org/", - "winget": "Greenshot.Greenshot" + "winget": "Greenshot.Greenshot", + "foss": true }, "gsudo": { "category": "Utilities", @@ -831,13 +1056,14 @@ "link": "https://gerardog.github.io/gsudo/", "winget": "gerardog.gsudo" }, - "guilded": { - "category": "Communications", - "choco": "na", - "content": "Guilded", - "description": "Guilded is a communication and productivity platform that includes chat, scheduling, and collaborative tools for gaming and communities.", - "link": "https://www.guilded.gg/", - "winget": "Guilded.Guilded" + "hugo": { + "category": "Utilities", + "choco": "hugo-extended", + "content": "Hugo", + "description": "The world’s fastest framework for building websites.", + "link": "https://github.com/gohugoio/hugo/", + "winget": "Hugo.Hugo.Extended", + "foss": true }, "handbrake": { "category": "Multimedia Tools", @@ -845,7 +1071,8 @@ "content": "HandBrake", "description": "HandBrake is an open-source video transcoder, allowing you to convert video from nearly any format to a selection of widely supported codecs.", "link": "https://handbrake.fr/", - "winget": "HandBrake.HandBrake" + "winget": "HandBrake.HandBrake", + "foss": true }, "harmonoid": { "category": "Multimedia Tools", @@ -853,7 +1080,8 @@ "content": "Harmonoid", "description": "Plays and manages your music library. Looks beautiful and juicy. Playlists, visuals, synced lyrics, pitch shift, volume boost and more.", "link": "https://harmonoid.com/", - "winget": "Harmonoid.Harmonoid" + "winget": "Harmonoid.Harmonoid", + "foss": true }, "heidisql": { "category": "Pro Tools", @@ -861,15 +1089,17 @@ "content": "HeidiSQL", "description": "HeidiSQL is a powerful and easy-to-use client for MySQL, MariaDB, Microsoft SQL Server, and PostgreSQL databases. It provides tools for database management and development.", "link": "https://www.heidisql.com/", - "winget": "HeidiSQL.HeidiSQL" + "winget": "HeidiSQL.HeidiSQL", + "foss": true }, "helix": { "category": "Development", "choco": "helix", "content": "Helix", - "description": "Helix is a neovim alternative built in rust.", + "description": "Helix is a neovim alternative built in Rust.", "link": "https://helix-editor.com/", - "winget": "Helix.Helix" + "winget": "Helix.Helix", + "foss": true }, "heroiclauncher": { "category": "Games", @@ -877,7 +1107,8 @@ "content": "Heroic Games Launcher", "description": "Heroic Games Launcher is an open-source alternative game launcher for Epic Games Store.", "link": "https://heroicgameslauncher.com/", - "winget": "HeroicGamesLauncher.HeroicGamesLauncher" + "winget": "HeroicGamesLauncher.HeroicGamesLauncher", + "foss": true }, "hexchat": { "category": "Communications", @@ -885,7 +1116,8 @@ "content": "Hexchat", "description": "HexChat is a free, open-source IRC (Internet Relay Chat) client with a graphical interface for easy communication.", "link": "https://hexchat.github.io/", - "winget": "HexChat.HexChat" + "winget": "HexChat.HexChat", + "foss": true }, "hwinfo": { "category": "Utilities", @@ -903,13 +1135,23 @@ "link": "https://www.cpuid.com/softwares/hwmonitor.html", "winget": "CPUID.HWMonitor" }, + "imhex": { + "category": "Development", + "choco": "na", + "content": "ImHex (Hex Editor)", + "description": "A modern, featureful Hex Editor for Reverse Engineers and Developers.", + "link": "https://imhex.werwolv.net/", + "winget": "WerWolv.ImHex", + "foss": true + }, "imageglass": { "category": "Multimedia Tools", "choco": "imageglass", "content": "ImageGlass (Image Viewer)", "description": "ImageGlass is a versatile image viewer with support for various image formats and a focus on simplicity and speed.", "link": "https://imageglass.org/", - "winget": "DuongDieuPhap.ImageGlass" + "winget": "DuongDieuPhap.ImageGlass", + "foss": true }, "imgburn": { "category": "Multimedia Tools", @@ -925,7 +1167,8 @@ "content": "Inkscape", "description": "Inkscape is a powerful open-source vector graphics editor, suitable for tasks such as illustrations, icons, logos, and more.", "link": "https://inkscape.org/", - "winget": "Inkscape.Inkscape" + "winget": "Inkscape.Inkscape", + "foss": true }, "itch": { "category": "Games", @@ -933,7 +1176,8 @@ "content": "Itch.io", "description": "Itch.io is a digital distribution platform for indie games and creative projects.", "link": "https://itch.io/", - "winget": "ItchIo.Itch" + "winget": "ItchIo.Itch", + "foss": true }, "itunes": { "category": "Multimedia Tools", @@ -949,7 +1193,17 @@ "content": "Jami", "description": "Jami is a secure and privacy-focused communication platform that offers audio and video calls, messaging, and file sharing.", "link": "https://jami.net/", - "winget": "SFLinux.Jami" + "winget": "SFLinux.Jami", + "foss": true + }, + "jan": { + "category": "AI-Automation", + "choco": "jan", + "content": "Jan", + "description": "Open-source ChatGPT alternative that runs on your computer (offline-first desktop AI assistant / local model runner).", + "link": "https://jan.ai/", + "winget": "Jan.Jan", + "foss": true }, "java8": { "category": "Development", @@ -957,7 +1211,8 @@ "content": "Amazon Corretto 8 (LTS)", "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "link": "https://aws.amazon.com/corretto", - "winget": "Amazon.Corretto.8.JDK" + "winget": "Amazon.Corretto.8.JDK", + "foss": true }, "java11": { "category": "Development", @@ -965,7 +1220,8 @@ "content": "Amazon Corretto 11 (LTS)", "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "link": "https://aws.amazon.com/corretto", - "winget": "Amazon.Corretto.11.JDK" + "winget": "Amazon.Corretto.11.JDK", + "foss": true }, "java17": { "category": "Development", @@ -973,7 +1229,8 @@ "content": "Amazon Corretto 17 (LTS)", "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "link": "https://aws.amazon.com/corretto", - "winget": "Amazon.Corretto.17.JDK" + "winget": "Amazon.Corretto.17.JDK", + "foss": true }, "java21": { "category": "Development", @@ -981,7 +1238,17 @@ "content": "Amazon Corretto 21 (LTS)", "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", "link": "https://aws.amazon.com/corretto", - "winget": "Amazon.Corretto.21.JDK" + "winget": "Amazon.Corretto.21.JDK", + "foss": true + }, + "java25": { + "category": "Development", + "choco": "corretto25jdk", + "content": "Amazon Corretto 25 (LTS)", + "description": "Amazon Corretto is a no-cost, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).", + "link": "https://aws.amazon.com/corretto", + "winget": "Amazon.Corretto.25.JDK", + "foss": true }, "jdownloader": { "category": "Utilities", @@ -997,7 +1264,8 @@ "content": "Jellyfin Media Player", "description": "Jellyfin Media Player is a client application for the Jellyfin media server, providing access to your media library.", "link": "https://github.com/jellyfin/jellyfin-media-player", - "winget": "Jellyfin.JellyfinMediaPlayer" + "winget": "Jellyfin.JellyfinMediaPlayer", + "foss": true }, "jellyfinserver": { "category": "Multimedia Tools", @@ -1005,7 +1273,8 @@ "content": "Jellyfin Server", "description": "Jellyfin Server is an open-source media server software, allowing you to organize and stream your media library.", "link": "https://jellyfin.org/", - "winget": "Jellyfin.Server" + "winget": "Jellyfin.Server", + "foss": true }, "jetbrains": { "category": "Development", @@ -1021,15 +1290,17 @@ "content": "Joplin (FOSS Notes)", "description": "Joplin is an open-source note-taking and to-do application with synchronization capabilities.", "link": "https://joplinapp.org/", - "winget": "Joplin.Joplin" + "winget": "Joplin.Joplin", + "foss": true }, "jpegview": { "category": "Utilities", "choco": "jpegview", "content": "JPEG View", - "description": "JPEGView is a lean, fast and highly configurable viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF, JXL, HEIC, HEIF, AVIF and TIFF images with a minimal GUI", + "description": "JPEGView is a lean, fast and highly configurable viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF, JXL, HEIC, HEIF, AVIF and TIFF images with a minimal GUI.", "link": "https://github.com/sylikc/jpegview", - "winget": "sylikc.JPEGView" + "winget": "sylikc.JPEGView", + "foss": true }, "kdeconnect": { "category": "Utilities", @@ -1037,7 +1308,8 @@ "content": "KDE Connect", "description": "KDE Connect allows seamless integration between your KDE desktop and mobile devices.", "link": "https://community.kde.org/KDEConnect", - "winget": "KDE.KDEConnect" + "winget": "KDE.KDEConnect", + "foss": true }, "kdenlive": { "category": "Multimedia Tools", @@ -1045,7 +1317,8 @@ "content": "Kdenlive (Video Editor)", "description": "Kdenlive is an open-source video editing software with powerful features for creating and editing professional-quality videos.", "link": "https://kdenlive.org/", - "winget": "KDE.Kdenlive" + "winget": "KDE.Kdenlive", + "foss": true }, "keepass": { "category": "Utilities", @@ -1053,7 +1326,8 @@ "content": "KeePassXC", "description": "KeePassXC is a cross-platform, open-source password manager with strong encryption features.", "link": "https://keepassxc.org/", - "winget": "KeePassXCTeam.KeePassXC" + "winget": "KeePassXCTeam.KeePassXC", + "foss": true }, "klite": { "category": "Multimedia Tools", @@ -1069,7 +1343,8 @@ "content": "Kodi Media Center", "description": "Kodi is an open-source media center application that allows you to play and view most videos, music, podcasts, and other digital media files.", "link": "https://kodi.tv/", - "winget": "XBMCFoundation.Kodi" + "winget": "XBMCFoundation.Kodi", + "foss": true }, "krita": { "category": "Multimedia Tools", @@ -1077,15 +1352,17 @@ "content": "Krita (Image Editor)", "description": "Krita is a powerful open-source painting application. It is designed for concept artists, illustrators, matte and texture artists, and the VFX industry.", "link": "https://krita.org/en/features/", - "winget": "KDE.Krita" + "winget": "KDE.Krita", + "foss": true }, "lazygit": { "category": "Development", "choco": "lazygit", "content": "Lazygit", - "description": "Simple terminal UI for git commands", + "description": "Simple terminal UI for git commands.", "link": "https://github.com/jesseduffield/lazygit/", - "winget": "JesseDuffield.lazygit" + "winget": "JesseDuffield.lazygit", + "foss": true }, "libreoffice": { "category": "Document", @@ -1093,7 +1370,8 @@ "content": "LibreOffice", "description": "LibreOffice is a powerful and free office suite, compatible with other major office suites.", "link": "https://www.libreoffice.org/", - "winget": "TheDocumentFoundation.LibreOffice" + "winget": "TheDocumentFoundation.LibreOffice", + "foss": true }, "librewolf": { "category": "Browsers", @@ -1101,7 +1379,8 @@ "content": "LibreWolf", "description": "LibreWolf is a privacy-focused web browser based on Firefox, with additional privacy and security enhancements.", "link": "https://librewolf-community.gitlab.io/", - "winget": "LibreWolf.LibreWolf" + "winget": "LibreWolf.LibreWolf", + "foss": true }, "linkshellextension": { "category": "Utilities", @@ -1115,9 +1394,10 @@ "category": "Communications", "choco": "linphone", "content": "Linphone", - "description": "Linphone is an open-source voice over IP (VoIPservice that allows for audio and video calls, messaging, and more.", + "description": "Linphone is an open-source voice over IP (VoIP) service that allows for audio and video calls, messaging, and more.", "link": "https://www.linphone.org/", - "winget": "BelledonneCommunications.Linphone" + "winget": "BelledonneCommunications.Linphone", + "foss": true }, "livelywallpaper": { "category": "Utilities", @@ -1125,15 +1405,26 @@ "content": "Lively Wallpaper", "description": "Free and open-source software that allows users to set animated desktop wallpapers and screensavers.", "link": "https://www.rocksdanister.com/lively/", - "winget": "rocksdanister.LivelyWallpaper" + "winget": "rocksdanister.LivelyWallpaper", + "foss": true + }, + "lm-studio": { + "category": "AI-Automation", + "choco": "lm-studio", + "content": "LM Studio", + "description": "Desktop app to discover, download, and run local LLMs on your machine, with a built-in chat UI and local inference tooling.", + "link": "https://lmstudio.ai/", + "winget": "ElementLabs.LMStudio", + "foss": false }, "localsend": { "category": "Utilities", "choco": "localsend.install", "content": "LocalSend", - "description": "An open source cross-platform alternative to AirDrop.", + "description": "An open-source cross-platform alternative to AirDrop.", "link": "https://localsend.org/", - "winget": "LocalSend.LocalSend" + "winget": "LocalSend.LocalSend", + "foss": true }, "lockhunter": { "category": "Utilities", @@ -1149,7 +1440,16 @@ "content": "Logseq", "description": "Logseq is a versatile knowledge management and note-taking application designed for the digital thinker. With a focus on the interconnectedness of ideas, Logseq allows users to seamlessly organize their thoughts through a combination of hierarchical outlines and bi-directional linking. It supports both structured and unstructured content, enabling users to create a personalized knowledge graph that adapts to their evolving ideas and insights.", "link": "https://logseq.com/", - "winget": "Logseq.Logseq" + "winget": "Logseq.Logseq", + "foss": true + }, + "logitechghub": { + "category": "Utilities", + "choco": "lghub", + "content": "Logitech G Hub", + "description": "Official software for managing Logitech gaming peripherals (mice, keyboards, headsets, lighting profiles, etc.).", + "link": "https://www.logitechg.com/en-us/software/ghub", + "winget": "Logitech.GHUB" }, "malwarebytes": { "category": "Utilities", @@ -1159,21 +1459,32 @@ "link": "https://www.malwarebytes.com/", "winget": "Malwarebytes.Malwarebytes" }, + "mpc-qt": { + "category": "Multimedia Tools", + "choco": "mediainfo", + "content": "mpc-qt", + "description": "MPC-HC (Media Player Classic Home Cinema) is considered by many to be the quintessential media player for the Windows desktop. MPC-QT (Media Player Classic Qute Theater) aims to reproduce most of the interface and functionality of MPC-HC while using libmpv to play video instead of DirectShow.", + "link": "https://github.com/mpc-qt/mpc-qt", + "winget": "mpc-qt.mpc-qt", + "foss": true + }, "masscode": { "category": "Document", "choco": "na", "content": "massCode (Snippet Manager)", "description": "massCode is a fast and efficient open-source code snippet manager for developers.", "link": "https://masscode.io/", - "winget": "antonreshetov.massCode" + "winget": "antonreshetov.massCode", + "foss": true }, "matrix": { "category": "Communications", "choco": "element-desktop", "content": "Element", - "description": "Element is a client for Matrix—an open network for secure, decentralized communication.", + "description": "Element is a client for Matrix; an open network for secure, decentralized communication.", "link": "https://element.io/", - "winget": "Element.Element" + "winget": "Element.Element", + "foss": true }, "meld": { "category": "Utilities", @@ -1181,15 +1492,35 @@ "content": "Meld", "description": "Meld is a visual diff and merge tool for files and directories.", "link": "https://meldmerge.org/", - "winget": "Meld.Meld" + "winget": "Meld.Meld", + "foss": true + }, + "microsoft-aishell": { + "category": "AI-Automation", + "choco": "na", + "content": "Microsoft AI Shell", + "description": "CLI shell that connects to AI assistance providers ('agents') for command-line productivity; distributed via WinGet.", + "link": "https://github.com/PowerShell/AIShell", + "winget": "Microsoft.AIShell", + "foss": true + }, + "microsoft-copilot": { + "category": "AI-Automation", + "choco": "na", + "content": "Microsoft Copilot", + "description": "Microsoft Copilot desktop app for Windows (consumer Copilot), distributed via Microsoft Store and commonly installed via its Store ID.", + "link": "https://apps.microsoft.com/detail/9nht9rb2f4hd", + "winget": "9NHT9RB2F4HD", + "foss": false }, "ModernFlyouts": { "category": "Multimedia Tools", "choco": "na", "content": "Modern Flyouts", - "description": "An open source, modern, Fluent Design-based set of flyouts for Windows.", + "description": "An open-source, modern, Fluent Design-based set of flyouts for Windows.", "link": "https://github.com/ModernFlyouts-Community/ModernFlyouts/", - "winget": "ModernFlyouts.ModernFlyouts" + "winget": "ModernFlyouts.ModernFlyouts", + "foss": true }, "monitorian": { "category": "Utilities", @@ -1197,7 +1528,8 @@ "content": "Monitorian", "description": "Monitorian is a utility for adjusting monitor brightness and contrast on Windows.", "link": "https://github.com/emoacht/Monitorian", - "winget": "emoacht.Monitorian" + "winget": "emoacht.Monitorian", + "foss": true }, "moonlight": { "category": "Games", @@ -1205,7 +1537,8 @@ "content": "Moonlight/GameStream Client", "description": "Moonlight/GameStream Client allows you to stream PC games to other devices over your local network.", "link": "https://moonlight-stream.org/", - "winget": "MoonlightGameStreamingProject.Moonlight" + "winget": "MoonlightGameStreamingProject.Moonlight", + "foss": true }, "Motrix": { "category": "Utilities", @@ -1213,7 +1546,8 @@ "content": "Motrix Download Manager", "description": "A full-featured download manager.", "link": "https://motrix.app/", - "winget": "agalwood.Motrix" + "winget": "agalwood.Motrix", + "foss": true }, "mpchc": { "category": "Multimedia Tools", @@ -1221,7 +1555,8 @@ "content": "Media Player Classic - Home Cinema", "description": "Media Player Classic - Home Cinema (MPC-HC) is a free and open-source video and audio player for Windows. MPC-HC is based on the original Guliverkli project and contains many additional features and bug fixes.", "link": "https://github.com/clsid2/mpc-hc/", - "winget": "clsid2.mpc-hc" + "winget": "clsid2.mpc-hc", + "foss": true }, "mremoteng": { "category": "Pro Tools", @@ -1229,15 +1564,17 @@ "content": "mRemoteNG", "description": "mRemoteNG is a free and open-source remote connections manager. It allows you to view and manage multiple remote sessions in a single interface.", "link": "https://mremoteng.org/", - "winget": "mRemoteNG.mRemoteNG" + "winget": "mRemoteNG.mRemoteNG", + "foss": true }, "msedgeredirect": { "category": "Utilities", "choco": "msedgeredirect", "content": "MSEdgeRedirect", - "description": "A Tool to Redirect News, Search, Widgets, Weather, and More to Your Default Browser.", + "description": "A Tool to Redirect News, Search, Widgets, Weather, and More to your default browser.", "link": "https://github.com/rcmaehl/MSEdgeRedirect", - "winget": "rcmaehl.MSEdgeRedirect" + "winget": "rcmaehl.MSEdgeRedirect", + "foss": true }, "msiafterburner": { "category": "Utilities", @@ -1253,15 +1590,8 @@ "content": "Mullvad VPN", "description": "This is the VPN client software for the Mullvad VPN service.", "link": "https://github.com/mullvad/mullvadvpn-app", - "winget": "MullvadVPN.MullvadVPN" - }, - "BorderlessGaming": { - "category": "Utilities", - "choco": "borderlessgaming", - "content": "Borderless Gaming", - "description": "Play your favorite games in a borderless window; no more time consuming alt-tabs.", - "link": "https://github.com/Codeusa/Borderless-Gaming", - "winget": "Codeusa.BorderlessGaming" + "winget": "MullvadVPN.MullvadVPN", + "foss": true }, "EqualizerAPO": { "category": "Multimedia Tools", @@ -1269,7 +1599,8 @@ "content": "Equalizer APO", "description": "Equalizer APO is a parametric / graphic equalizer for Windows.", "link": "https://sourceforge.net/projects/equalizerapo", - "winget": "na" + "winget": "na", + "foss": true }, "CompactGUI": { "category": "Utilities", @@ -1277,7 +1608,8 @@ "content": "Compact GUI", "description": "Transparently compress active games and programs using Windows 10/11 APIs", "link": "https://github.com/IridiumIO/CompactGUI", - "winget": "IridiumIO.CompactGUI" + "winget": "IridiumIO.CompactGUI", + "foss": true }, "ExifCleaner": { "category": "Utilities", @@ -1285,7 +1617,8 @@ "content": "ExifCleaner", "description": "Desktop app to clean metadata from images, videos, PDFs, and other files.", "link": "https://github.com/szTheory/exifcleaner", - "winget": "szTheory.exifcleaner" + "winget": "szTheory.exifcleaner", + "foss": true }, "mullvadbrowser": { "category": "Browsers", @@ -1293,7 +1626,8 @@ "content": "Mullvad Browser", "description": "Mullvad Browser is a privacy-focused web browser, developed in partnership with the Tor Project.", "link": "https://mullvad.net/browser", - "winget": "MullvadVPN.MullvadBrowser" + "winget": "MullvadVPN.MullvadBrowser", + "foss": true }, "musescore": { "category": "Multimedia Tools", @@ -1301,7 +1635,8 @@ "content": "MuseScore", "description": "Create, play back and print beautiful sheet music with free and easy to use music notation software MuseScore.", "link": "https://musescore.org/en", - "winget": "Musescore.Musescore" + "winget": "Musescore.Musescore", + "foss": true }, "musicbee": { "category": "Multimedia Tools", @@ -1323,7 +1658,7 @@ "category": "Multimedia Tools", "choco": "tagscanner", "content": "TagScanner (Tag Scanner)", - "description": "TagScanner is a powerful tool for organizing and managing your music collection", + "description": "TagScanner is a powerful tool for organizing and managing your music collection.", "link": "https://www.xdlab.ru/en/", "winget": "SergeySerkov.TagScanner" }, @@ -1333,15 +1668,17 @@ "content": "NanaZip", "description": "NanaZip is a fast and efficient file compression and decompression tool.", "link": "https://github.com/M2Team/NanaZip", - "winget": "M2Team.NanaZip" + "winget": "M2Team.NanaZip", + "foss": true }, "netbird": { "category": "Pro Tools", "choco": "netbird", "content": "NetBird", - "description": "NetBird is a Open Source alternative comparable to TailScale that can be connected to a selfhosted Server.", + "description": "NetBird is a open-source alternative comparable to TailScale that can be connected to a self-hosted server.", "link": "https://netbird.io/", - "winget": "netbird" + "winget": "netbird", + "foss": true }, "naps2": { "category": "Document", @@ -1349,7 +1686,8 @@ "content": "NAPS2 (Document Scanner)", "description": "NAPS2 is a document scanning application that simplifies the process of creating electronic documents.", "link": "https://www.naps2.com/", - "winget": "Cyanfish.NAPS2" + "winget": "Cyanfish.NAPS2", + "foss": true }, "neofetchwin": { "category": "Utilities", @@ -1357,7 +1695,8 @@ "content": "Neofetch", "description": "Neofetch is a command-line utility for displaying system information in a visually appealing way.", "link": "https://github.com/nepnep39/neofetch-win", - "winget": "nepnep.neofetch-win" + "winget": "nepnep.neofetch-win", + "foss": true }, "neovim": { "category": "Development", @@ -1373,7 +1712,8 @@ "content": "Nextcloud Desktop", "description": "Nextcloud Desktop is the official desktop client for the Nextcloud file synchronization and sharing platform.", "link": "https://nextcloud.com/install/#install-clients", - "winget": "Nextcloud.NextcloudDesktop" + "winget": "Nextcloud.NextcloudDesktop", + "foss": true }, "nglide": { "category": "Multimedia Tools", @@ -1389,7 +1729,8 @@ "content": "Nmap", "description": "Nmap (Network Mapper) is an open-source tool for network exploration and security auditing. It discovers devices on a network and provides information about their ports and services.", "link": "https://nmap.org/", - "winget": "Insecure.Nmap" + "winget": "Insecure.Nmap", + "foss": true }, "nodejs": { "category": "Development", @@ -1397,7 +1738,8 @@ "content": "NodeJS", "description": "NodeJS is a JavaScript runtime built on Chrome's V8 JavaScript engine for building server-side and networking applications.", "link": "https://nodejs.org/", - "winget": "OpenJS.NodeJS" + "winget": "OpenJS.NodeJS", + "foss": true }, "nodejslts": { "category": "Development", @@ -1405,7 +1747,8 @@ "content": "NodeJS LTS", "description": "NodeJS LTS provides Long-Term Support releases for stable and reliable server-side JavaScript development.", "link": "https://nodejs.org/", - "winget": "OpenJS.NodeJS.LTS" + "winget": "OpenJS.NodeJS.LTS", + "foss": true }, "nomacs": { "category": "Multimedia Tools", @@ -1413,7 +1756,8 @@ "content": "Nomacs (Image viewer)", "description": "Nomacs is a free, open-source image viewer that supports multiple platforms. It features basic image editing capabilities and supports a variety of image formats.", "link": "https://nomacs.org/", - "winget": "nomacs.nomacs" + "winget": "nomacs.nomacs", + "foss": true }, "notepadplus": { "category": "Document", @@ -1421,7 +1765,8 @@ "content": "Notepad++", "description": "Notepad++ is a free, open-source code editor and Notepad replacement with support for multiple languages.", "link": "https://notepad-plus-plus.org/", - "winget": "Notepad++.Notepad++" + "winget": "Notepad++.Notepad++", + "foss": true }, "nuget": { "category": "Microsoft Tools", @@ -1429,7 +1774,8 @@ "content": "NuGet", "description": "NuGet is a package manager for the .NET framework, enabling developers to manage and share libraries in their .NET applications.", "link": "https://www.nuget.org/", - "winget": "Microsoft.NuGet" + "winget": "Microsoft.NuGet", + "foss": true }, "nushell": { "category": "Utilities", @@ -1437,7 +1783,8 @@ "content": "Nushell", "description": "Nushell is a new shell that takes advantage of modern hardware and systems to provide a powerful, expressive, and fast experience.", "link": "https://www.nushell.sh/", - "winget": "Nushell.Nushell" + "winget": "Nushell.Nushell", + "foss": true }, "nvclean": { "category": "Utilities", @@ -1453,7 +1800,8 @@ "content": "Node Version Manager", "description": "Node Version Manager (NVM) for Windows allows you to easily switch between multiple Node.js versions.", "link": "https://github.com/coreybutler/nvm-windows", - "winget": "CoreyButler.NVMforWindows" + "winget": "CoreyButler.NVMforWindows", + "foss": true }, "obs": { "category": "Multimedia Tools", @@ -1461,7 +1809,8 @@ "content": "OBS Studio", "description": "OBS Studio is a free and open-source software for video recording and live streaming. It supports real-time video/audio capturing and mixing, making it popular among content creators.", "link": "https://obsproject.com/", - "winget": "OBSProject.OBSStudio" + "winget": "OBSProject.OBSStudio", + "foss": true }, "obsidian": { "category": "Document", @@ -1477,7 +1826,17 @@ "content": "Okular", "description": "Okular is a versatile document viewer with advanced features.", "link": "https://okular.kde.org/", - "winget": "KDE.Okular" + "winget": "KDE.Okular", + "foss": true + }, + "ollama": { + "category": "AI-Automation", + "choco": "na", + "content": "Ollama", + "description": "Ollama lets you run and manage local large language models on your desktop.", + "link": "https://ollama.com/", + "winget": "Ollama.Ollama", + "foss": true }, "onedrive": { "category": "Microsoft Tools", @@ -1493,7 +1852,8 @@ "content": "ONLYOffice Desktop", "description": "ONLYOffice Desktop is a comprehensive office suite for document editing and collaboration.", "link": "https://www.onlyoffice.com/desktop.aspx", - "winget": "ONLYOFFICE.DesktopEditors" + "winget": "ONLYOFFICE.DesktopEditors", + "foss": true }, "OPAutoClicker": { "category": "Utilities", @@ -1509,15 +1869,8 @@ "content": "OpenHashTab", "description": "OpenHashTab is a shell extension for conveniently calculating and checking file hashes from file properties.", "link": "https://github.com/namazso/OpenHashTab/", - "winget": "namazso.OpenHashTab" - }, - "openoffice": { - "category": "Document", - "choco": "openoffice", - "content": "Apache OpenOffice", - "description": "Apache OpenOffice is an open-source office software suite for word processing, spreadsheets, presentations, and more.", - "link": "https://www.openoffice.org/", - "winget": "Apache.OpenOffice" + "winget": "namazso.OpenHashTab", + "foss": true }, "openrgb": { "category": "Utilities", @@ -1525,7 +1878,8 @@ "content": "OpenRGB", "description": "OpenRGB is an open-source RGB lighting control software designed to manage and control RGB lighting for various components and peripherals.", "link": "https://openrgb.org/", - "winget": "CalcProgrammer1.OpenRGB" + "winget": "OpenRGB.OpenRGB", + "foss": true }, "openscad": { "category": "Multimedia Tools", @@ -1533,7 +1887,8 @@ "content": "OpenSCAD", "description": "OpenSCAD is a free and open-source script-based 3D CAD modeler. It is especially useful for creating parametric designs for 3D printing.", "link": "https://www.openscad.org/", - "winget": "OpenSCAD.OpenSCAD" + "winget": "OpenSCAD.OpenSCAD", + "foss": true }, "openshell": { "category": "Utilities", @@ -1541,7 +1896,8 @@ "content": "Open Shell (Start Menu)", "description": "Open Shell is a Windows Start Menu replacement with enhanced functionality and customization options.", "link": "https://github.com/Open-Shell/Open-Shell-Menu", - "winget": "Open-Shell.Open-Shell-Menu" + "winget": "Open-Shell.Open-Shell-Menu", + "foss": true }, "OpenVPN": { "category": "Pro Tools", @@ -1549,7 +1905,8 @@ "content": "OpenVPN Connect", "description": "OpenVPN Connect is an open-source VPN client that allows you to connect securely to a VPN server. It provides a secure and encrypted connection for protecting your online privacy.", "link": "https://openvpn.net/", - "winget": "OpenVPNTechnologies.OpenVPNConnect" + "winget": "OpenVPNTechnologies.OpenVPNConnect", + "foss": true }, "OVirtualBox": { "category": "Utilities", @@ -1557,7 +1914,8 @@ "content": "Oracle VirtualBox", "description": "Oracle VirtualBox is a powerful and free open-source virtualization tool for x86 and AMD64/Intel64 architectures.", "link": "https://www.virtualbox.org/", - "winget": "Oracle.VirtualBox" + "winget": "Oracle.VirtualBox", + "foss": true }, "ownclouddesktop": { "category": "Utilities", @@ -1565,7 +1923,51 @@ "content": "ownCloud Desktop", "description": "ownCloud Desktop is the official desktop client for the ownCloud file synchronization and sharing platform.", "link": "https://owncloud.com/desktop-app/", - "winget": "ownCloud.ownCloudDesktop" + "winget": "ownCloud.ownCloudDesktop", + "foss": true + }, + "policyplus": { + "category": "Multimedia Tools", + "choco": "na", + "content": "Policy Plus", + "description": "Local Group Policy Editor plus more, for all Windows editions.", + "link": "https://github.com/Fleex255/PolicyPlus", + "winget": "Fleex255.PolicyPlus", + "foss": true + }, + "qview": { + "category": "Multimedia Tools", + "choco": "na", + "content": "qView", + "description": "qView is an image viewer designed with minimalism and usability in mind.", + "link": "https://github.com/jurplel/qView", + "winget": "jurplel.qView", + "foss": true + }, + "potplayer": { + "category": "Multimedia Tools", + "choco": "na", + "content": "PotPlayer", + "description": "PotPlayer is a free Windows media player with wide format support, high performance, built-in codecs, and extensive customization options.", + "link": "https://potplayer.tv/", + "winget": "Daum.PotPlayer" + }, + "power-automate-desktop": { + "category": "AI-Automation", + "choco": "na", + "content": "Power Automate for desktop", + "description": "Microsoft's Windows RPA tool for building desktop flows to automate repetitive tasks across apps and services.", + "link": "https://powerautomate.microsoft.com/desktop/", + "winget": "na", + "foss": false + }, + "processexplorer": { + "category": "Microsoft Tools", + "choco": "na", + "content": "Process Explorer", + "description": "Process Explorer is a task manager and system monitor.", + "link": "https://learn.microsoft.com/sysinternals/downloads/process-explorer", + "winget": "Microsoft.Sysinternals.ProcessExplorer" }, "Paintdotnet": { "category": "Multimedia Tools", @@ -1583,6 +1985,14 @@ "link": "https://parsec.app/", "winget": "Parsec.Parsec" }, + "pdf-xchange": { + "category": "Document", + "choco": "pdfxchangeeditor", + "content": "PDF-XChangeEditor", + "description": "A comprehensive Windows-based software suite and editor for creating, viewing, editing, annotating, and signing PDF files.", + "link": "https://www.pdf-xchange.com/", + "winget": "TrackerSoftware.PDF-XChangeEditor" + }, "pdf24creator": { "category": "Document", "choco": "pdf24", @@ -1597,7 +2007,8 @@ "content": "PDFsam Basic", "description": "PDFsam Basic is a free and open-source tool for splitting, merging, and rotating PDF files.", "link": "https://pdfsam.org/", - "winget": "PDFsam.PDFsam" + "winget": "PDFsam.PDFsam", + "foss": true }, "peazip": { "category": "Utilities", @@ -1605,7 +2016,8 @@ "content": "PeaZip", "description": "PeaZip is a free, open-source file archiver utility that supports multiple archive formats and provides encryption features.", "link": "https://peazip.github.io/", - "winget": "Giorgiotani.Peazip" + "winget": "Giorgiotani.Peazip", + "foss": true }, "piimager": { "category": "Utilities", @@ -1621,7 +2033,8 @@ "content": "Playnite", "description": "Playnite is an open-source video game library manager with one simple goal: To provide a unified interface for all of your games.", "link": "https://playnite.link/", - "winget": "Playnite.Playnite" + "winget": "Playnite.Playnite", + "foss": true }, "plex": { "category": "Multimedia Tools", @@ -1645,7 +2058,8 @@ "content": "Portmaster", "description": "Portmaster is a free and open-source application that puts you back in charge over all your computers network connections.", "link": "https://safing.io/", - "winget": "Safing.Portmaster" + "winget": "Safing.Portmaster", + "foss": true }, "posh": { "category": "Development", @@ -1653,7 +2067,8 @@ "content": "Oh My Posh (Prompt)", "description": "Oh My Posh is a cross-platform prompt theme engine for any shell.", "link": "https://ohmyposh.dev/", - "winget": "JanDeDobbeleer.OhMyPosh" + "winget": "JanDeDobbeleer.OhMyPosh", + "foss": true }, "postman": { "category": "Development", @@ -1685,7 +2100,8 @@ "content": "PowerShell", "description": "PowerShell is a task automation framework and scripting language designed for system administrators, offering powerful command-line capabilities.", "link": "https://github.com/PowerShell/PowerShell", - "winget": "Microsoft.PowerShell" + "winget": "Microsoft.PowerShell", + "foss": true }, "powertoys": { "category": "Microsoft Tools", @@ -1693,15 +2109,17 @@ "content": "PowerToys", "description": "PowerToys is a set of utilities for power users to enhance productivity, featuring tools like FancyZones, PowerRename, and more.", "link": "https://github.com/microsoft/PowerToys", - "winget": "Microsoft.PowerToys" + "winget": "Microsoft.PowerToys", + "foss": true }, "prismlauncher": { "category": "Games", "choco": "prismlauncher", "content": "Prism Launcher", - "description": "Prism Launcher is a game launcher and manager designed to provide a clean and intuitive interface for organizing and launching your games.", + "description": "Prism Launcher is an open-source Minecraft launcher with the ability to manage multiple instances, accounts and mods.", "link": "https://prismlauncher.org/", - "winget": "PrismLauncher.PrismLauncher" + "winget": "PrismLauncher.PrismLauncher", + "foss": true }, "processlasso": { "category": "Utilities", @@ -1711,13 +2129,50 @@ "link": "https://bitsum.com/", "winget": "BitSum.ProcessLasso" }, - "spotify": { - "category": "Multimedia Tools", - "choco": "spotify", - "content": "Spotify", - "description": "Spotify is a digital music service that gives you access to millions of songs, podcasts, and videos from artists all over the world.", - "link": "https://www.spotify.com/", - "winget": "Spotify.Spotify" + "protonauth": { + "category": "Utilities", + "choco": "protonauth", + "content": "Proton Authenticator", + "description": "2FA app from Proton to securely sync and backup 2FA codes.", + "link": "https://proton.me/authenticator", + "winget": "Proton.ProtonAuthenticator", + "foss": true + }, + "protonmail": { + "category": "Communications", + "choco": "na", + "content": "Proton Mail", + "description": "Proton Mail is an end-to-end encrypted email service by Proton, protecting your privacy with zero-access encryption.", + "link": "https://proton.me/mail", + "winget": "Proton.ProtonMail", + "foss": true + }, + "protondrive": { + "category": "Utilities", + "choco": "na", + "content": "Proton Drive", + "description": "Proton Drive is an end-to-end encrypted Swiss vault for your files that protects your data.", + "link": "https://proton.me/drive", + "winget": "Proton.ProtonDrive", + "foss": true + }, + "protonpass": { + "category": "Utilities", + "choco": "na", + "content": "Proton Pass", + "description": "Proton Pass is a cloud-based password manager with end-to-end encryption and unique email aliases.", + "link": "https://proton.me/pass", + "winget": "Proton.ProtonPass", + "foss": true + }, + "protonvpn": { + "category": "Pro Tools", + "choco": "protonvpn", + "content": "Proton VPN", + "description": "Proton VPN is a no-logs VPN service that protects your privacy online with features like Secure Core and Tor over VPN.", + "link": "https://protonvpn.com/", + "winget": "Proton.ProtonVPN", + "foss": true }, "processmonitor": { "category": "Microsoft Tools", @@ -1731,9 +2186,10 @@ "category": "Utilities", "choco": "orcaslicer", "content": "OrcaSlicer", - "description": "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)", + "description": "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.).", "link": "https://github.com/SoftFever/OrcaSlicer", - "winget": "SoftFever.OrcaSlicer" + "winget": "SoftFever.OrcaSlicer", + "foss": true }, "prucaslicer": { "category": "Utilities", @@ -1741,7 +2197,8 @@ "content": "PrusaSlicer", "description": "PrusaSlicer is a powerful and easy-to-use slicing software for 3D printing with Prusa 3D printers.", "link": "https://www.prusa3d.com/prusaslicer/", - "winget": "Prusa3d.PrusaSlicer" + "winget": "Prusa3d.PrusaSlicer", + "foss": true }, "psremoteplay": { "category": "Games", @@ -1757,7 +2214,8 @@ "content": "PuTTY", "description": "PuTTY is a free and open-source terminal emulator, serial console, and network file transfer application. It supports various network protocols such as SSH, Telnet, and SCP.", "link": "https://www.chiark.greenend.org.uk/~sgtatham/putty/", - "winget": "PuTTY.PuTTY" + "winget": "PuTTY.PuTTY", + "foss": true }, "python3": { "category": "Development", @@ -1765,7 +2223,8 @@ "content": "Python3", "description": "Python is a versatile programming language used for web development, data analysis, artificial intelligence, and more.", "link": "https://www.python.org/", - "winget": "Python.Python.3.12" + "winget": "Python.Python.3.14", + "foss": true }, "qbittorrent": { "category": "Utilities", @@ -1773,15 +2232,17 @@ "content": "qBittorrent", "description": "qBittorrent is a free and open-source BitTorrent client that aims to provide a feature-rich and lightweight alternative to other torrent clients.", "link": "https://www.qbittorrent.org/", - "winget": "qBittorrent.qBittorrent" + "winget": "qBittorrent.qBittorrent", + "foss": true }, "transmission": { "category": "Utilities", "choco": "transmission", "content": "Transmission", - "description": "Transmission is a cross-platform BitTorrent client that is open source, easy, powerful, and lean.", + "description": "Transmission is a cross-platform BitTorrent client that is open-source, easy, powerful, and lean.", "link": "https://transmissionbt.com/", - "winget": "Transmission.Transmission" + "winget": "Transmission.Transmission", + "foss": true }, "tixati": { "category": "Utilities", @@ -1797,15 +2258,17 @@ "content": "QTox", "description": "QTox is a free and open-source messaging app that prioritizes user privacy and security in its design.", "link": "https://qtox.github.io/", - "winget": "Tox.qTox" + "winget": "Tox.qTox", + "foss": true }, "quicklook": { "category": "Utilities", "choco": "quicklook", "content": "Quicklook", - "description": "Bring macOS “Quick Look” feature to Windows", + "description": "Bring macOS \u201cQuick Look\u201d feature to Windows.", "link": "https://github.com/QL-Win/QuickLook", - "winget": "QL-Win.QuickLook" + "winget": "QL-Win.QuickLook", + "foss": true }, "rainmeter": { "category": "Utilities", @@ -1813,7 +2276,8 @@ "content": "Rainmeter", "description": "Rainmeter is a desktop customization tool that allows you to create and share customizable skins for your desktop.", "link": "https://www.rainmeter.net/", - "winget": "Rainmeter.Rainmeter" + "winget": "Rainmeter.Rainmeter", + "foss": true }, "revo": { "category": "Utilities", @@ -1837,15 +2301,17 @@ "content": "Revolt", "description": "Find your community, connect with the world. Revolt is one of the best ways to stay connected with your friends and community without sacrificing any usability.", "link": "https://revolt.chat/", - "winget": "Revolt.RevoltDesktop" + "winget": "Revolt.RevoltDesktop", + "foss": true }, "ripgrep": { "category": "Utilities", "choco": "ripgrep", "content": "Ripgrep", - "description": "Fast and powerful commandline search tool", + "description": "Fast and powerful commandline search tool.", "link": "https://github.com/BurntSushi/ripgrep/", - "winget": "BurntSushi.ripgrep.MSVC" + "winget": "BurntSushi.ripgrep.MSVC", + "foss": true }, "rufus": { "category": "Utilities", @@ -1853,7 +2319,8 @@ "content": "Rufus Imager", "description": "Rufus is a utility that helps format and create bootable USB drives, such as USB keys or pen drives.", "link": "https://rufus.ie/", - "winget": "Rufus.Rufus" + "winget": "Rufus.Rufus", + "foss": true }, "rustdesk": { "category": "Pro Tools", @@ -1861,7 +2328,8 @@ "content": "RustDesk", "description": "RustDesk is a free and open-source remote desktop application. It provides a secure way to connect to remote machines and access desktop environments.", "link": "https://rustdesk.com/", - "winget": "RustDesk.RustDesk" + "winget": "RustDesk.RustDesk", + "foss": true }, "rustlang": { "category": "Development", @@ -1869,7 +2337,8 @@ "content": "Rust", "description": "Rust is a programming language designed for safety and performance, particularly focused on systems programming.", "link": "https://www.rust-lang.org/", - "winget": "Rustlang.Rust.MSVC" + "winget": "Rustlang.Rust.MSVC", + "foss": true }, "sagethumbs": { "category": "Utilities", @@ -1877,15 +2346,8 @@ "content": "SageThumbs", "description": "Provides support for thumbnails in Explorer with more formats.", "link": "https://sagethumbs.en.lo4d.com/windows", - "winget": "CherubicSoftware.SageThumbs" - }, - "samsungmagician": { - "category": "Utilities", - "choco": "samsung-magician", - "content": "Samsung Magician", - "description": "Samsung Magician is a utility for managing and optimizing Samsung SSDs.", - "link": "https://semiconductor.samsung.com/consumer-storage/magician/", - "winget": "Samsung.SamsungMagician" + "winget": "CherubicSoftware.SageThumbs", + "foss": true }, "sandboxie": { "category": "Utilities", @@ -1893,7 +2355,8 @@ "content": "Sandboxie Plus", "description": "Sandboxie Plus is a sandbox-based isolation program that provides enhanced security by running applications in an isolated environment.", "link": "https://github.com/sandboxie-plus/Sandboxie", - "winget": "Sandboxie.Plus" + "winget": "Sandboxie.Plus", + "foss": true }, "sdio": { "category": "Utilities", @@ -1901,7 +2364,8 @@ "content": "Snappy Driver Installer Origin", "description": "Snappy Driver Installer Origin is a free and open-source driver updater with a vast driver database for Windows.", "link": "https://www.glenn.delahoy.com/snappy-driver-installer-origin/", - "winget": "GlennDelahoy.SnappyDriverInstallerOrigin" + "winget": "GlennDelahoy.SnappyDriverInstallerOrigin", + "foss": true }, "session": { "category": "Communications", @@ -1909,7 +2373,8 @@ "content": "Session", "description": "Session is a private and secure messaging app built on a decentralized network for user privacy and data protection.", "link": "https://getsession.org/", - "winget": "Oxen.Session" + "winget": "Session.Session", + "foss": true }, "sharex": { "category": "Multimedia Tools", @@ -1917,7 +2382,8 @@ "content": "ShareX (Screenshots)", "description": "ShareX is a free and open-source screen capture and file sharing tool. It supports various capture methods and offers advanced features for editing and sharing screenshots.", "link": "https://getsharex.com/", - "winget": "ShareX.ShareX" + "winget": "ShareX.ShareX", + "foss": true }, "nilesoftShell": { "category": "Utilities", @@ -1927,6 +2393,15 @@ "link": "https://nilesoft.org/", "winget": "Nilesoft.Shell" }, + "systeminformer": { + "category": "Development", + "choco": "na", + "content": "System Informer", + "description": "A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.", + "link": "https://systeminformer.com/", + "winget": "WinsiderSS.SystemInformer", + "foss": true + }, "sidequest": { "category": "Games", "choco": "sidequest", @@ -1941,7 +2416,8 @@ "content": "Signal", "description": "Signal is a privacy-focused messaging app that offers end-to-end encryption for secure and private communication.", "link": "https://signal.org/", - "winget": "OpenWhisperSystems.Signal" + "winget": "OpenWhisperSystems.Signal", + "foss": true }, "signalrgb": { "category": "Utilities", @@ -1957,7 +2433,8 @@ "content": "simplenote", "description": "Simplenote is an easy way to keep notes, lists, ideas and more.", "link": "https://simplenote.com/", - "winget": "Automattic.Simplenote" + "winget": "Automattic.Simplenote", + "foss": true }, "simplewall": { "category": "Pro Tools", @@ -1965,15 +2442,8 @@ "content": "Simplewall", "description": "Simplewall is a free and open-source firewall application for Windows. It allows users to control and manage the inbound and outbound network traffic of applications.", "link": "https://github.com/henrypp/simplewall", - "winget": "Henry++.simplewall" - }, - "skype": { - "category": "Communications", - "choco": "skype", - "content": "Skype", - "description": "Skype is a widely used communication platform offering video calls, voice calls, and instant messaging services.", - "link": "https://www.skype.com/", - "winget": "Microsoft.Skype" + "winget": "Henry++.simplewall", + "foss": true }, "slack": { "category": "Communications", @@ -1989,31 +2459,25 @@ "content": "Spacedrive File Manager", "description": "Spacedrive is a file manager that offers cloud storage integration and file synchronization across devices.", "link": "https://www.spacedrive.com/", - "winget": "spacedrive.Spacedrive" + "winget": "spacedrive.Spacedrive", + "foss": true }, "spacesniffer": { "category": "Utilities", "choco": "spacesniffer", "content": "SpaceSniffer", - "description": "A tool application that lets you understand how folders and files are structured on your disks", + "description": "A tool application that lets you understand how folders and files are structured on your disks.", "link": "http://www.uderzo.it/main_products/space_sniffer/", "winget": "UderzoSoftware.SpaceSniffer" }, - "spotube": { - "category": "Multimedia Tools", - "choco": "spotube", - "content": "Spotube", - "description": "Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile! ", - "link": "https://github.com/KRTirtho/spotube", - "winget": "KRTirtho.Spotube" - }, "starship": { "category": "Development", "choco": "starship", "content": "Starship (Shell Prompt)", "description": "Starship is a minimal, fast, and customizable prompt for any shell.", "link": "https://starship.rs/", - "winget": "starship" + "winget": "starship", + "foss": true }, "steam": { "category": "Games", @@ -2029,7 +2493,8 @@ "content": "Strawberry (Music Player)", "description": "Strawberry is an open-source music player that focuses on music collection management and audio quality. It supports various audio formats and features a clean user interface.", "link": "https://www.strawberrymusicplayer.org/", - "winget": "StrawberryMusicPlayer.Strawberry" + "winget": "StrawberryMusicPlayer.Strawberry", + "foss": true }, "stremio": { "winget": "Stremio.Stremio", @@ -2037,7 +2502,8 @@ "category": "Multimedia Tools", "content": "Stremio", "link": "https://www.stremio.com/", - "description": "Stremio is a media center application that allows users to organize and stream their favorite movies, TV shows, and video content." + "description": "Stremio is a media center application that allows users to organize and stream their favorite movies, TV shows, and video content.", + "foss": true }, "sublimemerge": { "category": "Development", @@ -2061,13 +2527,14 @@ "content": "Sumatra PDF", "description": "Sumatra PDF is a lightweight and fast PDF viewer with minimalistic design.", "link": "https://www.sumatrapdfreader.org/free-pdf-reader.html", - "winget": "SumatraPDF.SumatraPDF" + "winget": "SumatraPDF.SumatraPDF", + "foss": true }, "pdfgear": { "category": "Document", "choco": "na", "content": "PDFgear", - "description": "PDFgear is a piece of full-featured PDF management software for Windows, Mac, and mobile, and it's completely free to use.", + "description": "PDFgear is a piece of full-featured PDF management software for Windows, macOS, and mobile, and it's completely free to use.", "link": "https://www.pdfgear.com/", "winget": "PDFgear.PDFgear" }, @@ -2077,7 +2544,8 @@ "content": "Sunshine/GameStream Server", "description": "Sunshine is a GameStream server that allows you to remotely play PC games on Android devices, offering low-latency streaming.", "link": "https://github.com/LizardByte/Sunshine", - "winget": "LizardByte.Sunshine" + "winget": "LizardByte.Sunshine", + "foss": true }, "superf4": { "category": "Utilities", @@ -2085,7 +2553,8 @@ "content": "SuperF4", "description": "SuperF4 is a utility that allows you to terminate programs instantly by pressing a customizable hotkey.", "link": "https://stefansundin.github.io/superf4/", - "winget": "StefanSundin.Superf4" + "winget": "StefanSundin.Superf4", + "foss": true }, "swift": { "category": "Development", @@ -2093,15 +2562,17 @@ "content": "Swift toolchain", "description": "Swift is a general-purpose programming language that's approachable for newcomers and powerful for experts.", "link": "https://www.swift.org/", - "winget": "Swift.Toolchain" + "winget": "Swift.Toolchain", + "foss": true }, "synctrayzor": { "category": "Utilities", "choco": "synctrayzor", "content": "SyncTrayzor", - "description": "Windows tray utility / filesystem watcher / launcher for Syncthing", - "link": "https://github.com/canton7/SyncTrayzor/", - "winget": "SyncTrayzor.SyncTrayzor" + "description": "Windows tray utility / filesystem watcher / launcher for Syncthing.", + "link": "https://github.com/GermanCoding/SyncTrayzor", + "winget": "GermanCoding.SyncTrayzor", + "foss": true }, "sqlmanagementstudio": { "category": "Microsoft Tools", @@ -2115,9 +2586,10 @@ "category": "Utilities", "choco": "tabby", "content": "Tabby.sh", - "description": "Tabby is a highly configurable terminal emulator, SSH and serial client for Windows, macOS and Linux", + "description": "Tabby is a highly configurable terminal emulator, SSH and serial client for Windows, macOS and Linux.", "link": "https://tabby.sh/", - "winget": "Eugeny.Tabby" + "winget": "Eugeny.Tabby", + "foss": true }, "tailscale": { "category": "Utilities", @@ -2125,7 +2597,8 @@ "content": "Tailscale", "description": "Tailscale is a secure and easy-to-use VPN solution for connecting your devices and networks.", "link": "https://tailscale.com/", - "winget": "tailscale.tailscale" + "winget": "tailscale.tailscale", + "foss": true }, "TcNoAccSwitcher": { "category": "Games", @@ -2133,7 +2606,8 @@ "content": "TCNO Account Switcher", "description": "A Super-fast account switcher for Steam, Battle.net, Epic Games, Origin, Riot, Ubisoft and many others!", "link": "https://github.com/TCNOco/TcNo-Acc-Switcher", - "winget": "TechNobo.TcNoAccountSwitcher" + "winget": "TechNobo.TcNoAccountSwitcher", + "foss": true }, "tcpview": { "category": "Microsoft Tools", @@ -2159,21 +2633,31 @@ "link": "https://www.teamviewer.com/", "winget": "TeamViewer.TeamViewer" }, + "teamspeak3": { + "category": "Utilities", + "choco": "teamspeak", + "content": "TeamSpeak 3", + "description": "TEAMSPEAK. YOUR TEAM. YOUR RULES. Use crystal clear sound to communicate with your team mates cross-platform with military-grade security, lag-free performance & unparalleled reliability and uptime.", + "link": "https://www.teamspeak.com/", + "winget": "TeamSpeakSystems.TeamSpeakClient" + }, "telegram": { "category": "Communications", "choco": "telegram", "content": "Telegram", "description": "Telegram is a cloud-based instant messaging app known for its security features, speed, and simplicity.", "link": "https://telegram.org/", - "winget": "Telegram.TelegramDesktop" + "winget": "Telegram.TelegramDesktop", + "foss": true }, "unigram": { "category": "Communications", "choco": "na", "content": "Unigram", - "description": "Unigram - Telegram for Windows", + "description": "Unigram - Telegram for Windows.", "link": "https://unigramdev.github.io/", - "winget": "Telegram.Unigram" + "winget": "Telegram.Unigram", + "foss": true }, "terminal": { "category": "Microsoft Tools", @@ -2181,7 +2665,8 @@ "content": "Windows Terminal", "description": "Windows Terminal is a modern, fast, and efficient terminal application for command-line users, supporting multiple tabs, panes, and more.", "link": "https://aka.ms/terminal", - "winget": "Microsoft.WindowsTerminal" + "winget": "Microsoft.WindowsTerminal", + "foss": true }, "Thonny": { "category": "Development", @@ -2189,23 +2674,26 @@ "content": "Thonny Python IDE", "description": "Python IDE for beginners.", "link": "https://github.com/thonny/thonny", - "winget": "AivarAnnamaa.Thonny" + "winget": "AivarAnnamaa.Thonny", + "foss": true }, "MuEditor": { "category": "Development", "choco": "na", "content": "Code With Mu (Mu Editor)", - "description": "Mu is a Python code editor for beginner programmers", + "description": "Mu is a Python code editor for beginner programmers.", "link": "https://codewith.mu/", - "winget": "Mu.Mu" + "winget": "Mu.Mu", + "foss": true }, "thorium": { "category": "Browsers", - "choco": "na", + "choco": "thorium", "content": "Thorium Browser AVX2", - "description": "Browser built for speed over vanilla chromium. It is built with AVX2 optimizations and is the fastest browser on the market.", + "description": "Browser built for speed over vanilla Chromium. It is built with AVX2 optimizations and is the fastest browser on the market.", "link": "https://thorium.rocks/", - "winget": "Alex313031.Thorium.AVX2" + "winget": "Alex313031.Thorium.AVX2", + "foss": true }, "thunderbird": { "category": "Communications", @@ -2213,7 +2701,8 @@ "content": "Thunderbird", "description": "Mozilla Thunderbird is a free and open-source email client, news client, and chat client with advanced features.", "link": "https://www.thunderbird.net/", - "winget": "Mozilla.Thunderbird" + "winget": "Mozilla.Thunderbird", + "foss": true }, "betterbird": { "category": "Communications", @@ -2221,7 +2710,8 @@ "content": "Betterbird", "description": "Betterbird is a fork of Mozilla Thunderbird with additional features and bugfixes.", "link": "https://www.betterbird.eu/", - "winget": "Betterbird.Betterbird" + "winget": "Betterbird.Betterbird", + "foss": true }, "tidal": { "category": "Multimedia Tools", @@ -2237,7 +2727,8 @@ "content": "Tor Browser", "description": "Tor Browser is designed for anonymous web browsing, utilizing the Tor network to protect user privacy and security.", "link": "https://www.torproject.org/", - "winget": "TorProject.TorBrowser" + "winget": "TorProject.TorBrowser", + "foss": true }, "totalcommander": { "category": "Utilities", @@ -2258,10 +2749,11 @@ "ttaskbar": { "category": "Utilities", "choco": "translucenttb", - "content": "Translucent Taskbar", - "description": "Translucent Taskbar is a tool that allows you to customize the transparency of the Windows taskbar.", + "content": "TranslucentTB", + "description": "TranslucentTB is a tool that allows you to customize the transparency of the Windows Taskbar.", "link": "https://github.com/TranslucentTB/TranslucentTB", - "winget": "9PF4KZ2VN4W9" + "winget": "9PF4KZ2VN4W9", + "foss": true }, "twinkletray": { "category": "Utilities", @@ -2269,7 +2761,8 @@ "content": "Twinkle Tray", "description": "Twinkle Tray lets you easily manage the brightness levels of multiple monitors.", "link": "https://twinkletray.com/", - "winget": "xanderfrangos.twinkletray" + "winget": "xanderfrangos.twinkletray", + "foss": true }, "ubisoft": { "category": "Games", @@ -2285,7 +2778,8 @@ "content": "Ungoogled", "description": "Ungoogled Chromium is a version of Chromium without Google's integration for enhanced privacy and control.", "link": "https://github.com/Eloston/ungoogled-chromium", - "winget": "eloston.ungoogled-chromium" + "winget": "eloston.ungoogled-chromium", + "foss": true }, "unity": { "category": "Development", @@ -2295,13 +2789,23 @@ "link": "https://unity.com/", "winget": "Unity.UnityHub" }, + "veravrypt": { + "category": "Utilities", + "choco": "veracrypt", + "content": "VeraCrypt", + "description": "Disk encryption with strong security based on TrueCrypt.", + "link": "https://github.com/veracrypt/VeraCrypt/", + "winget": "IDRIX.VeraCrypt", + "foss": true + }, "vagrant": { "category": "Development", "choco": "vagrant", "content": "Vagrant", "description": "Vagrant is an open-source tool for building and managing virtualized development environments.", "link": "https://www.vagrantup.com/", - "winget": "Hashicorp.Vagrant" + "winget": "Hashicorp.Vagrant", + "foss": true }, "vc2015_32": { "category": "Microsoft Tools", @@ -2325,7 +2829,8 @@ "content": "Ventoy", "description": "Ventoy is an open-source tool for creating bootable USB drives. It supports multiple ISO files on a single USB drive, making it a versatile solution for installing operating systems.", "link": "https://www.ventoy.net/", - "winget": "Ventoy.Ventoy" + "winget": "Ventoy.Ventoy", + "foss": true }, "vesktop": { "category": "Communications", @@ -2333,7 +2838,8 @@ "content": "Vesktop", "description": "A cross platform electron-based desktop app aiming to give you a snappier Discord experience with Vencord pre-installed.", "link": "https://github.com/Vencord/Vesktop", - "winget": "Vencord.Vesktop" + "winget": "Vencord.Vesktop", + "foss": true }, "viber": { "category": "Communications", @@ -2341,7 +2847,7 @@ "content": "Viber", "description": "Viber is a free messaging and calling app with features like group chats, video calls, and more.", "link": "https://www.viber.com/", - "winget": "Viber.Viber" + "winget": "Rakuten.Viber" }, "videomass": { "category": "Multimedia Tools", @@ -2349,9 +2855,10 @@ "content": "Videomass", "description": "Videomass by GianlucaPernigotto is a cross-platform GUI for FFmpeg, streamlining multimedia file processing with batch conversions and user-friendly features.", "link": "https://jeanslack.github.io/Videomass/", - "winget": "GianlucaPernigotto.Videomass" + "winget": "GianlucaPernigotto.Videomass", + "foss": true }, - "visualstudio": { + "visualstudio2022": { "category": "Development", "choco": "visualstudio2022community", "content": "Visual Studio 2022", @@ -2359,6 +2866,14 @@ "link": "https://visualstudio.microsoft.com/", "winget": "Microsoft.VisualStudio.2022.Community" }, + "visualstudio2026": { + "category": "Development", + "choco": "visualstudio2026community", + "content": "Visual Studio 2026", + "description": "Visual Studio 2026 is an integrated development environment (IDE) for building, debugging, and deploying applications.", + "link": "https://visualstudio.microsoft.com/", + "winget": "Microsoft.VisualStudio.2026.Community" + }, "vivaldi": { "category": "Browsers", "choco": "vivaldi", @@ -2373,7 +2888,8 @@ "content": "VLC (Video Player)", "description": "VLC Media Player is a free and open-source multimedia player that supports a wide range of audio and video formats. It is known for its versatility and cross-platform compatibility.", "link": "https://www.videolan.org/vlc/", - "winget": "VideoLAN.VLC" + "winget": "VideoLAN.VLC", + "foss": true }, "voicemeeter": { "category": "Multimedia Tools", @@ -2405,7 +2921,8 @@ "content": "VS Code", "description": "Visual Studio Code is a free, open-source code editor with support for multiple programming languages.", "link": "https://code.visualstudio.com/", - "winget": "Microsoft.VisualStudioCode" + "winget": "Microsoft.VisualStudioCode", + "foss": true }, "vscodium": { "category": "Development", @@ -2413,7 +2930,8 @@ "content": "VS Codium", "description": "VSCodium is a community-driven, freely-licensed binary distribution of Microsoft's VS Code.", "link": "https://vscodium.com/", - "winget": "VSCodium.VSCodium" + "winget": "VSCodium.VSCodium", + "foss": true }, "waterfox": { "category": "Browsers", @@ -2421,23 +2939,26 @@ "content": "Waterfox", "description": "Waterfox is a fast, privacy-focused web browser based on Firefox, designed to preserve user choice and privacy.", "link": "https://www.waterfox.net/", - "winget": "Waterfox.Waterfox" + "winget": "Waterfox.Waterfox", + "foss": true }, "wazuh": { "category": "Utilities", "choco": "wazuh-agent", - "content": "Wazuh.", + "content": "Wazuh", "description": "Wazuh is an open-source security monitoring platform that offers intrusion detection, compliance checks, and log analysis.", "link": "https://wazuh.com/", - "winget": "Wazuh.WazuhAgent" + "winget": "Wazuh.WazuhAgent", + "foss": true }, "wezterm": { "category": "Development", "choco": "wezterm", "content": "Wezterm", - "description": "WezTerm is a powerful cross-platform terminal emulator and multiplexer", + "description": "WezTerm is a powerful cross-platform terminal emulator and multiplexer.", "link": "https://wezfurlong.org/wezterm/index.html", - "winget": "wez.wezterm" + "winget": "wez.wezterm", + "foss": true }, "windowspchealth": { "category": "Utilities", @@ -2459,9 +2980,10 @@ "category": "Utilities", "choco": "wingetui", "content": "UniGetUI", - "description": "UniGetUI is a GUI for Winget, Chocolatey, and other Windows CLI package managers.", - "link": "https://www.marticliment.com/wingetui/", - "winget": "MartiCliment.UniGetUI" + "description": "UniGetUI is a GUI for WinGet, Chocolatey, and other Windows CLI package managers.", + "link": "https://devolutions.net/unigetui/", + "winget": "Devolutions.UniGetUI", + "foss": true }, "winmerge": { "category": "Document", @@ -2469,7 +2991,8 @@ "content": "WinMerge", "description": "WinMerge is a visual text file and directory comparison tool for Windows.", "link": "https://winmerge.org/", - "winget": "WinMerge.WinMerge" + "winget": "WinMerge.WinMerge", + "foss": true }, "winpaletter": { "category": "Utilities", @@ -2477,7 +3000,8 @@ "content": "WinPaletter", "description": "WinPaletter is a tool for adjusting the color palette of Windows 10, providing customization options for window colors.", "link": "https://github.com/Abdelrhman-AK/WinPaletter", - "winget": "Abdelrhman-AK.WinPaletter" + "winget": "Abdelrhman-AK.WinPaletter", + "foss": true }, "winrar": { "category": "Utilities", @@ -2493,7 +3017,8 @@ "content": "WinSCP", "description": "WinSCP is a popular open-source SFTP, FTP, and SCP client for Windows. It allows secure file transfers between a local and a remote computer.", "link": "https://winscp.net/", - "winget": "WinSCP.WinSCP" + "winget": "WinSCP.WinSCP", + "foss": true }, "wireguard": { "category": "Pro Tools", @@ -2501,7 +3026,8 @@ "content": "WireGuard", "description": "WireGuard is a fast and modern VPN (Virtual Private Network) protocol. It aims to be simpler and more efficient than other VPN protocols, providing secure and reliable connections.", "link": "https://www.wireguard.com/", - "winget": "WireGuard.WireGuard" + "winget": "WireGuard.WireGuard", + "foss": true }, "wireshark": { "category": "Pro Tools", @@ -2509,7 +3035,8 @@ "content": "Wireshark", "description": "Wireshark is a widely-used open-source network protocol analyzer. It allows users to capture and analyze network traffic in real-time, providing detailed insights into network activities.", "link": "https://www.wireshark.org/", - "winget": "WiresharkFoundation.Wireshark" + "winget": "WiresharkFoundation.Wireshark", + "foss": true }, "wisetoys": { "category": "Utilities", @@ -2523,7 +3050,7 @@ "category": "Utilities", "choco": "TeraCopy", "content": "TeraCopy", - "description": "Copy your files faster and more securely", + "description": "Copy your files faster and more securely.", "link": "https://codesector.com/teracopy", "winget": "CodeSector.TeraCopy" }, @@ -2547,9 +3074,10 @@ "category": "Utilities", "choco": "xdm", "content": "Xtreme Download Manager", - "description": "Xtreme Download Manager is an advanced download manager with support for various protocols and browsers.*Browser integration deprecated by google store. No official release.*", + "description": "Xtreme Download Manager is an advanced download manager with support for various protocols and browsers. *Browser integration deprecated by google store. No official release.*", "link": "https://xtremedownloadmanager.com/", - "winget": "subhra74.XtremeDownloadManager" + "winget": "subhra74.XtremeDownloadManager", + "foss": true }, "xeheditor": { "category": "Utilities", @@ -2565,7 +3093,8 @@ "content": "XEMU", "description": "XEMU is an open-source Xbox emulator that allows you to play Xbox games on your PC, aiming for accuracy and compatibility.", "link": "https://xemu.app/", - "winget": "xemu-project.xemu" + "winget": "xemu-project.xemu", + "foss": true }, "xnview": { "category": "Utilities", @@ -2581,7 +3110,8 @@ "content": "Xournal++", "description": "Xournal++ is an open-source handwriting notetaking software with PDF annotation capabilities.", "link": "https://xournalpp.github.io/", - "winget": "Xournal++.Xournal++" + "winget": "Xournal++.Xournal++", + "foss": true }, "xpipe": { "category": "Pro Tools", @@ -2589,7 +3119,8 @@ "content": "XPipe", "description": "XPipe is an open-source tool for orchestrating containerized applications. It simplifies the deployment and management of containerized services in a distributed environment.", "link": "https://xpipe.io/", - "winget": "xpipe-io.xpipe" + "winget": "xpipe-io.xpipe", + "foss": true }, "yarn": { "category": "Development", @@ -2597,7 +3128,8 @@ "content": "Yarn", "description": "Yarn is a fast, reliable, and secure dependency management tool for JavaScript projects.", "link": "https://yarnpkg.com/", - "winget": "Yarn.Yarn" + "winget": "Yarn.Yarn", + "foss": true }, "ytdlp": { "category": "Multimedia Tools", @@ -2605,7 +3137,8 @@ "content": "Yt-dlp", "description": "Command-line tool that allows you to download videos from YouTube and other supported sites. It is an improved version of the popular youtube-dl.", "link": "https://github.com/yt-dlp/yt-dlp", - "winget": "yt-dlp.yt-dlp" + "winget": "yt-dlp.yt-dlp", + "foss": true }, "zerotierone": { "category": "Utilities", @@ -2621,7 +3154,8 @@ "content": "Zim Desktop Wiki", "description": "Zim Desktop Wiki is a graphical text editor used to maintain a collection of wiki pages.", "link": "https://zim-wiki.org/", - "winget": "Zimwiki.Zim" + "winget": "Zimwiki.Zim", + "foss": true }, "znote": { "category": "Document", @@ -2629,7 +3163,8 @@ "content": "Znote", "description": "Znote is a note-taking application.", "link": "https://znote.io/", - "winget": "alagrede.znote" + "winget": "alagrede.znote", + "foss": true }, "zoom": { "category": "Communications", @@ -2643,7 +3178,7 @@ "category": "Utilities", "choco": "na", "content": "ZoomIt", - "description": "A screen zoom, annotation, and recording tool for technical presentations and demos", + "description": "A screen zoom, annotation, and recording tool for technical presentations and demos.", "link": "https://learn.microsoft.com/en-us/sysinternals/downloads/zoomit", "winget": "Microsoft.Sysinternals.ZoomIt" }, @@ -2653,7 +3188,8 @@ "content": "Zotero", "description": "Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research materials.", "link": "https://www.zotero.org/", - "winget": "DigitalScholar.Zotero" + "winget": "DigitalScholar.Zotero", + "foss": true }, "zoxide": { "category": "Utilities", @@ -2661,7 +3197,8 @@ "content": "Zoxide", "description": "Zoxide is a fast and efficient directory changer (cd) that helps you navigate your file system with ease.", "link": "https://github.com/ajeetdsouza/zoxide", - "winget": "ajeetdsouza.zoxide" + "winget": "ajeetdsouza.zoxide", + "foss": true }, "zulip": { "category": "Communications", @@ -2669,15 +3206,17 @@ "content": "Zulip", "description": "Zulip is an open-source team collaboration tool with chat streams for productive and organized communication.", "link": "https://zulipchat.com/", - "winget": "Zulip.Zulip" + "winget": "Zulip.Zulip", + "foss": true }, "syncthingtray": { "category": "Utilities", "choco": "syncthingtray", "content": "Syncthingtray", - "description": "Might be the alternative for Synctrayzor. Windows tray utility / filesystem watcher / launcher for Syncthing", + "description": "Might be the alternative for Synctrayzor. Windows tray utility / filesystem watcher / launcher for Syncthing.", "link": "https://github.com/Martchus/syncthingtray", - "winget": "Martchus.syncthingtray" + "winget": "Martchus.syncthingtray", + "foss": true }, "miniconda": { "category": "Development", @@ -2685,7 +3224,8 @@ "content": "Miniconda", "description": "Miniconda is a free minimal installer for conda. It is a small bootstrap version of Anaconda that includes only conda, Python, the packages they both depend on, and a small number of other useful packages (like pip, zlib, and a few others).", "link": "https://docs.conda.io/projects/miniconda", - "winget": "Anaconda.Miniconda3" + "winget": "Anaconda.Miniconda3", + "foss": true }, "pixi": { "category": "Development", @@ -2693,15 +3233,17 @@ "content": "Pixi", "description": "Pixi is a fast software package manager built on top of the existing conda ecosystem. Spins up development environments quickly on Windows, macOS and Linux. Pixi supports Python, R, C/C++, Rust, Ruby, and many other languages.", "link": "https://pixi.sh", - "winget": "prefix-dev.pixi" + "winget": "prefix-dev.pixi", + "foss": true }, "temurin": { "category": "Development", "choco": "temurin", "content": "Eclipse Temurin", - "description": "Eclipse Temurin is the open source Java SE build based upon OpenJDK.", + "description": "Eclipse Temurin is the open-source Java SE build based upon OpenJDK.", "link": "https://adoptium.net/temurin/", - "winget": "EclipseAdoptium.Temurin.21.JDK" + "winget": "EclipseAdoptium.Temurin.21.JDK", + "foss": true }, "intelpresentmon": { "category": "Utilities", @@ -2709,7 +3251,17 @@ "content": "Intel-PresentMon", "description": "A new gaming performance overlay and telemetry application to monitor and measure your gaming experience.", "link": "https://game.intel.com/us/stories/intel-presentmon/", - "winget": "Intel.PresentMon.Beta" + "winget": "Intel.PresentMon.Beta", + "foss": true + }, + "uv": { + "category": "Development", + "choco": "na", + "content": "uv", + "description": "uv is a fast Python package and project manager written in Rust.", + "link": "https://docs.astral.sh/uv/getting-started/installation/", + "winget": "astral-sh.uv", + "foss": true }, "pyenvwin": { "category": "Development", @@ -2717,23 +3269,26 @@ "content": "Python Version Manager (pyenv-win)", "description": "pyenv for Windows is a simple python version management tool. It lets you easily switch between multiple versions of Python.", "link": "https://pyenv-win.github.io/pyenv-win/", - "winget": "na" + "winget": "na", + "foss": true }, "tightvnc": { "category": "Utilities", "choco": "TightVNC", "content": "TightVNC", - "description": "TightVNC is a free and Open Source remote desktop software that lets you access and control a computer over the network. With its intuitive interface, you can interact with the remote screen as if you were sitting in front of it. You can open files, launch applications, and perform other actions on the remote desktop almost as if you were physically there", + "description": "TightVNC is a free and open-source remote desktop software that lets you access and control a computer over the network. With its intuitive interface, you can interact with the remote screen as if you were sitting in front of it. You can open files, launch applications, and perform other actions on the remote desktop almost as if you were physically there.", "link": "https://www.tightvnc.com/", - "winget": "GlavSoft.TightVNC" + "winget": "GlavSoft.TightVNC", + "foss": true }, "ultravnc": { "category": "Utilities", "choco": "ultravnc", "content": "UltraVNC", - "description": "UltraVNC is a powerful, easy to use and free - remote pc access softwares - that can display the screen of another computer (via internet or network) on your own screen. The program allows you to use your mouse and keyboard to control the other PC remotely. It means that you can work on a remote computer, as if you were sitting in front of it, right from your current location.", + "description": "UltraVNC is a powerful, easy to use and free - remote pc access software - that can display the screen of another computer (via internet or network) on your own screen. The program allows you to use your mouse and keyboard to control the other PC remotely. It means that you can work on a remote computer, as if you were sitting in front of it, right from your current location.", "link": "https://uvnc.com/", - "winget": "uvncbvba.UltraVnc" + "winget": "uvncbvba.UltraVnc", + "foss": true }, "windowsfirewallcontrol": { "category": "Utilities", @@ -2755,9 +3310,10 @@ "category": "Utilities", "choco": "auto-dark-mode", "content": "Windows Auto Dark Mode", - "description": "Automatically switches between the dark and light theme of Windows 10 and Windows 11", + "description": "Automatically switches between the dark and light theme of Windows 10 and Windows 11.", "link": "https://github.com/AutoDarkMode/Windows-Auto-Night-Mode", - "winget": "Armin2208.WindowsAutoNightMode" + "winget": "Armin2208.WindowsAutoNightMode", + "foss": true }, "AmbieWhiteNoise": { "category": "Utilities", @@ -2765,15 +3321,17 @@ "content": "Ambie White Noise", "description": "Ambie is the ultimate app to help you focus, study, or relax. We use white noise and nature sounds combined with an innovative focus timer to keep you concentrated on doing your best work.", "link": "https://ambieapp.com/", - "winget": "9P07XNM5CHP0" + "winget": "JeniusApps.Ambie", + "foss": true }, "magicwormhole": { "category": "Utilities", "choco": "magic-wormhole", "content": "Magic Wormhole", - "description": "get things from one computer to another, safely", + "description": "get things from one computer to another, safely.", "link": "https://github.com/magic-wormhole/magic-wormhole", - "winget": "magic-wormhole.magic-wormhole" + "winget": "magic-wormhole.magic-wormhole", + "foss": true }, "croc": { "category": "Utilities", @@ -2781,15 +3339,17 @@ "content": "croc", "description": "Easily and securely send things from one computer to another.", "link": "https://github.com/schollz/croc", - "winget": "schollz.croc" + "winget": "schollz.croc", + "foss": true }, "qgis": { "category": "Multimedia Tools", "choco": "qgis", "content": "QGIS", - "description": "QGIS (Quantum GIS) is an open-source Geographic Information System (GIS) software that enables users to create, edit, visualize, analyze, and publish geospatial information on Windows, Mac, and Linux platforms.", + "description": "QGIS (Quantum GIS) is an open-source Geographic Information System (GIS) software that enables users to create, edit, visualize, analyze, and publish geospatial information on Windows, macOS, and Linux platforms.", "link": "https://qgis.org/en/site/", - "winget": "OSGeo.QGIS" + "winget": "OSGeo.QGIS", + "foss": true }, "smplayer": { "category": "Multimedia Tools", @@ -2797,15 +3357,17 @@ "content": "SMPlayer", "description": "SMPlayer is a free media player for Windows and Linux with built-in codecs that can play virtually all video and audio formats.", "link": "https://www.smplayer.info", - "winget": "SMPlayer.SMPlayer" + "winget": "SMPlayer.SMPlayer", + "foss": true }, "glazewm": { "category": "Utilities", "choco": "na", "content": "GlazeWM", - "description": "GlazeWM is a tiling window manager for Windows inspired by i3 and Polybar", + "description": "GlazeWM is a tiling window manager for Windows inspired by i3 and Polybar.", "link": "https://github.com/glzr-io/glazewm", - "winget": "glzr-io.glazewm" + "winget": "glzr-io.glazewm", + "foss": true }, "fancontrol": { "category": "Utilities", @@ -2813,21 +3375,23 @@ "content": "FanControl", "description": "Fan Control is a free and open-source software that allows the user to control his CPU, GPU and case fans using temperatures.", "link": "https://getfancontrol.com/", - "winget": "Rem0o.FanControl" + "winget": "Rem0o.FanControl", + "foss": true }, "fnm": { "category": "Development", "choco": "fnm", "content": "Fast Node Manager", - "description": "Fast Node Manager (fnm) allows you to switch your Node version by using the Terminal", + "description": "Fast Node Manager (fnm) allows you to switch your Node version by using the terminal.", "link": "https://github.com/Schniz/fnm", - "winget": "Schniz.fnm" + "winget": "Schniz.fnm", + "foss": true }, "Windhawk": { "category": "Utilities", "choco": "windhawk", "content": "Windhawk", - "description": "The customization marketplace for Windows programs", + "description": "The customization marketplace for Windows programs.", "link": "https://windhawk.net", "winget": "RamenSoftware.Windhawk" }, @@ -2835,15 +3399,16 @@ "category": "Utilities", "choco": "na", "content": "ForceAutoHDR", - "description": "ForceAutoHDR simplifies the process of adding games to the AutoHDR list in the Windows Registry", + "description": "ForceAutoHDR simplifies the process of adding games to the AutoHDR list in the Windows Registry.", "link": "https://github.com/7gxycn08/ForceAutoHDR", - "winget": "ForceAutoHDR.7gxycn08" + "winget": "ForceAutoHDR.7gxycn08", + "foss": true }, "JoyToKey": { "category": "Utilities", "choco": "joytokey", "content": "JoyToKey", - "description": "enables PC game controllers to emulate the keyboard and mouse input", + "description": "Enables PC game controllers to emulate the keyboard and mouse input.", "link": "https://joytokey.net/en/", "winget": "JTKsoftware.JoyToKey" }, @@ -2851,7 +3416,7 @@ "category": "Multimedia Tools", "choco": "na", "content": "NDI Tools", - "description":"NDI, or Network Device Interface, is a video connectivity standard that enables multimedia systems to identify and communicate with one another over IP and to encode, transmit, and receive high-quality, low latency, frame-accurate video and audio, and exchange metadata in real-time.", + "description": "NDI, or Network Device Interface, is a video connectivity standard that enables multimedia systems to identify and communicate with one another over IP and to encode, transmit, and receive high-quality, low latency, frame-accurate video and audio, and exchange metadata in real-time.", "link": "https://ndi.video/", "winget": "NDI.NDITools" }, @@ -2859,49 +3424,62 @@ "category": "Multimedia Tools", "choco": "na", "content": "Kicad", - "description":"Kicad is an open-source EDA tool. It's a good starting point for those who want to do electrical design and is even used by professionals in the industry.", + "description": "Kicad is an open-source EDA tool. It's a good starting point for those who want to do electrical design and is even used by professionals in the industry.", "link": "https://www.kicad.org/", - "winget": "KiCad.KiCad" + "winget": "KiCad.KiCad", + "foss": true }, "dropox": { "category": "Utilities", "choco": "na", "content": "Dropbox", - "description":"The Dropbox desktop app! Save hard drive space, share and edit files and send for signature – all without the distraction of countless browser tabs.", + "description": "The Dropbox desktop app! Save hard drive space, share and edit files and send for signature \u2013 all without the distraction of countless browser tabs.", "link": "https://www.dropbox.com/en_GB/desktop", "winget": "Dropbox.Dropbox" }, + "Overwolf": { + "category": "Games", + "choco": "overwolf", + "content": "Overwolf", + "description": "Popular platform for game overlays and companion apps (mod managers, trackers, etc.), widely used by gamers.", + "link": "https://www.overwolf.com/app/overwolf-curseforge", + "winget": "Overwolf.CurseForge" + }, "OFGB": { "category": "Utilities", "choco": "ofgb", "content": "OFGB (Oh Frick Go Back)", - "description":"GUI Tool to remove ads from various places around Windows 11", + "description": "GUI Tool to remove ads from various places around Windows 11", "link": "https://github.com/xM4ddy/OFGB", - "winget": "xM4ddy.OFGB" + "winget": "xM4ddy.OFGB", + "foss": true }, "PaleMoon": { "category": "Browsers", "choco": "paleMoon", "content": "PaleMoon", - "description":"Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.", + "description": "Pale Moon is an open-source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use.", "link": "https://www.palemoon.org/download.shtml", - "winget": "MoonchildProductions.PaleMoon" + "winget": "MoonchildProductions.PaleMoon", + "foss": true }, "Shotcut": { "category": "Multimedia Tools", "choco": "na", "content": "Shotcut", - "description": "Shotcut is a free, open source, cross-platform video editor.", + "description": "Shotcut is a free, open-source, cross-platform video editor.", "link": "https://shotcut.org/", - "winget": "Meltytech.Shotcut" + "winget": "Meltytech.Shotcut", + "foss": true }, "LenovoLegionToolkit": { "category": "Utilities", "choco": "na", "content": "Lenovo Legion Toolkit", - "description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion (and similar) series laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.", + "description": "Lenovo Legion Toolkit (LLT) is a open-source utility created for Lenovo Legion laptops, that allows changing a couple of features that are only available in Lenovo Vantage or Legion Zone. It runs no background services, uses less memory, uses virtually no CPU, and contains no telemetry. Just like Lenovo Vantage, this application is Windows only.", "link": "https://github.com/BartoszCichecki/LenovoLegionToolkit", - "winget": "BartoszCichecki.LenovoLegionToolkit" + "winget": "BartoszCichecki.LenovoLegionToolkit", + "foss": true }, "PulsarEdit": { "category": "Development", @@ -2909,23 +3487,26 @@ "content": "Pulsar", "description": "A Community-led Hyper-Hackable Text Editor", "link": "https://pulsar-edit.dev/", - "winget": "Pulsar-Edit.Pulsar" + "winget": "Pulsar-Edit.Pulsar", + "foss": true }, "Aegisub": { "category": "Development", "choco": "aegisub", "content": "Aegisub", - "description": "Aegisub is a free, cross-platform open source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.", + "description": "Aegisub is a free, cross-platform open-source tool for creating and modifying subtitles. Aegisub makes it quick and easy to time subtitles to audio, and features many powerful tools for styling them, including a built-in real-time video preview.", "link": "https://github.com/Aegisub/Aegisub", - "winget": "Aegisub.Aegisub" + "winget": "Aegisub.Aegisub", + "foss": true }, "SubtitleEdit": { "category": "Multimedia Tools", "choco": "na", "content": "Subtitle Edit", - "description": "Subtitle Edit is a free and open source editor for video subtitles.", + "description": "Subtitle Edit is a free and open-source editor for video subtitles.", "link": "https://github.com/SubtitleEdit/subtitleedit", - "winget": "Nikse.SubtitleEdit" + "winget": "Nikse.SubtitleEdit", + "foss": true }, "Fork": { "category": "Development", @@ -2934,5 +3515,59 @@ "description": "Fork - a fast and friendly git client.", "link": "https://git-fork.com/", "winget": "Fork.Fork" + }, + "ZenBrowser": { + "category": "Browsers", + "choco": "na", + "content": "Zen Browser", + "description": "The modern, privacy-focused, performance-driven browser built on Firefox.", + "link": "https://zen-browser.app/", + "winget": "Zen-Team.Zen-Browser", + "foss": true + }, + "Zed": { + "category": "Development", + "choco": "na", + "content": "Zed", + "description": "Zed is a modern, high-performance code editor designed from the ground up for speed and collaboration.", + "link": "https://zed.dev/", + "winget": "ZedIndustries.Zed", + "foss": true + }, + "LLLVM": { + "category": "Development", + "choco": "llvm", + "winget": "LLVM.LLVM", + "description": "A collection of modular and reusable compiler and toolchain technologies.", + "content": "LLVM", + "link": "https://llvm.org", + "foss": true + }, + "NASM": { + "category": "Development", + "choco": "nasm", + "winget": "NASM.NASM", + "description": "A powerful assembler for the x86 platform.", + "content": "NASM", + "link": "https://nasm.us", + "foss": true + }, + "Ruby": { + "category": "Development", + "choco": "ruby", + "winget": "RubyInstallerTeam.RubyWithDevkit.3.4", + "description": "A Ruby language execution environment with a MSYS2 installation.", + "content": "Ruby", + "link": "https://rubyinstaller.org/", + "foss": true + }, + "Lua": { + "category": "Development", + "choco": "lua", + "winget": "rjpcomputing.luaforwindows", + "description": "A 'batteries included environment' for the Lua scripting language on Windows.", + "content": "Lua", + "link": "https://github.com/rjpcomputing/luaforwindows", + "foss": true } } diff --git a/config/appnavigation.json b/config/appnavigation.json new file mode 100644 index 0000000000..056af6af82 --- /dev/null +++ b/config/appnavigation.json @@ -0,0 +1,84 @@ +{ + "WPFInstall": { + "Content": "Install/Upgrade Applications", + "Category": "____Actions", + "Type": "Button", + "Order": "1", + "Description": "Install or upgrade the selected applications" + }, + "WPFUninstall": { + "Content": "Uninstall Applications", + "Category": "____Actions", + "Type": "Button", + "Order": "2", + "Description": "Uninstall the selected applications" + }, + "WPFInstallUpgrade": { + "Content": "Upgrade all Applications", + "Category": "____Actions", + "Type": "Button", + "Order": "3", + "Description": "Upgrade all applications to the latest version" + }, + "WingetRadioButton": { + "Content": "WinGet", + "Category": "__Package Manager", + "Type": "RadioButton", + "GroupName": "PackageManagerGroup", + "Checked": true, + "Order": "1", + "Description": "Use WinGet for package management" + }, + "ChocoRadioButton": { + "Content": "Chocolatey", + "Category": "__Package Manager", + "Type": "RadioButton", + "GroupName": "PackageManagerGroup", + "Checked": false, + "Order": "2", + "Description": "Use Chocolatey for package management" + }, + "WPFCollapseAllCategories": { + "Content": "Collapse All Categories", + "Category": "__Selection", + "Type": "Button", + "Order": "1", + "Description": "Collapse all application categories" + }, + "WPFExpandAllCategories": { + "Content": "Expand All Categories", + "Category": "__Selection", + "Type": "Button", + "Order": "2", + "Description": "Expand all application categories" + }, + "WPFClearInstallSelection": { + "Content": "Clear Selection", + "Category": "__Selection", + "Type": "Button", + "Order": "3", + "Description": "Clear the selection of applications" + }, + "WPFGetInstalled": { + "Content": "Show Installed Apps", + "Category": "__Selection", + "Type": "Button", + "Order": "4", + "Description": "Show installed applications" + }, + "WPFselectedAppsButton": { + "Content": "Selected Apps: 0", + "Category": "__Selection", + "Type": "Button", + "Order": "5", + "Description": "Show the selected applications" + }, + "WPFToggleFOSSHighlight": { + "Content": "Highlight FOSS", + "Category": "__Selection", + "Type": "Toggle", + "Checked": true, + "Order": "6", + "Description": "Toggle the green highlight for FOSS applications" + } +} diff --git a/config/autounattend.xml b/config/autounattend.xml deleted file mode 100644 index a1daf403d1..0000000000 --- a/config/autounattend.xml +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - - en-US - - 0409:00000409 - en-US - en-US - en-US - - - - - VK7JG-NPHTM-C97JM-9MPGT-3V66T - - true - - - - 1 - reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f - - - 2 - reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f - - - 3 - reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f - - - - - - - - - - 1 - reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f - - - 2 - reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" - - - 3 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "powershell.exe -NoProfile -Command \"Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;\"" /f - - - 4 - reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f - - - 5 - reg.exe unload "HKU\DefaultUser" - - - 6 - reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f - - - 7 - reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" - - - 8 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f - - - 9 - reg.exe unload "HKU\DefaultUser" - - - 10 - cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"" - - - 11 - cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe"" - - - 12 - cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe"" - - - 13 - reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" - - - 14 - reg.exe delete "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f - - - 15 - reg.exe unload "HKU\DefaultUser" - - - 16 - reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f - - - 17 - reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f - - - 18 - powershell.exe -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;" - - - 19 - powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Microwin-RemovePackages.ps1' -Raw | Invoke-Expression;" - - - 20 - powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-caps.ps1' -Raw | Invoke-Expression;" - - - 21 - reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f - - - 22 - reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f - - - 23 - reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f - - - 24 - reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f - - - 25 - reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f - - - 26 - net.exe accounts /maxpwage:UNLIMITED - - - 27 - reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f - - - 28 - reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f - - - 29 - reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f - - - 30 - reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" - - - 31 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f - - - 32 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f - - - 33 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f - - - 34 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f - - - 35 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f - - - 36 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f - - - 37 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f - - - 38 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f - - - 39 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f - - - 40 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f - - - 41 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f - - - 42 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f - - - 43 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f - - - 44 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f - - - 45 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f - - - 46 - reg.exe unload "HKU\DefaultUser" - - - 47 - reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f - - - 48 - reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f - - - 49 - reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" - - - 50 - reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "ClassicContextMenu" /t REG_SZ /d "reg.exe add \"HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32\" /ve /f" /f - - - 51 - reg.exe unload "HKU\DefaultUser" - - - - - - - - - 0409:00000409 - en-US - en-US - en-US - - - - - - User - Administrators - - - true</PlainText> - </Password> - </LocalAccount> - </LocalAccounts> - </UserAccounts> - <AutoLogon> - <Username>User</Username> - <Enabled>true</Enabled> - <LogonCount>1</LogonCount> - <Password> - <Value></Value> - <PlainText>true</PlainText> - </Password> - </AutoLogon> - <OOBE> - <ProtectYourPC>3</ProtectYourPC> - <HideEULAPage>true</HideEULAPage> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - </OOBE> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <Order>1</Order> - <CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> - <Extensions xmlns="https://schneegans.de/windows/unattend-generator/"> - <ExtractScript> -param( - [xml]$Document -); - -$scriptsDir = 'C:\Windows\Setup\Scripts\'; -foreach( $file in $Document.unattend.Extensions.File ) { - $path = [System.Environment]::ExpandEnvironmentVariables( - $file.GetAttribute( 'path' ) - ); - if( $path.StartsWith( $scriptsDir ) ) { - mkdir -Path $scriptsDir -ErrorAction 'SilentlyContinue'; - } - $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) { - { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; } - { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); } - default { [System.Text.Encoding]::Default; } - }; - [System.IO.File]::WriteAllBytes( $path, ( $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ) ) ); -} - </ExtractScript> - <File path="C:\Windows\Temp\Microwin-RemovePackages.ps1"> -$selectors = @( - 'Microsoft.Microsoft3DViewer'; - 'Microsoft.BingSearch'; - 'Microsoft.WindowsCamera'; - 'Clipchamp.Clipchamp'; - 'Microsoft.WindowsAlarms'; - 'Microsoft.549981C3F5F10'; - 'Microsoft.Windows.DevHome'; - 'MicrosoftCorporationII.MicrosoftFamily'; - 'Microsoft.WindowsFeedbackHub'; - 'Microsoft.GetHelp'; - 'Microsoft.Getstarted'; - 'microsoft.windowscommunicationsapps'; - 'Microsoft.WindowsMaps'; - 'Microsoft.BingNews'; - 'Microsoft.WindowsNotepad'; - 'Microsoft.MicrosoftOfficeHub'; - 'Microsoft.Office.OneNote'; - 'Microsoft.OutlookForWindows'; - 'Microsoft.MSPaint'; - 'Microsoft.People'; - 'Microsoft.PowerAutomateDesktop'; - 'MicrosoftCorporationII.QuickAssist'; - 'Microsoft.SkypeApp'; - 'Microsoft.MicrosoftSolitaireCollection'; - 'Microsoft.MicrosoftStickyNotes'; - 'MSTeams'; - 'Microsoft.Todos'; - 'Microsoft.WindowsSoundRecorder'; - 'Microsoft.BingWeather'; - 'Microsoft.ZuneMusic'; - 'Microsoft.ZuneVideo'; -); -$getCommand = { Get-AppxProvisionedPackage -Online; }; -$filterCommand = { $_.DisplayName -eq $selector; }; -$removeCommand = { - [CmdletBinding()] - param( - [Parameter( Mandatory, ValueFromPipeline )] - $InputObject - ); - process { - $InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue'; - } -}; -$type = 'Package'; -$logfile = 'C:\Windows\Temp\Microwin-RemovePackages.log'; -&amp; { - $installed = &amp; $getCommand; - foreach( $selector in $selectors ) { - $result = [ordered] @{ - Selector = $selector; - }; - $found = $installed | Where-Object -FilterScript $filterCommand; - if( $found ) { - $result.Output = $found | &amp; $removeCommand; - if( $? ) { - $result.Message = "$type removed."; - } else { - $result.Message = "$type not removed."; - $result.Error = $Error[0]; - } - } else { - $result.Message = "$type not installed."; - } - $result | ConvertTo-Json -Depth 3 -Compress; - } -} *&gt;&amp;1 &gt;&gt; $logfile; - </File> - <File path="C:\Windows\Temp\remove-caps.ps1"> -$selectors = @( - 'Browser.InternetExplorer'; - 'MathRecognizer'; - 'OpenSSH.Client'; - 'App.Support.QuickAssist'; - 'App.StepsRecorder'; - 'Media.WindowsMediaPlayer'; - 'Microsoft.Windows.WordPad'; -); -$getCommand = { Get-WindowsCapability -Online; }; -$filterCommand = { ($_.Name -split '~')[0] -eq $selector; }; -$removeCommand = { - [CmdletBinding()] - param( - [Parameter( Mandatory, ValueFromPipeline )] - $InputObject - ); - process { - $InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue'; - } -}; -$type = 'Capability'; -$logfile = 'C:\Windows\Temp\remove-caps.log'; -&amp; { - $installed = &amp; $getCommand; - foreach( $selector in $selectors ) { - $result = [ordered] @{ - Selector = $selector; - }; - $found = $installed | Where-Object -FilterScript $filterCommand; - if( $found ) { - $result.Output = $found | &amp; $removeCommand; - if( $? ) { - $result.Message = "$type removed."; - } else { - $result.Message = "$type not removed."; - $result.Error = $Error[0]; - } - } else { - $result.Message = "$type not installed."; - } - $result | ConvertTo-Json -Depth 3 -Compress; - } -} *&gt;&amp;1 &gt;&gt; $logfile; - </File> - <File path="C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml"><![CDATA[ -<LayoutModificationTemplate Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"> - <LayoutOptions StartTileGroupCellWidth="6" /> - <DefaultLayoutOverride> - <StartLayoutCollection> - <StartLayout GroupCellWidth="6" xmlns="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" /> - </StartLayoutCollection> - </DefaultLayoutOverride> -</LayoutModificationTemplate> - ]]></File> - </Extensions> -</unattend> diff --git a/config/dns.json b/config/dns.json index 6ba26a766a..6c2ffbbd16 100644 --- a/config/dns.json +++ b/config/dns.json @@ -46,23 +46,5 @@ "Secondary": "94.140.15.16", "Primary6": "2a10:50c0::bad1:ff", "Secondary6": "2a10:50c0::bad2:ff" - }, - "dns0.eu_Open":{ - "Primary": "193.110.81.254", - "Secondary": "185.253.5.254", - "Primary6": "2a0f:fc80::ffff", - "Secondary6": "2a0f:fc81::ffff" - }, - "dns0.eu_ZERO":{ - "Primary": "193.110.81.9", - "Secondary": "185.253.5.9", - "Primary6": "2a0f:fc80::9", - "Secondary6": "2a0f:fc81::9" - }, - "dns0.eu_KIDS":{ - "Primary": "193.110.81.1", - "Secondary": "185.253.5.1", - "Primary6": "2a0f:fc80::1", - "Secondary6": "2a0f:fc81::1" } } diff --git a/config/feature.json b/config/feature.json index 4a296cf55a..8d5d6f58d1 100644 --- a/config/feature.json +++ b/config/feature.json @@ -4,41 +4,41 @@ "Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.", "category": "Features", "panel": "1", - "Order": "a010_", "feature": [ "NetFx4-AdvSrvs", "NetFx3" ], "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/dotnet" + "link": "https://winutil.christitus.com/dev/features/features/dotnet" + }, + "WPFFixesNTPPool": { + "Content": "Configure NTP Server", + "Description": "Replaces the default Windows NTP server (time.windows.com) with pool.ntp.org for improved time synchronization accuracy and reliability.", + "category": "Fixes", + "panel": "1", + "Type": "Button", + "ButtonWidth": "300", + "function": "Invoke-WPFFixesNTPPool", + "link": "https://winutil.christitus.com/dev/features/fixes/ntppool" }, "WPFFeatureshyperv": { "Content": "HyperV Virtualization", "Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.", "category": "Features", "panel": "1", - "Order": "a011_", "feature": [ - "HypervisorPlatform", - "Microsoft-Hyper-V-All", - "Microsoft-Hyper-V", - "Microsoft-Hyper-V-Tools-All", - "Microsoft-Hyper-V-Management-PowerShell", - "Microsoft-Hyper-V-Hypervisor", - "Microsoft-Hyper-V-Services", - "Microsoft-Hyper-V-Management-Clients" + "Microsoft-Hyper-V-All" ], "InvokeScript": [ - "Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait" + "bcdedit /set hypervisorschedulertype classic" ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/hyperv" + "link": "https://winutil.christitus.com/dev/features/features/hyperv" }, "WPFFeatureslegacymedia": { "Content": "Legacy Media (WMP, DirectPlay)", - "Description": "Enables legacy programs from previous versions of windows", + "Description": "Enables legacy programs from previous versions of Windows.", "category": "Features", "panel": "1", - "Order": "a012_", "feature": [ "WindowsMediaPlayer", "MediaPlayback", @@ -46,27 +46,25 @@ "LegacyComponents" ], "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/legacymedia" + "link": "https://winutil.christitus.com/dev/features/features/legacymedia" }, "WPFFeaturewsl": { "Content": "Windows Subsystem for Linux", "Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.", "category": "Features", "panel": "1", - "Order": "a020_", "feature": [ "VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux" ], "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/wsl" + "link": "https://winutil.christitus.com/dev/features/features/wsl" }, "WPFFeaturenfs": { "Content": "NFS - Network File System", "Description": "Network File System (NFS) is a mechanism for storing files on a network.", "category": "Features", "panel": "1", - "Order": "a014_", "feature": [ "ServicesForNFS-ClientOnly", "ClientForNFS-Infrastructure", @@ -79,50 +77,13 @@ "nfsadmin client start", "nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i" ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/nfs" - }, - "WPFFeatureEnableSearchSuggestions": { - "Content": "Enable Search Box Web Suggestions in Registry(explorer restart)", - "Description": "Enables web suggestions when searching using Windows Search.", - "category": "Features", - "panel": "1", - "Order": "a015_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) { - New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force - Stop-Process -name explorer -force - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/EnableSearchSuggestions" - }, - "WPFFeatureDisableSearchSuggestions": { - "Content": "Disable Search Box Web Suggestions in Registry(explorer restart)", - "Description": "Disables web suggestions when searching using Windows Search.", - "category": "Features", - "panel": "1", - "Order": "a016_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) { - New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force - Stop-Process -name explorer -force - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/DisableSearchSuggestions" + "link": "https://winutil.christitus.com/dev/features/features/nfs" }, "WPFFeatureRegBackup": { "Content": "Enable Daily Registry Backup Task 12.30am", "Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.", "category": "Features", "panel": "1", - "Order": "a017_", "feature": [], "InvokeScript": [ " @@ -133,201 +94,229 @@ Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System' " ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/RegBackup" + "link": "https://winutil.christitus.com/dev/features/features/regbackup" }, "WPFFeatureEnableLegacyRecovery": { "Content": "Enable Legacy F8 Boot Recovery", "Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", "category": "Features", "panel": "1", - "Order": "a018_", "feature": [], "InvokeScript": [ - " - If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) { - New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait - " + "bcdedit /set bootmenupolicy legacy" ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/EnableLegacyRecovery" + "link": "https://winutil.christitus.com/dev/features/features/enablelegacyrecovery" }, "WPFFeatureDisableLegacyRecovery": { "Content": "Disable Legacy F8 Boot Recovery", "Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", "category": "Features", "panel": "1", - "Order": "a019_", "feature": [], "InvokeScript": [ - " - If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) { - New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait - " + "bcdedit /set bootmenupolicy standard" ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/DisableLegacyRecovery" + "link": "https://winutil.christitus.com/dev/features/features/disablelegacyrecovery" }, "WPFFeaturesSandbox": { "Content": "Windows Sandbox", + "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", "category": "Features", "panel": "1", - "Order": "a021_", - "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", - "link": "https://christitustech.github.io/winutil/dev/features/Features/Sandbox" + "feature": [ + "Containers-DisposableClientVM" + ], + "link": "https://winutil.christitus.com/dev/features/features/sandbox" }, "WPFFeatureInstall": { "Content": "Install Features", "category": "Features", "panel": "1", - "Order": "a060_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Features/Install" + "function": "Invoke-WPFFeatureInstall", + "link": "https://winutil.christitus.com/dev/features/features/install" }, "WPFPanelAutologin": { "Content": "Set Up Autologin", "category": "Fixes", - "Order": "a040_", "panel": "1", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Autologin" + "function": "Invoke-WPFPanelAutologin", + "link": "https://winutil.christitus.com/dev/features/fixes/autologin" }, "WPFFixesUpdate": { "Content": "Reset Windows Update", "category": "Fixes", "panel": "1", - "Order": "a041_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Update" + "function": "Invoke-WPFFixesUpdate", + "link": "https://winutil.christitus.com/dev/features/fixes/update" }, "WPFFixesNetwork": { "Content": "Reset Network", "category": "Fixes", - "Order": "a042_", "panel": "1", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Network" + "function": "Invoke-WPFFixesNetwork", + "link": "https://winutil.christitus.com/dev/features/fixes/network" }, "WPFPanelDISM": { "Content": "System Corruption Scan", "category": "Fixes", "panel": "1", - "Order": "a043_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/DISM" + "function": "Invoke-WPFSystemRepair", + "link": "https://winutil.christitus.com/dev/features/fixes/dism" }, "WPFFixesWinget": { "Content": "WinGet Reinstall", "category": "Fixes", "panel": "1", - "Order": "a044_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Winget" + "function": "Invoke-WPFFixesWinget", + "link": "https://winutil.christitus.com/dev/features/fixes/winget" }, - "WPFRunAdobeCCCleanerTool": { - "Content": "Remove Adobe Creative Cloud", - "category": "Fixes", - "panel": "1", - "Order": "a045_", + "WPFPanelControl": { + "Content": "Control Panel", + "category": "Legacy Windows Panels", + "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool" + "InvokeScript": [ + "control" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/control" }, - "WPFPanelnetwork": { - "Content": "Network Connections", + "WPFPanelComputer": { + "Content": "Computer Management", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/network" + "InvokeScript": [ + "compmgmt.msc" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/computer" }, - "WPFPanelcontrol": { - "Content": "Control Panel", + "WPFPanelNetwork": { + "Content": "Network Connections", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/control" + "InvokeScript": [ + "ncpa.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/network" }, - "WPFPanelpower": { + "WPFPanelPower": { "Content": "Power Panel", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/power" + "InvokeScript": [ + "powercfg.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/power" + }, + "WPFPanelPrinter": { + "Content": "Printer Panel", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "Start-Process 'shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}'" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/printer" }, - "WPFPanelregion": { + "WPFPanelRegion": { "Content": "Region", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/region" + "InvokeScript": [ + "intl.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/region" }, - "WPFPanelsound": { - "Content": "Sound Settings", + "WPFPanelRestore": { + "Content": "Windows Restore", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/sound" + "InvokeScript": [ + "rstrui.exe" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/restore" }, - "WPFPanelprinter": { - "Content": "Printer Panel", + "WPFPanelSound": { + "Content": "Sound Settings", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/printer" + "InvokeScript": [ + "mmsys.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/sound" }, - "WPFPanelsystem": { + "WPFPanelSystem": { "Content": "System Properties", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/system" + "InvokeScript": [ + "sysdm.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/system" }, - "WPFPaneluser": { - "Content": "User Accounts", + "WPFPanelTimedate": { + "Content": "Time and Date", "category": "Legacy Windows Panels", "panel": "2", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/user" + "InvokeScript": [ + "timedate.cpl" + ], + "link": "https://winutil.christitus.com/dev/features/legacy-windows-panels/timedate" }, "WPFWinUtilInstallPSProfile": { "Content": "Install CTT PowerShell Profile", - "category": "Powershell Profile", + "category": "Powershell Profile Powershell 7+ Only", "panel": "2", - "Order": "a083_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "function": "Invoke-WinUtilInstallPSProfile", + "link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/installpsprofile" }, "WPFWinUtilUninstallPSProfile": { "Content": "Uninstall CTT PowerShell Profile", - "category": "Powershell Profile", + "category": "Powershell Profile Powershell 7+ Only", "panel": "2", - "Order": "a084_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "function": "Invoke-WinUtilUninstallPSProfile", + "link": "https://winutil.christitus.com/dev/features/powershell-profile-powershell-7--only/uninstallpsprofile" }, "WPFWinUtilSSHServer": { "Content": "Enable OpenSSH Server", "category": "Remote Access", "panel": "2", - "Order": "a084_", "Type": "Button", - "ButtonWidth": "300" + "ButtonWidth": "300", + "function": "Invoke-WPFSSHServer", + "link": "https://winutil.christitus.com/dev/features/remote-access/sshserver" } } diff --git a/config/preset.json b/config/preset.json index fb96dde5dc..9933f0e07e 100644 --- a/config/preset.json +++ b/config/preset.json @@ -1,15 +1,13 @@ { "Standard": [ - "WPFTweaksAH", + "WPFTweaksActivity", "WPFTweaksConsumerFeatures", + "WPFTweaksDisableExplorerAutoDiscovery", + "WPFTweaksWPBT", "WPFTweaksDVR", - "WPFTweaksHiber", - "WPFTweaksHome", - "WPFTweaksLoc", + "WPFTweaksLocation", "WPFTweaksServices", - "WPFTweaksStorage", - "WPFTweaksTele", - "WPFTweaksWifi", + "WPFTweaksTelemetry", "WPFTweaksDiskCleanup", "WPFTweaksDeleteTempFiles", "WPFTweaksEndTaskOnTaskbar", @@ -18,8 +16,8 @@ ], "Minimal": [ "WPFTweaksConsumerFeatures", - "WPFTweaksHome", + "WPFTweaksWPBT", "WPFTweaksServices", - "WPFTweaksTele" + "WPFTweaksTelemetry" ] } diff --git a/config/themes.json b/config/themes.json index dd2fb93af6..bab0de627b 100644 --- a/config/themes.json +++ b/config/themes.json @@ -1,5 +1,9 @@ { "shared":{ + "AppEntryWidth": "200", + "AppEntryFontSize": "11", + "AppEntryMargin": "1,0,1,0", + "AppEntryBorderThickness": "0", "CustomDialogFontSize": "12", "CustomDialogFontSizeHeader": "14", "CustomDialogLogoSize": "25", @@ -7,7 +11,7 @@ "CustomDialogHeight": "200", "FontSize": "12", "FontFamily": "Arial", - "HeadingFontSize": "16", + "HeaderFontSize": "16", "HeaderFontFamily": "Consolas, Monaco", "CheckBoxBulletDecoratorSize": "14", "CheckBoxMargin": "15,0,0,2", @@ -16,17 +20,17 @@ "TabButtonWidth": "110", "TabButtonHeight": "26", "TabRowHeightInPixels": "50", + "ToolTipWidth": "300", "IconFontSize": "14", "IconButtonSize": "35", "SettingsIconFontSize": "18", "CloseIconFontSize": "18", - "MicroWinLogoSize": "10", - "MicrowinCheckBoxMargin": "-10,5,0,0", "GroupBorderBackgroundColor": "#232629", "ButtonFontSize": "12", "ButtonFontFamily": "Arial", "ButtonWidth": "200", "ButtonHeight": "25", + "ConfigTabButtonFontSize": "14", "ConfigUpdateButtonFontSize": "14", "SearchBarWidth": "200", "SearchBarHeight": "26", @@ -38,6 +42,10 @@ "ButtonCornerRadius": "2" }, "Light": { + "AppInstallUnselectedColor": "#F7F7F7", + "AppInstallHighlightedColor": "#CFCFCF", + "AppInstallSelectedColor": "#C2C2C2", + "AppInstallOverlayBackgroundColor":"#6A6D72", "ComboBoxForegroundColor": "#232629", "ComboBoxBackgroundColor": "#F7F7F7", "LabelboxForegroundColor": "#232629", @@ -57,10 +65,12 @@ "ButtonTweaksBackgroundColor": "#F7F7F7", "ButtonConfigBackgroundColor": "#F7F7F7", "ButtonUpdatesBackgroundColor": "#F7F7F7", + "ButtonWin11ISOBackgroundColor": "#F7F7F7", "ButtonInstallForegroundColor": "#232629", "ButtonTweaksForegroundColor": "#232629", "ButtonConfigForegroundColor": "#232629", "ButtonUpdatesForegroundColor": "#232629", + "ButtonWin11ISOForegroundColor": "#232629", "ButtonBackgroundColor": "#F5F5F5", "ButtonBackgroundPressedColor": "#1A1A1A", "ButtonBackgroundMouseoverColor": "#C2C2C2", @@ -68,14 +78,19 @@ "ButtonForegroundColor": "#232629", "ToggleButtonOnColor": "#2e77ff", "ToggleButtonOffColor": "#707070", + "ToolTipBackgroundColor": "#F7F7F7", "BorderColor": "#232629", "BorderOpacity": "0.2" }, "Dark": { + "AppInstallUnselectedColor": "#232629", + "AppInstallHighlightedColor": "#3C3C3C", + "AppInstallSelectedColor": "#4C4C4C", + "AppInstallOverlayBackgroundColor":"#2E3135", "ComboBoxForegroundColor": "#F7F7F7", "ComboBoxBackgroundColor": "#1E3747", - "LabelboxForegroundColor": "#0567ff", + "LabelboxForegroundColor": "#5bdcff", "MainForegroundColor": "#F7F7F7", "MainBackgroundColor": "#232629", "LabelBackgroundColor": "#232629", @@ -87,15 +102,17 @@ "ProgressBarForegroundColor": "#222222", "ProgressBarBackgroundColor": "Transparent", - "ProgressBarTextColor": "#cccccc", + "ProgressBarTextColor": "#232629", "ButtonInstallBackgroundColor": "#222222", "ButtonTweaksBackgroundColor": "#333333", "ButtonConfigBackgroundColor": "#444444", "ButtonUpdatesBackgroundColor": "#555555", + "ButtonWin11ISOBackgroundColor": "#666666", "ButtonInstallForegroundColor": "#F7F7F7", "ButtonTweaksForegroundColor": "#F7F7F7", "ButtonConfigForegroundColor": "#F7F7F7", "ButtonUpdatesForegroundColor": "#F7F7F7", + "ButtonWin11ISOForegroundColor": "#F7F7F7", "ButtonBackgroundColor": "#1E3747", "ButtonBackgroundPressedColor": "#F7F7F7", "ButtonBackgroundMouseoverColor": "#3B4252", @@ -103,6 +120,7 @@ "ButtonForegroundColor": "#F7F7F7", "ToggleButtonOnColor": "#2e77ff", "ToggleButtonOffColor": "#707070", + "ToolTipBackgroundColor": "#2F373D", "BorderColor": "#2F373D", "BorderOpacity": "0.2" } diff --git a/config/tweaks.json b/config/tweaks.json index 36f805676a..019d4e96b2 100644 --- a/config/tweaks.json +++ b/config/tweaks.json @@ -1,54 +1,52 @@ { - "WPFTweaksAH": { + "WPFTweaksActivity": { "Content": "Disable Activity History", - "Description": "This erases recent docs, clipboard, and run history.", + "Description": "Erases recent docs, clipboard, and run history.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", "Name": "EnableActivityFeed", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", "Name": "PublishUserActivities", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", "Name": "UploadUserActivities", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/AH" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/activity" }, "WPFTweaksHiber": { "Content": "Disable Hibernation", - "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.", + "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the PC off. It really should never be used.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", "registry": [ { "Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power", "Name": "HibernateEnabled", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "1" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings", "Name": "ShowHibernateOption", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "1" } ], @@ -58,136 +56,133 @@ "UndoScript": [ "powercfg.exe /hibernate on" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Hiber" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hiber" }, - "WPFTweaksLaptopHibernation": { - "Content": "Set Hibernation as default (good for laptops)", - "Description": "Most modern laptops have connected standby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399", + "WPFTweaksWidget": { + "Content": "Remove Widgets", + "Description": "Removes the annoying widgets in the bottom left of the Taskbar.", "category": "Essential Tweaks", "panel": "1", - "Order": "a014_", - "registry": [ - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0", - "OriginalValue": "1", - "Name": "Attributes", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\abfc2519-3608-4c2a-94ea-171b0ed546ab\\94ac6d29-73ce-41a6-809f-6363ba21b47e", - "OriginalValue": "0", - "Name": "Attributes ", - "Value": "2", - "Type": "DWord" - } + "InvokeScript": [ + " + # Sometimes if you dont stop the Widgets process the removal may fail + + Get-Process *Widget* | Stop-Process + Get-AppxPackage Microsoft.WidgetsPlatformRuntime -AllUsers | Remove-AppxPackage -AllUsers + Get-AppxPackage MicrosoftWindows.Client.WebExperience -AllUsers | Remove-AppxPackage -AllUsers + + Invoke-WinUtilExplorerUpdate -action \"restart\" + Write-Host \"Removed widgets\" + " + ], + "UndoScript": [ + " + Write-Host \"Restoring widgets AppxPackages\" + + Add-AppxPackage -Register \"C:\\Program Files\\WindowsApps\\Microsoft.WidgetsPlatformRuntime*\\AppxManifest.xml\" -DisableDevelopmentMode + Add-AppxPackage -Register \"C:\\Program Files\\WindowsApps\\MicrosoftWindows.Client.WebExperience*\\AppxManifest.xml\" -DisableDevelopmentMode + + Invoke-WinUtilExplorerUpdate -action \"restart\" + " ], + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/widget" + }, + "WPFTweaksRevertStartMenu": { + "Content": "Revert Start Menu layout", + "Description": "Bring back the old Start Menu layout from before the gradual rollout of the new one in 25H2.", + "category": "Essential Tweaks", + "panel": "1", "InvokeScript": [ " - Write-Host \"Turn on Hibernation\" - Start-Process -FilePath powercfg -ArgumentList \"/hibernate on\" -NoNewWindow -Wait + Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip + + Expand-Archive ViVeTool.zip + Remove-Item ViVeTool.zip - # Set hibernation as the default action - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 60\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 60\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 10\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 1\" -NoNewWindow -Wait + Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/disable /id:47205210' -Wait -NoNewWindow + + Remove-Item ViVeTool -Recurse + + Write-Host 'Old start menu reverted. Please restart your computer to take effect.' " ], "UndoScript": [ " - Write-Host \"Turn off Hibernation\" - Start-Process -FilePath powercfg -ArgumentList \"/hibernate off\" -NoNewWindow -Wait + Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip + + Expand-Archive ViVeTool.zip + Remove-Item ViVeTool.zip + + Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/enable /id:47205210' -Wait -NoNewWindow - # Set standby to detault values - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 15\" -NoNewWindow -Wait + Remove-Item ViVeTool -Recurse + + Write-Host 'New start menu reverted. Please restart your computer to take effect.' " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/LaptopHibernation" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/revertstartmenu" }, - "WPFTweaksHome": { - "Content": "Disable Homegroup", - "Description": "Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network.", + "WPFTweaksDisableStoreSearch": { + "Content": "Disable Microsoft Store search results", + "Description": "Will not display recommended Microsoft Store apps when searching for apps in the Start menu.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", - "service": [ - { - "Name": "HomeGroupListener", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "HomeGroupProvider", - "StartupType": "Manual", - "OriginalType": "Automatic" - } + "InvokeScript": [ + "icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /deny Everyone:F" + ], + "UndoScript": [ + "icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /grant Everyone:F" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Home" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/disablestoresearch" }, - "WPFTweaksLoc": { + "WPFTweaksLocation": { "Content": "Disable Location Tracking", - "Description": "Disables Location Tracking...DUH!", + "Description": "Disables Location Tracking.", "category": "Essential Tweaks", "panel": "1", - "Order": "a005_", + "service": [ + { + "Name": "lfsvc", + "StartupType": "Disable", + "OriginalType": "Manual" + } + ], "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location", "Name": "Value", - "Type": "String", "Value": "Deny", + "Type": "String", "OriginalValue": "Allow" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Sensor\\Overrides\\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}", "Name": "SensorPermissionState", - "Type": "DWord", "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\lfsvc\\Service\\Configuration", - "Name": "Status", "Type": "DWord", - "Value": "0", "OriginalValue": "1" }, { "Path": "HKLM:\\SYSTEM\\Maps", "Name": "AutoUpdateEnabled", - "Type": "DWord", "Value": "0", + "Type": "DWord", "OriginalValue": "1" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Loc" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/location" }, "WPFTweaksServices": { "Content": "Set Services to Manual", "Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.", "category": "Essential Tweaks", "panel": "1", - "Order": "a014_", "service": [ - { - "Name": "AJRouter", - "StartupType": "Disabled", - "OriginalType": "Manual" - }, { "Name": "ALG", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "AppIDSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "AppMgmt", "StartupType": "Manual", @@ -203,11 +198,6 @@ "StartupType": "Disabled", "OriginalType": "Disabled" }, - { - "Name": "AppXSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "Appinfo", "StartupType": "Manual", @@ -243,11 +233,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "BFE", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "BITS", "StartupType": "AutomaticDelayedStart", @@ -258,81 +243,26 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "BcastDVRUserService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BluetoothUserService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BrokerInfrastructure", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "Browser", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "BthAvctpSvc", "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "BthHFSrv", - "StartupType": "Automatic", - "OriginalType": "Automatic" + "OriginalType": "Manual" }, { "Name": "CDPSvc", "StartupType": "Manual", "OriginalType": "Automatic" }, - { - "Name": "CDPUserSvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "COMSysApp", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "CaptureService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "CertPropSvc", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "ClipSVC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ConsentUxUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "CoreMessagingRegistrar", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "CredentialEnrollmentManagerUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "CryptSvc", "StartupType": "Automatic", @@ -348,26 +278,11 @@ "StartupType": "Automatic", "OriginalType": "Automatic" }, - { - "Name": "DcomLaunch", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DcpSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "DevQueryBroker", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "DeviceAssociationBrokerSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "DeviceAssociationService", "StartupType": "Manual", @@ -378,16 +293,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "DevicePickerUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DevicesFlowUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "Dhcp", "StartupType": "Automatic", @@ -413,36 +318,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "DmEnrollmentSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Dnscache", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DoSvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "DsSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DsmSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DusmSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "EFS", "StartupType": "Manual", @@ -453,11 +328,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "EntAppSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "EventLog", "StartupType": "Automatic", @@ -473,11 +343,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "Fax", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "FontCache", "StartupType": "Automatic", @@ -498,26 +363,11 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "HomeGroupListener", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "HomeGroupProvider", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "HvHost", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "IEEtwCollectorService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "IKEEXT", "StartupType": "Manual", @@ -531,7 +381,7 @@ { "Name": "InventorySvc", "StartupType": "Manual", - "OriginalType": "Manual" + "OriginalType": "Automatic" }, { "Name": "IpxlatCfgSvc", @@ -541,18 +391,13 @@ { "Name": "KeyIso", "StartupType": "Automatic", - "OriginalType": "Automatic" + "OriginalType": "Manual" }, { "Name": "KtmRm", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "LSM", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "LanmanServer", "StartupType": "Automatic", @@ -593,36 +438,11 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "MessagingService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "MicrosoftEdgeElevationService", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "MixedRealityOpenXRSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MpsSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "MsKeyboardFilter", - "StartupType": "Manual", - "OriginalType": "Disabled" - }, - { - "Name": "NPSMSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "NaturalAuthentication", "StartupType": "Manual", @@ -653,123 +473,73 @@ "StartupType": "Disabled", "OriginalType": "Disabled" }, - { - "Name": "Netlogon", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "Netman", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "NgcCtnrSvc", + "Name": "NlaSvc", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "NgcSvc", + "Name": "PcaSvc", "StartupType": "Manual", - "OriginalType": "Manual" + "OriginalType": "Automatic" }, { - "Name": "NlaSvc", + "Name": "PeerDistSvc", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "OneSyncSvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" + "Name": "PerfHost", + "StartupType": "Manual", + "OriginalType": "Manual" }, { - "Name": "P9RdrService_*", + "Name": "PhoneSvc", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PNRPAutoReg", + "Name": "PlugPlay", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PNRPsvc", + "Name": "PolicyAgent", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PcaSvc", - "StartupType": "Manual", + "Name": "Power", + "StartupType": "Automatic", "OriginalType": "Automatic" }, { - "Name": "PeerDistSvc", + "Name": "PrintNotify", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PenService_*", - "StartupType": "Manual", - "OriginalType": "Manual" + "Name": "ProfSvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" }, { - "Name": "PerfHost", + "Name": "PushToInstall", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PhoneSvc", + "Name": "QWAVE", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "PimIndexMaintenanceSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PlugPlay", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PolicyAgent", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Power", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "PrintNotify", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PrintWorkflowUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ProfSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "PushToInstall", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "QWAVE", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RasAuto", + "Name": "RasAuto", "StartupType": "Manual", "OriginalType": "Manual" }, @@ -798,21 +568,11 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "RpcEptMapper", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "RpcLocator", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "RpcSs", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "SCPolicySvc", "StartupType": "Manual", @@ -863,21 +623,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "Schedule", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SecurityHealthService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Sense", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "SensorDataService", "StartupType": "Manual", @@ -898,21 +643,11 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "SgrmBroker", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "SharedAccess", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "SharedRealitySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "ShellHWDetection", "StartupType": "Automatic", @@ -933,11 +668,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "StateRepository", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, { "Name": "StiSvc", "StartupType": "Manual", @@ -953,16 +683,6 @@ "StartupType": "Automatic", "OriginalType": "Automatic" }, - { - "Name": "SystemEventsBroker", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TabletInputService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "TapiSrv", "StartupType": "Manual", @@ -970,13 +690,8 @@ }, { "Name": "TermService", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TextInputManagementService", "StartupType": "Manual", - "OriginalType": "Automatic" + "OriginalType": "Manual" }, { "Name": "Themes", @@ -988,16 +703,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "TimeBroker", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TimeBrokerSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "TokenBroker", "StartupType": "Manual", @@ -1018,16 +723,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "UI0Detect", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UdkUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "UevAgentService", "StartupType": "Disabled", @@ -1038,16 +733,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "UnistoreSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UserDataSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "UserManager", "StartupType": "Automatic", @@ -1058,31 +743,16 @@ "StartupType": "Manual", "OriginalType": "Automatic" }, - { - "Name": "VGAuthService", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "VMTools", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "VSS", "StartupType": "Manual", "OriginalType": "Manual" }, { - "Name": "VacSvc", + "Name": "VaultSvc", "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "VaultSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "W32Time", "StartupType": "Manual", @@ -1114,20 +784,15 @@ "OriginalType": "Manual" }, { - "Name": "WSService", + "Name": "WSAIFabricSvc", "StartupType": "Manual", - "OriginalType": "Manual" + "OriginalType": "Automatic" }, { "Name": "WSearch", "StartupType": "AutomaticDelayedStart", "OriginalType": "Automatic" }, - { - "Name": "WaaSMedicSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "WalletService", "StartupType": "Manual", @@ -1148,16 +813,6 @@ "StartupType": "Automatic", "OriginalType": "Automatic" }, - { - "Name": "WcsPlugInService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WdNisSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "WdiServiceHost", "StartupType": "Manual", @@ -1188,16 +843,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "WinDefend", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "WinHttpAutoProxySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "WinRM", "StartupType": "Manual", @@ -1208,11 +853,6 @@ "StartupType": "Automatic", "OriginalType": "Automatic" }, - { - "Name": "WlanSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "WpcMonSvc", "StartupType": "Manual", @@ -1223,11 +863,6 @@ "StartupType": "Manual", "OriginalType": "Automatic" }, - { - "Name": "WpnUserService_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "XblAuthManager", "StartupType": "Manual", @@ -1261,11 +896,6 @@ { "Name": "camsvc", "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "cbdhsvc_*", - "StartupType": "Manual", "OriginalType": "Automatic" }, { @@ -1283,11 +913,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "diagnosticshub.standardcollector.service", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "diagsvc", "StartupType": "Manual", @@ -1313,11 +938,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "embeddedmode", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "fdPHost", "StartupType": "Manual", @@ -1328,11 +948,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "gpsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "hidserv", "StartupType": "Manual", @@ -1363,16 +978,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "mpssvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "msiserver", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "netprofm", "StartupType": "Manual", @@ -1383,16 +988,6 @@ "StartupType": "Automatic", "OriginalType": "Automatic" }, - { - "Name": "p2pimsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "p2psvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "perceptionsimulation", "StartupType": "Manual", @@ -1418,16 +1013,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "spectrum", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "sppsvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, { "Name": "ssh-agent", "StartupType": "Disabled", @@ -1443,21 +1028,11 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "tiledatamodelsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "tzautoupdate", "StartupType": "Disabled", "OriginalType": "Disabled" }, - { - "Name": "uhssvc", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, { "Name": "upnphost", "StartupType": "Manual", @@ -1468,11 +1043,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "vm3dservice", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, { "Name": "vmicguestinterface", "StartupType": "Manual", @@ -1513,11 +1083,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "vmvss", - "StartupType": "Manual", - "OriginalType": "Manual" - }, { "Name": "wbengine", "StartupType": "Manual", @@ -1533,11 +1098,6 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "webthreatdefusersvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, { "Name": "wercplsupport", "StartupType": "Manual", @@ -1568,709 +1128,518 @@ "StartupType": "Manual", "OriginalType": "Manual" }, - { - "Name": "wscsvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, { "Name": "wuauserv", "StartupType": "Manual", "OriginalType": "Manual" - }, - { - "Name": "wudfsvc", - "StartupType": "Manual", - "OriginalType": "Manual" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Services" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/services" }, - "WPFTweaksEdgeDebloat": { - "Content": "Debloat Edge", - "Description": "Disables various telemetry options, popups, and other annoyances in Edge.", - "category": "Essential Tweaks", + "WPFTweaksBraveDebloat": { + "Content": "Brave Debloat", + "Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.", + "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a016_", "registry": [ { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate", - "Name": "CreateDesktopShortcutDefault", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveRewardsDisabled", + "Value": "1", "Type": "DWord", - "Value": "0", "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "PersonalizationReportingEnabled", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveWalletDisabled", + "Value": "1", "Type": "DWord", - "Value": "0", "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ShowRecommendationsEnabled", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveVPNDisabled", + "Value": "1", "Type": "DWord", - "Value": "0", "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "HideFirstRunExperience", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveAIChatEnabled", + "Value": "0", "Type": "DWord", - "Value": "1", "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "UserFeedbackAllowed", - "Type": "DWord", + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveStatsPingEnabled", "Value": "0", - "OriginalValue": "<RemoveEntry>" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ConfigureDoNotTrack", "Type": "DWord", - "Value": "1", "OriginalValue": "<RemoveEntry>" - }, + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/bravedebloat" + }, + "WPFTweaksEdgeDebloat": { + "Content": "Edge Debloat", + "Description": "Disables various telemetry options, popups, and other annoyances in Edge.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "AlternateErrorPagesEnabled", - "Type": "DWord", + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate", + "Name": "CreateDesktopShortcutDefault", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeCollectionsEnabled", - "Type": "DWord", + "Name": "PersonalizationReportingEnabled", "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\\ExtensionInstallBlocklist", + "Name": "1", + "Value": "ofefcgjbeghpigppfmkologfjadafddi", + "Type": "String", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeShoppingAssistantEnabled", - "Type": "DWord", + "Name": "ShowRecommendationsEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "MicrosoftEdgeInsiderPromotionEnabled", + "Name": "HideFirstRunExperience", + "Value": "1", "Type": "DWord", - "Value": "0", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "PersonalizationReportingEnabled", - "Type": "DWord", + "Name": "UserFeedbackAllowed", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ShowMicrosoftRewards", + "Name": "ConfigureDoNotTrack", + "Value": "1", "Type": "DWord", - "Value": "0", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "WebWidgetAllowed", - "Type": "DWord", + "Name": "AlternateErrorPagesEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "DiagnosticData", - "Type": "DWord", + "Name": "EdgeCollectionsEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeAssetDeliveryServiceEnabled", + "Name": "EdgeShoppingAssistantEnabled", + "Value": "0", "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "MicrosoftEdgeInsiderPromotionEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeCollectionsEnabled", + "Name": "ShowMicrosoftRewards", + "Value": "0", "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "WebWidgetAllowed", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "CryptoWalletEnabled", + "Name": "DiagnosticData", + "Value": "0", "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "EdgeAssetDeliveryServiceEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", "Name": "WalletDonationEnabled", + "Value": "0", "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "DefaultBrowserSettingsCampaignEnabled", "Value": "0", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EdgeDebloat" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/edgedebloat" }, "WPFTweaksConsumerFeatures": { "Content": "Disable ConsumerFeatures", - "Description": "Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)", + "Description": "Windows will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link).", "category": "Essential Tweaks", "panel": "1", - "Order": "a003_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", - "OriginalValue": "<RemoveEntry>", "Name": "DisableWindowsConsumerFeatures", "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/ConsumerFeatures" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/consumerfeatures" }, - "WPFTweaksTele": { + "WPFTweaksTelemetry": { "Content": "Disable Telemetry", - "Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.", + "Description": "Disables Microsoft Telemetry.", "category": "Essential Tweaks", "panel": "1", - "Order": "a003_", - "ScheduledTask": [ - { - "Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Autochk\\Proxy", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Customer Experience Improvement Program\\Consolidator", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Customer Experience Improvement Program\\UsbCeip", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\DiskDiagnostic\\Microsoft-Windows-DiskDiagnosticDataCollector", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Feedback\\Siuf\\DmClient", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Feedback\\Siuf\\DmClientOnScenarioDownload", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Windows Error Reporting\\QueueReporting", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\MareBackup", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\StartupAppTask", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\PcaPatchDbTask", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Maps\\MapsUpdateTask", - "State": "Disabled", - "OriginalState": "Enabled" - } - ], "registry": [ { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection", - "Type": "DWord", + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo", + "Name": "Enabled", "Value": "0", - "Name": "AllowTelemetry", + "Type": "DWord", "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", - "OriginalValue": "<RemoveEntry>", - "Name": "AllowTelemetry", + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Privacy", + "Name": "TailoredExperiencesWithDiagnosticDataEnabled", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "ContentDeliveryAllowed", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "OemPreInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "PreInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "PreInstalledAppsEverEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SilentInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338387Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338388Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338389Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-353698Enabled", - "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SystemPaneSuggestionsEnabled", + "Path": "HKCU:\\Software\\Microsoft\\Speech_OneCore\\Settings\\OnlineSpeechPrivacy", + "Name": "HasAccepted", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules", - "OriginalValue": "0", - "Name": "NumberOfSIUFInPeriod", + "Path": "HKCU:\\Software\\Microsoft\\Input\\TIPC", + "Name": "Enabled", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", - "OriginalValue": "<RemoveEntry>", - "Name": "DoNotShowFeedbackNotifications", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", - "OriginalValue": "<RemoveEntry>", - "Name": "DisableTailoredExperiencesWithDiagnosticData", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AdvertisingInfo", - "OriginalValue": "<RemoveEntry>", - "Name": "DisabledByGroupPolicy", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting", - "OriginalValue": "0", - "Name": "Disabled", - "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config", - "OriginalValue": "1", - "Name": "DODownloadMode", + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization", + "Name": "RestrictImplicitInkCollection", "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance", - "OriginalValue": "1", - "Name": "fAllowToGetHelp", - "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\OperationStatusManager", - "OriginalValue": "0", - "Name": "EnthusiastMode", + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization", + "Name": "RestrictImplicitTextCollection", "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "ShowTaskViewButton", + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization\\TrainedDataStore", + "Name": "HarvestContacts", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\People", - "OriginalValue": "1", - "Name": "PeopleBand", + "Path": "HKCU:\\Software\\Microsoft\\Personalization\\Settings", + "Name": "AcceptedPrivacyPolicy", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "LaunchTo", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem", - "OriginalValue": "0", - "Name": "LongPathsEnabled", - "Value": "1", - "Type": "DWord" - }, - { - "_Comment": "Driver searching is a function that should be left in", - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", - "OriginalValue": "1", - "Name": "SearchOrderConfig", - "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile", - "OriginalValue": "1", - "Name": "SystemResponsiveness", + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection", + "Name": "AllowTelemetry", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile", - "OriginalValue": "1", - "Name": "NetworkThrottlingIndex", - "Value": "4294967295", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "MenuShowDelay", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "AutoEndTasks", - "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management", - "OriginalValue": "0", - "Name": "ClearPageFileAtShutdown", + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "Start_TrackProgs", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\ControlSet001\\Services\\Ndu", - "OriginalValue": "1", - "Name": "Start", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Mouse", - "OriginalValue": "400", - "Name": "MouseHoverTime", - "Value": "400", - "Type": "String" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters", - "OriginalValue": "20", - "Name": "IRPStackSize", - "Value": "30", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Feeds", - "OriginalValue": "<RemoveEntry>", - "Name": "EnableFeeds", + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", + "Name": "PublishUserActivities", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Feeds", - "OriginalValue": "1", - "Name": "ShellFeedsTaskbarViewMode", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", - "OriginalValue": "<RemoveEntry>", - "Name": "HideSCAMeetNow", - "Value": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement", - "OriginalValue": "1", - "Name": "ScoobeSystemSettingEnabled", + "Path": "HKCU:\\Software\\Microsoft\\Siuf\\Rules", + "Name": "NumberOfSIUFInPeriod", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" } ], "InvokeScript": [ " - bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null - If ((get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentBuild).CurrentBuild -lt 22557) { - $taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru - Do { - Start-Sleep -Milliseconds 100 - $preferences = Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -ErrorAction SilentlyContinue - } Until ($preferences) - Stop-Process $taskmgr - $preferences.Preferences[28] = 0 - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences - } - Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue + # Disable Defender Auto Sample Submission + Set-MpPreference -SubmitSamplesConsent 2 - # Fix Managed by your organization in Edge if regustry path exists then remove it + # Disable (Connected User Experiences and Telemetry) Service + Set-Service -Name diagtrack -StartupType Disabled - If (Test-Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\") { - Remove-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\" -Recurse -ErrorAction SilentlyContinue - } + # Disable (Windows Error Reporting Manager) Service + Set-Service -Name wermgr -StartupType Disabled - # Group svchost.exe processes - $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb - Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name \"SvcHostSplitThresholdInKB\" -Type DWord -Value $ram -Force + $Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB + Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory - $autoLoggerDir = \"$env:PROGRAMDATA\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger\" - If (Test-Path \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\") { - Remove-Item \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\" - } - icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null + Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Siuf\\Rules\" -Name PeriodInNanoSeconds + " + ], + "UndoScript": [ + " + # Enable Defender Auto Sample Submission + Set-MpPreference -SubmitSamplesConsent 1 - # Disable Defender Auto Sample Submission - Set-MpPreference -SubmitSamplesConsent 2 -ErrorAction SilentlyContinue | Out-Null - " + # Enable (Connected User Experiences and Telemetry) Service + Set-Service -Name diagtrack -StartupType Automatic + + # Enable (Windows Error Reporting Manager) Service + Set-Service -Name wermgr -StartupType Automatic + " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Tele" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/telemetry" }, - "WPFTweaksWifi": { - "Content": "Disable Wifi-Sense", - "Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.", - "category": "Essential Tweaks", + "WPFTweaksRemoveEdge": { + "Content": "Remove Microsoft Edge", + "Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.", + "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting", - "Name": "Value", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowAutoConnectToWiFiSenseHotspots", - "Name": "Value", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } + "InvokeScript": [ + "Invoke-WinUtilRemoveEdge" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Wifi" + "UndoScript": [ + " + Write-Host 'Installing Microsoft Edge...' + winget install Microsoft.Edge --source winget + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeedge" }, "WPFTweaksUTC": { "Content": "Set Time to UTC (Dual Boot)", - "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.", + "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a027_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation", "Name": "RealTimeIsUniversal", - "Type": "DWord", "Value": "1", + "Type": "QWord", "OriginalValue": "0" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/utc" + }, + "WPFTweaksRemoveOneDrive": { + "Content": "Remove OneDrive", + "Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + # Deny permission to remove OneDrive folder + icacls $Env:OneDrive /deny \"Administrators:(D,DC)\" + + Write-Host \"Uninstalling OneDrive...\" + Start-Process 'C:\\Windows\\System32\\OneDriveSetup.exe' -ArgumentList '/uninstall' -Wait + + # Some of OneDrive files use explorer, and OneDrive uses FileCoAuth + Write-Host \"Removing leftover OneDrive Files...\" + Stop-Process -Name FileCoAuth,Explorer + Remove-Item \"$Env:LocalAppData\\Microsoft\\OneDrive\" -Recurse -Force + Remove-Item \"C:\\ProgramData\\Microsoft OneDrive\" -Recurse -Force + + # Grant back permission to access OneDrive folder + icacls $Env:OneDrive /grant \"Administrators:(D,DC)\" + + # Disable OneSyncSvc + Set-Service -Name OneSyncSvc -StartupType Disabled + " + ], + "UndoScript": [ + " + Write-Host \"Installing OneDrive\" + winget install Microsoft.Onedrive --source winget + + # Enabled OneSyncSvc + Set-Service -Name OneSyncSvc -StartupType Automatic + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removeonedrive" }, - "WPFTweaksRemoveHomeGallery": { - "Content": "Remove Home and Gallery from explorer", - "Description": "Removes the Home and Gallery from explorer and sets This PC as default", + "WPFTweaksRemoveHome": { + "Content": "Remove Home from Explorer", + "Description": "Removes the Home from Explorer and sets This PC as default.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a029_", "InvokeScript": [ " - REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f - REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f - REG ADD \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" /t REG_DWORD /d \"1\" + Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 1 " ], "UndoScript": [ " - REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f /ve /t REG_SZ /d \"{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" - REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f /ve /t REG_SZ /d \"CLSID_MSGraphHomeFolder\" - REG DELETE \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0 " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehome" + }, + "WPFTweaksRemoveGallery": { + "Content": "Remove Gallery from Explorer", + "Description": "Removes the Gallery from Explorer and sets This PC as default.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" + " + ], + "UndoScript": [ + " + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removegallery" }, "WPFTweaksDisplay": { "Content": "Set Display for Performance", "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a027_", "registry": [ { "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", "Name": "DragFullWindows", "Value": "0", - "Type": "String" + "Type": "String", + "OriginalValue": "1" }, { "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", "Name": "MenuShowDelay", "Value": "200", - "Type": "String" + "Type": "String", + "OriginalValue": "400" }, { "Path": "HKCU:\\Control Panel\\Desktop\\WindowMetrics", - "OriginalValue": "1", "Name": "MinAnimate", "Value": "0", - "Type": "String" + "Type": "String", + "OriginalValue": "1" }, { "Path": "HKCU:\\Control Panel\\Keyboard", - "OriginalValue": "1", "Name": "KeyboardDelay", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", "Name": "ListviewAlphaSelect", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", "Name": "ListviewShadow", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", "Name": "TaskbarAnimations", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects", - "OriginalValue": "1", "Name": "VisualFXSetting", "Value": "3", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\DWM", - "OriginalValue": "1", "Name": "EnableAeroPeek", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", "Name": "TaskbarMn", "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "TaskbarDa", - "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", "Name": "ShowTaskViewButton", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", - "OriginalValue": "1", "Name": "SearchboxTaskbarMode", "Value": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" } ], "InvokeScript": [ @@ -2279,836 +1648,291 @@ "UndoScript": [ "Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\"" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/display" + }, + "WPFTweaksXboxRemoval": { + "Content": "Remove Xbox & Gaming Components", + "Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GameDVR", + "Name": "AppCaptureEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], + "appx": [ + "Microsoft.XboxIdentityProvider", + "Microsoft.XboxSpeechToTextOverlay", + "Microsoft.GamingApp", + "Microsoft.Xbox.TCUI", + "Microsoft.XboxGamingOverlay" + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/xboxremoval" }, "WPFTweaksDeBloat": { - "Content": "Remove ALL MS Store Apps - NOT RECOMMENDED", - "Description": "USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!", + "Content": "Remove Unwanted Pre-Installed Apps", + "Description": "This will remove a bunch of Windows pre-installed applications which most people dont want on there system.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a028_", "appx": [ - "Microsoft.Microsoft3DViewer", - "Microsoft.AppConnector", - "Microsoft.BingFinance", + "Microsoft.WindowsFeedbackHub", "Microsoft.BingNews", - "Microsoft.BingSports", - "Microsoft.BingTranslator", + "Microsoft.BingSearch", "Microsoft.BingWeather", - "Microsoft.BingFoodAndDrink", - "Microsoft.BingHealthAndFitness", - "Microsoft.BingTravel", - "Microsoft.MinecraftUWP", - "Microsoft.GamingServices", - "Microsoft.GetHelp", - "Microsoft.Getstarted", - "Microsoft.Messaging", - "Microsoft.Microsoft3DViewer", + "Clipchamp.Clipchamp", + "Microsoft.Todos", + "Microsoft.PowerAutomateDesktop", "Microsoft.MicrosoftSolitaireCollection", - "Microsoft.NetworkSpeedTest", - "Microsoft.News", - "Microsoft.Office.Lens", - "Microsoft.Office.Sway", - "Microsoft.Office.OneNote", - "Microsoft.OneConnect", - "Microsoft.People", - "Microsoft.Print3D", - "Microsoft.SkypeApp", - "Microsoft.Wallet", - "Microsoft.Whiteboard", - "Microsoft.WindowsAlarms", - "microsoft.windowscommunicationsapps", - "Microsoft.WindowsFeedbackHub", - "Microsoft.WindowsMaps", "Microsoft.WindowsSoundRecorder", - "Microsoft.ConnectivityStore", - "Microsoft.ScreenSketch", - "Microsoft.MixedReality.Portal", + "Microsoft.MicrosoftStickyNotes", + "Microsoft.Windows.DevHome", + "Microsoft.Paint", + "Microsoft.OutlookForWindows", + "Microsoft.WindowsAlarms", + "Microsoft.StartExperiencesApp", + "Microsoft.GetHelp", "Microsoft.ZuneMusic", - "Microsoft.ZuneVideo", - "Microsoft.Getstarted", - "Microsoft.MicrosoftOfficeHub", - "*EclipseManager*", - "*ActiproSoftwareLLC*", - "*AdobeSystemsIncorporated.AdobePhotoshopExpress*", - "*Duolingo-LearnLanguagesforFree*", - "*PandoraMediaInc*", - "*CandyCrush*", - "*BubbleWitch3Saga*", - "*Wunderlist*", - "*Flipboard*", - "*Twitter*", - "*Facebook*", - "*Royal Revolt*", - "*Sway*", - "*Speed Test*", - "*Dolby*", - "*Viber*", - "*ACGMediaPlayer*", - "*Netflix*", - "*OneCalendar*", - "*LinkedInforWindows*", - "*HiddenCityMysteryofShadows*", - "*Hulu*", - "*HiddenCity*", - "*AdobePhotoshopExpress*", - "*HotspotShieldFreeVPN*", - "*Microsoft.Advertising.Xaml*" + "MicrosoftCorporationII.QuickAssist", + "MSTeams" ], "InvokeScript": [ " - $TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams') - $TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe') + $TeamsPath = \"$Env:LocalAppData\\Microsoft\\Teams\\Update.exe\" - Write-Host \"Stopping Teams process...\" - Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue - - Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\" - if ([System.IO.File]::Exists($TeamsUpdateExePath)) { - # Uninstall app - $proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru - $proc.WaitForExit() - } - - Write-Host \"Removing Teams AppxPackage...\" - Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue - Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue + if (Test-Path $TeamsPath) { + Write-Host \"Uninstalling Teams\" + Start-Process $TeamsPath -ArgumentList -uninstall -wait Write-Host \"Deleting Teams directory\" - if ([System.IO.Directory]::Exists($TeamsPath)) { - Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue - } - - Write-Host \"Deleting Teams uninstall registry key\" - # Uninstall from Uninstall registry key UninstallString - $us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString - if ($us.Length -gt 0) { - $us = ($us.Replace('/I', '/uninstall ') + ' /quiet').Replace(' ', ' ') - $FilePath = ($us.Substring(0, $us.IndexOf('.exe') + 4).Trim()) - $ProcessArgs = ($us.Substring($us.IndexOf('.exe') + 5).Trim().replace(' ', ' ')) - $proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru - $proc.WaitForExit() - } - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat" + Remove-Item $TeamsPath -Recurse -Force + } + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/debloat" }, "WPFTweaksRestorePoint": { "Content": "Create Restore Point", - "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications", + "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.", "category": "Essential Tweaks", "panel": "1", "Checked": "False", - "Order": "a001_", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore", + "Name": "SystemRestorePointCreationFrequency", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1440" + } + ], "InvokeScript": [ " - # Check if System Restore is enabled for the main drive - try { - # Try getting restore points to check if System Restore is enabled - Enable-ComputerRestore -Drive \"$env:SystemDrive\" - } catch { - Write-Host \"An error occurred while enabling System Restore: $_\" - } - - # Check if the SystemRestorePointCreationFrequency value exists - $exists = Get-ItemProperty -path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -ErrorAction SilentlyContinue - if($null -eq $exists) { - write-host 'Changing system to allow multiple restore points per day' - Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -Value \"0\" -Type DWord -Force -ErrorAction Stop | Out-Null - } - - # Attempt to load the required module for Get-ComputerRestorePoint - try { - Import-Module Microsoft.PowerShell.Management -ErrorAction Stop - } catch { - Write-Host \"Failed to load the Microsoft.PowerShell.Management module: $_\" - return - } - - # Get all the restore points for the current day - try { - $existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date } - } catch { - Write-Host \"Failed to retrieve restore points: $_\" - return - } - - # Check if there is already a restore point created today - if ($existingRestorePoints.Count -eq 0) { - $description = \"System Restore Point created by WinUtil\" + if (-not (Get-ComputerRestorePoint)) { + Enable-ComputerRestore -Drive $Env:SystemDrive + } - Checkpoint-Computer -Description $description -RestorePointType \"MODIFY_SETTINGS\" - Write-Host -ForegroundColor Green \"System Restore Point Created Successfully\" - } + Checkpoint-Computer -Description \"System Restore Point created by WinUtil\" -RestorePointType MODIFY_SETTINGS + Write-Host \"System Restore Point Created Successfully\" -ForegroundColor Green " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/RestorePoint" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/restorepoint" }, "WPFTweaksEndTaskOnTaskbar": { "Content": "Enable End Task With Right Click", - "Description": "Enables option to end task when right clicking a program in the taskbar", + "Description": "Enables option to end task when right clicking a program in the taskbar.", "category": "Essential Tweaks", "panel": "1", - "Order": "a006_", - "InvokeScript": [ - "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" - $name = \"TaskbarEndTask\" - $value = 1 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null - } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" - ], - "UndoScript": [ - "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" - $name = \"TaskbarEndTask\" - $value = 0 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings", + "Name": "TaskbarEndTask", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar" - }, - "WPFTweaksPowershell7": { - "Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7", - "Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a009_", - "InvokeScript": [ - "Invoke-WPFTweakPS7 -action \"PS7\"" - ], - "UndoScript": [ - "Invoke-WPFTweakPS7 -action \"PS5\"" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Powershell7" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/endtaskontaskbar" }, "WPFTweaksPowershell7Tele": { - "Content": "Disable Powershell 7 Telemetry", - "Description": "This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data.", + "Content": "Disable PowerShell 7 Telemetry", + "Description": "Creates an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell PowerShell 7 to not send Telemetry Data.", "category": "Essential Tweaks", "panel": "1", - "Order": "a009_", "InvokeScript": [ "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')" ], "UndoScript": [ "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine')" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Powershell7Tele" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/powershell7tele" }, "WPFTweaksStorage": { "Content": "Disable Storage Sense", "Description": "Storage Sense deletes temp files automatically.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "InvokeScript": [ - "Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 0 -Type Dword -Force" - ], - "UndoScript": [ - "Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 1 -Type Dword -Force" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Storage" - }, - "WPFTweaksRemoveEdge": { - "Content": "Remove Microsoft Edge", - "Description": "Removes MS Edge when it gets reinstalled by updates. Credit: Psyirius", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a029_", - "InvokeScript": [ - "Uninstall-WinUtilEdgeBrowser -action \"Uninstall\"" - ], - "UndoScript": [ - "Uninstall-WinUtilEdgeBrowser -action \"Install\"" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge" - }, - "WPFTweaksRemoveCopilot": { - "Content": "Disable Microsoft Copilot", - "Description": "Disables MS Copilot AI built into Windows since 23H2.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a025_", "registry": [ { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot", - "Name": "TurnOffWindowsCopilot", - "Type": "DWord", - "Value": "1", - "OriginalValue": "<RemoveEntry>" - }, - { - "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\WindowsCopilot", - "Name": "TurnOffWindowsCopilot", - "Type": "DWord", - "Value": "1", - "OriginalValue": "<RemoveEntry>" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "ShowCopilotButton", - "Type": "DWord", + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy", + "Name": "01", "Value": "0", - "OriginalValue": "1" - } - ], - "InvokeScript": [ - " - Write-Host \"Remove Copilot\" - dism /online /remove-package /package-name:Microsoft.Windows.Copilot - " - ], - "UndoScript": [ - " - Write-Host \"Install Copilot\" - dism /online /add-package /package-name:Microsoft.Windows.Copilot - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot" - }, - "WPFTweaksRecallOff": { - "Content": "Disable Recall", - "Description": "Turn Recall off", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a011_", - "registry": [ - { - - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI", - "Name": "DisableAIDataAnalysis", "Type": "DWord", - "Value": "1", - "OriginalValue": "<RemoveEntry>" + "OriginalValue": "1" } ], - "InvokeScript": [ - " - Write-Host \"Disable Recall\" - DISM /Online /Disable-Feature /FeatureName:Recall /Quiet /NoRestart - Write-Host \"Please restart your computer in order for the changes to be fully applied.\" - " - ], - "UndoScript": [ - " - Write-Host \"Enable Recall\" - DISM /Online /Enable-Feature /FeatureName:Recall /Quiet /NoRestart - Write-Host \"Please restart your computer in order for the changes to be fully applied.\" - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/storage" }, - "WPFTweaksDisableLMS1": { - "Content": "Disable Intel MM (vPro LMS)", - "Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.", + "WPFTweaksRemoveCopilot": { + "Content": "Remove Microsoft Copilot", + "Description": "Removes Copilot AppXPackages and related ai packages", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a026_", "InvokeScript": [ " - Write-Host \"Kill LMS\" - $serviceName = \"LMS\" - Write-Host \"Stopping and disabling service: $serviceName\" - Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue; - Set-Service -Name $serviceName -StartupType Disabled -ErrorAction SilentlyContinue; + Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers + Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers - Write-Host \"Removing service: $serviceName\"; - sc.exe delete $serviceName; + $Appx = (Get-AppxPackage MicrosoftWindows.Client.CoreAI).PackageFullName + $Sid = (Get-LocalUser $Env:UserName).Sid.Value - Write-Host \"Removing LMS driver packages\"; - $lmsDriverPackages = Get-ChildItem -Path \"C:\\Windows\\System32\\DriverStore\\FileRepository\" -Recurse -Filter \"lms.inf*\"; - foreach ($package in $lmsDriverPackages) { - Write-Host \"Removing driver package: $($package.Name)\"; - pnputil /delete-driver $($package.Name) /uninstall /force; - } - if ($lmsDriverPackages.Count -eq 0) { - Write-Host \"No LMS driver packages found in the driver store.\"; - } else { - Write-Host \"All found LMS driver packages have been removed.\"; - } + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force + Remove-AppxPackage $Appx - Write-Host \"Searching and deleting LMS executable files\"; - $programFilesDirs = @(\"C:\\Program Files\", \"C:\\Program Files (x86)\"); - $lmsFiles = @(); - foreach ($dir in $programFilesDirs) { - $lmsFiles += Get-ChildItem -Path $dir -Recurse -Filter \"LMS.exe\" -ErrorAction SilentlyContinue; - } - foreach ($file in $lmsFiles) { - Write-Host \"Taking ownership of file: $($file.FullName)\"; - & icacls $($file.FullName) /grant Administrators:F /T /C /Q; - & takeown /F $($file.FullName) /A /R /D Y; - Write-Host \"Deleting file: $($file.FullName)\"; - Remove-Item $($file.FullName) -Force -ErrorAction SilentlyContinue; - } - if ($lmsFiles.Count -eq 0) { - Write-Host \"No LMS.exe files found in Program Files directories.\"; - } else { - Write-Host \"All found LMS.exe files have been deleted.\"; - } - Write-Host 'Intel LMS vPro service has been disabled, removed, and blocked.'; - " + Write-Host \"Copilot Removed\" + " ], "UndoScript": [ " - Write-Host \"LMS vPro needs to be redownloaded from intel.com\" - + Write-Host \"Installing Copilot...\" + winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removecopilot" }, - "WPFTweaksRemoveOnedrive": { - "Content": "Remove OneDrive", - "Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.", - "category": "z__Advanced Tweaks - CAUTION", + "WPFTweaksWPBT": { + "Content": "Disable Windows Platform Binary Table (WPBT)", + "Description": "If enabled, WPBT allows your computer vendor to execute programs at boot time, such as anti-theft software, software drivers, as well as force install software without user consent. Poses potential security risk.", + "category": "Essential Tweaks", "panel": "1", - "Order": "a030_", - "InvokeScript": [ - " - $OneDrivePath = $($env:OneDrive) - Write-Host \"Removing OneDrive\" - - # Check both traditional and Microsoft Store installations - $regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\" - $msStorePath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\Applications\\*OneDrive*\" - - if (Test-Path $regPath) { - $OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\" - $OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \") - Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait - } elseif (Test-Path $msStorePath) { - Write-Host \"OneDrive appears to be installed via Microsoft Store\" -ForegroundColor Yellow - # Attempt to uninstall via winget - Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --accept-source-agreements Microsoft.OneDrive\" -NoNewWindow -Wait - } else { - Write-Host \"OneDrive doesn't seem to be installed\" -ForegroundColor Red - Write-Host \"Running cleanup if OneDrive path exists\" -ForegroundColor Red - } - - # Check if OneDrive got Uninstalled (both paths) - if (Test-Path $OneDrivePath) { - Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\" - Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait - - Write-Host \"Removing OneDrive leftovers\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\" - reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f - # check if directory is empty before removing: - If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) { - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\" - } - - Write-Host \"Remove Onedrive from explorer sidebar\" - Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0 - Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0 - - Write-Host \"Removing run hook for new users\" - reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\" - reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f - 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\" - Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\" - - Write-Host \"Removing scheduled task\" - Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false - - # Add Shell folders restoring default locations - Write-Host \"Shell Fixing\" - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -Value \"$env:userprofile\\Documents\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString - Write-Host \"Restarting explorer\" - taskkill.exe /F /IM \"explorer.exe\" - Start-Process \"explorer.exe\" - - Write-Host \"Waiting for explorer to complete loading\" - Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\" - Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow - Start-Sleep 5 - } else { - Write-Host \"Nothing to Cleanup with OneDrive\" -ForegroundColor Red + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", + "Name": "DisableWpbtExecution", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" } - " - ], - "UndoScript": [ - " - Write-Host \"Install OneDrive\" - Start-Process -FilePath winget -ArgumentList \"install -e --accept-source-agreements --accept-package-agreements --silent Microsoft.OneDrive \" -NoNewWindow -Wait - " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/wpbt" }, "WPFTweaksRazerBlock": { "Content": "Block Razer Software Installs", "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a031_", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", "Name": "SearchOrderConfig", "Value": "0", - "OriginalValue": "1", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "1" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Device Installer", "Name": "DisableCoInstallers", "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - } - ], - "InvokeScript": [ - " - $RazerPath = \"C:\\Windows\\Installer\\Razer\" - Remove-Item $RazerPath -Recurse -Force - New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\" - $Acl = Get-Acl $RazerPath - $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule(\"NT AUTHORITY\\SYSTEM\",\"Write\",\"ContainerInherit,ObjectInherit\",\"None\",\"Deny\") - $Acl.SetAccessRule($Ar) - Set-Acl $RazerPath $Acl - " - ], - "UndoScript": [ - " - $RazerPath = \"C:\\Windows\\Installer\\Razer\" - Remove-Item $RazerPath -Recurse -Force - New-Item -Path \"C:\\Windows\\Installer\\\" -Name \"Razer\" -ItemType \"directory\" - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/RazerBlock" - }, - "WPFTweaksDisableNotifications": { - "Content": "Disable Notification Tray/Calendar", - "Description": "Disables all Notifications INCLUDING Calendar", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a026_", - "registry": [ - { - "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer", - "Name": "DisableNotificationCenter", - "Type": "DWord", - "Value": "1", - "OriginalValue": "<RemoveEntry>" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications", - "Name": "ToastEnabled", "Type": "DWord", - "Value": "0", - "OriginalValue": "1" + "OriginalValue": "0" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications" - }, - "WPFTweaksDebloatAdobe": { - "Content": "Adobe Debloat", - "Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a021_", "InvokeScript": [ " - function CCStopper { - $path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" - - # Test if the path exists before proceeding - if (Test-Path $path) { - Takeown /f $path - $acl = Get-Acl $path - $acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\") - $acl | Set-Acl $path - - Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force - } else { - Write-Host \"Adobe Desktop Service is not in the default location.\" - } - } - - - function AcrobatUpdates { - # Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script. - # Possible Values for the edited key: - # 0 = Do not download or install updates automatically - # 2 = Automatically download updates but let the user choose when to install them - # 3 = Automatically download and install updates (default value) - # 4 = Notify the user when an update is available but don't download or install it automatically - # = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing. - - $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 0 - Write-Host \"Acrobat Updates have been disabled.\" - } catch { - Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" - } - } - } - - CCStopper - AcrobatUpdates - " - ], - "UndoScript": [ - " - function RestoreCCService { - $originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\" - $newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" + $RazerPath = \"C:\\Windows\\Installer\\Razer\" - if (Test-Path -Path $originalPath) { - Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force - Write-Host \"Adobe Desktop Service has been restored.\" - } else { - Write-Host \"Backup file does not exist. No changes were made.\" - } - } - - function AcrobatUpdates { - # Default Value: - # 3 = Automatically download and install updates - - $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 3 - } catch { - Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" - } - } + if (Test-Path $RazerPath) { + Remove-Item $RazerPath\\* -Recurse -Force + } else { + New-Item -Path $RazerPath -ItemType Directory } - RestoreCCService - AcrobatUpdates + icacls $RazerPath /deny \"Everyone:(W)\" " - ], - "service": [ - { - "Name": "AGSService", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AGMService", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AdobeUpdateService", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Acrobat Update", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Genuine Monitor Service", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AdobeARMservice", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Licensing Console", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "CCXProcess", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, + ], + "UndoScript": [ + " + icacls \"C:\\Windows\\Installer\\Razer\" /remove:d Everyone + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/razerblock" + }, + "WPFTweaksDisableNotifications": { + "Content": "Disable Notification Tray/Calendar", + "Description": "Disables all Notifications INCLUDING Calendar.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ { - "Name": "AdobeIPCBroker", - "StartupType": "Manual", - "OriginalType": "Automatic" + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer", + "Name": "DisableNotificationCenter", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" }, { - "Name": "CoreSync", - "StartupType": "Manual", - "OriginalType": "Automatic" + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications", + "Name": "ToastEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disablenotifications" }, "WPFTweaksBlockAdobeNet": { "Content": "Adobe Network Block", - "Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", + "Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a021_", "InvokeScript": [ " - # Define the URL of the remote HOSTS file and the local paths - $remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\" - $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" - $tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\" - - # Download the remote HOSTS file to a temporary location - try { - Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath - Write-Output \"Downloaded the remote HOSTS file to a temporary location.\" - } catch { - Write-Error \"Failed to download the HOSTS file. Error: $_\" - } - - # Check if the AdobeNetBlock has already been started - try { - $localHostsContent = Get-Content $localHostsPath -ErrorAction Stop - - # Check if AdobeNetBlock markers exist - $blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\" - if ($blockStartExists) { - Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\" - } else { - # Load the new block from the downloaded file - $newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop - $newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments - $newBlockHeader = \"#AdobeNetBlock-start\" - $newBlockFooter = \"#AdobeNetBlock-end\" - - # Combine the contents, ensuring new block is properly formatted - $combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String - - # Write the combined content back to the original HOSTS file - $combinedContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output \"Successfully added the AdobeNetBlock.\" - } - } catch { - Write-Error \"Error during processing: $_\" - } + $hostsUrl = \"https://github.com/Ruddernation-Designs/Adobe-URL-Block-List/raw/refs/heads/master/hosts\" + $hosts = \"$Env:SystemRoot\\System32\\drivers\\etc\\hosts\" - # Clean up temporary file - Remove-Item $tempHostsPath -ErrorAction Ignore + Move-Item $hosts \"$hosts.bak\" + Invoke-WebRequest $hostsUrl -OutFile $hosts + ipconfig /flushdns - # Flush the DNS resolver cache - try { - Invoke-Expression \"ipconfig /flushdns\" - Write-Output \"DNS cache flushed successfully.\" - } catch { - Write-Error \"Failed to flush DNS cache. Error: $_\" - } + Write-Host \"Added Adobe url block list from host file\" " ], "UndoScript": [ " - # Define the local path of the HOSTS file - $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" - - # Load the content of the HOSTS file - try { - $hostsContent = Get-Content $localHostsPath -ErrorAction Stop - } catch { - Write-Error \"Failed to load the HOSTS file. Error: $_\" - return - } - - # Initialize flags and buffer for new content - $recording = $true - $newContent = @() + $hosts = \"$Env:SystemRoot\\System32\\drivers\\etc\\hosts\" - # Iterate over each line of the HOSTS file - foreach ($line in $hostsContent) { - if ($line -match \"#AdobeNetBlock-start\") { - $recording = $false - } - if ($recording) { - $newContent += $line - } - if ($line -match \"#AdobeNetBlock-end\") { - $recording = $true - } - } - - # Write the filtered content back to the HOSTS file - try { - $newContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\" - } catch { - Write-Error \"Failed to write back to the HOSTS file. Error: $_\" - } + Remove-Item $hosts + Move-Item \"$hosts.bak\" $hosts + ipconfig /flushdns - # Flush the DNS resolver cache - try { - Invoke-Expression \"ipconfig /flushdns\" - Write-Output \"DNS cache flushed successfully.\" - } catch { - Write-Error \"Failed to flush DNS cache. Error: $_\" - } + Write-Host \"Removed Adobe url block list from host file\" " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/blockadobenet" }, "WPFTweaksRightClickMenu": { - "Content": "Set Classic Right-Click Menu ", - "Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.", + "Content": "Set Classic Right-Click Menu", + "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a027_", "InvokeScript": [ " New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" Write-Host Restarting explorer.exe ... - $process = Get-Process -Name \"explorer\" - Stop-Process -InputObject $process + Stop-Process -Name \"explorer\" -Force " ], "UndoScript": [ @@ -3116,113 +1940,65 @@ Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. Write-Host Restarting explorer.exe ... - $process = Get-Process -Name \"explorer\" - Stop-Process -InputObject $process + Stop-Process -Name \"explorer\" -Force " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/rightclickmenu" }, "WPFTweaksDiskCleanup": { "Content": "Run Disk Cleanup", "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", "category": "Essential Tweaks", "panel": "1", - "Order": "a009_", "InvokeScript": [ " cleanmgr.exe /d C: /VERYLOWDISK Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DiskCleanup" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/diskcleanup" }, "WPFTweaksDeleteTempFiles": { "Content": "Delete Temporary Files", - "Description": "Erases TEMP Folders", + "Description": "Erases TEMP Folders.", "category": "Essential Tweaks", "panel": "1", - "Order": "a002_", "InvokeScript": [ - "Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse - Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DeleteTempFiles" - }, - "WPFTweaksDVR": { - "Content": "Disable GameDVR", - "Description": "GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_FSEBehavior", - "Value": "2", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_Enabled", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_HonorUserFSEBehaviorMode", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_EFSEFeatureFlags", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR", - "Name": "AllowGameDVR", - "Value": "0", - "OriginalValue": "<RemoveEntry>", - "Type": "DWord" - } + " + Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force + Remove-Item -Path \"$Env:SystemRoot\\Temp\\*\" -Recurse -Force + " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DVR" + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/deletetempfiles" }, "WPFTweaksIPv46": { "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.", + "Description": "Setting the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a023_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", "Name": "DisabledComponents", "Value": "32", - "OriginalValue": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "0" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/IPv46" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/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", + "Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a023_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", "Name": "DisabledComponents", "Value": "1", - "OriginalValue": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "0" } ], "InvokeScript": [ @@ -3231,88 +2007,84 @@ "UndoScript": [ "netsh interface teredo set state default" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/teredo" }, - "WPFTweaksDisableipsix": { + "WPFTweaksDisableIPv6": { "Content": "Disable IPv6", "Description": "Disables IPv6.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a023_", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", "Name": "DisabledComponents", "Value": "255", - "OriginalValue": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "0" } ], "InvokeScript": [ - "Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6" + "Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6" ], "UndoScript": [ - "Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6" + "Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6" ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disableipv6" }, "WPFTweaksDisableBGapps": { "Content": "Disable Background Apps", - "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Win11", + "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\BackgroundAccessApplications", "Name": "GlobalUserDisabled", "Value": "1", - "OriginalValue": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "0" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disablebgapps" }, "WPFTweaksDisableFSO": { "Content": "Disable Fullscreen Optimizations", - "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen", + "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a024_", "registry": [ { "Path": "HKCU:\\System\\GameConfigStore", "Name": "GameDVR_DXGIHonorFSEWindowsCompatible", "Value": "1", - "OriginalValue": "0", - "Type": "DWord" + "Type": "DWord", + "OriginalValue": "0" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disablefso" }, "WPFToggleDarkMode": { "Content": "Dark Theme for Windows", "Description": "Enable/Disable Dark Mode.", "category": "Customize Preferences", "panel": "2", - "Order": "a100_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "Name": "AppsUseLightTheme", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" }, { "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "Name": "SystemUsesLightTheme", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" } ], "InvokeScript": [ @@ -3331,142 +2103,118 @@ } " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DarkMode" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/darkmode" }, "WPFToggleBingSearch": { "Content": "Bing Search in Start Menu", - "Description": "If enable then includes web search results from Bing in your Start Menu search.", + "Description": "If enabled, Bing web search results will be included in your Start Menu search.", "category": "Customize Preferences", "panel": "2", - "Order": "a101_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", "Name": "BingSearchEnabled", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/bingsearch" + }, + "WPFToggleStandbyFix": { + "Content": "Modern Standby fix", + "Description": "Disable network connection during S0 Sleep. If network connectivity is turned on during S0 Sleep it could cause overheating on modern laptops.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Power\\PowerSettings\\f15576e8-98b7-4186-b944-eafa664402d9", + "Name": "ACSettingIndex", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "true" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/BingSearch" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/standbyfix" }, "WPFToggleNumLock": { - "Content": "NumLock on Startup", + "Content": "Num Lock on Startup", "Description": "Toggle the Num Lock key state when your computer starts.", "category": "Customize Preferences", "panel": "2", - "Order": "a102_", "Type": "Toggle", "registry": [ { "Path": "HKU:\\.Default\\Control Panel\\Keyboard", "Name": "InitialKeyboardIndicators", "Value": "2", + "Type": "String", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" }, { "Path": "HKCU:\\Control Panel\\Keyboard", "Name": "InitialKeyboardIndicators", "Value": "2", + "Type": "String", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/NumLock" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/numlock" }, "WPFToggleVerboseLogon": { "Content": "Verbose Messages During Logon", "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", "category": "Customize Preferences", "panel": "2", - "Order": "a103_", "Type": "Toggle", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", "Name": "VerboseStatus", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/verboselogon" }, "WPFToggleStartMenuRecommendations": { "Content": "Recommendations in Start Menu", - "Description": "If disabled then you will not see recommendations in the Start Menu. | Enables 'iseducationenvironment' | Relogin Required.", + "Description": "If disabled, then you will not see recommendations in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.", "category": "Customize Preferences", "panel": "2", - "Order": "a104_", "Type": "Toggle", "registry": [ { "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start", "Name": "HideRecommendedSection", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" }, { "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education", "Name": "IsEducationEnvironment", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" }, { "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer", "Name": "HideRecommendedSection", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "true", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/WPFToggleStartMenuRecommendations" - }, - "WPFToggleSnapWindow": { - "Content": "Snap Window", - "Description": "If enabled you can align windows by dragging them. | Relogin Required", - "category": "Customize Preferences", - "panel": "2", - "Order": "a105_", - "Type": "Toggle", - "registry": [ - { - "Path": "HKCU:\\Control Panel\\Desktop", - "Name": "WindowArrangementActive", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "String" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapWindow" - }, - "WPFToggleSnapFlyout": { - "Content": "Snap Assist Flyout", - "Description": "If enabled then Snap preview is disabled when maximize button is hovered.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a106_", - "Type": "Toggle", - "registry": [ - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "EnableSnapAssistFlyout", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" } ], "InvokeScript": [ @@ -3479,106 +2227,152 @@ Invoke-WinUtilExplorerUpdate -action \"restart\" " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapFlyout" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/startmenurecommendations" }, - "WPFToggleSnapSuggestion": { - "Content": "Snap Assist Suggestion", - "Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.", + "WPFToggleHideSettingsHome": { + "Content": "Remove Settings Home Page", + "Description": "Removes the Home Page in the Windows Settings app.", "category": "Customize Preferences", "panel": "2", - "Order": "a107_", "Type": "Toggle", "registry": [ { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "SnapAssist", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + "Name": "SettingsPageVisibility", + "Value": "hide:home", + "Type": "String", + "OriginalValue": "show:home", + "DefaultState": "false" } ], - "InvokeScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], - "UndoScript": [ - " - Invoke-WinUtilExplorerUpdate -action \"restart\" - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapSuggestion" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/hidesettingshome" }, "WPFToggleMouseAcceleration": { "Content": "Mouse Acceleration", - "Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.", + "Description": "If enabled, the Cursor movement is affected by the speed of your physical mouse movements.", "category": "Customize Preferences", "panel": "2", - "Order": "a108_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Control Panel\\Mouse", "Name": "MouseSpeed", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" }, { "Path": "HKCU:\\Control Panel\\Mouse", "Name": "MouseThreshold1", "Value": "6", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" }, { "Path": "HKCU:\\Control Panel\\Mouse", "Name": "MouseThreshold2", "Value": "10", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/MouseAcceleration" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/mouseacceleration" }, "WPFToggleStickyKeys": { "Content": "Sticky Keys", - "Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", + "Description": "If enabled, Sticky Keys is activated. Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", "category": "Customize Preferences", "panel": "2", - "Order": "a109_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Control Panel\\Accessibility\\StickyKeys", "Name": "Flags", - "Value": "510", + "Value": "506", + "Type": "DWord", "OriginalValue": "58", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/stickykeys" + }, + "WPFToggleNewOutlook": { + "Content": "New Outlook", + "Description": "If disabled, it removes the new Outlook toggle, disables the new Outlook migration, and ensures the classic Outlook application is used.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "UseNewOutlook", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "HideNewOutlookToggle", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "DoNewOutlookAutoMigration", + "Value": "0", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "NewOutlookMigrationUserSetting", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "true" + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/newoutlook" + }, + "WPFToggleMultiplaneOverlay": { + "Content": "Disable Multiplane Overlay", + "Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm", + "Name": "OverlayTestMode", + "Value": "5", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "false" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/StickyKeys" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/multiplaneoverlay" }, "WPFToggleHiddenFiles": { "Content": "Show Hidden Files", - "Description": "If Enabled then Hidden Files will be shown.", + "Description": "If enabled, Hidden Files will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a200_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "Hidden", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" } ], "InvokeScript": [ @@ -3591,23 +2385,22 @@ Invoke-WinUtilExplorerUpdate -action \"restart\" " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/HiddenFiles" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/hiddenfiles" }, "WPFToggleShowExt": { "Content": "Show File Extensions", - "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", + "Description": "If enabled, File extensions (e.g., .txt, .jpg) are visible.", "category": "Customize Preferences", "panel": "2", - "Order": "a201_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "HideFileExt", "Value": "0", + "Type": "DWord", "OriginalValue": "1", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" } ], "InvokeScript": [ @@ -3620,144 +2413,218 @@ Invoke-WinUtilExplorerUpdate -action \"restart\" " ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/ShowExt" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/showext" }, "WPFToggleTaskbarSearch": { "Content": "Search Button in Taskbar", - "Description": "If Enabled Search Button will be on the taskbar.", + "Description": "If enabled, Search Button will be on the Taskbar.", "category": "Customize Preferences", "panel": "2", - "Order": "a202_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", "Name": "SearchboxTaskbarMode", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarSearch" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskbarsearch" }, "WPFToggleTaskView": { "Content": "Task View Button in Taskbar", - "Description": "If Enabled then Task View Button in Taskbar will be shown.", + "Description": "If enabled, Task View Button in Taskbar will be shown.", "category": "Customize Preferences", "panel": "2", - "Order": "a203_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "ShowTaskViewButton", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskView" - }, - "WPFToggleTaskbarWidgets": { - "Content": "Widgets Button in Taskbar", - "Description": "If Enabled then Widgets Button in Taskbar will be shown.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a204_", - "Type": "Toggle", - "registry": [ - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "TaskbarDa", - "Value": "1", - "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarWidgets" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskview" }, "WPFToggleTaskbarAlignment": { "Content": "Center Taskbar Items", - "Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", + "Description": "[Windows 11] If enabled, the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", "category": "Customize Preferences", "panel": "2", - "Order": "a204_", "Type": "Toggle", "registry": [ { "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", "Name": "TaskbarAl", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "true", - "Type": "DWord" + "DefaultState": "true" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarAlignment" + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/taskbaralignment" }, "WPFToggleDetailedBSoD": { "Content": "Detailed BSoD", - "Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.", + "Description": "If enabled, you will see a detailed Blue Screen of Death (BSOD) with more information.", "category": "Customize Preferences", "panel": "2", - "Order": "a205_", "Type": "Toggle", "registry": [ { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl", "Name": "DisplayParameters", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" }, { "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl", "Name": "DisableEmoticon", "Value": "1", + "Type": "DWord", "OriginalValue": "0", - "DefaultState": "false", - "Type": "DWord" + "DefaultState": "false" + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/detailedbsod" + }, + "WPFToggleS3Sleep": { + "Content": "S3 Sleep", + "Description": "Toggles between Modern Standby and S3 Sleep.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power", + "Name": "PlatformAoAcOverride", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "false" } ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DetailedBSoD" + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/s3sleep" }, "WPFOOSUbutton": { "Content": "Run OO Shutup 10", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a039_", "Type": "Button", - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton" + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/oosubutton" }, "WPFchangedns": { "Content": "DNS", "category": "z__Advanced Tweaks - CAUTION", "panel": "1", - "Order": "a040_", "Type": "Combobox", - "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult dns0.eu_Open dns0.eu_ZERO dns0.eu_KIDS", - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns" + "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult", + "link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/changedns" }, "WPFAddUltPerf": { "Content": "Add and Activate Ultimate Performance Profile", "category": "Performance Plans", "panel": "2", - "Order": "a080_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/AddUltPerf" + "link": "https://winutil.christitus.com/dev/tweaks/performance-plans/addultperf" }, "WPFRemoveUltPerf": { "Content": "Remove Ultimate Performance Profile", "category": "Performance Plans", "panel": "2", - "Order": "a081_", "Type": "Button", "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/RemoveUltPerf" + "link": "https://winutil.christitus.com/dev/tweaks/performance-plans/removeultperf" + }, + "WPFTweaksDisableExplorerAutoDiscovery": { + "Content": "Disable Explorer Automatic Folder Discovery", + "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + # Every folder + $allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\" + + if (!(Test-Path $allFolders)) { + New-Item -Path $allFolders -Force + Write-Host \"Created $allFolders\" + } + + # Generic view + New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force + Write-Host \"Set FolderType to NotSpecified\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], + "UndoScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], + "link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/disableexplorerautodiscovery" + }, + "WPFToggleDisableCrossDeviceResume": { + "Content": "Cross-Device Resume", + "Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration", + "Name": "IsResumeAllowed", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], + "link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/disablecrossdeviceresume" } } diff --git a/docs/KnownIssues.md b/docs/KnownIssues.md deleted file mode 100644 index d687ce91ca..0000000000 --- a/docs/KnownIssues.md +++ /dev/null @@ -1,214 +0,0 @@ -## Launch Issues - -### Blocked by anti-virus -Windows Security (formerly Defender) and other anti-virus software are known to block the script. The script gets flagged due to the fact that it requires administrator privileges & makes drastic system changes. - -To resolve this, allow/whitelist the script in your anti-virus software settings, or temporarily disable real-time protection. Since the project is open source, you may audit the code if security is a concern. - -### Download not working -If `https://christitus.com/win` is not working, or you want to download the code from GitHub directly, you can use the direct download link: - -```ps1 -irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex -``` - -If you are seeing errors referencing TLS or security, you may be running an older version of Windows where TLS 1.2 is not the default security protocol used for network connections. The following commands will force .NET to use TLS 1.2, and download the script directly using .NET instead of PowerShell: - -```ps1 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -iex (New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1') -``` - -If it still isn't working and you live in India, it might be due to India blocking GitHub's content domain and preventing downloads. See more on [Times of India](https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms). - -If you are still having issues, try using a **VPN**, or changing your **DNS provider** to one of following two providers: - -| Provider | Primary DNS | Secondary DNS | -|:------------:|:------------:|:-------------:| -| Cloudflare | `1.1.1.1` | `1.0.0.1` | -| Google | `8.8.8.8` | `8.8.4.4` | - - -### Script blocked by Execution Policy -1. Ensure you are running PowerShell as admin: Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11. -2. In the PowerShell window, type this to allow unsigned code to execute and run the installation script: - ```ps1 - Set-ExecutionPolicy Unrestricted -Scope Process -Force - irm https://christitus.com/win | iex - ``` - -## Runtime Issues - -### WinGet configuration -If you have not installed anything using PowerShell before, you may be prompted to configure WinGet. This requires user interaction on first run. You will need to manually type `y` into the PowerShell console and press enter to continue. Once you do it the first time, you will not be prompted again. - -### MicroWin: Error `0x80041031` -This error code typically indicates an issue related to Windows Management Instrumentation (WMI). Here are a few steps you can try to resolve the issue: - -1. **Reboot Your Computer:** - - Sometimes, a simple reboot can resolve temporary issues. Restart your computer and try mounting the ISO again. - -3. **Check for System Corruption:** - - Run the System File Checker (SFC) utility to scan and repair system files that may be corrupted. - ```powershell - sfc /scannow - ``` - -4. **Update Your System:** - - Make sure your operating system is up-to-date. Check for Windows updates and install any pending updates. - -5. **Check WMI Service:** - - Ensure that the Windows Management Instrumentation (WMI) service is running. You can do this through the Services application: - - Press `Win`+`R` to open the Run dialog. - - Type `services.msc` and press Enter. - - Locate *Windows Management Instrumentation* in the list. - - Make sure to set its status to "Running" and the startup type to "Automatic". - -6. **Check for Security Software Interference:** - - Security software can sometimes interfere with WMI operations. Temporarily disable your anti-virus or security software and check if the issue persists. WMI is a common attack/infection vector, so many anti-virus programs will limit its usage. - -7. **Event Viewer:** - - Check the Event Viewer for more detailed error information. Look for entries related to the `80041031` error and check if there are any additional details that can help identify the cause. - - - Press `Win`+`X` and select *Event Viewer*. - - Navigate to *Windows Logs* > *Application* or *System*. - - Look for entries with the source related to WMI or the application use to mount the ISO. - -8. **ISO File Integrity:** - - Ensure that the ISO file you are trying to mount is uncorrupted. Try mounting a different ISO file to see if the issue persists. - -If the problem persists after trying these steps, additional troubleshooting is required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you use to mount the ISO. - -## Windows Issues - -### Windows takes longer to shut down -This could be for a number of reasons: -- Turn on fast startup: Press `Windows key`+`R`, then type: - ```bat - control /name Microsoft.PowerOptions /page pageGlobalSettings - ``` -- If that doesn't work, disable Hibernation: - - Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11. - - In the PowerShell window, type: - ```bat - powercfg /H off - ``` -Related issue: [#69](https://github.com/ChrisTitusTech/winutil/issues/69) - -### Windows Search does not work -Enable Background Apps. Related issues: [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) - -### Xbox Game Bar Activation Broken -Set the Xbox Accessory Management Service to Automatic: - -```ps1 -Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic -``` - -Related issue: [#198](https://github.com/ChrisTitusTech/winutil/issues/198) - -### Windows 11: Quick Settings no longer works -Launch the Script and click *Enable Action Center*. - -### Explorer (file browser) no longer launches - - Press `Windows key`+`R` then type: - ```bat - control /name Microsoft.FolderOptions - ``` -- Change the *Open File Explorer to* option to *This PC*. - -### Battery drains too fast -If you're using a laptop or tablet and find your battery drains too fast, please try the below troubleshooting steps, and report the results back to the Winutil community. - -1. **Check Battery Health:** - - Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11. - - Run the following command to generate a battery report: - ```powershell - powercfg /batteryreport /output "C:\battery_report.html" - ``` - - Open the generated HTML report to review information about battery health and usage. A battery with poor health may hold less charge, discharge faster, or cause other issues. - -2. **Review Power Settings:** - - Open the Settings app, and go to *System* > *Power & sleep*. - - Adjust power plan settings based on your preferences and usage patterns. - - Click on *Additional power settings* to access advanced power settings that may help. - -3. **Identify Power-Hungry Apps:** - - Right-click on the taskbar and select *Task Manager*. - - Navigate to the *Processes* tab to identify applications with high CPU or memory usage. - - Consider reconfiguring, closing, disabling, or uninstalling applications that use a lot of resources. - -4. **Update Drivers:** - - Visit your device manufacturer's website or use Windows Update to check for driver updates. - - Ensure graphics, chipset, and other essential drivers are up to date. - -5. **Check for Windows Updates:** - - Open the Settings app, and go to *Update & Security* > *Windows Update*. - - Check for and install any available updates for your operating system. - -6. **Reduce Screen Brightness:** - - Open the Settings app, and go to *System* > *Display*. - - Adjust screen brightness based on your preferences and lighting conditions. - -7. **Enable Battery Saver:** - - Open the Settings app, and go to *System* > *Battery*. - - Turn on *Battery saver* to limit background activity and conserve power. - -8. **Check Power Usage in Settings:** - - Open the Settings app, and go to *System* > *Battery* > *Battery usage by app*. - - Review the list of apps and their power usage. Disable or uninstall any you don't need. - -9. **Check Background Apps:** - - Open the Settings app, and go to *Privacy* > *Background apps*. - - Disable or uninstall unnecessary apps running in the background. - -10. **Use `powercfg` for Analysis:** - - Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11. - - Run the following command to analyze energy usage and generate a report: - ```powershell - powercfg /energy /output "C:\energy_report.html" - ``` - - Open the generated HTML report to identify energy consumption patterns. - -11. **Review Event Logs:** - - Open Event Viewer by searching for it in the Start menu. - - Navigate to *Windows Logs* > *System*. - - Look for events with the source *Power-Troubleshooter* to identify power-related events. These may highlight battery, input power, and other issues. - -12. **Check Wake-up Sources:** - - Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11. - - Use the command `powercfg /requests` to identify processes preventing sleep. - - Use the command `powercfg /waketimers` to view active wake timers. - - Check Task Scheduler to see if any of the discovered processes are scheduled to start on boot or at regular intervals. - -13. **Advanced Identification of Power-Hungry Apps:** - - Open Resource Monitor from the Start menu. - - Navigate to the *CPU*, *Memory*, *Network*, and other tabs to identify processes with high resource usage. - - Consider reconfiguring, closing, disabling, or uninstalling applications that use a lot of resources. - -14. **Disable Activity History:** - - Open the Settings app, and go to *Privacy* > *Activity history*. - - Turn off *Let Windows collect my activities from this PC*. - -15. **Prevent Network Adapters From Waking PC:** - - Open Device Manager by searching for it in the Start menu. - - Locate your network adapter, right-click, and go to *Properties*. - - Under the *Power Management* tab, uncheck the option that allows the device to wake the computer. - -16. **Review Installed Applications:** - - Manually review installed applications by searching for *Add or remove programs* in the Start menu. - - Check settings/preferences of individual applications for power-related options. - - Uninstall unnecessary or problematic software. - -These troubleshooting steps are generic, but should help in most situations. You should have these key takeaways: -- Battery health is the most significant limiter on your device's runtime. A battery in poor health usually cannot be made to last like it used to, simply by closing some applications. Consider replacing your battery. -- Background applications that use CPU and memory, make lots of or large network requests, read/write to disk frequently, or that keep your PC awake when it could be conserving energy are the next major concern. Avoid installing programs you don't need, only use programs you trust, and configure applications to use as little power and run as infrequently as possible. -- Windows performs a lot of tasks that may affect battery life by default. Changing settings, stopping scheduled tasks, and disabling features can help the system stay in lower power states to conserve battery. -- Bad chargers, inconsistent power input, and high temperatures will cause batteries to degrade and discharge faster. Use trusted high-quality chargers, ensure input power is steady, clean any fans or airflow ports, and keep the battery/PC cool. diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md new file mode 100644 index 0000000000..3e72f68c29 --- /dev/null +++ b/docs/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: '{{ replace .File.ContentBaseName "-" " " | title }}' +description: "" +date: '{{ .Date }}' +draft: true +--- diff --git a/docs/assets/Compile.png b/docs/assets/Compile.png deleted file mode 100644 index fe784cd61e..0000000000 Binary files a/docs/assets/Compile.png and /dev/null differ diff --git a/docs/assets/Get-Installed-Dark.png b/docs/assets/Get-Installed-Dark.png deleted file mode 100644 index d84d5b73cc..0000000000 Binary files a/docs/assets/Get-Installed-Dark.png and /dev/null differ diff --git a/docs/assets/Get-Installed-Light.png b/docs/assets/Get-Installed-Light.png deleted file mode 100644 index ff7eb26074..0000000000 Binary files a/docs/assets/Get-Installed-Light.png and /dev/null differ diff --git a/docs/assets/Install-Tab-Dark.png b/docs/assets/Install-Tab-Dark.png deleted file mode 100644 index 234d368827..0000000000 Binary files a/docs/assets/Install-Tab-Dark.png and /dev/null differ diff --git a/docs/assets/Install-Tab-Light.png b/docs/assets/Install-Tab-Light.png deleted file mode 100644 index c619d2237b..0000000000 Binary files a/docs/assets/Install-Tab-Light.png and /dev/null differ diff --git a/docs/assets/MicroWinScreen.png b/docs/assets/MicroWinScreen.png deleted file mode 100644 index b815187dd8..0000000000 Binary files a/docs/assets/MicroWinScreen.png and /dev/null differ diff --git a/docs/assets/Microwin-Dark.png b/docs/assets/Microwin-Dark.png deleted file mode 100644 index f1a0cc698e..0000000000 Binary files a/docs/assets/Microwin-Dark.png and /dev/null differ diff --git a/docs/assets/Microwin-Light.png b/docs/assets/Microwin-Light.png deleted file mode 100644 index 20b5a13614..0000000000 Binary files a/docs/assets/Microwin-Light.png and /dev/null differ diff --git a/docs/assets/Screen.png b/docs/assets/Screen.png deleted file mode 100644 index cbce05108c..0000000000 Binary files a/docs/assets/Screen.png and /dev/null differ diff --git a/docs/assets/Settings-Export-Dark.png b/docs/assets/Settings-Export-Dark.png deleted file mode 100644 index 9a1480b209..0000000000 Binary files a/docs/assets/Settings-Export-Dark.png and /dev/null differ diff --git a/docs/assets/Settings-Export-Light.png b/docs/assets/Settings-Export-Light.png deleted file mode 100644 index 3fa1d2d1f3..0000000000 Binary files a/docs/assets/Settings-Export-Light.png and /dev/null differ diff --git a/docs/assets/Title-Screen.png b/docs/assets/Title-Screen.png deleted file mode 100644 index cdf13b0d07..0000000000 Binary files a/docs/assets/Title-Screen.png and /dev/null differ diff --git a/docs/assets/Tweaks-Tab-Dark.png b/docs/assets/Tweaks-Tab-Dark.png deleted file mode 100644 index 76c7d84566..0000000000 Binary files a/docs/assets/Tweaks-Tab-Dark.png and /dev/null differ diff --git a/docs/assets/Tweaks-Tab-Light.png b/docs/assets/Tweaks-Tab-Light.png deleted file mode 100644 index d4afa964ef..0000000000 Binary files a/docs/assets/Tweaks-Tab-Light.png and /dev/null differ diff --git a/docs/assets/Commit-GHD.png b/docs/assets/images/Commit-GHD.png similarity index 100% rename from docs/assets/Commit-GHD.png rename to docs/assets/images/Commit-GHD.png diff --git a/docs/assets/images/Complie.png b/docs/assets/images/Complie.png new file mode 100644 index 0000000000..464ac62198 Binary files /dev/null and b/docs/assets/images/Complie.png differ diff --git a/docs/assets/Create-Branch.png b/docs/assets/images/Create-Branch.png similarity index 100% rename from docs/assets/Create-Branch.png rename to docs/assets/images/Create-Branch.png diff --git a/docs/assets/Discard-GHD.png b/docs/assets/images/Discard-GHD.png similarity index 100% rename from docs/assets/Discard-GHD.png rename to docs/assets/images/Discard-GHD.png diff --git a/docs/assets/Fork-Button-Dark.png b/docs/assets/images/Fork-Button-Dark.png similarity index 100% rename from docs/assets/Fork-Button-Dark.png rename to docs/assets/images/Fork-Button-Dark.png diff --git a/docs/assets/Fork-Button-Light.png b/docs/assets/images/Fork-Button-Light.png similarity index 100% rename from docs/assets/Fork-Button-Light.png rename to docs/assets/images/Fork-Button-Light.png diff --git a/docs/assets/images/Get-Installed-Dark.png b/docs/assets/images/Get-Installed-Dark.png new file mode 100644 index 0000000000..87e250be87 Binary files /dev/null and b/docs/assets/images/Get-Installed-Dark.png differ diff --git a/docs/assets/images/Get-Installed-Light.png b/docs/assets/images/Get-Installed-Light.png new file mode 100644 index 0000000000..6e87f79014 Binary files /dev/null and b/docs/assets/images/Get-Installed-Light.png differ diff --git a/docs/assets/images/Install-Tab-Dark.png b/docs/assets/images/Install-Tab-Dark.png new file mode 100644 index 0000000000..24c0ce8761 Binary files /dev/null and b/docs/assets/images/Install-Tab-Dark.png differ diff --git a/docs/assets/images/Install-Tab-Light.png b/docs/assets/images/Install-Tab-Light.png new file mode 100644 index 0000000000..15a64f6a8b Binary files /dev/null and b/docs/assets/images/Install-Tab-Light.png differ diff --git a/docs/assets/images/Install/Install-apps.png b/docs/assets/images/Install/Install-apps.png new file mode 100644 index 0000000000..24c0ce8761 Binary files /dev/null and b/docs/assets/images/Install/Install-apps.png differ diff --git a/docs/assets/images/Install/Installation.png b/docs/assets/images/Install/Installation.png new file mode 100644 index 0000000000..aac51f2378 Binary files /dev/null and b/docs/assets/images/Install/Installation.png differ diff --git a/docs/assets/images/Install/Select-Apps-to-install-upgrade.png b/docs/assets/images/Install/Select-Apps-to-install-upgrade.png new file mode 100644 index 0000000000..70f961ffe5 Binary files /dev/null and b/docs/assets/images/Install/Select-Apps-to-install-upgrade.png differ diff --git a/docs/assets/Push-Commit.png b/docs/assets/images/Push-Commit.png similarity index 100% rename from docs/assets/Push-Commit.png rename to docs/assets/images/Push-Commit.png diff --git a/docs/assets/images/Screen.png b/docs/assets/images/Screen.png new file mode 100644 index 0000000000..cdd219e2b4 Binary files /dev/null and b/docs/assets/images/Screen.png differ diff --git a/docs/assets/images/Settings-Export-Dark.png b/docs/assets/images/Settings-Export-Dark.png new file mode 100644 index 0000000000..9a51ac54bf Binary files /dev/null and b/docs/assets/images/Settings-Export-Dark.png differ diff --git a/docs/assets/images/Settings-Export-Light.png b/docs/assets/images/Settings-Export-Light.png new file mode 100644 index 0000000000..9aacccb7e9 Binary files /dev/null and b/docs/assets/images/Settings-Export-Light.png differ diff --git a/docs/assets/images/Title-Screen.png b/docs/assets/images/Title-Screen.png new file mode 100644 index 0000000000..c8bc94626b Binary files /dev/null and b/docs/assets/images/Title-Screen.png differ diff --git a/docs/assets/images/Tweaks-Tab-Dark.png b/docs/assets/images/Tweaks-Tab-Dark.png new file mode 100644 index 0000000000..cdc5cb2f6e Binary files /dev/null and b/docs/assets/images/Tweaks-Tab-Dark.png differ diff --git a/docs/assets/images/Tweaks-Tab-Light.png b/docs/assets/images/Tweaks-Tab-Light.png new file mode 100644 index 0000000000..4db891871c Binary files /dev/null and b/docs/assets/images/Tweaks-Tab-Light.png differ diff --git a/docs/assets/images/favicon.png b/docs/assets/images/favicon.png new file mode 100644 index 0000000000..a4f4bc5d19 Binary files /dev/null and b/docs/assets/images/favicon.png differ diff --git a/docs/assets/navlogo.png b/docs/assets/navlogo.png new file mode 100644 index 0000000000..1ae83be076 Binary files /dev/null and b/docs/assets/navlogo.png differ diff --git a/docs/content/CONTRIBUTING.md b/docs/content/CONTRIBUTING.md new file mode 100644 index 0000000000..1a986fd205 --- /dev/null +++ b/docs/content/CONTRIBUTING.md @@ -0,0 +1,115 @@ +--- +toc: true +--- + +# How to Contribute? + +## Testing + +* Test the latest changes to Winutil by running the pre-release and reporting issues you are encountering to help us continually improve Winutil! + +#### **Run the latest pre-release** + ``` + irm https://christitus.com/windev | iex + ``` + +> [!WARNING] +> This is a pre-release and should be treated as such. It exists for developers to test the utility and report or fix bugs before they get added to the stable release. Don't use it in production! + +## Issues + +* If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me (and others in the community) to promptly address any bugs or consider feature requests. + +## Contribute Code + +* Pull requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub. + +* If you're doing code changes, then you can submit a PR to the `main` branch, but I am very selective about these. + +> [!IMPORTANT] +> Do not use a code formatter, make massive amounts of line changes, or make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN PULL REQUEST! + +* When creating pull requests, it is essential to thoroughly document all changes made. This includes, but is not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes. Document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in the denial of the pull request. Additionally, any code lacking sufficient documentation may also be denied. + +* By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented. + +> [!NOTE] +> When creating a function, please include "WPF" or "Winutil" in the file name so it can be loaded into the runspace. + +## Walk through + +* This is a guide for beginners. If you are still having issues, look at the following official GitHub documentation: + * [Commit through WEB](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits) + * [Commit through GitHub Desktop](https://docs.github.com/en/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop#about-commits) + * [Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) + + +### Overview + +``` mermaid +%%{init: {"flowchart": {"curve": "cardinal"}} }%% +graph TD +  A[Fork Project] --> B[Clone Repository]; +  B --> C[Create New Branch]; +  C --> D[Make Changes]; +  D --> G[Test Changes]; +  G --> H{Tests Passed?}; +  H -->|Yes| E[Commit Changes]; +  H -->|No| J[Fix Issues]; +  J --> G; +  E --> F[Push Branch]; +  F --> K[Create Pull Request]; +  K --> L[Fill out PR template]; + classDef default stroke:#333,stroke-width:4px,font-size:12pt; +``` +> [!NOTE] +> This is a diagram to guide you through the process. It may vary depending on the type of change you're making. + +### Fork the Repo +* Fork the Winutil Repository [here](https://github.com/ChrisTitusTech/Winutil) to create a copy that will be available in your repository list. + +{{< image src="images/Fork-Button" alt="Fork Image" >}} + +### Clone the Fork + +> [!TIP] +> While you can make your changes directly through the Web, we recommend cloning the repo to your device using the application GitHub Desktop (available in Winutil) to test your fork easily. + +* Install GitHub Desktop if it is not already installed. +* Log in using the same GitHub account you used to fork Winutil. +* Choose the fork under "Your Repositories" and press "clone {repo name}" +* Create a new branch and name it something relatable to your changes. + +* Now you can modify Winutil to your liking using your preferred text editor. + + +### Testing your changes + +* To test to see if your changes work as intended, run the following commands in a PowerShell terminal as admin: + +* Change the directory where you are running the commands to the forked project. +* `cd {path to the folder with the compile.ps1}` +* Run the following command to compile and run Winutil: +* `.\Compile.ps1 -run` + +{{< image src="images/Compile" alt="Compile" >}} + +* After seeing that your changes work properly, feel free to commit the changes to the repository and make a PR. For help on that, follow the documentation below. + +### Committing the changes +* Before committing your changes, please discard changes made to the `Winutil.ps1` file, like the following: + +{{< image src="images/Discard-GHD" alt="Push Commit Image" >}} + +* Now, commit your changes once you are happy with the result. + +{{< image src="images/Commit-GHD" alt="Commit Image" >}} + +* Push the changes to upload them to your fork on github.com. + +{{< image src="images/Push-Commit" alt="Push Commit Image" >}} + +### Making a PR +* To make a PR on your repo under a new branch linking to the main branch, a button will show and say Preview and Create pull request. Click that button and fill in all the information that is provided on the template. Once all the information is filled in correctly, check your PR to make sure there is no Winutil.ps1 file attached to the PR. Once everything is good, make the PR and wait for Chris (the maintainer) to accept or deny your PR. Once it is accepted by Chris, you will be able to see your changes in the "/windev" build. +* If you do not see your feature in the main "/win" build, that is fine. All new changes go into the /windev build to make sure everything is working OK before going fully public. +* Congratulations! You just submitted your first PR. Thank you so much for contributing to Winutil. diff --git a/docs/content/KnownIssues.md b/docs/content/KnownIssues.md new file mode 100644 index 0000000000..8f0a029ae0 --- /dev/null +++ b/docs/content/KnownIssues.md @@ -0,0 +1,67 @@ +--- +title: Known Issues +toc: true +--- + +### Download not working + +If `https://christitus.com/win` is not working, or you want to download the code from GitHub directly, you can use the direct download link: + +``` +irm https://github.com/ChrisTitusTech/Winutil/releases/latest/download/Winutil.ps1 | iex +``` + +If it still isn't working in your region, it may be due to temporary ISP or network filtering of GitHub content domains. This has been reported by some users in India in the past. See: [Times of India](https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms). + +If you are still having issues, try using a **VPN**, or changing your **DNS provider** to one of the following two providers: + +| Provider | Primary DNS | Secondary DNS | +| :--------: | :---------: | :-----------: | +| Cloudflare | `1.1.1.1` | `1.0.0.1` | +| Google | `8.8.8.8` | `8.8.4.4` | + +### Script Won't Run + +If your PowerShell session is running in **Constrained Language Mode**, some scripts and commands may fail to execute. To check the current language mode, run: +```powershell +$ExecutionContext.SessionState.LanguageMode +``` +If it returns `ConstrainedLanguage`, you may need to switch to `FullLanguage` mode or run the script in a session with administrative privileges. Be aware that some security policies may enforce Constrained Language Mode, especially in corporate or managed environments. + +**If the download fails**: + +1. Try the direct GitHub link: + +```powershell +irm https://github.com/ChrisTitusTech/Winutil/releases/latest/download/Winutil.ps1 | iex +``` + +2. Force TLS 1.2: + +```powershell +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +irm "https://christitus.com/win" | iex +``` + +> [!NOTE] +> On Windows 11, you usually do not need the TLS 1.2 command. Use it only if you encounter download or security protocol errors. + +### Execution Policy Error + +If you see an execution policy error when running the downloaded script, you can allow the current session to run unsigned scripts with this command: + +```powershell +Set-ExecutionPolicy Unrestricted -Scope Process -Force +irm "https://christitus.com/win" | iex +``` + +This only changes the policy for the current PowerShell process and is safe for one-off runs. + +### Interface Doesn't Appear + +If Winutil downloads, but the GUI does not open or appear, try these steps: + +1. Check if your antivirus or Windows Defender is blocking the script — add an exclusion if necessary. +2. Ensure you launched PowerShell / Terminal as **Administrator**. +3. Close and reopen PowerShell, then run the launch command again. +4. If the script still doesn't show, try running the script in a visible PowerShell window (avoid background/silent shells) to observe output and errors. diff --git a/docs/content/_index.md b/docs/content/_index.md new file mode 100644 index 0000000000..fad9021abc --- /dev/null +++ b/docs/content/_index.md @@ -0,0 +1,26 @@ +--- +title: Welcome to Winutil Documentation! +toc: false +width: full +--- + +<div style="display: flex; justify-content: center; align-items: center; width: 100%; flex-wrap: wrap; gap: 5px;margin-top:30px;" > + <a href="https://github.com/ChrisTitusTech/Winutil/releases/latest"><img src="https://img.shields.io/github/v/release/ChrisTitusTech/Winutil?color=%230567ff&label=Latest%20Release&style=for-the-badge" alt="Version" style="height: 28px; width: auto; min-width: 10px; object-fit: contain; margin: 0;"></a> + <img src="https://img.shields.io/github/downloads/ChrisTitusTech/Winutil/Winutil.ps1?label=Total%20Downloads&style=for-the-badge" alt="GitHub Downloads" style="height: 28px; width: auto; min-width: 10px; object-fit: contain; margin: 0;"> + <a href="https://discord.gg/RUbZUZyByQ"><img src="https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ" alt="Discord Community Server" style="height: 28px; width: auto; min-width: 10px; object-fit: contain; margin: 0;"></a> +</div> + +Welcome to the official documentation for Winutil, your go-to utility for optimizing and managing your Windows environment. Whether you’re an IT professional, power user, or regular user, Winutil provides a comprehensive set of tools to enhance your Windows experience. + +## Running the latest release of Winutil + +* You will first need to start a PowerShell terminal **as Admin**. +* Now you can run the following command: + +``` +irm "https://christitus.com/win" | iex +``` + + +> [!IMPORTANT] +> Winutil is updated frequently as of the time of writing. Consequently, features and functionalities may evolve, and the documentation may not always reflect the most current images or information. diff --git a/docs/content/dev/_index.md b/docs/content/dev/_index.md new file mode 100644 index 0000000000..7c17850c23 --- /dev/null +++ b/docs/content/dev/_index.md @@ -0,0 +1,52 @@ +--- +title: Developer Reference +weight: 3 +toc: false +--- + +> [!NOTE] +> This section contains technical documentation for developers. For end-user documentation, see the [User Guide](../userguide/). + +## Architecture + +- [Architecture & Design](architecture/) - Code structure, data flow, and how Winutil works internally + +## Tweaks + +### Essential Tweaks + +{{< autolinks section="dev/tweaks/essential-tweaks" >}} + +### Advanced Tweaks (CAUTION) + +{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}} + +### Customize Preferences + +{{< autolinks section="dev/tweaks/customize-preferences" >}} + +### Performance Plans + +{{< autolinks section="dev/tweaks/performance-plans" >}} + +## Features + +### Fixes + +{{< autolinks section="dev/features/fixes" >}} + +### Legacy Windows Panels + +{{< autolinks section="dev/features/legacy-windows-panels" >}} + +### Features + +{{< autolinks section="dev/features/features" >}} + +### Remote Access + +{{< autolinks section="dev/features/remote-access" >}} + +### Powershell Profile Powershell 7+ Only + +{{< autolinks section="dev/features/powershell-profile-powershell-7--only" >}} diff --git a/docs/content/dev/architecture.md b/docs/content/dev/architecture.md new file mode 100644 index 0000000000..fb0fb50497 --- /dev/null +++ b/docs/content/dev/architecture.md @@ -0,0 +1,677 @@ +--- +title: Architecture & Design +weight: 1 +toc: true +--- + +## Overview + +Winutil is a PowerShell-based Windows utility with a WPF (Windows Presentation Foundation) GUI. This document explains the architecture, code structure, and how different components work together. + +## High-Level Architecture + +``` +┌─────────────────────────────────────────────────────┐ +│ Winutil GUI │ +│ (WPF XAML Interface) │ +└──────────────────┬──────────────────────────────────┘ + │ + ┌─────────┴─────────┐ + │ │ +┌────────▼──────┐ ┌───────▼────────┐ +│ Public APIs │ │ Private APIs │ +│ (User-facing)│ │ (Internal) │ +└───────┬───────┘ └───────┬────────┘ + │ │ + └────────┬──────────┘ + │ + ┌────────────▼────────────┐ + │ Configuration Files │ + │ (JSON definitions) │ + └────────────┬────────────┘ + │ + ┌────────────▼────────────┐ + │ External Tools │ + │ (WinGet, Chocolatey) │ + └─────────────────────────┘ +``` + +## Project Structure + +### Directory Layout + +``` +winutil/ +├── Compile.ps1 # Build script that combines all files +├── winutil.ps1 # Compiled output (generated) +├── scripts/ +│ ├── main.ps1 # Entry point and GUI initialization +│ └── start.ps1 # Startup logic +├── functions/ +│ ├── private/ # Internal helper functions +│ │ ├── Get-WinUtilVariables.ps1 +│ │ ├── Install-WinUtilWinget.ps1 +│ │ └── ... +│ ├── public/ # User-facing functions +│ │ ├── Initialize-WPFUI.ps1 +│ │ └── ... +├── config/ # JSON configuration files +│ ├── applications.json # Application definitions +│ ├── tweaks.json # Tweak definitions +│ ├── feature.json # Windows feature definitions +│ └── preset.json # Preset configurations +├── xaml/ +│ └── inputXML.xaml # GUI layout definition +└── docs/ # Documentation +``` + +### Key Components + +#### 1. Compile.ps1 +**Purpose**: Combines all separate script files into a single `winutil.ps1` for distribution. + +**Process**: +1. Reads all function files from `/functions/` +2. Includes configuration JSON files +3. Embeds XAML GUI definition +4. Combines into single script +5. Outputs `winutil.ps1` + +**Why**: Makes distribution easier (single file) and improves load time. + +#### 2. scripts/main.ps1 +**Purpose**: Entry point that initializes the GUI and event system. + +**Responsibilities**: +- Load XAML and create WPF window +- Initialize form elements +- Set up event handlers +- Load configurations +- Display the GUI + +#### 3. functions/public/ +**Purpose**: User-facing functions that implement main features. + +**Key Functions**: +- `Initialize-WPFUI.ps1`: Sets up the GUI +- `Invoke-WPFTweak*`: Applies system tweaks +- `Invoke-WPFFeature*`: Enables Windows features +- `Install-WinUtilProgram*`: Installs applications + +**Naming Convention**: Functions start with `WPF` or `Winutil` to be loaded into the runspace. + +#### 4. functions/private/ +**Purpose**: Internal helper functions not directly called by users. + +**Key Functions**: +- `Get-WinUtilVariables.ps1`: Retrieves UI element references +- `Install-WinUtilWinget.ps1`: Ensures WinGet is installed +- `Get-WinUtilCheckBoxes.ps1`: Gets checkbox states +- `Invoke-WinUtilCurrentSystem.ps1`: Gets system information + +#### 5. config/*.json +**Purpose**: Define available applications, tweaks, and features declaratively. + +**Files**: +- `applications.json`: Application definitions with WinGet/Choco IDs +- `tweaks.json`: Registry tweaks and their undo actions +- `feature.json`: Windows features that can be enabled/disabled +- `preset.json`: Predefined tweak combinations +- `dns.json`: DNS provider configurations + +#### 6. xaml/inputXML.xaml +**Purpose**: WPF GUI layout and design. + +**Structure**: +- Buttons with event handlers +- TextBoxes for input +- CheckBoxes for options +- ListBoxes for selections + +## Win11 Creator Architecture + +The **Win11 Creator** is a specialized subsystem within Winutil that creates customized Windows 11 ISOs. It operates independently from the main package installation and tweak system. + +### Win11 Creator Components + +**Core Functions** (`functions/private/`): +- `Invoke-WinUtilISO.ps1`: Main orchestrator containing all Win11 Creator functions + - `Invoke-WinUtilISOBrowse`: ISO file selection dialog + - `Invoke-WinUtilISOMountAndVerify`: Validates and mounts ISO, verifies it's official Windows 11 + - `Invoke-WinUtilISOModify`: Launches modification in background runspace + - `Invoke-WinUtilISOExport`: Handles ISO and USB export + - `Invoke-WinUtilISOCheckExistingWork`: Recovers incomplete work sessions + - `Invoke-WinUtilISOCleanAndReset`: Cleans up temp directories and resets UI + +- `Invoke-WinUtilISOScript.ps1`: Applies modifications to mounted install.wim + - Removes provisioned AppX packages (40+ bloatware apps) + - Injects drivers (optional) from the current system + - Removes OneDrive setup files + - Applies offline registry tweaks (hardware bypass, privacy, telemetry, OOBE) + - Deletes telemetry scheduled task definitions + - Pre-stages setup scripts from autounattend.xml + - Removes unused Windows editions + - Cleans component store via DISM + +### Win11 Creator Data Flow + +``` +User selects official Windows 11 ISO + ↓ +Invoke-WinUtilISOBrowse → OpenFileDialog, validates file size + ↓ +Invoke-WinUtilISOMountAndVerify + ├─ Mount ISO via Mount-DiskImage + ├─ Verify install.wim or install.esd exists + ├─ Check for "Windows 11" in image metadata + ├─ Extract available editions (Home, Pro, Enterprise, etc.) + └─ Store ISO path, drive letter, WIM path, image info in $sync + ↓ +User optionally enables the Driver Injection checkbox + ↓ +Invoke-WinUtilISOModify (runs in background runspace) + ├─ Create work directory: ~WinUtil_Win11ISO_[timestamp] + ├─ Copy ISO contents to disk (~5-6 GB) + ├─ Mount install.wim at selected edition/index + ├─ Invoke-WinUtilISOScript: + │ ├─ Remove 40+ bloat AppX packages + │ ├─ Export and inject drivers (if enabled) + │ ├─ Remove OneDrive setup + │ ├─ Load offline registry hives + │ ├─ Apply 50+ registry tweaks (hardware bypass, privacy, telemetry, OOBE, etc.) + │ ├─ Delete telemetry scheduled task files + │ ├─ Pre-stage setup scripts from autounattend.xml to C:\Windows\Setup\Scripts\ + │ └─ Unload registry hives + ├─ DISM /Cleanup-Image /StartComponentCleanup /ResetBase (saves 300-800 MB) + ├─ Dismount and save the modified install.wim (~10+ minutes, slowest step) + ├─ Export selected edition only (removes all other editions, saves 1-2 GB each) + ├─ Dismount source ISO + └─ Report completion, enable export options + ↓ +Invoke-WinUtilISOExport (user chooses output) + ├─ Option 1: Save as ISO + │ ├─ Build bootable ISO via oscdimg.exe (BIOS/UEFI dual-boot) + │ └─ Output: Win11_Modified_[date].iso (2.5-3.5 GB) + │ + └─ Option 2: Write to USB + ├─ Format USB as GPT + ├─ Create 512 MB EFI partition + ├─ Copy modified ISO contents + └─ Output: Bootable USB (minimum 8 GB) + ↓ +Invoke-WinUtilISOCleanAndReset (optional) + └─ Delete temp working directory (~10-15 GB) + └─ Reset UI to initial state +``` + +### Win11 Creator Validation & Safety + +**ISO Validation**: +- Only accepts official Microsoft Windows 11 ISOs +- Validates presence of install.wim or install.esd +- Checks image metadata for "Windows 11" string +- Rejects custom, modified, or non-Windows 11 ISOs + +**Work Session Recovery**: +- Auto-detects incomplete work from previous sessions +- Allows resuming Step 4 (export) without re-running Steps 1-3 +- Prevents redundant modifications + +**Modification Safety**: +- All registry changes are documented in a script (reversible) +- Original ISO never modified; only working copy +- Logged to `WinUtil_Win11ISO.log` for debugging +- DISM handles image dismount with automatic cleanup on error + +### Win11 Creator Registry Tweaks + +The `Invoke-WinUtilISOScript` function applies **50+ offline registry tweaks**: + +**Hardware Bypass**: +- TPM 2.0 check bypass +- Secure Boot requirement bypass +- CPU compatibility bypass +- RAM requirement bypass +- Storage check bypass + +**Privacy & Telemetry**: +- Disable advertising ID +- Disable tailored experiences +- Disable input personalization +- Disable speech online privacy +- Disable cloud content suggestions +- Disable app suggestion subscriptions +- Remove CEIP, Appraiser, WaaSMedic, etc. + +**OOBE & Setup**: +- Enable local account setup +- Skip Microsoft account requirement +- Dark mode by default +- Empty taskbar and Start Menu + +**Post-Setup Installations**: +- Prevent DevHome auto-installation +- Prevent new Outlook Mail app installation +- Prevent Teams auto-installation + +**System Features**: +- Disable BitLocker and device encryption +- Disable Chat icon from the Taskbar +- Disable OneDrive folder backup +- Disable Copilot +- Disable Windows Update during OOBE (re-enabled at first login) + +### Driver Injection Feature + +**Optional Enhancement**: When enabled, exports all drivers from the running system and injects them into both: +- `install.wim` (main OS image) +- `boot.wim` index 2 (Windows Setup PE environment) + +**Use Case**: Enables offline installation on systems with missing drivers. + +### Disk Space Requirements + +- **Temporary working directory**: ~10-15 GB +- **Original ISO**: 4-6 GB +- **Modified ISO**: 2.5-3.5 GB +- **Total needed**: ~25 GB for safe operation + +## Data Flow + +### Application Installation Flow + +``` +User clicks "Install" + ↓ +Get-WinUtilCheckBoxes → Retrieves selected apps + ↓ +For each selected app: + ↓ +Check if WinGet/Choco is installed + ↓ +Install-WinUtilWinget/Choco (if needed) + ↓ +Install-WinUtilProgramWinget/Choco → Install app + ↓ +Update UI with progress + ↓ +Display completion message +``` + +### Tweak Application Flow + +``` +User selects tweaks and clicks "Run Tweaks" + ↓ +Get-WinUtilCheckBoxes → Get selected tweaks + ↓ +For each selected tweak: + ↓ +Load tweak definition from tweaks.json + ↓ +Invoke-WPFTweak → Apply registry/service changes + ↓ +Log changes + ↓ +Store original values (for undo) + ↓ +Update UI + ↓ +Display completion +``` + +### Undo Tweak Flow + +``` +User selects tweaks and clicks "Undo" + ↓ +Get-WinUtilCheckBoxes → Get selected tweaks + ↓ +For each tweak: + ↓ +Retrieve "OriginalState" from tweak definition + ↓ +Invoke-WPFUndoTweak → Restore original values + ↓ +Remove from the applied tweaks log + ↓ +Update UI +``` + +## Configuration File Format + +### applications.json Structure + +```json {filename="config/applications.json"} +{ + "WPFInstall<AppName>": { + "category": "Browsers", + "choco": "googlechrome", + "content": "Google Chrome", + "description": "Google Chrome browser", + "link": "https://chrome.google.com", + "winget": "Google.Chrome" + } +} +``` + +**Fields**: +- `category`: Which section in the Install tab +- `content`: Display name in GUI +- `description`: Tooltip/description text +- `winget`: WinGet package ID +- `choco`: Chocolatey package name +- `link`: Official website + +### tweaks.json Structure + +```json {filename="config/tweaks.json"} +{ + "WPFTweaksTelemetry": { + "Content": "Disable Telemetry", + "Description": "Disables Microsoft Telemetry", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", + "Name": "AllowTelemetry", + "Type": "DWord", + "Value": "0", + "OriginalValue": "1" + } + ], + "ScheduledTask": [ + { + "Name": "Microsoft\\Windows\\Autochk\\Proxy", + "State": "Disabled", + "OriginalState": "Enabled" + } + ] + } +} +``` + +**Fields**: +- `Content`: Display name +- `Description`: What it does +- `category`: Essential/Advanced/Customize +- `registry`: Registry changes to make +- `ScheduledTask`: Scheduled tasks to modify +- `service`: Services to change +- `OriginalValue/State`: For undo functionality + +## PowerShell Runspace + +Winutil uses PowerShell runspaces for the GUI to remain responsive: + +```powershell +# Create runspace +$sync.runspace = [runspacefactory]::CreateRunspace() +$sync.runspace.Open() +$sync.runspace.SessionStateProxy.SetVariable("sync", $sync) + +# Run code in background +$powershell = [powershell]::Create().AddScript($scriptblock) +$powershell.Runspace = $sync.runspace +$handle = $powershell.BeginInvoke() +``` + +**Why**: Prevents UI freezing during long-running operations. + +## WPF Event Handling + +Events are wired up via XAML element names: + +```powershell +# Get all named elements +$sync.keys | ForEach-Object { + if($sync.$_.GetType().Name -eq "Button") { + $sync.$_.Add_Click({ + $button = $sync.$($args[0].Name) + & "Invoke-$($args[0].Name)" + }) + } +} +``` + +**Convention**: Button named `WPFInstallButton` calls function `Invoke-WPFInstallButton`. + +## Package Manager Integration + +### WinGet Integration + +```powershell +# Check if installed +if (!(Get-Command winget -ErrorAction SilentlyContinue)) { + Install-WinUtilWinget +} + +# Install package +winget install --id $app.winget --silent --accept-source-agreements +``` + +### Chocolatey Integration + +```powershell +# Check if installed +if (!(Get-Command choco -ErrorAction SilentlyContinue)) { + Install-WinUtilChoco +} + +# Install package +choco install $app.choco -y +``` + +## Error Handling + +Winutil uses PowerShell error handling: + +```powershell +try { + # Attempt operation + Invoke-SomeOperation +} +catch { + Write-Host "Error: $_" -ForegroundColor Red + # Log error + Add-Content -Path $logfile -Value "ERROR: $_" +} +``` + +**Logging**: Errors and operations are logged for debugging. + +## Configuration Loading + +At startup, Winutil loads all configurations: + +```powershell +# Load JSON configs +$sync.configs = @{} +$sync.configs.applications = Get-Content "config/applications.json" | ConvertFrom-Json +$sync.configs.tweaks = Get-Content "config/tweaks.json" | ConvertFrom-Json +$sync.configs.features = Get-Content "config/feature.json" | ConvertFrom-Json +``` + +**Sync Hash**: `$sync` hashtable shares state across runspaces. + +## UI Update Pattern + +UI updates must happen on the UI thread: + +```powershell +$sync.form.Dispatcher.Invoke([action]{ + $sync.WPFStatusLabel.Content = "Installing..." +}, "Normal") +``` + +**Why**: WPF requires UI updates on the main thread. + +## Adding New Features + +### Adding a New Application + +1. Edit `config/applications.json`: +```json {filename="config/applications.json"} +{ + "WPFInstallNewApp": { + "category": "Utilities", + "content": "New App", + "description": "Description of new app", + "winget": "Publisher.AppName", + "choco": "appname" + } +} +``` + +2. Recompile: `.\Compile.ps1` +3. The app appears automatically in the Install tab + +### Adding a New Tweak + +1. Edit `config/tweaks.json`: +```json {filename="config/tweaks.json"} +{ + "WPFTweaksNewTweak": { + "Content": "New Tweak", + "Description": "What it does", + "category": "Essential Tweaks", + "registry": [ + { + "Path": "HKLM:\\Path\\To\\Key", + "Name": "ValueName", + "Type": "DWord", + "Value": "1", + "OriginalValue": "0" + } + ] + } +} +``` + +2. Recompile: `.\Compile.ps1` +3. Tweak appears in the Tweaks tab + +### Adding a New Function + +1. Create file in `functions/public/` or `functions/private/`: +```powershell +# functions/public/Invoke-WPFNewFeature.ps1 +function Invoke-WPFNewFeature { + <# + .SYNOPSIS + Does something new + #> + # Implementation +} +``` + +2. File naming must include "WPF" or "Winutil" to load +3. Recompile: `.\Compile.ps1` + +## Testing + +### Manual Testing + +```powershell +# Compile and run with -run flag +.\Compile.ps1 -run +``` + +### Automated Tests + +Tests are in `/pester/`: +- `configs.Tests.ps1`: Validates JSON configurations +- `functions.Tests.ps1`: Tests PowerShell functions + +Run tests: +```powershell +Invoke-Pester +``` + +## Build Process + +### Development Build + +```powershell +.\Compile.ps1 +``` + +Outputs `winutil.ps1` in the root directory. + +### Production Release + +1. Tag release in Git +2. GitHub Actions builds and uploads `winutil.ps1` +3. Release appears on GitHub Releases +4. Users download via `irm christitus.com/win` + +## Dependencies + +**Required**: +- PowerShell 5.1+ +- .NET Framework 4.5+ +- Windows 11 + +**Optional (auto-installed)**: +- WinGet (Windows Package Manager) +- Chocolatey + +## Performance Considerations + +**Optimization Strategies**: +- Lazy-load configurations (only when needed) +- Use runspaces for long operations +- Cache expensive lookups +- Minimize registry reads/writes +- Batch operations when possible + +## Security Considerations + +**Safety Measures**: +- All operations logged +- Registry backups for undo +- No credential storage +- Open source (auditable) +- Digitally signed (future) + +## Contributing Guidelines + +**Code Standards**: +- Use proper PowerShell cmdlet naming (Verb-Noun) +- Include comment-based help +- Follow existing code style +- Test thoroughly before PR +- Document significant changes + +**File Naming**: +- Public functions: `Invoke-WPF*.ps1` or `Invoke-Winutil*.ps1` +- Private functions: `Get-WinUtil*.ps1` or verb-WinUtil*.ps1` +- Must include "WPF" or "Winutil" to load + +## Future Architecture Plans + +**Roadmap Considerations**: +- Plugin system for community extensions +- Config import/export +- Cloud sync for configurations +- Enhanced logging dashboard +- Modular compilation (choose features) + +## Related Documentation + +- [Contributing Guide](../../contributing/) - How to contribute code +- [User Guide](../../userguide/) - End-user documentation +- [Win11 Creator Guide](../../userguide/win11Creator/) - Building customized Windows 11 ISOs +- [FAQ](../../faq/) - Common questions + +## Additional Resources + +- **GitHub Repository**: [ChrisTitusTech/winutil](https://github.com/ChrisTitusTech/winutil) +- **PowerShell Docs**: [Microsoft Docs](https://docs.microsoft.com/powershell/) +- **WPF Guide**: [WPF Documentation](https://docs.microsoft.com/dotnet/desktop/wpf/) + +--- + +**Last Updated**: January 2026 +**Maintainers**: Chris Titus Tech and contributors diff --git a/docs/content/dev/features/Features/DisableLegacyRecovery.md b/docs/content/dev/features/Features/DisableLegacyRecovery.md new file mode 100644 index 0000000000..63c1c3af56 --- /dev/null +++ b/docs/content/dev/features/Features/DisableLegacyRecovery.md @@ -0,0 +1,16 @@ +--- +title: "Disable Legacy F8 Boot Recovery" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=110} + "WPFFeatureDisableLegacyRecovery": { + "Content": "Disable Legacy F8 Boot Recovery", + "Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", + "category": "Features", + "panel": "1", + "feature": [], + "InvokeScript": [ + "bcdedit /set bootmenupolicy standard" + ], +``` diff --git a/docs/content/dev/features/Features/EnableLegacyRecovery.md b/docs/content/dev/features/Features/EnableLegacyRecovery.md new file mode 100644 index 0000000000..f6d021daa4 --- /dev/null +++ b/docs/content/dev/features/Features/EnableLegacyRecovery.md @@ -0,0 +1,16 @@ +--- +title: "Enable Legacy F8 Boot Recovery" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=99} + "WPFFeatureEnableLegacyRecovery": { + "Content": "Enable Legacy F8 Boot Recovery", + "Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", + "category": "Features", + "panel": "1", + "feature": [], + "InvokeScript": [ + "bcdedit /set bootmenupolicy legacy" + ], +``` diff --git a/docs/content/dev/features/Features/RegBackup.md b/docs/content/dev/features/Features/RegBackup.md new file mode 100644 index 0000000000..bdc2ca28ad --- /dev/null +++ b/docs/content/dev/features/Features/RegBackup.md @@ -0,0 +1,22 @@ +--- +title: "Enable Daily Registry Backup Task 12.30am" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=82} + "WPFFeatureRegBackup": { + "Content": "Enable Daily Registry Backup Task 12.30am", + "Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.", + "category": "Features", + "panel": "1", + "feature": [], + "InvokeScript": [ + " + New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force + New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force + $action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn \"\\Microsoft\\Windows\\Registry\\RegIdleBackup\"' + $trigger = New-ScheduledTaskTrigger -Daily -At 00:30 + Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System' + " + ], +``` diff --git a/docs/content/dev/features/Features/Sandbox.md b/docs/content/dev/features/Features/Sandbox.md new file mode 100644 index 0000000000..f4c6fd5097 --- /dev/null +++ b/docs/content/dev/features/Features/Sandbox.md @@ -0,0 +1,15 @@ +--- +title: "Windows Sandbox" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=121} + "WPFFeaturesSandbox": { + "Content": "Windows Sandbox", + "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", + "category": "Features", + "panel": "1", + "feature": [ + "Containers-DisposableClientVM" + ], +``` diff --git a/docs/content/dev/features/Features/_index.md b/docs/content/dev/features/Features/_index.md new file mode 100644 index 0000000000..99a10baa1b --- /dev/null +++ b/docs/content/dev/features/Features/_index.md @@ -0,0 +1,7 @@ +--- +title: "Features" +weight: 1 +toc: false +--- + +{{< autolinks section="dev/features/features" >}} diff --git a/docs/content/dev/features/Features/dotnet.md b/docs/content/dev/features/Features/dotnet.md new file mode 100644 index 0000000000..30940195ea --- /dev/null +++ b/docs/content/dev/features/Features/dotnet.md @@ -0,0 +1,17 @@ +--- +title: "All .Net Framework (2,3,4)" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=2} + "WPFFeaturesdotnet": { + "Content": "All .Net Framework (2,3,4)", + "Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.", + "category": "Features", + "panel": "1", + "feature": [ + "NetFx4-AdvSrvs", + "NetFx3" + ], + "InvokeScript": [], +``` diff --git a/docs/content/dev/features/Features/hyperv.md b/docs/content/dev/features/Features/hyperv.md new file mode 100644 index 0000000000..81e88a4817 --- /dev/null +++ b/docs/content/dev/features/Features/hyperv.md @@ -0,0 +1,18 @@ +--- +title: "HyperV Virtualization" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=24} + "WPFFeatureshyperv": { + "Content": "HyperV Virtualization", + "Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.", + "category": "Features", + "panel": "1", + "feature": [ + "Microsoft-Hyper-V-All" + ], + "InvokeScript": [ + "bcdedit /set hypervisorschedulertype classic" + ], +``` diff --git a/docs/content/dev/features/Features/legacymedia.md b/docs/content/dev/features/Features/legacymedia.md new file mode 100644 index 0000000000..25c780238a --- /dev/null +++ b/docs/content/dev/features/Features/legacymedia.md @@ -0,0 +1,19 @@ +--- +title: "Legacy Media (WMP, DirectPlay)" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=37} + "WPFFeatureslegacymedia": { + "Content": "Legacy Media (WMP, DirectPlay)", + "Description": "Enables legacy programs from previous versions of Windows.", + "category": "Features", + "panel": "1", + "feature": [ + "WindowsMediaPlayer", + "MediaPlayback", + "DirectPlay", + "LegacyComponents" + ], + "InvokeScript": [], +``` diff --git a/docs/content/dev/features/Features/nfs.md b/docs/content/dev/features/Features/nfs.md new file mode 100644 index 0000000000..471e464323 --- /dev/null +++ b/docs/content/dev/features/Features/nfs.md @@ -0,0 +1,24 @@ +--- +title: "NFS - Network File System" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=63} + "WPFFeaturenfs": { + "Content": "NFS - Network File System", + "Description": "Network File System (NFS) is a mechanism for storing files on a network.", + "category": "Features", + "panel": "1", + "feature": [ + "ServicesForNFS-ClientOnly", + "ClientForNFS-Infrastructure", + "NFS-Administration" + ], + "InvokeScript": [ + "nfsadmin client stop", + "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousUID' -Type DWord -Value 0", + "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0", + "nfsadmin client start", + "nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i" + ], +``` diff --git a/docs/content/dev/features/Features/wsl.md b/docs/content/dev/features/Features/wsl.md new file mode 100644 index 0000000000..0d8c01b080 --- /dev/null +++ b/docs/content/dev/features/Features/wsl.md @@ -0,0 +1,17 @@ +--- +title: "Windows Subsystem for Linux" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=51} + "WPFFeaturewsl": { + "Content": "Windows Subsystem for Linux", + "Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.", + "category": "Features", + "panel": "1", + "feature": [ + "VirtualMachinePlatform", + "Microsoft-Windows-Subsystem-Linux" + ], + "InvokeScript": [], +``` diff --git a/docs/content/dev/features/Fixes/Autologin.md b/docs/content/dev/features/Fixes/Autologin.md new file mode 100644 index 0000000000..d8e9461db1 --- /dev/null +++ b/docs/content/dev/features/Fixes/Autologin.md @@ -0,0 +1,19 @@ +--- +title: "Set Up Autologin" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFPanelAutologin.ps1",linenos=inline,linenostart=1} +function Invoke-WPFPanelAutologin { + <# + + .SYNOPSIS + Enables autologin using Sysinternals Autologon.exe + + #> + + # Official Microsoft recommendation: https://learn.microsoft.com/en-us/sysinternals/downloads/autologon + Invoke-WebRequest -Uri "https://live.sysinternals.com/Autologon.exe" -OutFile "$env:temp\autologin.exe" + cmd /c "$env:temp\autologin.exe" /accepteula +} +``` diff --git a/docs/content/dev/features/Fixes/DISM.md b/docs/content/dev/features/Fixes/DISM.md new file mode 100644 index 0000000000..5ba15f6df8 --- /dev/null +++ b/docs/content/dev/features/Fixes/DISM.md @@ -0,0 +1,26 @@ +--- +title: "System Corruption Scan" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFSystemRepair.ps1",linenos=inline,linenostart=1} +function Invoke-WPFSystemRepair { + <# + .SYNOPSIS + Checks for system corruption using SFC, and DISM + Checks for disk failure using Chkdsk + + .DESCRIPTION + 1. Chkdsk - Checks for disk errors, which can cause system file corruption and notifies of early disk failure + 2. SFC - scans protected system files for corruption and fixes them + 3. DISM - Repair a corrupted Windows operating system image + #> + + Start-Process cmd.exe -ArgumentList "/c chkdsk /scan /perf" -NoNewWindow -Wait + Start-Process cmd.exe -ArgumentList "/c sfc /scannow" -NoNewWindow -Wait + Start-Process cmd.exe -ArgumentList "/c dism /online /cleanup-image /restorehealth" -NoNewWindow -Wait + + Write-Host "==> Finished System Repair" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" +} +``` diff --git a/docs/content/dev/features/Fixes/NTPPool.md b/docs/content/dev/features/Fixes/NTPPool.md new file mode 100644 index 0000000000..7da6723cfd --- /dev/null +++ b/docs/content/dev/features/Fixes/NTPPool.md @@ -0,0 +1,27 @@ +--- +title: "Configure NTP Server" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFFixesNTPPool.ps1",linenos=inline,linenostart=1} +function Invoke-WPFFixesNTPPool { + <# + .SYNOPSIS + Configures Windows to use pool.ntp.org for NTP synchronization + + .DESCRIPTION + Replaces the default Windows NTP server (time.windows.com) with + pool.ntp.org for improved time synchronization accuracy and reliability. + #> + + Start-Service w32time + w32tm /config /update /manualpeerlist:"pool.ntp.org,0x8" /syncfromflags:MANUAL + + Restart-Service w32time + w32tm /resync + + Write-Host "=================================" + Write-Host "-- NTP Configuration Complete ---" + Write-Host "=================================" +} +``` diff --git a/docs/dev/features/Fixes/Network.md b/docs/content/dev/features/Fixes/Network.md similarity index 57% rename from docs/dev/features/Fixes/Network.md rename to docs/content/dev/features/Fixes/Network.md index 2f5dc47fd4..880d084e2c 100644 --- a/docs/dev/features/Fixes/Network.md +++ b/docs/content/dev/features/Fixes/Network.md @@ -1,36 +1,9 @@ -# Reset Network +--- +title: "Reset Network" +description: "" +--- -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Reset Network", - "category": "Fixes", - "Order": "a042_", - "panel": "1", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Network" -} -``` - -</details> - -## Function: Invoke-WPFFixesNetwork - -```powershell +```powershell {filename="functions/public/Invoke-WPFFixesNetwork.ps1",linenos=inline,linenostart=1} function Invoke-WPFFixesNetwork { <# @@ -41,13 +14,20 @@ function Invoke-WPFFixesNetwork { Write-Host "Resetting Network with netsh" + Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" # Reset WinSock catalog to a clean state Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" + + Set-WinUtilTaskbaritem -state "Normal" -value 0.35 -overlay "logo" # Resets WinHTTP proxy setting to DIRECT Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" + + Set-WinUtilTaskbaritem -state "Normal" -value 0.7 -overlay "logo" # Removes all user configured IP settings Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + Write-Host "Process complete. Please reboot your computer." $ButtonType = [System.Windows.MessageBoxButton]::OK @@ -60,14 +40,4 @@ function Invoke-WPFFixesNetwork { Write-Host "-- Network Configuration has been Reset --" Write-Host "==========================================" } - ``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Fixes/Update.md b/docs/content/dev/features/Fixes/Update.md similarity index 62% rename from docs/dev/features/Fixes/Update.md rename to docs/content/dev/features/Fixes/Update.md index 027829fd6b..cca61ae494 100644 --- a/docs/dev/features/Fixes/Update.md +++ b/docs/content/dev/features/Fixes/Update.md @@ -1,36 +1,9 @@ -# Reset Windows Update +--- +title: "Reset Windows Update" +description: "" +--- -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Reset Windows Update", - "category": "Fixes", - "panel": "1", - "Order": "a041_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Update" -} -``` - -</details> - -## Function: Invoke-WPFFixesUpdate - -```powershell +```powershell {filename="functions/public/Invoke-WPFFixesUpdate.ps1",linenos=inline,linenostart=1} function Invoke-WPFFixesUpdate { <# @@ -39,19 +12,7 @@ function Invoke-WPFFixesUpdate { Performs various tasks in an attempt to repair Windows Update .DESCRIPTION - 1. (Aggressive Only) Scans the system for corruption using chkdsk, SFC, and DISM - Steps: - 1. Runs chkdsk /scan /perf - /scan - Runs an online scan on the volume - /perf - Uses more system resources to complete a scan as fast as possible - 2. Runs SFC /scannow - /scannow - Scans integrity of all protected system files and repairs files with problems when possible - 3. Runs DISM /Online /Cleanup-Image /RestoreHealth - /Online - Targets the running operating system - /Cleanup-Image - Performs cleanup and recovery operations on the image - /RestoreHealth - Scans the image for component store corruption and attempts to repair the corruption using Windows Update - 4. Runs SFC /scannow - Ran twice in case DISM repaired SFC + 1. (Aggressive Only) Scans the system for corruption using the Invoke-WPFSystemRepair function 2. Stops Windows Update Services 3. Remove the QMGR Data file, which stores BITS jobs 4. (Aggressive Only) Renames the DataStore and CatRoot2 folders @@ -75,108 +36,13 @@ function Invoke-WPFFixesUpdate { param($Aggressive = $false) Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0 + Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" + Write-Host "Starting Windows Update Repair..." # Wait for the first progress bar to show, otherwise the second one won't show Start-Sleep -Milliseconds 200 if ($Aggressive) { - # Scan system for corruption - Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Scanning for corruption..." -PercentComplete 0 - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk..." -PercentComplete 0 - # 2>&1 redirects stdout, alowing iteration over the output - chkdsk.exe /scan /perf 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Get the index of the total percentage - $index = $_.IndexOf("Total:") - if ( - # If the percent is found - ($percent = try {( - $_.Substring( - $index + 6, - $_.IndexOf("%", $index) - $index - 6 - ) - ).Trim()} catch {0}) ` - <# And the current percentage is greater than the previous one #>` - -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC..." -PercentComplete 0 - $oldpercent = 0 - # SFC has a bug when redirected which causes it to output only when the stdout buffer is full, causing the progress bar to move in chunks - sfc /scannow 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ( - # Use a different method to get the percentage that accounts for SFC's Unicode output - [int]$percent = try {( - ( - $_.Substring( - $_.IndexOf("n") + 2, - $_.IndexOf("%") - $_.IndexOf("n") - 2 - ).ToCharArray() | Where-Object {$_} - ) -join '' - ).TrimStart()} catch {0} - ) -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM..." -PercentComplete 0 - $oldpercent = 0 - DISM /Online /Cleanup-Image /RestoreHealth | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ($percent = try { - [int]($_ -replace "\[" -replace "=" -replace " " -replace "%" -replace "\]") - } catch {0}) ` - -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC again..." -PercentComplete 0 - $oldpercent = 0 - sfc /scannow 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ( - [int]$percent = try {( - ( - $_.Substring( - $_.IndexOf("n") + 2, - $_.IndexOf("%") - $_.IndexOf("n") - 2 - ).ToCharArray() | Where-Object {$_} - ) -join '' - ).TrimStart()} catch {0} - ) -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent - } - } - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Completed" -PercentComplete 100 + Invoke-WPFSystemRepair } @@ -220,9 +86,9 @@ function Invoke-WPFFixesUpdate { # Reset the Security Descriptors on the Windows Update Services Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting the WU Service Security Descriptors..." -PercentComplete 25 Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the BITS Security Descriptor..." -PercentComplete 0 - Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "bits", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" + Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "bits", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" -Wait Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Resetting the wuauserv Security Descriptor..." -PercentComplete 50 - Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "wuauserv", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" + Start-Process -NoNewWindow -FilePath "sc.exe" -ArgumentList "sdset", "wuauserv", "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" -Wait Write-Progress -Id 4 -ParentId 0 -Activity "Resetting the WU Service Security Descriptors" -Status "Completed" -PercentComplete 100 } @@ -254,19 +120,53 @@ function Invoke-WPFFixesUpdate { if (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate") { Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing WSUS client settings..." -PercentComplete 60 Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -PercentComplete 0 - Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "AccountDomainSid", "/f" -RedirectStandardError $true - Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "PingID", "/f" -RedirectStandardError $true - Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "SusClientId", "/f" -RedirectStandardError $true + Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "AccountDomainSid", "/f" -RedirectStandardError "NUL" + Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "PingID", "/f" -RedirectStandardError "NUL" + Start-Process -NoNewWindow -FilePath "REG" -ArgumentList "DELETE", "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate", "/v", "SusClientId", "/f" -RedirectStandardError "NUL" Write-Progress -Id 6 -ParentId 0 -Activity "Removing WSUS client settings" -Status "Completed" -PercentComplete 100 } + # Remove Group Policy Windows Update settings + Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Removing Group Policy Windows Update settings..." -PercentComplete 60 + Write-Progress -Id 7 -ParentId 0 -Activity "Removing Group Policy Windows Update settings" -PercentComplete 0 + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue + Write-Host "Defaulting driver offering through Windows Update..." + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue + Write-Host "Defaulting Windows Update automatic restart..." + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue + Write-Host "Clearing ANY Windows Update Policy settings..." + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue + Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Start-Process -NoNewWindow -FilePath "secedit" -ArgumentList "/configure", "/cfg", "$env:windir\inf\defltbase.inf", "/db", "defltbase.sdb", "/verbose" -Wait + Start-Process -NoNewWindow -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicyUsers" -Wait + Start-Process -NoNewWindow -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicy" -Wait + Start-Process -NoNewWindow -FilePath "gpupdate" -ArgumentList "/force" -Wait + Write-Progress -Id 7 -ParentId 0 -Activity "Removing Group Policy Windows Update settings" -Status "Completed" -PercentComplete 100 + # Reset WinSock Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Resetting WinSock..." -PercentComplete 65 Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Resetting WinSock..." -PercentComplete 0 - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" -RedirectStandardOutput $true - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" -RedirectStandardOutput $true - Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" -RedirectStandardOutput $true + Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" + Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" + Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" Write-Progress -Id 7 -ParentId 0 -Activity "Resetting WinSock" -Status "Completed" -PercentComplete 100 @@ -295,11 +195,18 @@ function Invoke-WPFFixesUpdate { # Force Windows Update to check for updates Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Forcing discovery..." -PercentComplete 95 Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Forcing discovery..." -PercentComplete 0 - (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + try { + (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() + } catch { + Set-WinUtilTaskbaritem -state "Error" -overlay "warning" + Write-Warning "Failed to create Windows Update COM object: $_" + } Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow" Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100 Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100 + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + $ButtonType = [System.Windows.MessageBoxButton]::OK $MessageboxTitle = "Reset Windows Update " $Messageboxbody = ("Stock settings loaded.`n Please reboot your computer") @@ -317,20 +224,10 @@ function Invoke-WPFFixesUpdate { Write-Progress -Id 3 -Activity "Renaming/Removing Files" -Completed Write-Progress -Id 4 -Activity "Resetting the WU Service Security Descriptors" -Completed Write-Progress -Id 5 -Activity "Reregistering DLLs" -Completed - Write-Progress -Id 6 -Activity "Removing WSUS client settings" -Completed + Write-Progress -Id 6 -Activity "Removing Group Policy Windows Update settings" -Completed Write-Progress -Id 7 -Activity "Resetting WinSock" -Completed Write-Progress -Id 8 -Activity "Deleting BITS jobs" -Completed Write-Progress -Id 9 -Activity "Starting Windows Update Services" -Completed Write-Progress -Id 10 -Activity "Forcing discovery" -Completed } - ``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/content/dev/features/Fixes/Winget.md b/docs/content/dev/features/Fixes/Winget.md new file mode 100644 index 0000000000..7cdcdf44b8 --- /dev/null +++ b/docs/content/dev/features/Fixes/Winget.md @@ -0,0 +1,30 @@ +--- +title: "WinGet Reinstall" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFFixesWinget.ps1",linenos=inline,linenostart=1} +function Invoke-WPFFixesWinget { + + <# + + .SYNOPSIS + Fixes WinGet by running `choco install winget` + .DESCRIPTION + BravoNorris for the fantastic idea of a button to reinstall WinGet + #> + # Install Choco if not already present + try { + Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" + Write-Host "==> Starting WinGet Repair" + Install-WinUtilWinget + } catch { + Write-Error "Failed to install WinGet: $_" + Set-WinUtilTaskbaritem -state "Error" -overlay "warning" + } finally { + Write-Host "==> Finished WinGet Repair" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + } + +} +``` diff --git a/docs/content/dev/features/Fixes/_index.md b/docs/content/dev/features/Fixes/_index.md new file mode 100644 index 0000000000..76f58da0af --- /dev/null +++ b/docs/content/dev/features/Fixes/_index.md @@ -0,0 +1,7 @@ +--- +title: "Fixes" +weight: 2 +toc: false +--- + +{{< autolinks section="dev/features/fixes" >}} diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Computer.md b/docs/content/dev/features/Legacy-Windows-Panels/Computer.md new file mode 100644 index 0000000000..96692de3c7 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Computer.md @@ -0,0 +1,16 @@ +--- +title: "Computer Management" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=196} + "WPFPanelComputer": { + "Content": "Computer Management", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "compmgmt.msc" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Control.md b/docs/content/dev/features/Legacy-Windows-Panels/Control.md new file mode 100644 index 0000000000..34b7cc8782 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Control.md @@ -0,0 +1,16 @@ +--- +title: "Control Panel" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=185} + "WPFPanelControl": { + "Content": "Control Panel", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "control" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Network.md b/docs/content/dev/features/Legacy-Windows-Panels/Network.md new file mode 100644 index 0000000000..f505528ed5 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Network.md @@ -0,0 +1,16 @@ +--- +title: "Network Connections" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=207} + "WPFPanelNetwork": { + "Content": "Network Connections", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "ncpa.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Power.md b/docs/content/dev/features/Legacy-Windows-Panels/Power.md new file mode 100644 index 0000000000..4afa16867b --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Power.md @@ -0,0 +1,16 @@ +--- +title: "Power Panel" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=218} + "WPFPanelPower": { + "Content": "Power Panel", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "powercfg.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Printer.md b/docs/content/dev/features/Legacy-Windows-Panels/Printer.md new file mode 100644 index 0000000000..1e4d2e47dc --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Printer.md @@ -0,0 +1,16 @@ +--- +title: "Printer Panel" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=229} + "WPFPanelPrinter": { + "Content": "Printer Panel", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "Start-Process 'shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}'" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Region.md b/docs/content/dev/features/Legacy-Windows-Panels/Region.md new file mode 100644 index 0000000000..111cb7d8a8 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Region.md @@ -0,0 +1,16 @@ +--- +title: "Region" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=240} + "WPFPanelRegion": { + "Content": "Region", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "intl.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Restore.md b/docs/content/dev/features/Legacy-Windows-Panels/Restore.md new file mode 100644 index 0000000000..360fe8760f --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Restore.md @@ -0,0 +1,16 @@ +--- +title: "Windows Restore" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=251} + "WPFPanelRestore": { + "Content": "Windows Restore", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "rstrui.exe" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Sound.md b/docs/content/dev/features/Legacy-Windows-Panels/Sound.md new file mode 100644 index 0000000000..3646e2b112 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Sound.md @@ -0,0 +1,16 @@ +--- +title: "Sound Settings" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=262} + "WPFPanelSound": { + "Content": "Sound Settings", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "mmsys.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/System.md b/docs/content/dev/features/Legacy-Windows-Panels/System.md new file mode 100644 index 0000000000..57b74f35b6 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/System.md @@ -0,0 +1,16 @@ +--- +title: "System Properties" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=273} + "WPFPanelSystem": { + "Content": "System Properties", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "sysdm.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/Timedate.md b/docs/content/dev/features/Legacy-Windows-Panels/Timedate.md new file mode 100644 index 0000000000..5e1c20cca1 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/Timedate.md @@ -0,0 +1,16 @@ +--- +title: "Time and Date" +description: "" +--- + +```json {filename="config/feature.json",linenos=inline,linenostart=284} + "WPFPanelTimedate": { + "Content": "Time and Date", + "category": "Legacy Windows Panels", + "panel": "2", + "Type": "Button", + "ButtonWidth": "300", + "InvokeScript": [ + "timedate.cpl" + ], +``` diff --git a/docs/content/dev/features/Legacy-Windows-Panels/_index.md b/docs/content/dev/features/Legacy-Windows-Panels/_index.md new file mode 100644 index 0000000000..b09a97bca4 --- /dev/null +++ b/docs/content/dev/features/Legacy-Windows-Panels/_index.md @@ -0,0 +1,7 @@ +--- +title: "Legacy Windows Panels" +weight: 3 +toc: false +--- + +{{< autolinks section="dev/features/legacy-windows-panels" >}} diff --git a/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/InstallPSProfile.md b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/InstallPSProfile.md new file mode 100644 index 0000000000..a3ca01cf98 --- /dev/null +++ b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/InstallPSProfile.md @@ -0,0 +1,15 @@ +--- +title: "Install CTT PowerShell Profile" +description: "" +--- + +```powershell {filename="functions/private/Invoke-WinUtilInstallPSProfile.ps1",linenos=inline,linenostart=1} +function Invoke-WinUtilInstallPSProfile { + + if (Test-Path $Profile) { + Rename-Item $Profile -NewName ($Profile + '.bak') + } + + Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"' +} +``` diff --git a/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/UninstallPSProfile.md b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/UninstallPSProfile.md new file mode 100644 index 0000000000..326a6fc66e --- /dev/null +++ b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/UninstallPSProfile.md @@ -0,0 +1,18 @@ +--- +title: "Uninstall CTT PowerShell Profile" +description: "" +--- + +```powershell {filename="functions/private/Invoke-WinUtilUninstallPSProfile.ps1",linenos=inline,linenostart=1} +function Invoke-WinUtilUninstallPSProfile { + if (Test-Path ($Profile + '.bak')) { + Remove-Item $Profile + Rename-Item ($Profile + '.bak') -NewName $Profile + } + else { + Remove-Item $Profile + } + + Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green +} +``` diff --git a/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/_index.md b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/_index.md new file mode 100644 index 0000000000..c31e1e8b42 --- /dev/null +++ b/docs/content/dev/features/Powershell-Profile-Powershell-7--Only/_index.md @@ -0,0 +1,7 @@ +--- +title: "Powershell Profile Powershell 7+ Only" +weight: 5 +toc: false +--- + +{{< autolinks section="dev/features/powershell-profile-powershell-7--only" >}} diff --git a/docs/content/dev/features/Remote-Access/SSHServer.md b/docs/content/dev/features/Remote-Access/SSHServer.md new file mode 100644 index 0000000000..c767b2cfe5 --- /dev/null +++ b/docs/content/dev/features/Remote-Access/SSHServer.md @@ -0,0 +1,24 @@ +--- +title: "Enable OpenSSH Server" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFSSHServer.ps1",linenos=inline,linenostart=1} +function Invoke-WPFSSHServer { + <# + + .SYNOPSIS + Invokes the OpenSSH Server install in a runspace + + #> + + Invoke-WPFRunspace -ScriptBlock { + + Invoke-WinUtilSSHServer + + Write-Host "=======================================" + Write-Host "-- OpenSSH Server installed! ---" + Write-Host "=======================================" + } +} +``` diff --git a/docs/content/dev/features/Remote-Access/_index.md b/docs/content/dev/features/Remote-Access/_index.md new file mode 100644 index 0000000000..e557a9e377 --- /dev/null +++ b/docs/content/dev/features/Remote-Access/_index.md @@ -0,0 +1,7 @@ +--- +title: "Remote Access" +weight: 4 +toc: false +--- + +{{< autolinks section="dev/features/remote-access" >}} diff --git a/docs/content/dev/features/_index.md b/docs/content/dev/features/_index.md new file mode 100644 index 0000000000..1680214a4e --- /dev/null +++ b/docs/content/dev/features/_index.md @@ -0,0 +1,25 @@ +--- +title: "Features" +weight: 1 +toc: false +--- + +### Fixes + +{{< autolinks section="dev/features/fixes" >}} + +### Legacy Windows Panels + +{{< autolinks section="dev/features/legacy-windows-panels" >}} + +### Features + +{{< autolinks section="dev/features/features" >}} + +### Remote Access + +{{< autolinks section="dev/features/remote-access" >}} + +### Powershell Profile Powershell 7+ Only + +{{< autolinks section="dev/features/powershell-profile-powershell-7--only" >}} diff --git a/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md b/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md new file mode 100644 index 0000000000..18cb7f026b --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md @@ -0,0 +1,29 @@ +--- +title: "Bing Search in Start Menu" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2108} + "WPFToggleBingSearch": { + "Content": "Bing Search in Start Menu", + "Description": "If enabled, Bing web search results will be included in your Start Menu search.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", + "Name": "BingSearchEnabled", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md b/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md new file mode 100644 index 0000000000..4d7b8078bd --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md @@ -0,0 +1,53 @@ +--- +title: "Dark Theme for Windows" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2066} + "WPFToggleDarkMode": { + "Content": "Dark Theme for Windows", + "Description": "Enable/Disable Dark Mode.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", + "Name": "AppsUseLightTheme", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "false" + }, + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", + "Name": "SystemUsesLightTheme", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "false" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate + if ($sync.ThemeButton.Content -eq [char]0xF08C) { + Invoke-WinutilThemeChange -theme \"Auto\" + } + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate + if ($sync.ThemeButton.Content -eq [char]0xF08C) { + Invoke-WinutilThemeChange -theme \"Auto\" + } + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md b/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md new file mode 100644 index 0000000000..d037ef3065 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md @@ -0,0 +1,37 @@ +--- +title: "Detailed BSoD" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2482} + "WPFToggleDetailedBSoD": { + "Content": "Detailed BSoD", + "Description": "If enabled, you will see a detailed Blue Screen of Death (BSOD) with more information.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl", + "Name": "DisplayParameters", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + }, + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\CrashControl", + "Name": "DisableEmoticon", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md b/docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md new file mode 100644 index 0000000000..bcd7b2c8ac --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/DisableCrossDeviceResume.md @@ -0,0 +1,29 @@ +--- +title: "Cross-Device Resume" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2612} + "WPFToggleDisableCrossDeviceResume": { + "Content": "Cross-Device Resume", + "Description": "This tweak controls the Resume function in Windows 11 24H2 and later, which allows you to resume an activity from a mobile device and vice-versa.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\CrossDeviceResume\\Configuration", + "Name": "IsResumeAllowed", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md b/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md new file mode 100644 index 0000000000..f50bf32d36 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md @@ -0,0 +1,39 @@ +--- +title: "Show Hidden Files" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2362} + "WPFToggleHiddenFiles": { + "Content": "Show Hidden Files", + "Description": "If enabled, Hidden Files will be shown.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "Hidden", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md b/docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md new file mode 100644 index 0000000000..82cdb8a269 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/HideSettingsHome.md @@ -0,0 +1,29 @@ +--- +title: "Remove Settings Home Page" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2232} + "WPFToggleHideSettingsHome": { + "Content": "Remove Settings Home Page", + "Description": "Removes the Home Page in the Windows Settings app.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + "Name": "SettingsPageVisibility", + "Value": "hide:home", + "Type": "String", + "OriginalValue": "show:home", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md b/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md new file mode 100644 index 0000000000..0d2609ebba --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md @@ -0,0 +1,45 @@ +--- +title: "Mouse Acceleration" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2250} + "WPFToggleMouseAcceleration": { + "Content": "Mouse Acceleration", + "Description": "If enabled, the Cursor movement is affected by the speed of your physical mouse movements.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Control Panel\\Mouse", + "Name": "MouseSpeed", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Control Panel\\Mouse", + "Name": "MouseThreshold1", + "Value": "6", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Control Panel\\Mouse", + "Name": "MouseThreshold2", + "Value": "10", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md b/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md new file mode 100644 index 0000000000..5b0f614d3d --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/MultiplaneOverlay.md @@ -0,0 +1,29 @@ +--- +title: "Disable Multiplane Overlay" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2344} + "WPFToggleMultiplaneOverlay": { + "Content": "Disable Multiplane Overlay", + "Description": "Disable the Multiplane Overlay which can sometimes cause issues with Graphics Cards.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Dwm", + "Name": "OverlayTestMode", + "Value": "5", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md b/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md new file mode 100644 index 0000000000..24292514b7 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/NewOutlook.md @@ -0,0 +1,53 @@ +--- +title: "New Outlook" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2302} + "WPFToggleNewOutlook": { + "Content": "New Outlook", + "Description": "If disabled, it removes the new Outlook toggle, disables the new Outlook migration, and ensures the classic Outlook application is used.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "UseNewOutlook", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "HideNewOutlookToggle", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "true" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Options\\General", + "Name": "DoNewOutlookAutoMigration", + "Value": "0", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + }, + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Office\\16.0\\Outlook\\Preferences", + "Name": "NewOutlookMigrationUserSetting", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/NumLock.md b/docs/content/dev/tweaks/Customize-Preferences/NumLock.md new file mode 100644 index 0000000000..d302095b33 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/NumLock.md @@ -0,0 +1,37 @@ +--- +title: "Num Lock on Startup" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2144} + "WPFToggleNumLock": { + "Content": "Num Lock on Startup", + "Description": "Toggle the Num Lock key state when your computer starts.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKU:\\.Default\\Control Panel\\Keyboard", + "Name": "InitialKeyboardIndicators", + "Value": "2", + "Type": "String", + "OriginalValue": "0", + "DefaultState": "false" + }, + { + "Path": "HKCU:\\Control Panel\\Keyboard", + "Name": "InitialKeyboardIndicators", + "Value": "2", + "Type": "String", + "OriginalValue": "0", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md b/docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md new file mode 100644 index 0000000000..51222d1e43 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/S3Sleep.md @@ -0,0 +1,29 @@ +--- +title: "S3 Sleep" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2508} + "WPFToggleS3Sleep": { + "Content": "S3 Sleep", + "Description": "Toggles between Modern Standby and S3 Sleep.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power", + "Name": "PlatformAoAcOverride", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md b/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md new file mode 100644 index 0000000000..d1604ac91a --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md @@ -0,0 +1,39 @@ +--- +title: "Show File Extensions" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2390} + "WPFToggleShowExt": { + "Content": "Show File Extensions", + "Description": "If enabled, File extensions (e.g., .txt, .jpg) are visible.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "HideFileExt", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "false" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/StandbyFix.md b/docs/content/dev/tweaks/Customize-Preferences/StandbyFix.md new file mode 100644 index 0000000000..28195da9a1 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/StandbyFix.md @@ -0,0 +1,29 @@ +--- +title: "Modern Standby fix" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2126} + "WPFToggleStandbyFix": { + "Content": "Modern Standby fix", + "Description": "Disable network connection during S0 Sleep. If network connectivity is turned on during S0 Sleep it could cause overheating on modern laptops.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Power\\PowerSettings\\f15576e8-98b7-4186-b944-eafa664402d9", + "Name": "ACSettingIndex", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md b/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md new file mode 100644 index 0000000000..d4da528b83 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/StartMenuRecommendations.md @@ -0,0 +1,55 @@ +--- +title: "Recommendations in Start Menu" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2188} + "WPFToggleStartMenuRecommendations": { + "Content": "Recommendations in Start Menu", + "Description": "If disabled, then you will not see recommendations in the Start Menu. WARNING: This will also disable Windows Spotlight on your Lock Screen as a side effect.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Start", + "Name": "HideRecommendedSection", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "true" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\PolicyManager\\current\\device\\Education", + "Name": "IsEducationEnvironment", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "true" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer", + "Name": "HideRecommendedSection", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1", + "DefaultState": "true" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md b/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md new file mode 100644 index 0000000000..18691d57d7 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md @@ -0,0 +1,29 @@ +--- +title: "Sticky Keys" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2284} + "WPFToggleStickyKeys": { + "Content": "Sticky Keys", + "Description": "If enabled, Sticky Keys is activated. Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Control Panel\\Accessibility\\StickyKeys", + "Name": "Flags", + "Value": "506", + "Type": "DWord", + "OriginalValue": "58", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskView.md b/docs/content/dev/tweaks/Customize-Preferences/TaskView.md new file mode 100644 index 0000000000..dfc6065c39 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskView.md @@ -0,0 +1,29 @@ +--- +title: "Task View Button in Taskbar" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2436} + "WPFToggleTaskView": { + "Content": "Task View Button in Taskbar", + "Description": "If enabled, Task View Button in Taskbar will be shown.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "ShowTaskViewButton", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md b/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md new file mode 100644 index 0000000000..3a774463b7 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md @@ -0,0 +1,39 @@ +--- +title: "Center Taskbar Items" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2454} + "WPFToggleTaskbarAlignment": { + "Content": "Center Taskbar Items", + "Description": "[Windows 11] If enabled, the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "TaskbarAl", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], + "InvokeScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], + "UndoScript": [ + " + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md b/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md new file mode 100644 index 0000000000..5bcbb9babb --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md @@ -0,0 +1,29 @@ +--- +title: "Search Button in Taskbar" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2418} + "WPFToggleTaskbarSearch": { + "Content": "Search Button in Taskbar", + "Description": "If enabled, Search Button will be on the Taskbar.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", + "Name": "SearchboxTaskbarMode", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "true" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md b/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md new file mode 100644 index 0000000000..662750972a --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md @@ -0,0 +1,29 @@ +--- +title: "Verbose Messages During Logon" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2170} + "WPFToggleVerboseLogon": { + "Content": "Verbose Messages During Logon", + "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", + "category": "Customize Preferences", + "panel": "2", + "Type": "Toggle", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System", + "Name": "VerboseStatus", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0", + "DefaultState": "false" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Customize-Preferences/_index.md b/docs/content/dev/tweaks/Customize-Preferences/_index.md new file mode 100644 index 0000000000..ddc2a936a4 --- /dev/null +++ b/docs/content/dev/tweaks/Customize-Preferences/_index.md @@ -0,0 +1,9 @@ +--- +title: "Customize Preferences" +weight: 3 +toc: false +--- + +### Customize Preferences + +{{< autolinks section="dev/tweaks/customize-preferences" >}} diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Activity.md b/docs/content/dev/tweaks/Essential-Tweaks/Activity.md new file mode 100644 index 0000000000..a7d56ca6df --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Activity.md @@ -0,0 +1,41 @@ +--- +title: "Disable Activity History" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2} + "WPFTweaksActivity": { + "Content": "Disable Activity History", + "Description": "Erases recent docs, clipboard, and run history.", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", + "Name": "EnableActivityFeed", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", + "Name": "PublishUserActivities", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", + "Name": "UploadUserActivities", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md b/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md new file mode 100644 index 0000000000..0de41f8df9 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md @@ -0,0 +1,27 @@ +--- +title: "Disable ConsumerFeatures" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1311} + "WPFTweaksConsumerFeatures": { + "Content": "Disable ConsumerFeatures", + "Description": "Windows will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link).", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", + "Name": "DisableWindowsConsumerFeatures", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md b/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md new file mode 100644 index 0000000000..e26e27dcb3 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md @@ -0,0 +1,18 @@ +--- +title: "Delete Temporary Files" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1961} + "WPFTweaksDeleteTempFiles": { + "Content": "Delete Temporary Files", + "Description": "Erases TEMP Folders.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + Remove-Item -Path \"$Env:Temp\\*\" -Recurse -Force + Remove-Item -Path \"$Env:SystemRoot\\Temp\\*\" -Recurse -Force + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md b/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md new file mode 100644 index 0000000000..e7c9b697cd --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md @@ -0,0 +1,60 @@ +--- +title: "Disable Explorer Automatic Folder Discovery" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2557} + "WPFTweaksDisableExplorerAutoDiscovery": { + "Content": "Disable Explorer Automatic Folder Discovery", + "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + # Every folder + $allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\" + + if (!(Test-Path $allFolders)) { + New-Item -Path $allFolders -Force + Write-Host \"Created $allFolders\" + } + + # Generic view + New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force + Write-Host \"Set FolderType to NotSpecified\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], + "UndoScript": [ + " + # Previously detected folders + $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\" + + # Folder types lookup table + $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\" + + # Flush Explorer view database + Remove-Item -Path $bags -Recurse -Force + Write-Host \"Removed $bags\" + + Remove-Item -Path $bagMRU -Recurse -Force + Write-Host \"Removed $bagMRU\" + + Write-Host Please sign out and back in, or restart your computer to apply the changes! + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DisableStoreSearch.md b/docs/content/dev/tweaks/Essential-Tweaks/DisableStoreSearch.md new file mode 100644 index 0000000000..059ae2429a --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/DisableStoreSearch.md @@ -0,0 +1,18 @@ +--- +title: "Disable Microsoft Store search results" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=125} + "WPFTweaksDisableStoreSearch": { + "Content": "Disable Microsoft Store search results", + "Description": "Will not display recommended Microsoft Store apps when searching for apps in the Start menu.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + "icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /deny Everyone:F" + ], + "UndoScript": [ + "icacls \"$Env:LocalAppData\\Packages\\Microsoft.WindowsStore_8wekyb3d8bbwe\\LocalState\\store.db\" /grant Everyone:F" + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md b/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md new file mode 100644 index 0000000000..49372259a4 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md @@ -0,0 +1,18 @@ +--- +title: "Run Disk Cleanup" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1948} + "WPFTweaksDiskCleanup": { + "Content": "Run Disk Cleanup", + "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + cleanmgr.exe /d C: /VERYLOWDISK + Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md b/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md new file mode 100644 index 0000000000..f375df81be --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md @@ -0,0 +1,27 @@ +--- +title: "Enable End Task With Right Click" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1744} + "WPFTweaksEndTaskOnTaskbar": { + "Content": "Enable End Task With Right Click", + "Description": "Enables option to end task when right clicking a program in the taskbar.", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings", + "Name": "TaskbarEndTask", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Hiber.md b/docs/content/dev/tweaks/Essential-Tweaks/Hiber.md new file mode 100644 index 0000000000..254f7dbc0d --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Hiber.md @@ -0,0 +1,40 @@ +--- +title: "Disable Hibernation" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=32} + "WPFTweaksHiber": { + "Content": "Disable Hibernation", + "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the PC off. It really should never be used.", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power", + "Name": "HibernateEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings", + "Name": "ShowHibernateOption", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], + "InvokeScript": [ + "powercfg.exe /hibernate off" + ], + "UndoScript": [ + "powercfg.exe /hibernate on" + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Location.md b/docs/content/dev/tweaks/Essential-Tweaks/Location.md new file mode 100644 index 0000000000..527491fc77 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Location.md @@ -0,0 +1,48 @@ +--- +title: "Disable Location Tracking" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=138} + "WPFTweaksLocation": { + "Content": "Disable Location Tracking", + "Description": "Disables Location Tracking.", + "category": "Essential Tweaks", + "panel": "1", + "service": [ + { + "Name": "lfsvc", + "StartupType": "Disable", + "OriginalType": "Manual" + } + ], + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location", + "Name": "Value", + "Value": "Deny", + "Type": "String", + "OriginalValue": "Allow" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Sensor\\Overrides\\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}", + "Name": "SensorPermissionState", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKLM:\\SYSTEM\\Maps", + "Name": "AutoUpdateEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md b/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md new file mode 100644 index 0000000000..0705b6c05f --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md @@ -0,0 +1,18 @@ +--- +title: "Disable PowerShell 7 Telemetry" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1760} + "WPFTweaksPowershell7Tele": { + "Content": "Disable PowerShell 7 Telemetry", + "Description": "Creates an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell PowerShell 7 to not send Telemetry Data.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')" + ], + "UndoScript": [ + "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine')" + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md b/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md new file mode 100644 index 0000000000..76c1cf01c3 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md @@ -0,0 +1,38 @@ +--- +title: "Create Restore Point" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1717} + "WPFTweaksRestorePoint": { + "Content": "Create Restore Point", + "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications.", + "category": "Essential Tweaks", + "panel": "1", + "Checked": "False", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore", + "Name": "SystemRestorePointCreationFrequency", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1440" + } + ], + "InvokeScript": [ + " + if (-not (Get-ComputerRestorePoint)) { + Enable-ComputerRestore -Drive $Env:SystemDrive + } + + Checkpoint-Computer -Description \"System Restore Point created by WinUtil\" -RestorePointType MODIFY_SETTINGS + Write-Host \"System Restore Point Created Successfully\" -ForegroundColor Green + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/RevertStartMenu.md b/docs/content/dev/tweaks/Essential-Tweaks/RevertStartMenu.md new file mode 100644 index 0000000000..64d063b50b --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/RevertStartMenu.md @@ -0,0 +1,40 @@ +--- +title: "Revert Start Menu layout" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=90} + "WPFTweaksRevertStartMenu": { + "Content": "Revert Start Menu layout", + "Description": "Bring back the old Start Menu layout from before the gradual rollout of the new one in 25H2.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip + + Expand-Archive ViVeTool.zip + Remove-Item ViVeTool.zip + + Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/disable /id:47205210' -Wait -NoNewWindow + + Remove-Item ViVeTool -Recurse + + Write-Host 'Old start menu reverted. Please restart your computer to take effect.' + " + ], + "UndoScript": [ + " + Invoke-WebRequest https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip -OutFile ViVeTool.zip + + Expand-Archive ViVeTool.zip + Remove-Item ViVeTool.zip + + Start-Process 'ViVeTool\\ViVeTool.exe' -ArgumentList '/enable /id:47205210' -Wait -NoNewWindow + + Remove-Item ViVeTool -Recurse + + Write-Host 'New start menu reverted. Please restart your computer to take effect.' + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Services.md b/docs/content/dev/tweaks/Essential-Tweaks/Services.md new file mode 100644 index 0000000000..6e7ed614e8 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Services.md @@ -0,0 +1,969 @@ +--- +title: "Set Services to Manual" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=175} + "WPFTweaksServices": { + "Content": "Set Services to Manual", + "Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.", + "category": "Essential Tweaks", + "panel": "1", + "service": [ + { + "Name": "ALG", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "AppMgmt", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "AppReadiness", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "AppVClient", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "Appinfo", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "AssignedAccessManagerSvc", + "StartupType": "Disabled", + "OriginalType": "Manual" + }, + { + "Name": "AudioEndpointBuilder", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "AudioSrv", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "Audiosrv", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "AxInstSV", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "BDESVC", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "BITS", + "StartupType": "AutomaticDelayedStart", + "OriginalType": "Automatic" + }, + { + "Name": "BTAGService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "BthAvctpSvc", + "StartupType": "Automatic", + "OriginalType": "Manual" + }, + { + "Name": "CDPSvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "COMSysApp", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "CertPropSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "CryptSvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "CscService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "DPS", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "DevQueryBroker", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "DeviceAssociationService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "DeviceInstall", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Dhcp", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "DiagTrack", + "StartupType": "Disabled", + "OriginalType": "Automatic" + }, + { + "Name": "DialogBlockingService", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "DispBrokerDesktopSvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "DisplayEnhancementService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "EFS", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "EapHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "EventLog", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "EventSystem", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "FDResPub", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "FontCache", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "FrameServer", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "FrameServerMonitor", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "GraphicsPerfSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "HvHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "IKEEXT", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "InstallService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "InventorySvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "IpxlatCfgSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "KeyIso", + "StartupType": "Automatic", + "OriginalType": "Manual" + }, + { + "Name": "KtmRm", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "LanmanServer", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "LanmanWorkstation", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "LicenseManager", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "LxpSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "MSDTC", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "MSiSCSI", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "MapsBroker", + "StartupType": "AutomaticDelayedStart", + "OriginalType": "Automatic" + }, + { + "Name": "McpManagementService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "MicrosoftEdgeElevationService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NaturalAuthentication", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NcaSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NcbService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NcdAutoSetup", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NetSetupSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NetTcpPortSharing", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "Netman", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "NlaSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "PcaSvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "PeerDistSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "PerfHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "PhoneSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "PlugPlay", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "PolicyAgent", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Power", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "PrintNotify", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "ProfSvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "PushToInstall", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "QWAVE", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "RasAuto", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "RasMan", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "RemoteAccess", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "RemoteRegistry", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "RetailDemo", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "RmSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "RpcLocator", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SCPolicySvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SCardSvr", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SDRSVC", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SEMgrSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SENS", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "SNMPTRAP", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SNMPTrap", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SSDPSRV", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SamSs", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "ScDeviceEnum", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SensorDataService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SensorService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SensrSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SessionEnv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "SharedAccess", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "ShellHWDetection", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "SmsRouter", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Spooler", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "SstpSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "StiSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "StorSvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "SysMain", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "TapiSrv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "TermService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Themes", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "TieringEngineService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "TokenBroker", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "TrkWks", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "TroubleshootingSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "TrustedInstaller", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "UevAgentService", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "UmRdpService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "UserManager", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "UsoSvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "VSS", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "VaultSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "W32Time", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WEPHOSTSVC", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WFDSConMgrSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WMPNetworkSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WManSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WPDBusEnum", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WSAIFabricSvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "WSearch", + "StartupType": "AutomaticDelayedStart", + "OriginalType": "Automatic" + }, + { + "Name": "WalletService", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WarpJITSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WbioSrvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Wcmsvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "WdiServiceHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WdiSystemHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WebClient", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Wecsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WerSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WiaRpc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WinRM", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "Winmgmt", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "WpcMonSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "WpnService", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "XblAuthManager", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "XblGameSave", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "XboxGipSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "XboxNetApiSvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "autotimesvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "bthserv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "camsvc", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "cloudidsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "dcsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "defragsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "diagsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "dmwappushservice", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "dot3svc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "edgeupdate", + "StartupType": "Manual", + "OriginalType": "Automatic" + }, + { + "Name": "edgeupdatem", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "fdPHost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "fhsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "hidserv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "icssvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "iphlpsvc", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "lfsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "lltdsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "lmhosts", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "netprofm", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "nsi", + "StartupType": "Automatic", + "OriginalType": "Automatic" + }, + { + "Name": "perceptionsimulation", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "pla", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "seclogon", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "shpamsvc", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "smphost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "ssh-agent", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "svsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "swprv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "tzautoupdate", + "StartupType": "Disabled", + "OriginalType": "Disabled" + }, + { + "Name": "upnphost", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vds", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicguestinterface", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicheartbeat", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmickvpexchange", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicrdv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicshutdown", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmictimesync", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicvmsession", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "vmicvss", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wbengine", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wcncsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "webthreatdefsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wercplsupport", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wisvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wlidsvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wlpasvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wmiApSrv", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "workfolderssvc", + "StartupType": "Manual", + "OriginalType": "Manual" + }, + { + "Name": "wuauserv", + "StartupType": "Manual", + "OriginalType": "Manual" + } + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md b/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md new file mode 100644 index 0000000000..af409b9fe2 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md @@ -0,0 +1,133 @@ +--- +title: "Disable Telemetry" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1327} + "WPFTweaksTelemetry": { + "Content": "Disable Telemetry", + "Description": "Disables Microsoft Telemetry.", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\AdvertisingInfo", + "Name": "Enabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Privacy", + "Name": "TailoredExperiencesWithDiagnosticDataEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Speech_OneCore\\Settings\\OnlineSpeechPrivacy", + "Name": "HasAccepted", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Input\\TIPC", + "Name": "Enabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization", + "Name": "RestrictImplicitInkCollection", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization", + "Name": "RestrictImplicitTextCollection", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\InputPersonalization\\TrainedDataStore", + "Name": "HarvestContacts", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Personalization\\Settings", + "Name": "AcceptedPrivacyPolicy", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection", + "Name": "AllowTelemetry", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "Start_TrackProgs", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", + "Name": "PublishUserActivities", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Siuf\\Rules", + "Name": "NumberOfSIUFInPeriod", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], + "InvokeScript": [ + " + # Disable Defender Auto Sample Submission + Set-MpPreference -SubmitSamplesConsent 2 + + # Disable (Connected User Experiences and Telemetry) Service + Set-Service -Name diagtrack -StartupType Disabled + + # Disable (Windows Error Reporting Manager) Service + Set-Service -Name wermgr -StartupType Disabled + + $Memory = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum / 1KB + Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory + + Remove-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Siuf\\Rules\" -Name PeriodInNanoSeconds + " + ], + "UndoScript": [ + " + # Enable Defender Auto Sample Submission + Set-MpPreference -SubmitSamplesConsent 1 + + # Enable (Connected User Experiences and Telemetry) Service + Set-Service -Name diagtrack -StartupType Automatic + + # Enable (Windows Error Reporting Manager) Service + Set-Service -Name wermgr -StartupType Automatic + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md b/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md new file mode 100644 index 0000000000..15fab93692 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/WPBT.md @@ -0,0 +1,27 @@ +--- +title: "Disable Windows Platform Binary Table (WPBT)" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1816} + "WPFTweaksWPBT": { + "Content": "Disable Windows Platform Binary Table (WPBT)", + "Description": "If enabled, WPBT allows your computer vendor to execute programs at boot time, such as anti-theft software, software drivers, as well as force install software without user consent. Poses potential security risk.", + "category": "Essential Tweaks", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", + "Name": "DisableWpbtExecution", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/Essential-Tweaks/Widget.md b/docs/content/dev/tweaks/Essential-Tweaks/Widget.md new file mode 100644 index 0000000000..422c34acf2 --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/Widget.md @@ -0,0 +1,34 @@ +--- +title: "Remove Widgets" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=61} + "WPFTweaksWidget": { + "Content": "Remove Widgets", + "Description": "Removes the annoying widgets in the bottom left of the Taskbar.", + "category": "Essential Tweaks", + "panel": "1", + "InvokeScript": [ + " + # Sometimes if you dont stop the Widgets process the removal may fail + + Get-Process *Widget* | Stop-Process + Get-AppxPackage Microsoft.WidgetsPlatformRuntime -AllUsers | Remove-AppxPackage -AllUsers + Get-AppxPackage MicrosoftWindows.Client.WebExperience -AllUsers | Remove-AppxPackage -AllUsers + + Invoke-WinUtilExplorerUpdate -action \"restart\" + Write-Host \"Removed widgets\" + " + ], + "UndoScript": [ + " + Write-Host \"Restoring widgets AppxPackages\" + + Add-AppxPackage -Register \"C:\\Program Files\\WindowsApps\\Microsoft.WidgetsPlatformRuntime*\\AppxManifest.xml\" -DisableDevelopmentMode + Add-AppxPackage -Register \"C:\\Program Files\\WindowsApps\\MicrosoftWindows.Client.WebExperience*\\AppxManifest.xml\" -DisableDevelopmentMode + + Invoke-WinUtilExplorerUpdate -action \"restart\" + " + ], +``` diff --git a/docs/content/dev/tweaks/Essential-Tweaks/_index.md b/docs/content/dev/tweaks/Essential-Tweaks/_index.md new file mode 100644 index 0000000000..4fa2fe70af --- /dev/null +++ b/docs/content/dev/tweaks/Essential-Tweaks/_index.md @@ -0,0 +1,9 @@ +--- +title: "Essential Tweaks" +weight: 1 +toc: false +--- + +### Essential Tweaks + +{{< autolinks section="dev/tweaks/essential-tweaks" >}} diff --git a/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md b/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md new file mode 100644 index 0000000000..1eb2f3f5e9 --- /dev/null +++ b/docs/content/dev/tweaks/Performance-Plans/AddUltPerf.md @@ -0,0 +1,42 @@ +--- +title: "Add and Activate Ultimate Performance Profile" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1} +function Invoke-WPFUltimatePerformance { + param( + [switch]$Do + ) + + if ($Do) { + if (-not (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan")) { + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + powercfg /restoredefaultschemes + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + Write-Host "Failed to restore High Performance plan. Default plans do not include high performance. If you are on a laptop, do NOT use High Performance or Ultimate Performance plans." -ForegroundColor Red + return + } + } + $guid = ((powercfg /duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c) -split '\s+')[3] + powercfg /changename $guid "ChrisTitus - Ultimate Power Plan" + powercfg /setacvalueindex $guid SUB_PROCESSOR IDLEDISABLE 1 + powercfg /setacvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 1 + powercfg /setacvalueindex $guid SUB_PROCESSOR PROCTHROTTLEMIN 100 + powercfg /setactive $guid + Write-Host "ChrisTitus - Ultimate Power Plan plan installed and activated." -ForegroundColor Green + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is already installed." -ForegroundColor Red + return + } + } else { + if (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan") { + powercfg /setactive SCHEME_BALANCED + powercfg /delete ((powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan").ToString().Split()[3]) + Write-Host "ChrisTitus - Ultimate Power Plan plan was removed." -ForegroundColor Red + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is not installed." -ForegroundColor Yellow + } + } +} +``` diff --git a/docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md b/docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md new file mode 100644 index 0000000000..7cf3205759 --- /dev/null +++ b/docs/content/dev/tweaks/Performance-Plans/RemoveUltPerf.md @@ -0,0 +1,42 @@ +--- +title: "Remove Ultimate Performance Profile" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFUltimatePerformance.ps1",linenos=inline,linenostart=1} +function Invoke-WPFUltimatePerformance { + param( + [switch]$Do + ) + + if ($Do) { + if (-not (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan")) { + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + powercfg /restoredefaultschemes + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + Write-Host "Failed to restore High Performance plan. Default plans do not include high performance. If you are on a laptop, do NOT use High Performance or Ultimate Performance plans." -ForegroundColor Red + return + } + } + $guid = ((powercfg /duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c) -split '\s+')[3] + powercfg /changename $guid "ChrisTitus - Ultimate Power Plan" + powercfg /setacvalueindex $guid SUB_PROCESSOR IDLEDISABLE 1 + powercfg /setacvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 1 + powercfg /setacvalueindex $guid SUB_PROCESSOR PROCTHROTTLEMIN 100 + powercfg /setactive $guid + Write-Host "ChrisTitus - Ultimate Power Plan plan installed and activated." -ForegroundColor Green + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is already installed." -ForegroundColor Red + return + } + } else { + if (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan") { + powercfg /setactive SCHEME_BALANCED + powercfg /delete ((powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan").ToString().Split()[3]) + Write-Host "ChrisTitus - Ultimate Power Plan plan was removed." -ForegroundColor Red + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is not installed." -ForegroundColor Yellow + } + } +} +``` diff --git a/docs/content/dev/tweaks/Performance-Plans/_index.md b/docs/content/dev/tweaks/Performance-Plans/_index.md new file mode 100644 index 0000000000..42f31144b2 --- /dev/null +++ b/docs/content/dev/tweaks/Performance-Plans/_index.md @@ -0,0 +1,9 @@ +--- +title: "Performance Plans" +weight: 4 +toc: false +--- + +### Performance Plans + +{{< autolinks section="dev/tweaks/performance-plans" >}} diff --git a/docs/content/dev/tweaks/_index.md b/docs/content/dev/tweaks/_index.md new file mode 100644 index 0000000000..c2c02344a2 --- /dev/null +++ b/docs/content/dev/tweaks/_index.md @@ -0,0 +1,21 @@ +--- +title: "Tweaks" +weight: 2 +toc: false +--- + +### Essential Tweaks + +{{< autolinks section="dev/tweaks/essential-tweaks" >}} + +### Advanced Tweaks (CAUTION) + +{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}} + +### Customize Preferences + +{{< autolinks section="dev/tweaks/customize-preferences" >}} + +### Performance Plans + +{{< autolinks section="dev/tweaks/performance-plans" >}} diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md new file mode 100644 index 0000000000..5e69e593ab --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md @@ -0,0 +1,35 @@ +--- +title: "Adobe Network Block" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1896} + "WPFTweaksBlockAdobeNet": { + "Content": "Adobe Network Block", + "Description": "Reduces user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + $hostsUrl = \"https://github.com/Ruddernation-Designs/Adobe-URL-Block-List/raw/refs/heads/master/hosts\" + $hosts = \"$Env:SystemRoot\\System32\\drivers\\etc\\hosts\" + + Move-Item $hosts \"$hosts.bak\" + Invoke-WebRequest $hostsUrl -OutFile $hosts + ipconfig /flushdns + + Write-Host \"Added Adobe url block list from host file\" + " + ], + "UndoScript": [ + " + $hosts = \"$Env:SystemRoot\\System32\\drivers\\etc\\hosts\" + + Remove-Item $hosts + Move-Item \"$hosts.bak\" $hosts + ipconfig /flushdns + + Write-Host \"Removed Adobe url block list from host file\" + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md new file mode 100644 index 0000000000..e6023208f7 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BraveDebloat.md @@ -0,0 +1,55 @@ +--- +title: "Brave Debloat" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1139} + "WPFTweaksBraveDebloat": { + "Content": "Brave Debloat", + "Description": "Disables various annoyances like Brave Rewards, Leo AI, Crypto Wallet and VPN.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveRewardsDisabled", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveWalletDisabled", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveVPNDisabled", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveAIChatEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave", + "Name": "BraveStatsPingEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md new file mode 100644 index 0000000000..0a33004e05 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md @@ -0,0 +1,46 @@ +--- +title: "Remove Unwanted Pre-Installed Apps" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1676} + "WPFTweaksDeBloat": { + "Content": "Remove Unwanted Pre-Installed Apps", + "Description": "This will remove a bunch of Windows pre-installed applications which most people dont want on there system.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "appx": [ + "Microsoft.WindowsFeedbackHub", + "Microsoft.BingNews", + "Microsoft.BingSearch", + "Microsoft.BingWeather", + "Clipchamp.Clipchamp", + "Microsoft.Todos", + "Microsoft.PowerAutomateDesktop", + "Microsoft.MicrosoftSolitaireCollection", + "Microsoft.WindowsSoundRecorder", + "Microsoft.MicrosoftStickyNotes", + "Microsoft.Windows.DevHome", + "Microsoft.Paint", + "Microsoft.OutlookForWindows", + "Microsoft.WindowsAlarms", + "Microsoft.StartExperiencesApp", + "Microsoft.GetHelp", + "Microsoft.ZuneMusic", + "MicrosoftCorporationII.QuickAssist", + "MSTeams" + ], + "InvokeScript": [ + " + $TeamsPath = \"$Env:LocalAppData\\Microsoft\\Teams\\Update.exe\" + + if (Test-Path $TeamsPath) { + Write-Host \"Uninstalling Teams\" + Start-Process $TeamsPath -ArgumentList -uninstall -wait + + Write-Host \"Deleting Teams directory\" + Remove-Item $TeamsPath -Recurse -Force + } + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md new file mode 100644 index 0000000000..5784657d25 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md @@ -0,0 +1,27 @@ +--- +title: "Disable Background Apps" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2034} + "WPFTweaksDisableBGapps": { + "Content": "Disable Background Apps", + "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Windows 11.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\BackgroundAccessApplications", + "Name": "GlobalUserDisabled", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md new file mode 100644 index 0000000000..3f027bec43 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md @@ -0,0 +1,27 @@ +--- +title: "Disable Fullscreen Optimizations" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2050} + "WPFTweaksDisableFSO": { + "Content": "Disable Fullscreen Optimizations", + "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\System\\GameConfigStore", + "Name": "GameDVR_DXGIHonorFSEWindowsCompatible", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md new file mode 100644 index 0000000000..e08b4f6b93 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md @@ -0,0 +1,33 @@ +--- +title: "Disable IPv6" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2012} + "WPFTweaksDisableIPv6": { + "Content": "Disable IPv6", + "Description": "Disables IPv6.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", + "Name": "DisabledComponents", + "Value": "255", + "Type": "DWord", + "OriginalValue": "0" + } + ], + "InvokeScript": [ + "Disable-NetAdapterBinding -Name * -ComponentID ms_tcpip6" + ], + "UndoScript": [ + "Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6" + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md new file mode 100644 index 0000000000..a0831bd06f --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md @@ -0,0 +1,34 @@ +--- +title: "Disable Notification Tray/Calendar" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1873} + "WPFTweaksDisableNotifications": { + "Content": "Disable Notification Tray/Calendar", + "Description": "Disables all Notifications INCLUDING Calendar.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer", + "Name": "DisableNotificationCenter", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications", + "Name": "ToastEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md new file mode 100644 index 0000000000..48cd8a5688 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md @@ -0,0 +1,110 @@ +--- +title: "Set Display for Performance" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1554} + "WPFTweaksDisplay": { + "Content": "Set Display for Performance", + "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\Control Panel\\Desktop", + "Name": "DragFullWindows", + "Value": "0", + "Type": "String", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Control Panel\\Desktop", + "Name": "MenuShowDelay", + "Value": "200", + "Type": "String", + "OriginalValue": "400" + }, + { + "Path": "HKCU:\\Control Panel\\Desktop\\WindowMetrics", + "Name": "MinAnimate", + "Value": "0", + "Type": "String", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Control Panel\\Keyboard", + "Name": "KeyboardDelay", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "ListviewAlphaSelect", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "ListviewShadow", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "TaskbarAnimations", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects", + "Name": "VisualFXSetting", + "Value": "3", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\DWM", + "Name": "EnableAeroPeek", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "TaskbarMn", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + "Name": "ShowTaskViewButton", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", + "Name": "SearchboxTaskbarMode", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], + "InvokeScript": [ + "Set-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0))" + ], + "UndoScript": [ + "Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\"" + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md new file mode 100644 index 0000000000..bc2b374d7a --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeDebloat.md @@ -0,0 +1,139 @@ +--- +title: "Edge Debloat" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1183} + "WPFTweaksEdgeDebloat": { + "Content": "Edge Debloat", + "Description": "Disables various telemetry options, popups, and other annoyances in Edge.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate", + "Name": "CreateDesktopShortcutDefault", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "PersonalizationReportingEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\\ExtensionInstallBlocklist", + "Name": "1", + "Value": "ofefcgjbeghpigppfmkologfjadafddi", + "Type": "String", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "ShowRecommendationsEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "HideFirstRunExperience", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "UserFeedbackAllowed", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "ConfigureDoNotTrack", + "Value": "1", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "AlternateErrorPagesEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "EdgeCollectionsEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "EdgeShoppingAssistantEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "MicrosoftEdgeInsiderPromotionEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "ShowMicrosoftRewards", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "WebWidgetAllowed", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "DiagnosticData", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "EdgeAssetDeliveryServiceEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "WalletDonationEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + }, + { + "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", + "Name": "DefaultBrowserSettingsCampaignEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "<RemoveEntry>" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md new file mode 100644 index 0000000000..012bb00e98 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/IPv46.md @@ -0,0 +1,27 @@ +--- +title: "Prefer IPv4 over IPv6" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1974} + "WPFTweaksIPv46": { + "Content": "Prefer IPv4 over IPv6", + "Description": "Setting the IPv4 preference can have latency and security benefits on private networks where IPv6 is not configured.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", + "Name": "DisabledComponents", + "Value": "32", + "Type": "DWord", + "OriginalValue": "0" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md new file mode 100644 index 0000000000..c0f014bab5 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md @@ -0,0 +1,26 @@ +--- +title: "Run OO Shutup 10" +description: "" +--- + +```powershell {filename="functions/public/Invoke-WPFOOSU.ps1",linenos=inline,linenostart=1} +function Invoke-WPFOOSU { + <# + .SYNOPSIS + Downloads and runs OO Shutup 10 + #> + try { + $OOSU_filepath = "$ENV:temp\OOSU10.exe" + $Initial_ProgressPreference = $ProgressPreference + $ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest + Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath + Write-Host "Starting OO Shutup 10 ..." + Start-Process $OOSU_filepath + } catch { + Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red + } + finally { + $ProgressPreference = $Initial_ProgressPreference + } +} +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md new file mode 100644 index 0000000000..2cd76e3753 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RazerBlock.md @@ -0,0 +1,52 @@ +--- +title: "Block Razer Software Installs" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1832} + "WPFTweaksRazerBlock": { + "Content": "Block Razer Software Installs", + "Description": "Blocks ALL Razer Software installations. The hardware works fine without any software.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", + "Name": "SearchOrderConfig", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + }, + { + "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Device Installer", + "Name": "DisableCoInstallers", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0" + } + ], + "InvokeScript": [ + " + $RazerPath = \"C:\\Windows\\Installer\\Razer\" + + if (Test-Path $RazerPath) { + Remove-Item $RazerPath\\* -Recurse -Force + } else { + New-Item -Path $RazerPath -ItemType Directory + } + + icacls $RazerPath /deny \"Everyone:(W)\" + " + ], + "UndoScript": [ + " + icacls \"C:\\Windows\\Installer\\Razer\" /remove:d Everyone + " + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md new file mode 100644 index 0000000000..eb9ef2b6cc --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md @@ -0,0 +1,32 @@ +--- +title: "Remove Microsoft Copilot" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1789} + "WPFTweaksRemoveCopilot": { + "Content": "Remove Microsoft Copilot", + "Description": "Removes Copilot AppXPackages and related ai packages", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers + Get-AppxPackage -AllUsers Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -AllUsers + + $Appx = (Get-AppxPackage MicrosoftWindows.Client.CoreAI).PackageFullName + $Sid = (Get-LocalUser $Env:UserName).Sid.Value + + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Appx\\AppxAllUserStore\\EndOfLife\\$Sid\\$Appx\" -Force + Remove-AppxPackage $Appx + + Write-Host \"Copilot Removed\" + " + ], + "UndoScript": [ + " + Write-Host \"Installing Copilot...\" + winget install --name Copilot --source msstore --accept-package-agreements --accept-source-agreements --silent + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md new file mode 100644 index 0000000000..74ca23d594 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md @@ -0,0 +1,21 @@ +--- +title: "Remove Microsoft Edge" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1449} + "WPFTweaksRemoveEdge": { + "Content": "Remove Microsoft Edge", + "Description": "Unblocks Microsoft Edge uninstaller restrictions then uses that uninstaller to remove Microsoft Edge.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + "Invoke-WinUtilRemoveEdge" + ], + "UndoScript": [ + " + Write-Host 'Installing Microsoft Edge...' + winget install Microsoft.Edge --source winget + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md new file mode 100644 index 0000000000..4e5b59fea4 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md @@ -0,0 +1,22 @@ +--- +title: "Remove Gallery from Explorer" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1537} + "WPFTweaksRemoveGallery": { + "Content": "Remove Gallery from Explorer", + "Description": "Removes the Gallery from Explorer and sets This PC as default.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" + " + ], + "UndoScript": [ + " + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md new file mode 100644 index 0000000000..2be07ba928 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md @@ -0,0 +1,24 @@ +--- +title: "Remove Home from Explorer" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1518} + "WPFTweaksRemoveHome": { + "Content": "Remove Home from Explorer", + "Description": "Removes the Home from Explorer and sets This PC as default.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + Remove-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 1 + " + ], + "UndoScript": [ + " + New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" + Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0 + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md new file mode 100644 index 0000000000..00619304d7 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md @@ -0,0 +1,42 @@ +--- +title: "Remove OneDrive" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1481} + "WPFTweaksRemoveOneDrive": { + "Content": "Remove OneDrive", + "Description": "Denies permission to remove OneDrive user files, then uses its own uninstaller to remove it and restores the original permission afterward.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + # Deny permission to remove OneDrive folder + icacls $Env:OneDrive /deny \"Administrators:(D,DC)\" + + Write-Host \"Uninstalling OneDrive...\" + Start-Process 'C:\\Windows\\System32\\OneDriveSetup.exe' -ArgumentList '/uninstall' -Wait + + # Some of OneDrive files use explorer, and OneDrive uses FileCoAuth + Write-Host \"Removing leftover OneDrive Files...\" + Stop-Process -Name FileCoAuth,Explorer + Remove-Item \"$Env:LocalAppData\\Microsoft\\OneDrive\" -Recurse -Force + Remove-Item \"C:\\ProgramData\\Microsoft OneDrive\" -Recurse -Force + + # Grant back permission to access OneDrive folder + icacls $Env:OneDrive /grant \"Administrators:(D,DC)\" + + # Disable OneSyncSvc + Set-Service -Name OneSyncSvc -StartupType Disabled + " + ], + "UndoScript": [ + " + Write-Host \"Installing OneDrive\" + winget install Microsoft.Onedrive --source winget + + # Enabled OneSyncSvc + Set-Service -Name OneSyncSvc -StartupType Automatic + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md new file mode 100644 index 0000000000..5b13d23f10 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md @@ -0,0 +1,27 @@ +--- +title: "Set Classic Right-Click Menu" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1926} + "WPFTweaksRightClickMenu": { + "Content": "Set Classic Right-Click Menu", + "Description": "Restores the classic context menu when right-clicking in File Explorer, replacing the simplified Windows 11 version.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "InvokeScript": [ + " + New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" + Write-Host Restarting explorer.exe ... + Stop-Process -Name \"explorer\" -Force + " + ], + "UndoScript": [ + " + Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force + # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. + Write-Host Restarting explorer.exe ... + Stop-Process -Name \"explorer\" -Force + " + ], +``` diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md new file mode 100644 index 0000000000..813ac6c323 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Storage.md @@ -0,0 +1,27 @@ +--- +title: "Disable Storage Sense" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1773} + "WPFTweaksStorage": { + "Content": "Disable Storage Sense", + "Description": "Storage Sense deletes temp files automatically.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy", + "Name": "01", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md new file mode 100644 index 0000000000..350e92e833 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md @@ -0,0 +1,33 @@ +--- +title: "Disable Teredo" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1990} + "WPFTweaksTeredo": { + "Content": "Disable Teredo", + "Description": "Teredo network tunneling is an IPv6 feature that can cause additional latency, but may cause problems with some games.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", + "Name": "DisabledComponents", + "Value": "1", + "Type": "DWord", + "OriginalValue": "0" + } + ], + "InvokeScript": [ + "netsh interface teredo set state disabled" + ], + "UndoScript": [ + "netsh interface teredo set state default" + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md new file mode 100644 index 0000000000..222c58321a --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md @@ -0,0 +1,27 @@ +--- +title: "Set Time to UTC (Dual Boot)" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1465} + "WPFTweaksUTC": { + "Content": "Set Time to UTC (Dual Boot)", + "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux systems.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation", + "Name": "RealTimeIsUniversal", + "Value": "1", + "Type": "QWord", + "OriginalValue": "0" + } + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md new file mode 100644 index 0000000000..60ac37bdfd --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/XboxRemoval.md @@ -0,0 +1,34 @@ +--- +title: "Remove Xbox & Gaming Components" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=1653} + "WPFTweaksXboxRemoval": { + "Content": "Remove Xbox & Gaming Components", + "Description": "Removes Xbox services, the Xbox app, Game Bar, and related authentication components.", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "registry": [ + { + "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GameDVR", + "Name": "AppCaptureEnabled", + "Value": "0", + "Type": "DWord", + "OriginalValue": "1" + } + ], + "appx": [ + "Microsoft.XboxIdentityProvider", + "Microsoft.XboxSpeechToTextOverlay", + "Microsoft.GamingApp", + "Microsoft.Xbox.TCUI", + "Microsoft.XboxGamingOverlay" + ], +``` + +## 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). diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/_index.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/_index.md new file mode 100644 index 0000000000..08cc8f058f --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/_index.md @@ -0,0 +1,9 @@ +--- +title: "Advanced Tweaks (CAUTION)" +weight: 2 +toc: false +--- + +### Advanced Tweaks (CAUTION) + +{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}} diff --git a/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md new file mode 100644 index 0000000000..a67393c2e7 --- /dev/null +++ b/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md @@ -0,0 +1,13 @@ +--- +title: "DNS" +description: "" +--- + +```json {filename="config/tweaks.json",linenos=inline,linenostart=2533} + "WPFchangedns": { + "Content": "DNS", + "category": "z__Advanced Tweaks - CAUTION", + "panel": "1", + "Type": "Combobox", + "ComboItems": "Default DHCP Google Cloudflare Cloudflare_Malware Cloudflare_Malware_Adult Open_DNS Quad9 AdGuard_Ads_Trackers AdGuard_Ads_Trackers_Malware_Adult", +``` diff --git a/docs/content/faq.md b/docs/content/faq.md new file mode 100644 index 0000000000..ee45e7e799 --- /dev/null +++ b/docs/content/faq.md @@ -0,0 +1,266 @@ +--- +title: Frequently Asked Questions +toc: true +--- + +## General Questions + +### Is Windows 10 still supported? +No. Windows 10 is no longer supported by Winutil because it reached the end of support on **October 14, 2025**. +Winutil is focused on Windows 11. + +### How do I uninstall Winutil? +You do not need to uninstall Winutil. Because it runs as a PowerShell script, it is loaded into memory only while it is open. Once you close it, it is removed from memory and does not remain installed on your system. + +### Is Winutil safe to use? +Yes, Winutil is open source, and the code is publicly available on GitHub. Thousands of users run it daily. However, like any system modification tool, you should: +- Run it as Administrator (required) +- Create a restore point before major changes +- Understand what tweaks you're applying +- Run only from [official source](https://github.com/ChrisTitusTech/winutil/) + +### Do I need to keep running Winutil? +No. Once you've applied tweaks or installed applications, you can close Winutil. Changes persist after closing. You only need to run Winutil again when you want to make additional changes or undo tweaks. + +### Does Winutil require internet access? +- **For downloading**: Yes, installing applications requires the internet +- **For tweaks**: No, most tweaks work offline +- **Initial run**: Yes, to run the latest script + +### How often is Winutil updated? +Winutil is actively maintained with frequent updates. New features, bug fixes, and application additions are released regularly. The script auto-downloads the latest version each time you run it. + +## Installation & Running + +### How do I run Winutil? +1. Open PowerShell as Administrator +2. Run: `irm "https://christitus.com/win" | iex` +3. Wait for the GUI to appear + +### Why do I need Administrator rights? +Winutil makes system-level changes (registry edits, service modifications, software installation) that require elevated permissions. Without admin rights, most features won't work. + +### The script won't download. What do I do? +Try these solutions in order: + +1. **Use the direct GitHub link**: + ```powershell + irm https://github.com/ChrisTitusTech/Winutil/releases/latest/download/Winutil.ps1 | iex + ``` + +2. **Force TLS 1.2**: + ```powershell + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + irm "https://christitus.com/win" | iex + ``` + + > [!NOTE] + > On Windows 11, you usually do not need the TLS 1.2 command. Use it only if you encounter download or security protocol errors. + +3. **Change DNS** to Cloudflare (1.1.1.1) or Google (8.8.8.8) + +4. **Use a VPN** if GitHub is blocked in your region + +### I get an "Execution Policy" error. How do I fix it? +Run this command first to allow script execution: +```powershell +Set-ExecutionPolicy Unrestricted -Scope Process -Force +irm "https://christitus.com/win" | iex +``` + +This only affects the current PowerShell session and is safe. + +## Tweaks & Modifications + +### I applied a tweak and now something doesn't work. What do I do? +If you applied a tweak and it breaks something, you can revert it: +1. Open Winutil again +2. Go to the **Tweaks** tab +3. Select the same tweak you applied +4. Click **Undo Selected Tweaks** +5. The system will revert to the previous state + +Alternatively, use System Restore if you created a restore point. + +### Which tweaks are safe to apply? +**Safe for everyone (Essential Tweaks)**: +- Disable Telemetry +- Disable Activity History +- Disable Location Tracking +- Delete Temporary Files +- Run Disk Cleanup +- Create Restore Point + +**(Advanced Tweaks)** should only be run by advanced users. + +### Will tweaks survive Windows Updates? +Most tweaks persist through updates, but some may be reset by major Windows feature updates. You may need to reapply certain tweaks afterwards. + +### Can I create my own tweak presets? +Currently, Winutil uses predefined presets (Standard, Minimal). Custom presets aren't directly supported in the GUI, but you can script your preferred configuration. + +### What's the difference between Essential and Advanced tweaks? +- **Essential Tweaks**: Safe for most users, improve performance/privacy with minimal risk +- **Advanced Tweaks**: More aggressive changes that may break functionality or compatibility. Use with caution. + +## Application Installation + +### How does Winutil install applications? +Winutil uses Windows Package Manager (WinGet) and Chocolatey to automate installations. It downloads applications from official sources and installs them silently without bloatware. + +### Can I install multiple applications at once? +Yes! Check the boxes for all applications you want, then click "Install Selected". They'll install sequentially. + +### WinGet isn't working. How do I fix it? +1. Go to the **Config** tab +2. Find the **Fixes** section +3. Click **WinGet Reinstall** +4. Wait for completion +5. Try installing applications again + +### Do installed applications have bloatware or bundled software? +No. WinGet and Chocolatey install clean versions of applications without bundled offers, toolbars, or bloatware. + +### Can I uninstall applications through Winutil? +Winutil primarily focuses on installing and managing applications rather than providing a full GUI for uninstalling every program. To remove applications you can: +- Use Windows Settings > Apps > Installed apps to uninstall programs. +- Use package manager commands in PowerShell (for example `winget uninstall <package>` or `choco uninstall <package>`). +- Some packages installed by Winutil (AppX/MSIX) include removal helpers; check the app entry or use Winutil's remove helpers when available. + +### Will installed apps auto-update? +Applications with built-in update mechanisms will auto-update. You can also update them via WinGet/Chocolatey commands or through Winutil's "Upgrade Selected" feature. + +## Updates & Maintenance + +### Should I disable Windows Updates? +Generally, **no**. Security updates are important. However, you might: +- Use "Security Updates Only" to avoid feature updates +- Pause updates temporarily for stability +- Disable only during critical work periods + +### How do I re-enable updates after disabling them? +1. Open Winutil +2. Go to the **Updates** tab +3. Click **Default Updates** +4. Updates will resume normally + +### What's the difference between "Security Updates Only" and "Disable Updates"? +- **Security Updates Only**: Installs critical security patches, blocks feature updates (major versions) +- **Disable Updates**: Blocks ALL updates including security (not recommended) + +## Troubleshooting + +### Winutil won't open after running the command +Possible causes: +1. **Antivirus blocking**: Add PowerShell exception +2. **Not run as Admin**: Restart PowerShell as Administrator +3. **Corrupted download**: Close PowerShell, reopen, try again +4. **Windows Defender**: Allow the script + +### My antivirus flags Winutil as malicious +This is a false positive. Winutil makes system changes that antivirus programs may flag. The code is open source and audited. Add an exception if needed. + +### An application failed to install +Troubleshooting steps: +1. Check your internet connection +2. Try installing just that one application +3. Review error messages in the output panel +4. Check if the antivirus is blocking +5. Try the WinGet Reinstall fix + +### Network tweaks broke my internet connection +1. Open Winutil +2. Go to **Config** > **Fixes** +3. Click **Reset Network** +4. Restart your computer +5. Connection should be restored + +### I can't access certain Windows features after applying tweaks +Undo the tweaks that might have affected those features: +1. Reopen Winutil +2. Select the tweaks you applied +3. Click **Undo Selected Tweaks** + +If that doesn't work, use System Restore to revert to a previous state. + +## Advanced Topics + +### Can I run Winutil on Windows Server? +Yes, Winutil works on Windows Server editions, though some features may not be applicable or may behave differently. + +### Does Winutil work with Windows LTSC? +Yes, Winutil works with Windows 10/11 LTSC editions. Some applications may not be available depending on your configuration. + +### Can I use Winutil in a corporate/enterprise environment? +Yes, but check your organization's policies first. Some tweaks may conflict with Group Policy or other corporate requirements. + +### How do I automate Winutil for multiple PCs? +See the [Automation Guide](/userguide/automation/) for details on: +- Configuration files +- PowerShell parameters +- Batch deployment +- Silent installation + +### Can I contribute to Winutil? +Yes! Contributions are welcome: +- Report bugs on GitHub Issues +- Submit pull requests for fixes/features +- Improve documentation +- Help others in Discord + +See the [Contributing Guide](/contributing/) for details. + +## Privacy & Security + +### Does Winutil collect any data? +No, Winutil itself doesn't collect or transmit any user data. It's a local PowerShell script. + +### What telemetry does the Disable Telemetry tweak block? +It disables: +- Windows diagnostic data collection +- Activity history tracking +- Feedback requests +- Usage statistics +- Error reporting (optional) + +### Will removing Microsoft Store affect security updates? +No, Windows security updates are independent of the Microsoft Store. + +## Performance + +### Will Winutil make my PC faster? +Tweaks can improve performance by: +- Reducing background processes +- Disabling unnecessary services +- Cleaning temporary files +- Optimizing startup programs + +Results may vary depending on your system. + +### What's the best preset for gaming? +Use the **Desktop** preset, then additionally apply: +- Disable GameDVR +- Ultimate Performance power plan +- Disable full-screen optimizations (Advanced) +- Set display for performance (Advanced) + +### How much RAM does Winutil use? +Winutil itself uses about 50-100 MB while running. Once closed, it is removed from memory. + +## Error Messages + +### "Access Denied" errors +- Ensure PowerShell is running as Administrator +- Check if the antivirus is blocking changes +- Verify you have ownership of files/registry keys + + +## Still Need Help? + +Can't find your answer? Try these resources: + +- **[Known Issues](/knownissues/)** - Check if it's a known problem +- **[User Guide](/userguide/)** - Comprehensive documentation +- **[Discord Community](https://discord.gg/RUbZUZyByQ)** - Get help from other users +- **[GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues)** - Report bugs +- **[YouTube Tutorial](https://www.youtube.com/watch?v=6UQZ5oQg8XA)** - Video walkthrough diff --git a/docs/content/userguide/_index.md b/docs/content/userguide/_index.md new file mode 100644 index 0000000000..da348426f4 --- /dev/null +++ b/docs/content/userguide/_index.md @@ -0,0 +1,162 @@ +--- +title: User Guide +weight: 2 +breadcrumbs: false +cascade: + type: docs + params: + reversePagination: false + breadcrumbs: false +--- + +Welcome to the official User Guide for **Winutil**, your all-in-one Windows toolkit. + +> [!IMPORTANT] +> Windows 10 is not supported by Winutil. Windows 10 reached the end of support on **October 14, 2025**. + +## What is Winutil? + +Winutil (Chris Titus Tech's Windows Utility) is a comprehensive PowerShell-based tool that helps you: + +- **Install Applications**: Quickly install popular software without manual downloads +- **Apply Tweaks**: Optimize Windows for performance, privacy, and usability +- **Fix Issues**: Troubleshoot common Windows problems with one-click fixes +- **Manage Updates**: Control how and when Windows updates install +- **Access Tools**: Quick access to Windows panels and utilities + +## Who Should Use Winutil? + +Winutil is designed for: + +- **Home Users**: People who want to optimize their personal PCs +- **Power Users**: Users who want fine-grained control over Windows +- **IT Professionals**: Teams managing multiple systems efficiently +- **Gamers**: Users optimizing systems for gaming performance +- **Privacy-Conscious Users**: People reducing telemetry and data collection +- **Developers**: Users setting up clean development environments + +## Getting Started + +New to Winutil? Follow the guides below in order to get up and running quickly: + +1. **[Getting Started](getting-started/)** - Learn how to launch Winutil and understand the basics. +2. **[Applications](application/)** - Install, update, and remove apps with ease. +3. **[Tweaks](tweaks/)** - Apply performance, privacy, and usability improvements. +4. **[Features](features/)** - Explore built-in tools and common Windows fixes. +5. **[Updates](updates/)** - Configure how Windows Update behaves on your system. +6. **[Automation](automation/)** - Automate setups and reuse configurations across PCs. +7. **[Win11 Creator](win11creator/)** - Build a custom debloated Windows 11 ISO. + +## Main Features + +### 🚀 Application Installation + +Browse and install hundreds of popular applications with a single click. No more hunting for download links or dealing with installer bloat. + +**[Read the Applications Guide →](application/)** + +### ⚙️ System Tweaks + +Apply optimizations for performance, privacy, and usability. Choose from preset configurations or customize individual tweaks. + +**[Read the Tweaks Guide →](tweaks/)** + +### 🛠️ Config & Fixes + +Quick fixes for common Windows problems: +- Reset network settings +- Fix Windows Update issues +- Repair system files +- Access legacy Windows panels + +**[Read the Features Guide →](features/)** + +### 🔄 Update Management + +Take control of Windows Updates with options to: +- Enable/disable updates +- Security updates only +- Pause updates +- Manage driver updates + +**[Read the Updates Guide →](updates/)** + +### 🤖 Automation + +Automate Winutil configurations for: +- Multiple PC setups +- Enterprise deployments +- Consistent configurations +- Scripted installations + +**[Read the Automation Guide →](automation/)** + +### 💿 Windows 11 Creator + +Build a custom Windows 11 ISO with bloatware removed, telemetry disabled, and hardware requirement checks bypassed. You can then export it as an ISO file or write it directly to a USB drive. + +**[Read the Win11 Creator Guide →](win11creator/)** + +## Safety and Best Practices + +Before using Winutil: + +✅ **Always**: +- Run PowerShell as Administrator +- Create a system restore point before major changes +- Understand what tweaks do before applying them +- Start with Essential Tweaks before Advanced ones +- Keep backups of important data + +❌ **Never**: +- Apply all tweaks without understanding them +- Skip creating restore points +- Use on production systems without testing +- Disable security features unnecessarily + +## System Requirements + +- **Operating System**: Windows 11 +- **PowerShell**: Version 5.1 or later (included in Windows 11) +- **Permissions**: Administrator access required +- **Internet**: Required for downloading apps and updates +- **.NET Framework**: 4.5+ (usually pre-installed) + +## Getting Help + +Need help? + +- **📖 Documentation**: You're reading it! Use the navigation menu +- **❓ FAQ**: Check [Frequently Asked Questions](../faq/) +- **🐛 Known Issues**: Review [Known Issues](../knownissues/) +- **💬 Discord**: Join the [community Discord](https://discord.gg/RUbZUZyByQ) +- **🐙 GitHub**: Report bugs on [GitHub Issues](https://github.com/ChrisTitusTech/winutil/issues) +- **📺 YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA) + +## Contributing + +Want to help improve Winutil? + +- **Report Bugs**: Submit issues on GitHub +- **Suggest Features**: Open feature requests +- **Contribute Code**: Submit pull requests +- **Improve Docs**: Help expand this documentation +- **Share Knowledge**: Help others in Discord + +**[Read Contributing Guide →](../contributing/)** + +## Video Tutorial + +Watch the complete Winutil overview: + +{{< youtube id=6UQZ5oQg8XA loading=lazy >}} + +Ready to get started? Head to the **[Getting Started Guide](getting-started/)**. + +## Next + +Dive right into the following section to get started: + +{{< cards >}} + {{< card link="getting-started" title="Getting Started" icon="document-text" subtitle="Learn how to use winutil." >}} +{{< /cards >}} diff --git a/docs/content/userguide/application/_index.md b/docs/content/userguide/application/_index.md new file mode 100644 index 0000000000..d4913094de --- /dev/null +++ b/docs/content/userguide/application/_index.md @@ -0,0 +1,41 @@ +--- +title: Applications +weight: 3 +prev: /userguide/getting-started/ +next: /userguide/tweaks/ +--- + +{{< tabs >}} + + {{< tab name="Installation & Updates" selected=true >}} + * Choose the applications you want to install or upgrade. + * For programs not currently installed, this action will install them. + * For programs already installed, this action will update them to the latest version. + * Click the `Install/Upgrade Selected` button to start the installation or upgrade process. + {{< /tab >}} + + {{< tab name="Upgrade All" >}} + * Simply press the `Upgrade All` button. + * This will upgrade all applicable programs that are installed without the need for individual selection. + {{< /tab >}} + + {{< tab name="Uninstall" >}} + * Select the programs you wish to uninstall. + * Click the `Uninstall Selected` button to remove the selected programs. + {{< /tab >}} + + {{< tab name="Get Installed" >}} + * Click the `Show Installed Apps` button. + * This scans for and selects installed applications supported by WinGet. + {{< /tab >}} + + {{< tab name="Clear Selection" >}} + * Click the `Clear Selection` button. + * This will unselect all checked programs. + {{< /tab >}} +{{< /tabs >}} + +{{< image src="images/Install-Tab" alt="Install Image" >}} + +> [!TIP] +> If you have trouble finding an application, press `Ctrl + F` and search for its name. The list filters as you type. diff --git a/docs/content/userguide/automation/_index.md b/docs/content/userguide/automation/_index.md new file mode 100644 index 0000000000..a868d81d18 --- /dev/null +++ b/docs/content/userguide/automation/_index.md @@ -0,0 +1,29 @@ +--- +title: Automation +weight: 7 +prev: /userguide/updates/ +next: /userguide/win11Creator/ +--- + +Use Automation to run Winutil from an exported configuration file. + +To create a config file: + +1. Open Winutil. +2. Click the gear icon in the top-right corner. +3. Choose **Export**. +4. Save the exported JSON file. + +Once you have exported a config, launch Winutil with it using this command: +```powershell +& ([ScriptBlock]::Create((irm "https://christitus.com/win"))) -Config "C:\Path\To\Config.json" -Run +``` + +This is useful for: + +- Applying the same Winutil configuration across multiple Windows 11 PCs +- Reusing a known-good baseline after reinstalling Windows +- Standardizing deployments for labs, workstations, or personal setups + +> [!NOTE] +> Run the command in an elevated PowerShell session so Winutil can apply system-level changes. diff --git a/docs/content/userguide/features/_index.md b/docs/content/userguide/features/_index.md new file mode 100644 index 0000000000..327f403fb5 --- /dev/null +++ b/docs/content/userguide/features/_index.md @@ -0,0 +1,48 @@ +--- +title: Features +weight: 5 +prev: /userguide/tweaks/ +next: /userguide/updates/ +--- + +Use the **Features** and **Fixes** sections to install optional Windows components and run common repair tasks. + +## Windows Features + +Install common **Windows features** by selecting the feature checkboxes and clicking **Install Features**. + +* All .NET Frameworks (2, 3, 4) +* Hyper-V Virtualization +* Legacy Media (WMP, DirectPlay) +* NFS - Network File System +* Enable Daily Registry Backup Task 12:30 AM +* Enable Legacy F8 Boot Recovery +* Disable Legacy F8 Boot Recovery +* Windows Subsystem for Linux +* Windows Sandbox + +## Fixes + +Use these one-click fixes for common system problems. + +* Set Up Autologin +* Reset Windows Update +* Reset Network +* System Corruption Scan +* WinGet Reinstall + +## Legacy Windows Panels + +Open old-school Windows panels directly from Winutil. Available panels include: + +* Control Panel +* Network Connections +* Power Panel +* Region +* Sound Settings +* System Properties +* User Accounts + +## Remote Access + +Enable an OpenSSH server on your Windows machine for remote access. diff --git a/docs/content/userguide/getting-started/_index.md b/docs/content/userguide/getting-started/_index.md new file mode 100644 index 0000000000..661990494c --- /dev/null +++ b/docs/content/userguide/getting-started/_index.md @@ -0,0 +1,247 @@ +--- +title: Getting Started +weight: 2 +prev: /userguide/ +next: /userguide/application/ +--- + +## Welcome to Winutil! + +Winutil is a powerful Windows utility that helps you optimize, customize, and maintain your system. This guide walks you through everything you need to get started. + +## System Requirements + +Before running Winutil, ensure your system meets these requirements: + +> [!IMPORTANT] +> Windows 10 is not supported by Winutil. Windows 10 reached the end of support on **October 14, 2025**. + +- **Operating System**: Windows 11 +- **PowerShell**: Version 5.1 or later (included by default in Windows 11) +- **Administrator Access**: Required for system-level changes +- **Internet Connection**: Required for downloading applications and updates +- **.NET Framework**: Version 4.5 or later (usually pre-installed) + +## Installation + +Winutil doesn't require traditional installation. It runs directly from PowerShell as a script. + +### Step 1: Open PowerShell as Administrator + +There are several ways to open PowerShell with admin rights: + +**Method 1: Start Menu (Recommended)** + +1. Right-click the Windows Start button +2. Select "Terminal (Admin)" + +**Method 2: Search Method** + +1. Press the `Windows` key +2. Type "PowerShell" or "Terminal" +3. Press `Ctrl + Shift + Enter` to launch as administrator +4. Or right-click and select "Run as administrator" + +**Method 3: Run Dialog** + +1. Press `Windows + R` +2. Type `powershell` +3. Press `Ctrl + Shift + Enter` + +### Step 2: Run the Launch Command + +With PowerShell running as Administrator, run one of the following commands depending on the release channel you want. + +**Stable release (recommended)** + +```powershell +irm "https://christitus.com/win" | iex +``` + +**Development branch (bleeding edge — for testing only)** + +```powershell +irm "https://christitus.com/windev" | iex +``` + +> [!NOTE] +> - The `irm` command downloads the script, and `iex` executes it. This is safe when downloading from the official source. +> - The development branch may contain experimental changes and should only be used for testing on non-production systems. + +### Step 3: Wait for Winutil to Load + +The first time you run Winutil, it may take a few moments to: + +- Run the latest version +- Initialize the interface +- Load all features and settings + +## First Time Setup + +### Understanding the Interface + +Winutil opens with a clean, tabbed interface: + +**Main Tabs**: + +- **Install**: Browse and install applications +- **Tweaks**: Apply system optimizations and customizations +- **Config**: Access system tools and utilities +- **Updates**: Manage Windows updates +- **Win11 Creator**: Allows user to debloat Windows 11 ISO files. + +## Your First Actions + +Here are some recommended first steps for new users: + +### 1. Create a Restore Point + +Before making any changes, create a system restore point: + +1. Go to the **Tweaks** tab +2. Find "Create Restore Point" under Essential Tweaks +3. Check the box and click **Run Tweaks** + +This gives you a rollback point if needed. + +### 2. Install Essential Applications + +1. Navigate to the **Install** tab +2. Browse categories or use the search bar +3. Check the applications you want to install +4. Click "Install/Upgrade Selected" at the bottom + +### 3. Apply Basic Tweaks + +For a better Windows experience with minimal risk: + +1. Go to the **Tweaks** tab +2. Select the **Standard** for a balanced configuration +3. Review the selected tweaks +4. Click **Run Tweaks** + +## Common Tasks + +### Installing Applications + +**Single Application**: + +1. Open the **Install** tab +2. Search for the application name +3. Check the box next to it +4. Click "Install/Upgrade Selected" + +**Multiple Applications**: + +1. Check multiple application boxes +2. All checked apps will install in sequence +3. Progress is shown in the bottom panel + +### Applying Tweaks + +**Essential Tweaks** (Safe for all users): + +1. Go to the **Tweaks** tab +2. Select from the Essential Tweaks section +3. Click **Run Tweaks** + +**Advanced Tweaks** (Use with caution): + +1. Only modify if you understand the implications +2. Always create a restore point first +3. Review documentation for each tweak + +**Undoing Tweaks**: + +1. Select the same tweaks you applied +2. Click **Undo Selected Tweaks** +3. The system reverts to the previous state + +### Using Quick Fixes + +For common Windows issues: + +1. Go to the **Config** tab +2. Navigate to the **Fixes** section +3. Select the appropriate fix: + - **Reset Network**: Fixes network connectivity issues + - **Reset Windows Update**: Resolves update problems + - **System Corruption Scan**: Repairs corrupted system files + - **WinGet Reinstall**: Fixes package manager issues + +### Changing DNS Servers + +For improved privacy and speed: + +1. Go to the **Tweaks** tab +2. Find the DNS section +3. Select a provider: + - **Cloudflare**: Fast and privacy-focused + - **Google**: Reliable and widely used + - **Quad9**: Security-focused with malware blocking + - **AdGuard**: Blocks ads and trackers +4. Click **Apply** + +## Understanding Presets + +Winutil offers several preset configurations: + +- **Minimal**: Minimal changes that keep most Windows features +- **Standard**: A good middle ground for most users + +## Safety Tips + +✅ **DO**: + +- Create restore points before major changes +- Read tweak descriptions before applying +- Start with Essential Tweaks +- Keep Windows up to date +- Back up important data + +❌ **DON'T**: + +- Apply all tweaks at once without understanding them +- Skip creating restore points +- Use Advanced Tweaks without research +- Disable security features unless necessary +- Run on production systems without testing + +## Troubleshooting First Run + +### Script Won't Download + +If you get any errors when running Winutil please refer to [Known Issues](/knownissues/) page + +## Next Steps + +Now that you're set up, explore these guides: + +- [Applications Guide](../application/) - Learn about installing, upgrading, and uninstalling software +- [Tweaks Guide](../tweaks/) - Understand system optimizations +- [FAQ](/faq/) - Common questions and answers + +## Getting Help + +If you need assistance: + +- **Documentation**: Browse this documentation site +- **Known Issues**: Check the [Known Issues](/knownissues/) page +- **Discord**: Join the [community Discord server](https://discord.gg/RUbZUZyByQ) +- **GitHub Issues**: Report bugs on [GitHub](https://github.com/ChrisTitusTech/winutil/issues) +- **YouTube**: Watch [video tutorials](https://www.youtube.com/watch?v=6UQZ5oQg8XA) + +## Quick Reference Card + +| Task | Location | Action | +| ---- | -------- | ------ | +| Install or upgrade apps | Install tab | Check boxes -> Install/Upgrade Selected | +| Uninstall apps | Install tab | Check boxes -> Uninstall Selected | +| Apply tweaks | Tweaks tab | Select tweaks -> Run Tweaks | +| Undo tweaks | Tweaks tab | Select tweaks -> Undo Selected Tweaks | +| Create restore point | Tweaks tab | Essential Tweaks section | +| Fix network | Config tab | Fixes -> Reset Network | +| Change DNS | Tweaks tab | DNS section | +| Open Control Panel | Config tab | Legacy Windows Panels | + +Happy optimizing! diff --git a/docs/content/userguide/tweaks/_index.md b/docs/content/userguide/tweaks/_index.md new file mode 100644 index 0000000000..8499dd7b9b --- /dev/null +++ b/docs/content/userguide/tweaks/_index.md @@ -0,0 +1,58 @@ +--- +title: Tweaks +weight: 4 +prev: /userguide/application/ +next: /userguide/features/ +--- + +{{< image src="images/Tweaks-Tab" alt="Image of Tweaks Tab" >}} + +### Run Tweaks +* **Open the Tweaks tab**: Navigate to the **Tweaks** tab in the application. +* **Select Tweaks**: Choose the tweaks you want to apply. You can use the presets available at the top for convenience. +* **Run Tweaks**: After selecting the desired tweaks, click **Run Tweaks** at the bottom of the screen. + +### Undo Tweaks +* **Open the Tweaks tab**: Go to the **Tweaks** tab located next to **Install**. +* **Select Tweaks to Remove**: Choose the tweaks you want to disable or remove. +* **Undo Tweaks**: Click **Undo Selected Tweaks** at the bottom of the screen to apply the changes. + +### Essential Tweaks +Essential Tweaks are modifications and optimizations that are generally safe for most users to implement. These tweaks are designed to enhance system performance, improve privacy, and reduce unnecessary system activities. They are considered low-risk and are recommended for users who want to ensure their system runs smoothly and efficiently without delving too deeply into complex configurations. The goal of Essential Tweaks is to provide noticeable improvements with minimal risk, making them suitable for a wide range of users, including those who may not have advanced technical knowledge. + +### Advanced Tweaks (CAUTION) +Advanced Tweaks are intended for experienced users who have a solid understanding of their system and the potential implications of making deep-level changes. These tweaks involve more significant alterations to the operating system and can provide substantial customization. However, they also carry a higher risk of causing system instability or unintended side effects if not implemented correctly. Users who choose to apply Advanced Tweaks should proceed with caution, ensuring they have adequate knowledge and backups in place to recover if something goes wrong. These tweaks are not recommended for novice users or those unfamiliar with the inner workings of their operating system. + +### O&O ShutUp10++ +[O&O ShutUp10++](https://www.oo-software.com/en/shutup10) can be launched from Winutil with one click. It is a free privacy tool for Windows that helps users manage telemetry, update behavior, and app permission settings. + +{{< youtube id=3HvNr8eMcv0 loading=lazy >}} + + +### DNS + +The utility provides a convenient DNS selection feature, allowing users to choose between various DNS providers for both IPv4 and IPv6. This enables users to optimize their internet connection for speed, security, and privacy according to their specific needs. Here are the available options: + +* **Default**: Uses the default DNS settings configured by your ISP or network. +* **DHCP**: Automatically acquires DNS settings from the DHCP server. +* [**Google**](https://developers.google.com/speed/public-dns?hl=en): A reliable and fast DNS service provided by Google. +* [**Cloudflare**](https://developers.cloudflare.com/1.1.1.1/): Known for speed and privacy, Cloudflare DNS is a popular choice for enhancing internet performance. +* [**Cloudflare_Malware**](https://developers.cloudflare.com/1.1.1.1/setup/#:~:text=Use%20the%20following%20DNS%20resolvers%20to%20block%20malicious%20content%3A): Provides additional protection by blocking malware sites. +* [**Cloudflare_Malware_Adult**](https://developers.cloudflare.com/1.1.1.1/setup/#:~:text=Use%20the%20following%20DNS%20resolvers%20to%20block%20malware%20and%20adult%20content%3A): Blocks both malware and adult content, offering more comprehensive filtering. +* [**Open_DNS**](https://www.opendns.com/setupguide/#familyshield): Offers customizable filtering and enhanced security features. +* [**Quad9**](https://quad9.net/): Focuses on security by blocking known malicious domains. +* [**AdGuard_Ads_Trackers**](https://adguard-dns.io/en/welcome.html): AdGuard DNS blocks ads, trackers, and other unwanted DNS requests. Visit the website and sign in for a dashboard, statistics, and additional server-side customization. +* [**AdGuard_Ads_Trackers_Malware_Adult**](https://adguard-dns.io/en/welcome.html): AdGuard DNS blocks ads, trackers, malware, and adult content, and enables Safe Search and Safe Mode where possible. + +### Customize Preferences + +The Customize Preferences section allows users to personalize their Windows experience by toggling visual and functional settings. + +### Performance Plans + +The Performance Plans section allows users to manage the Ultimate Performance Profile for maximum performance. + +#### Add and activate the Ultimate Performance Profile: +* Enables and activates the Ultimate Performance Profile to enhance system performance by minimizing latency and increasing efficiency. +#### Remove Ultimate Performance Profile: +* Deactivates the Ultimate Performance Profile, changing the system to the Balanced Profile. diff --git a/docs/content/userguide/updates/_index.md b/docs/content/userguide/updates/_index.md new file mode 100644 index 0000000000..c2cac70cc6 --- /dev/null +++ b/docs/content/userguide/updates/_index.md @@ -0,0 +1,32 @@ +--- +title: Updates +weight: 6 +prev: /userguide/features/ +next: /userguide/automation/ +--- + +Winutil provides three update modes so you can choose how aggressively Windows Update is managed on your system: + +- **Default (Out of the Box) Settings**: Restores standard Windows Update behavior +- **Security (Recommended) Settings**: Prioritizes stability while still receiving security updates +- **Disable ALL Updates**: Turns off Windows Update entirely and should only be used with extreme caution + +### Default (Out of Box) Settings + +- **What it does**: Restores the default Windows Update configuration. +- **Best for**: Systems where you want Windows to manage updates normally. +- **Notes**: This removes custom update settings previously applied by Winutil. If update errors continue, use the reset option in the **Config** tab to restore Microsoft Update services to their default state. + +### Security (Recommended) Settings + +- **What it does**: Applies a more conservative update strategy designed for most users. +- **Feature updates**: Delayed by **365 days** to reduce the chance of disruption from major Windows changes. +- **Security updates**: Delayed by **4 days** to allow time for early issues to surface while still keeping the system protected. +- **Why use it**: This mode offers the best balance between security and stability, which is why it is the recommended option for most PCs. + +### Disable ALL Updates (NOT RECOMMENDED!) + +- **What it does**: Disables all Windows updates. +- **Best for**: Highly controlled or special-purpose systems where updates must remain off temporarily. +- **Warning**: This leaves the system without security patches and significantly increases security risk. +- **Recommendation**: Avoid this mode unless you fully understand the tradeoffs and have a specific reason to use it. diff --git a/docs/content/userguide/win11Creator/_index.md b/docs/content/userguide/win11Creator/_index.md new file mode 100644 index 0000000000..340fbd7454 --- /dev/null +++ b/docs/content/userguide/win11Creator/_index.md @@ -0,0 +1,171 @@ +--- +title: Win11 Creator +weight: 8 +prev: /userguide/automation/ +--- + +## Using Winutil's Win11 Creator + +Winutil includes a built-in **Win11 Creator** tool that lets you take an official Windows 11 ISO and produce a customized, debloated version. The resulting image can remove telemetry, bypass hardware requirement checks, and enable local account setup out of the box. You can export the result as a new ISO file or write it directly to a USB drive. + +> [!IMPORTANT] +> You need an **official Windows 11 ISO** from [Microsoft's website](https://www.microsoft.com/en-us/software-download/windows11) before starting. Custom, modified, or non-official ISOs are not supported. The process uses ~10–15 GB of temporary disk space, so make sure you have room. + +--- + +### Step 1 — Select Your Official Windows 11 ISO + +1. Open Winutil and go to the **Win11 Creator** tab. +2. Click **Browse** and select your **official Windows 11 ISO file** from Microsoft (must be 4 GB or larger). Custom or modified ISOs are not supported. +3. The file path and size will appear on screen once selected. + +--- + +### Step 2 — Mount & Verify + +1. Click **Mount & Verify ISO**. +2. Winutil mounts the ISO, checks for a valid `install.wim` or `install.esd`, and reads the available editions (Home, Pro, Enterprise, etc.). +3. Once verified, select your desired **edition** from the dropdown — Pro is selected by default if available. + +> [!NOTE] +> This step takes around 10–30 seconds depending on your drive speed. + +--- + +### Step 3 — Run the Modification + +Click **Run Windows ISO Modification and Creator** to start the customization process. Winutil will: + +**App & Component Removal:** +- **Remove 40+ bloat apps** — Clipchamp, Teams, Copilot, Dev Home, new Outlook, Bing apps, Solitaire, and more +- **Delete OneDrive setup** from the image + +**System Customization:** +- **Bypass hardware checks** — removes TPM, Secure Boot, CPU, RAM, and storage requirement enforcement so the ISO installs on unsupported hardware +- **Enable local account setup** — injects an `autounattend.xml` that skips the Microsoft account screen during OOBE +- **Disable BitLocker and device encryption** — removes startup overhead +- **Disable Chat icon** — removes chat taskbar button +- **Strip unused editions** — keeps only your selected edition, saving 1–2 GB per removed edition +- **Clean the component store** — runs DISM cleanup to reclaim another 300–800 MB + +**Privacy & Telemetry Tweaks:** +- **Disable telemetry** — advertising ID, tailored experiences, input personalization, speech online privacy +- **Disable cloud content features** — app suggestions, Microsoft Store recommendations +- **Remove telemetry scheduled tasks** — CEIP, Appraiser, WaaSMedic, and others +- **Disable OneDrive folder backup** — prevents automatic backups to cloud +- **Prevent DevHome and Outlook post-setup installation** +- **Prevent Teams installation** — blocks auto-install after OOBE +- **Prevent new Outlook Mail app installation** +- **Disable Windows Update during OOBE** — re-enabled automatically on first login +- **Disable Copilot and search box suggestions** + +**Optional: Driver Injection** +- If enabled, it injects all drivers from your current system into the install.wim and boot.wim — useful for offline installations on machines with missing drivers. This is an optional checkbox in Step 3. + +A live log shows progress as each step completes. This stage usually takes **10–30 minutes** depending on disk speed. The WIM dismount near the end is the slowest part, so do not close Winutil while it is running. + +--- + +### Step 4 — Export Your Result + +Once the modification is complete, choose how to save your image: + +{{< tabs >}} + + {{< tab name="Save as ISO" selected=true >}} + 1. Click **Save as an ISO File**. + 2. Choose a save location (defaults to your Desktop as `Win11_Modified_yyyyMMdd.iso`). + 3. Winutil builds a dual BIOS/UEFI bootable ISO using `oscdimg.exe`. + + > [!NOTE] + > `oscdimg.exe` (part of the Windows ADK) is required. If it's not found, Winutil will attempt to install it automatically via winget. If that fails, install it manually: `winget install -e --id Microsoft.OSCDIMG` + + **Typical output size:** 2.5–3.5 GB (down from 5–6 GB original) + {{< /tab >}} + + {{< tab name="Write to USB" >}} + 1. Click **Write Directly to a USB Drive**. + 2. Select your USB drive from the dropdown (click **Refresh** if it doesn't appear). + 3. Click **Erase & Write to USB** and confirm the warning — **all data on the drive will be permanently erased**. + 4. Winutil formats the drive as GPT with a 512 MB EFI partition and copies the modified Windows files. + + > [!WARNING] + > Double-check you have selected the correct drive before confirming. This operation cannot be undone. + + **Minimum USB size:** 8 GB recommended. Writing takes 10–20 minutes. + {{< /tab >}} + +{{< /tabs >}} + +--- + +### Step 5 — Clean Up (Optional) + +Click **Clean & Reset** to delete the temporary working directory (~10–15 GB) and return the tool to its initial state, ready for a new ISO. You will be asked to confirm before anything is deleted. + +--- + +### What the Modified ISO Does Differently + +When you install Windows 11 from your modified ISO: + +- **No Microsoft account required** — create a local account directly during setup +- **No hardware checks** — installs on machines without TPM 2.0, Secure Boot, or supported CPUs +- **Dark mode enabled by default** +- **Empty taskbar and Start Menu** — no pinned apps, Chat icon removed +- **Windows Update disabled during OOBE** — automatically re-enabled on first login to prevent setup interruptions +- **BitLocker disabled** — removes startup overhead on first boot + +--- + +### Troubleshooting + +| Problem | Fix | +|---------|-----| +| "install.wim not found" | Not a valid Windows 11 ISO — download a fresh one from Microsoft | +| "oscdimg.exe not found" | Run `winget install -e --id Microsoft.OSCDIMG` then retry | +| USB drive not showing up | Plug it in, wait a few seconds, then click **Refresh** | +| Modification seems stuck | The WIM dismount step is slow — wait at least 10 minutes before assuming it's frozen | +| "Access Denied" error | Make sure Winutil is running as Administrator | + +--- + +Below is a list of free and open-source tools for downloading, creating, and flashing Windows ISOs. + +## Download Windows ISOs + +| Tool | Description | Website | +|------|-------------|---------| +| **[UUP Dump](https://uupdump.net/)** | Download Windows UUP files directly from Microsoft's servers and convert them into a clean ISO — great for getting the latest builds | [uupdump.net](https://uupdump.net/) | +| **[Microsoft Media Creation Tool](https://www.microsoft.com/en-us/software-download/windows11)** | Microsoft's official tool for downloading and creating Windows 11 installation media | [microsoft.com](https://www.microsoft.com/en-us/software-download/windows11) | + + +## Customize Windows ISOs + +| Tool | Description | Website | +|------|-------------|---------| +| **[MicroWin](https://github.com/CodingWonders/microwin)** | A C# desktop app for building stripped-down, customized Windows ISOs — the original predecessor to Winutil's old MicroWin feature | [github.com](https://github.com/CodingWonders/microwin) | +| **[Tiny11 Builder](https://github.com/ntdevlabs/tiny11builder)** | PowerShell script that strips a Windows 11 ISO down to the bare minimum — removes bloatware and bypasses hardware requirements | [github.com](https://github.com/ntdevlabs/tiny11builder) | +| **[NTLite](https://www.ntlite.com/)** | Remove Windows components, integrate drivers and updates, and build a custom ISO before installation | [ntlite.com](https://www.ntlite.com/) | + + +## Flash ISOs to USB + +| Tool | Description | Website | +|------|-------------|---------| +| **[Rufus](https://rufus.ie/)** | The go-to tool for creating bootable Windows USB drives. Supports bypassing Windows 11 TPM/Secure Boot requirements and downloading ISOs directly | [rufus.ie](https://rufus.ie/) | +| **[Ventoy](https://www.ventoy.net/)** | Install once, then just copy any ISO files onto the USB — supports booting multiple ISOs from a single drive without re-flashing | [ventoy.net](https://www.ventoy.net/) | +| **[balenaEtcher](https://etcher.balena.io/)** | Simple, beginner-friendly ISO flasher with a clean interface | [etcher.balena.io](https://etcher.balena.io/) | + + + +--- + +> [!TIP] +> Already have a Windows 11 ISO? Skip the third-party tools and use Winutil's built-in **[Win11 Creator](#using-winutils-win11-creator)** at the top of this page. + +> [!NOTE] +> Always download Windows ISOs from official Microsoft sources or trusted tools like Rufus/UUP Dump to avoid tampered images. + +> [!NOTE] +> Newer Windows 11 ISOs may not boot correctly on older versions of Ventoy — make sure Ventoy is up to date before use. If issues persist after updating, this is a Ventoy compatibility limitation outside of Winutil's control. diff --git a/docs/dev/features/Features/DisableLegacyRecovery.md b/docs/dev/features/Features/DisableLegacyRecovery.md deleted file mode 100644 index 98b948ca4f..0000000000 --- a/docs/dev/features/Features/DisableLegacyRecovery.md +++ /dev/null @@ -1,61 +0,0 @@ -# Disable Legacy F8 Boot Recovery - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Legacy F8 Boot Recovery", - "Description": "Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", - "category": "Features", - "panel": "1", - "Order": "a019_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) { - New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/DisableLegacyRecovery" -} -``` - -</details> - -## Invoke Script - -```powershell - - If (!(Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood')) { - New-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Name 'Enabled' -Type DWord -Value 0 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Standard' -Wait - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/DisableSearchSuggestions.md b/docs/dev/features/Features/DisableSearchSuggestions.md deleted file mode 100644 index f683b27025..0000000000 --- a/docs/dev/features/Features/DisableSearchSuggestions.md +++ /dev/null @@ -1,61 +0,0 @@ -# Disable Search Box Web Suggestions in Registry(explorer restart) - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables web suggestions when searching using Windows Search. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Search Box Web Suggestions in Registry(explorer restart)", - "Description": "Disables web suggestions when searching using Windows Search.", - "category": "Features", - "panel": "1", - "Order": "a016_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) { - New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force - Stop-Process -name explorer -force - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/DisableSearchSuggestions" -} -``` - -</details> - -## Invoke Script - -```powershell - - If (!(Test-Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer')) { - New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 1 -Force - Stop-Process -name explorer -force - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/EnableLegacyRecovery.md b/docs/dev/features/Features/EnableLegacyRecovery.md deleted file mode 100644 index 938a8e5356..0000000000 --- a/docs/dev/features/Features/EnableLegacyRecovery.md +++ /dev/null @@ -1,61 +0,0 @@ -# Enable Legacy F8 Boot Recovery - -Last Updated: 2024-08-07 - - -!!! 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 - -Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Enable Legacy F8 Boot Recovery", - "Description": "Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes.", - "category": "Features", - "panel": "1", - "Order": "a018_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood')) { - New-Item -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager\\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/EnableLegacyRecovery" -} -``` - -</details> - -## Invoke Script - -```powershell - - If (!(Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood')) { - New-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Force | Out-Null - } - New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager\LastKnownGood' -Name 'Enabled' -Type DWord -Value 1 -Force - Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /Set {Current} BootMenuPolicy Legacy' -Wait - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/EnableSearchSuggestions.md b/docs/dev/features/Features/EnableSearchSuggestions.md deleted file mode 100644 index 1cb9c51a15..0000000000 --- a/docs/dev/features/Features/EnableSearchSuggestions.md +++ /dev/null @@ -1,61 +0,0 @@ -# Enable Search Box Web Suggestions in Registry(explorer restart) - -Last Updated: 2024-08-07 - - -!!! 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 - -Enables web suggestions when searching using Windows Search. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Enable Search Box Web Suggestions in Registry(explorer restart)", - "Description": "Enables web suggestions when searching using Windows Search.", - "category": "Features", - "panel": "1", - "Order": "a015_", - "feature": [], - "InvokeScript": [ - " - If (!(Test-Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer')) { - New-Item -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force - Stop-Process -name explorer -force - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/EnableSearchSuggestions" -} -``` - -</details> - -## Invoke Script - -```powershell - - If (!(Test-Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer')) { - New-Item -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Force | Out-Null - } - New-ItemProperty -Path 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer' -Name 'DisableSearchBoxSuggestions' -Type DWord -Value 0 -Force - Stop-Process -name explorer -force - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/Install.md b/docs/dev/features/Features/Install.md deleted file mode 100644 index 048cd801fb..0000000000 --- a/docs/dev/features/Features/Install.md +++ /dev/null @@ -1,80 +0,0 @@ -# Install Features - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Install Features", - "category": "Features", - "panel": "1", - "Order": "a060_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Features/Install" -} -``` - -</details> - -## Function: Invoke-WPFFeatureInstall - -```powershell -function Invoke-WPFFeatureInstall { - <# - - .SYNOPSIS - Installs selected Windows Features - - #> - - if($sync.ProcessRunning) { - $msg = "[Invoke-WPFFeatureInstall] Install process is currently running." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - $Features = (Get-WinUtilCheckBoxes)["WPFFeature"] - - Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock { - param($Features, $DebugPreference) - $sync.ProcessRunning = $true - if ($Features.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) - } - - Invoke-WinUtilFeatureInstall $Features - - $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) - - Write-Host "===================================" - Write-Host "--- Features are Installed ---" - Write-Host "--- A Reboot may be required ---" - Write-Host "===================================" - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/RegBackup.md b/docs/dev/features/Features/RegBackup.md deleted file mode 100644 index 2012d605ef..0000000000 --- a/docs/dev/features/Features/RegBackup.md +++ /dev/null @@ -1,61 +0,0 @@ -# Enable Daily Registry Backup Task 12.30am - -Last Updated: 2024-08-07 - - -!!! 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 - -Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Enable Daily Registry Backup Task 12.30am", - "Description": "Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803.", - "category": "Features", - "panel": "1", - "Order": "a017_", - "feature": [], - "InvokeScript": [ - " - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force - New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force - $action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn \"\\Microsoft\\Windows\\Registry\\RegIdleBackup\"' - $trigger = New-ScheduledTaskTrigger -Daily -At 00:30 - Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System' - " - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/RegBackup" -} -``` - -</details> - -## Invoke Script - -```powershell - - New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager' -Name 'EnablePeriodicBackup' -Type DWord -Value 1 -Force - New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager' -Name 'BackupCount' -Type DWord -Value 2 -Force - $action = New-ScheduledTaskAction -Execute 'schtasks' -Argument '/run /i /tn "\Microsoft\Windows\Registry\RegIdleBackup"' - $trigger = New-ScheduledTaskTrigger -Daily -At 00:30 - Register-ScheduledTask -Action $action -Trigger $trigger -TaskName 'AutoRegBackup' -Description 'Create System Registry Backups' -User 'System' - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/Sandbox.md b/docs/dev/features/Features/Sandbox.md deleted file mode 100644 index bd10ee8294..0000000000 --- a/docs/dev/features/Features/Sandbox.md +++ /dev/null @@ -1,39 +0,0 @@ -# Windows Sandbox - -Last Updated: 2024-08-07 - - -!!! 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 - -Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Windows Sandbox", - "category": "Features", - "panel": "1", - "Order": "a021_", - "Description": "Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation.", - "link": "https://christitustech.github.io/winutil/dev/features/Features/Sandbox" -} -``` - -</details> - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/dotnet.md b/docs/dev/features/Features/dotnet.md deleted file mode 100644 index b6f8526bb6..0000000000 --- a/docs/dev/features/Features/dotnet.md +++ /dev/null @@ -1,56 +0,0 @@ -# All .Net Framework (2,3,4) - -Last Updated: 2024-08-07 - - -!!! 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 - -.NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "All .Net Framework (2,3,4)", - "Description": ".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.", - "category": "Features", - "panel": "1", - "Order": "a010_", - "feature": [ - "NetFx4-AdvSrvs", - "NetFx3" - ], - "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/dotnet" -} -``` - -</details> - -## Features - - -Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - - -You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - -### Features to install -- NetFx4-AdvSrvs -- NetFx3 - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/hyperv.md b/docs/dev/features/Features/hyperv.md deleted file mode 100644 index e1b77463c7..0000000000 --- a/docs/dev/features/Features/hyperv.md +++ /dev/null @@ -1,76 +0,0 @@ -# HyperV Virtualization - -Last Updated: 2024-08-07 - - -!!! 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 - -Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "HyperV Virtualization", - "Description": "Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines.", - "category": "Features", - "panel": "1", - "Order": "a011_", - "feature": [ - "HypervisorPlatform", - "Microsoft-Hyper-V-All", - "Microsoft-Hyper-V", - "Microsoft-Hyper-V-Tools-All", - "Microsoft-Hyper-V-Management-PowerShell", - "Microsoft-Hyper-V-Hypervisor", - "Microsoft-Hyper-V-Services", - "Microsoft-Hyper-V-Management-Clients" - ], - "InvokeScript": [ - "Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait" - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/hyperv" -} -``` - -</details> - -## Features - - -Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - - -You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - -### Features to install -- HypervisorPlatform -- Microsoft-Hyper-V-All -- Microsoft-Hyper-V -- Microsoft-Hyper-V-Tools-All -- Microsoft-Hyper-V-Management-PowerShell -- Microsoft-Hyper-V-Hypervisor -- Microsoft-Hyper-V-Services -- Microsoft-Hyper-V-Management-Clients - -## Invoke Script - -```powershell -Start-Process -FilePath cmd.exe -ArgumentList '/c bcdedit /set hypervisorschedulertype classic' -Wait - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/legacymedia.md b/docs/dev/features/Features/legacymedia.md deleted file mode 100644 index 64bac661a7..0000000000 --- a/docs/dev/features/Features/legacymedia.md +++ /dev/null @@ -1,60 +0,0 @@ -# Legacy Media (WMP, DirectPlay) - -Last Updated: 2024-08-07 - - -!!! 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 - -Enables legacy programs from previous versions of windows - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Legacy Media (WMP, DirectPlay)", - "Description": "Enables legacy programs from previous versions of windows", - "category": "Features", - "panel": "1", - "Order": "a012_", - "feature": [ - "WindowsMediaPlayer", - "MediaPlayback", - "DirectPlay", - "LegacyComponents" - ], - "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/legacymedia" -} -``` - -</details> - -## Features - - -Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - - -You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - -### Features to install -- WindowsMediaPlayer -- MediaPlayback -- DirectPlay -- LegacyComponents - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/nfs.md b/docs/dev/features/Features/nfs.md deleted file mode 100644 index 5c726a1f4d..0000000000 --- a/docs/dev/features/Features/nfs.md +++ /dev/null @@ -1,74 +0,0 @@ -# NFS - Network File System - -Last Updated: 2024-08-07 - - -!!! 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 - -Network File System (NFS) is a mechanism for storing files on a network. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "NFS - Network File System", - "Description": "Network File System (NFS) is a mechanism for storing files on a network.", - "category": "Features", - "panel": "1", - "Order": "a014_", - "feature": [ - "ServicesForNFS-ClientOnly", - "ClientForNFS-Infrastructure", - "NFS-Administration" - ], - "InvokeScript": [ - "nfsadmin client stop", - "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousUID' -Type DWord -Value 0", - "Set-ItemProperty -Path 'HKLM:\\SOFTWARE\\Microsoft\\ClientForNFS\\CurrentVersion\\Default' -Name 'AnonymousGID' -Type DWord -Value 0", - "nfsadmin client start", - "nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i" - ], - "link": "https://christitustech.github.io/winutil/dev/features/Features/nfs" -} -``` - -</details> - -## Features - - -Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - - -You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - -### Features to install -- ServicesForNFS-ClientOnly -- ClientForNFS-Infrastructure -- NFS-Administration - -## Invoke Script - -```powershell -nfsadmin client stop -Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default' -Name 'AnonymousUID' -Type DWord -Value 0 -Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default' -Name 'AnonymousGID' -Type DWord -Value 0 -nfsadmin client start -nfsadmin client localhost config fileaccess=755 SecFlavors=+sys -krb5 -krb5i - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Features/wsl.md b/docs/dev/features/Features/wsl.md deleted file mode 100644 index fbf15cc6ea..0000000000 --- a/docs/dev/features/Features/wsl.md +++ /dev/null @@ -1,56 +0,0 @@ -# Windows Subsystem for Linux - -Last Updated: 2024-08-07 - - -!!! 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 - -Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Windows Subsystem for Linux", - "Description": "Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting.", - "category": "Features", - "panel": "1", - "Order": "a020_", - "feature": [ - "VirtualMachinePlatform", - "Microsoft-Windows-Subsystem-Linux" - ], - "InvokeScript": [], - "link": "https://christitustech.github.io/winutil/dev/features/Features/wsl" -} -``` - -</details> - -## Features - - -Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - - -You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - -### Features to install -- VirtualMachinePlatform -- Microsoft-Windows-Subsystem-Linux - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Fixes/Autologin.md b/docs/dev/features/Fixes/Autologin.md deleted file mode 100644 index ae269ab4d8..0000000000 --- a/docs/dev/features/Fixes/Autologin.md +++ /dev/null @@ -1,56 +0,0 @@ -# Set Up Autologin - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Up Autologin", - "category": "Fixes", - "Order": "a040_", - "panel": "1", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Autologin" -} -``` - -</details> - -## Function: Invoke-WPFPanelAutologin - -```powershell -function Invoke-WPFPanelAutologin { - <# - - .SYNOPSIS - Enables autologin using Sysinternals Autologon.exe - - #> - - # Official Microsoft recommendation: https://learn.microsoft.com/en-us/sysinternals/downloads/autologon - Invoke-WebRequest -Uri "https://live.sysinternals.com/Autologon.exe" -OutFile "$env:temp\autologin.exe" - cmd /c "$env:temp\autologin.exe" /accepteula -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Fixes/DISM.md b/docs/dev/features/Fixes/DISM.md deleted file mode 100644 index b768796724..0000000000 --- a/docs/dev/features/Fixes/DISM.md +++ /dev/null @@ -1,74 +0,0 @@ -# System Corruption Scan - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "System Corruption Scan", - "category": "Fixes", - "panel": "1", - "Order": "a043_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/DISM" -} -``` - -</details> - -## Function: Invoke-WPFPanelDISM - -```powershell -function Invoke-WPFPanelDISM { - <# - - .SYNOPSIS - Checks for system corruption using Chkdsk, SFC, and DISM - - .DESCRIPTION - 1. Chkdsk - Fixes disk and filesystem corruption - 2. SFC Run 1 - Fixes system file corruption, and fixes DISM if it was corrupted - 3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted - 4. SFC Run 2 - Fixes system file corruption, this time with an almost guaranteed uncorrupted system image - - .NOTES - Command Arguments: - 1. Chkdsk - /Scan - Runs an online scan on the system drive, attempts to fix any corruption, and queues other corruption for fixing on reboot - 2. SFC - /ScanNow - Performs a scan of the system files and fixes any corruption - 3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted - /Online - Fixes the currently running system image - /Cleanup-Image - Performs cleanup operations on the image, could remove some unneeded temporary files - /Restorehealth - Performs a scan of the image and fixes any corruption - - #> - Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan; - Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow; - Write-Host '`n(3/4) DISM' -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth; - Write-Host '`n(4/4) SFC - 2nd scan' -ForegroundColor Green; sfc /scannow; - Read-Host '`nPress Enter to Continue'" -verb runas -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Fixes/RunAdobeCCCleanerTool.md b/docs/dev/features/Fixes/RunAdobeCCCleanerTool.md deleted file mode 100644 index 7707736ee5..0000000000 --- a/docs/dev/features/Fixes/RunAdobeCCCleanerTool.md +++ /dev/null @@ -1,76 +0,0 @@ -# Remove Adobe Creative Cloud - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove Adobe Creative Cloud", - "category": "Fixes", - "panel": "1", - "Order": "a045_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/RunAdobeCCCleanerTool" -} -``` - -</details> - -## Function: Invoke-WPFRunAdobeCCCleanerTool - -```powershell -function Invoke-WPFRunAdobeCCCleanerTool { - <# - .SYNOPSIS - It removes or fixes problem files and resolves permission issues in registry keys. - .DESCRIPTION - The Creative Cloud Cleaner tool is a utility for experienced users to clean up corrupted installations. - #> - - [string]$url="https://swupmf.adobe.com/webfeed/CleanerTool/win/AdobeCreativeCloudCleanerTool.exe" - - Write-Host "The Adobe Creative Cloud Cleaner tool is hosted at" - Write-Host "$url" - - try { - # Don't show the progress because it will slow down the download speed - $ProgressPreference='SilentlyContinue' - - Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -UseBasicParsing -ErrorAction SilentlyContinue -Verbose - - # Revert back the ProgressPreference variable to the default value since we got the file desired - $ProgressPreference='Continue' - - Start-Process -FilePath "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Wait -ErrorAction SilentlyContinue -Verbose - } catch { - Write-Error $_.Exception.Message - } finally { - if (Test-Path -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe") { - Write-Host "Cleaning up..." - Remove-Item -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Verbose - } - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Fixes/Winget.md b/docs/dev/features/Fixes/Winget.md deleted file mode 100644 index 730b243e53..0000000000 --- a/docs/dev/features/Fixes/Winget.md +++ /dev/null @@ -1,58 +0,0 @@ -# WinGet Reinstall - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "WinGet Reinstall", - "category": "Fixes", - "panel": "1", - "Order": "a044_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Fixes/Winget" -} -``` - -</details> - -## Function: Invoke-WPFFixesWinget - -```powershell -function Invoke-WPFFixesWinget { - - <# - - .SYNOPSIS - Fixes Winget by running choco install winget - .DESCRIPTION - BravoNorris for the fantastic idea of a button to reinstall winget - #> - # Install Choco if not already present - Install-WinUtilChoco - Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait - -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/control.md b/docs/dev/features/Legacy-Windows-Panels/control.md deleted file mode 100644 index ca0a38af06..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/control.md +++ /dev/null @@ -1,65 +0,0 @@ -# Control Panel - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Control Panel", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/control" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/network.md b/docs/dev/features/Legacy-Windows-Panels/network.md deleted file mode 100644 index edc6809998..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/network.md +++ /dev/null @@ -1,65 +0,0 @@ -# Network Connections - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Network Connections", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/network" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/power.md b/docs/dev/features/Legacy-Windows-Panels/power.md deleted file mode 100644 index 6d0d042321..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/power.md +++ /dev/null @@ -1,65 +0,0 @@ -# Power Panel - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Power Panel", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/power" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/printer.md b/docs/dev/features/Legacy-Windows-Panels/printer.md deleted file mode 100644 index 05e3471a4c..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/printer.md +++ /dev/null @@ -1,65 +0,0 @@ -# Printer Settings - -Last Updated: 2024-08-31 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Printer Settings", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/../config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/region.md b/docs/dev/features/Legacy-Windows-Panels/region.md deleted file mode 100644 index 49430caab2..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/region.md +++ /dev/null @@ -1,65 +0,0 @@ -# Region - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Region", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/region" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/sound.md b/docs/dev/features/Legacy-Windows-Panels/sound.md deleted file mode 100644 index be2c61ac79..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/sound.md +++ /dev/null @@ -1,65 +0,0 @@ -# Sound Settings - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Sound Settings", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/sound" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/system.md b/docs/dev/features/Legacy-Windows-Panels/system.md deleted file mode 100644 index b8ee8987ac..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/system.md +++ /dev/null @@ -1,65 +0,0 @@ -# System Properties - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "System Properties", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/system" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/features/Legacy-Windows-Panels/user.md b/docs/dev/features/Legacy-Windows-Panels/user.md deleted file mode 100644 index b2cfa975aa..0000000000 --- a/docs/dev/features/Legacy-Windows-Panels/user.md +++ /dev/null @@ -1,65 +0,0 @@ -# User Accounts - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "User Accounts", - "category": "Legacy Windows Panels", - "panel": "2", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/features/Legacy-Windows-Panels/user" -} -``` - -</details> - -## Function: Invoke-WPFControlPanel - -```powershell -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/feature.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/BingSearch.md b/docs/dev/tweaks/Customize-Preferences/BingSearch.md deleted file mode 100644 index 570390f0cb..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/BingSearch.md +++ /dev/null @@ -1,76 +0,0 @@ -# Bing Search in Start Menu - -Last Updated: 2024-08-07 - - -!!! 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 - -If enable then includes web search results from Bing in your Start Menu search. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Bing Search in Start Menu", - "Description": "If enable then includes web search results from Bing in your Start Menu search.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a101_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/BingSearch" -} -``` - -</details> - -## Function: Invoke-WinUtilBingSearch - -```powershell -function Invoke-WinUtilBingSearch { - <# - - .SYNOPSIS - Disables/Enables Bing Search - - .PARAMETER Enabled - Indicates whether to enable or disable Bing Search - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Bing Search" - $value = 1 - } else { - Write-Host "Disabling Bing Search" - $value = 0 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" - Set-ItemProperty -Path $Path -Name BingSearchEnabled -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/DarkMode.md b/docs/dev/tweaks/Customize-Preferences/DarkMode.md deleted file mode 100644 index 8a88f7691a..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/DarkMode.md +++ /dev/null @@ -1,78 +0,0 @@ -# Dark Theme for Windows - -Last Updated: 2024-08-07 - - -!!! 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 - -Enable/Disable Dark Mode. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Dark Theme for Windows", - "Description": "Enable/Disable Dark Mode.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a100_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DarkMode" -} -``` - -</details> - -## Function: Invoke-WinUtilDarkMode - -```powershell -Function Invoke-WinUtilDarkMode { - <# - - .SYNOPSIS - Enables/Disables Dark Mode - - .PARAMETER DarkMoveEnabled - Indicates the current dark mode state - - #> - Param($DarkMoveEnabled) - try { - if ($DarkMoveEnabled -eq $false) { - Write-Host "Enabling Dark Mode" - $DarkMoveValue = 0 - } else { - Write-Host "Disabling Dark Mode" - $DarkMoveValue = 1 - } - - $Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" - Set-ItemProperty -Path $Path -Name AppsUseLightTheme -Value $DarkMoveValue - Set-ItemProperty -Path $Path -Name SystemUsesLightTheme -Value $DarkMoveValue - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md b/docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md deleted file mode 100644 index fe75f06d94..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md +++ /dev/null @@ -1,76 +0,0 @@ -# Detailed BSoD - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Detailed BSoD", - "Description": "If Enabled then you will see a detailed Blue Screen of Death (BSOD) with more information.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a205_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/DetailedBSoD" -} -``` - -</details> - -## Function: Invoke-WinUtilDetailedBSoD - -```powershell -Function Invoke-WinUtilDetailedBSoD { - <# - - .SYNOPSIS - Enables/Disables Detailed BSoD - (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl' -Name 'DisplayParameters').DisplayParameters - - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Detailed BSoD" - $value = 1 - } else { - Write-Host "Disabling Detailed BSoD" - $value =0 - } - - $Path = "HKLM:\SYSTEM\CurrentControlSet\Control\CrashControl" - Set-ItemProperty -Path $Path -Name DisplayParameters -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/HiddenFiles.md b/docs/dev/tweaks/Customize-Preferences/HiddenFiles.md deleted file mode 100644 index 4d90b31129..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/HiddenFiles.md +++ /dev/null @@ -1,76 +0,0 @@ -# Show Hidden Files - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then Hidden Files will be shown. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Show Hidden Files", - "Description": "If Enabled then Hidden Files will be shown.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a200_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/HiddenFiles" -} -``` - -</details> - -## Function: Invoke-WinUtilHiddenFiles - -```powershell -function Invoke-WinUtilHiddenFiles { - <# - - .SYNOPSIS - Enable/Disable Hidden Files - - .PARAMETER Enabled - Indicates whether to enable or disable Hidden Files - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Hidden Files" - $value = 1 - } else { - Write-Host "Disabling Hidden Files" - $value = 0 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - Set-ItemProperty -Path $Path -Name Hidden -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md b/docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md deleted file mode 100644 index 83d6aff72f..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md +++ /dev/null @@ -1,84 +0,0 @@ -# Mouse Acceleration - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then Cursor movement is affected by the speed of your physical mouse movements. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Mouse Acceleration", - "Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a107_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/MouseAcceleration" -} -``` - -</details> - -## Function: Invoke-WinUtilMouseAcceleration - -```powershell -Function Invoke-WinUtilMouseAcceleration { - <# - - .SYNOPSIS - Enables/Disables Mouse Acceleration - - .PARAMETER DarkMoveEnabled - Indicates the current Mouse Acceleration State - - #> - Param($MouseAccelerationEnabled) - try { - if ($MouseAccelerationEnabled -eq $false) { - Write-Host "Enabling Mouse Acceleration" - $MouseSpeed = 1 - $MouseThreshold1 = 6 - $MouseThreshold2 = 10 - } else { - Write-Host "Disabling Mouse Acceleration" - $MouseSpeed = 0 - $MouseThreshold1 = 0 - $MouseThreshold2 = 0 - - } - - $Path = "HKCU:\Control Panel\Mouse" - Set-ItemProperty -Path $Path -Name MouseSpeed -Value $MouseSpeed - Set-ItemProperty -Path $Path -Name MouseThreshold1 -Value $MouseThreshold1 - Set-ItemProperty -Path $Path -Name MouseThreshold2 -Value $MouseThreshold2 - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/NumLock.md b/docs/dev/tweaks/Customize-Preferences/NumLock.md deleted file mode 100644 index 00fc099060..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/NumLock.md +++ /dev/null @@ -1,77 +0,0 @@ -# NumLock on Startup - -Last Updated: 2024-08-07 - - -!!! 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 - -Toggle the Num Lock key state when your computer starts. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "NumLock on Startup", - "Description": "Toggle the Num Lock key state when your computer starts.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a102_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/NumLock" -} -``` - -</details> - -## Function: Invoke-WinUtilNumLock - -```powershell -function Invoke-WinUtilNumLock { - <# - .SYNOPSIS - Disables/Enables NumLock on startup - .PARAMETER Enabled - Indicates whether to enable or disable Numlock on startup - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Numlock on startup" - $value = 2 - } else { - Write-Host "Disabling Numlock on startup" - $value = 0 - } - New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS - $HKUPath = "HKU:\.Default\Control Panel\Keyboard" - $HKCUPath = "HKCU:\Control Panel\Keyboard" - Set-ItemProperty -Path $HKUPath -Name InitialKeyboardIndicators -Value $value - Set-ItemProperty -Path $HKCUPath -Name InitialKeyboardIndicators -Value $value - } - Catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/ShowExt.md b/docs/dev/tweaks/Customize-Preferences/ShowExt.md deleted file mode 100644 index 9913035f09..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/ShowExt.md +++ /dev/null @@ -1,73 +0,0 @@ -# Show File Extensions - -Last Updated: 2024-08-07 - - -!!! 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 - -If enabled then File extensions (e.g., .txt, .jpg) are visible. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Show File Extensions", - "Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a201_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/ShowExt" -} -``` - -</details> - -## Function: Invoke-WinUtilShowExt - -```powershell -function Invoke-WinUtilShowExt { - <# - .SYNOPSIS - Disables/Enables Show file Extentions - .PARAMETER Enabled - Indicates whether to enable or disable Show file extentions - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Showing file extentions" - $value = 0 - } else { - Write-Host "hiding file extensions" - $value = 1 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - Set-ItemProperty -Path $Path -Name HideFileExt -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/SnapFlyout.md b/docs/dev/tweaks/Customize-Preferences/SnapFlyout.md deleted file mode 100644 index 9d6373225e..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/SnapFlyout.md +++ /dev/null @@ -1,76 +0,0 @@ -# Snap Assist Flyout - -Last Updated: 2024-08-07 - - -!!! 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 - -If enabled then Snap preview is disabled when maximize button is hovered. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Snap Assist Flyout", - "Description": "If enabled then Snap preview is disabled when maximize button is hovered.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a105_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapFlyout" -} -``` - -</details> - -## Function: Invoke-WinUtilSnapFlyout - -```powershell -function Invoke-WinUtilSnapFlyout { - <# - .SYNOPSIS - Disables/Enables Snap Assist Flyout on startup - .PARAMETER Enabled - Indicates whether to enable or disable Snap Assist Flyout on startup - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Snap Assist Flyout On startup" - $value = 1 - } else { - Write-Host "Disabling Snap Assist Flyout On startup" - $value = 0 - } - # taskkill.exe /F /IM "explorer.exe" - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - taskkill.exe /F /IM "explorer.exe" - Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value - Start-Process "explorer.exe" - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md b/docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md deleted file mode 100644 index 3e725d5724..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md +++ /dev/null @@ -1,76 +0,0 @@ -# Snap Assist Suggestion - -Last Updated: 2024-08-07 - - -!!! 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 - -If enabled then you will get suggestions to snap other applications in the left over spaces. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Snap Assist Suggestion", - "Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a106_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapSuggestion" -} -``` - -</details> - -## Function: Invoke-WinUtilSnapSuggestion - -```powershell -function Invoke-WinUtilSnapSuggestion { - <# - .SYNOPSIS - Disables/Enables Snap Assist Suggestions on startup - .PARAMETER Enabled - Indicates whether to enable or disable Snap Assist Suggestions on startup - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Snap Assist Suggestion On startup" - $value = 1 - } else { - Write-Host "Disabling Snap Assist Suggestion On startup" - $value = 0 - } - # taskkill.exe /F /IM "explorer.exe" - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - taskkill.exe /F /IM "explorer.exe" - Set-ItemProperty -Path $Path -Name SnapAssist -Value $value - Start-Process "explorer.exe" - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/SnapWindow.md b/docs/dev/tweaks/Customize-Preferences/SnapWindow.md deleted file mode 100644 index 7192a8586b..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/SnapWindow.md +++ /dev/null @@ -1,73 +0,0 @@ -# Snap Window - -Last Updated: 2024-08-07 - - -!!! 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 - -If enabled you can align windows by dragging them. | Relogin Required - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Snap Window", - "Description": "If enabled you can align windows by dragging them. | Relogin Required", - "category": "Customize Preferences", - "panel": "2", - "Order": "a104_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/SnapWindow" -} -``` - -</details> - -## Function: Invoke-WinUtilSnapWindow - -```powershell -function Invoke-WinUtilSnapWindow { - <# - .SYNOPSIS - Disables/Enables Snapping Windows on startup - .PARAMETER Enabled - Indicates whether to enable or disable Snapping Windows on startup - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Snap Windows On startup | Relogin Required" - $value = 1 - } else { - Write-Host "Disabling Snap Windows On startup | Relogin Required" - $value = 0 - } - $Path = "HKCU:\Control Panel\Desktop" - Set-ItemProperty -Path $Path -Name WindowArrangementActive -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/StickyKeys.md b/docs/dev/tweaks/Customize-Preferences/StickyKeys.md deleted file mode 100644 index e2213ee84d..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/StickyKeys.md +++ /dev/null @@ -1,73 +0,0 @@ -# Sticky Keys - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Sticky Keys", - "Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a108_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/StickyKeys" -} -``` - -</details> - -## Function: Invoke-WinUtilStickyKeys - -```powershell -Function Invoke-WinUtilStickyKeys { - <# - .SYNOPSIS - Disables/Enables Sticky Keyss on startup - .PARAMETER Enabled - Indicates whether to enable or disable Sticky Keys on startup - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Sticky Keys On startup" - $value = 510 - } else { - Write-Host "Disabling Sticky Keys On startup" - $value = 58 - } - $Path = "HKCU:\Control Panel\Accessibility\StickyKeys" - Set-ItemProperty -Path $Path -Name Flags -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/TaskView.md b/docs/dev/tweaks/Customize-Preferences/TaskView.md deleted file mode 100644 index 4161a0f9b3..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/TaskView.md +++ /dev/null @@ -1,76 +0,0 @@ -# Task View Button in Taskbar - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then Task View Button in Taskbar will be shown. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Task View Button in Taskbar", - "Description": "If Enabled then Task View Button in Taskbar will be shown.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a203_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskView" -} -``` - -</details> - -## Function: Invoke-WinUtilTaskView - -```powershell -function Invoke-WinUtilTaskView { - <# - - .SYNOPSIS - Enable/Disable Task View - - .PARAMETER Enabled - Indicates whether to enable or disable Task View - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Task View" - $value = 1 - } else { - Write-Host "Disabling Task View" - $value = 0 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - Set-ItemProperty -Path $Path -Name ShowTaskViewButton -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md b/docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md deleted file mode 100644 index 3a4d299503..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md +++ /dev/null @@ -1,76 +0,0 @@ -# Center Taskbar Items - -Last Updated: 2024-08-07 - - -!!! 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 - -[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Center Taskbar Items", - "Description": "[Windows 11] If Enabled then the Taskbar Items will be shown on the Center, otherwise the Taskbar Items will be shown on the Left.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a204_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarAlignment" -} -``` - -</details> - -## Function: Invoke-WinUtilTaskbarAlignment - -```powershell -function Invoke-WinUtilTaskbarAlignment { - <# - - .SYNOPSIS - Switches between Center & Left Taskbar Alignment - - .PARAMETER Enabled - Indicates whether to make Taskbar Alignment Center or Left - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Making Taskbar Alignment to the Center" - $value = 1 - } else { - Write-Host "Making Taskbar Alignment to the Left" - $value = 0 - } - $Path = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - Set-ItemProperty -Path $Path -Name "TaskbarAl" -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md b/docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md deleted file mode 100644 index fc0d27e8ed..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md +++ /dev/null @@ -1,76 +0,0 @@ -# Search Button in Taskbar - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled Search Button will be on the taskbar. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Search Button in Taskbar", - "Description": "If Enabled Search Button will be on the taskbar.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a202_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarSearch" -} -``` - -</details> - -## Function: Invoke-WinUtilTaskbarSearch - -```powershell -function Invoke-WinUtilTaskbarSearch { - <# - - .SYNOPSIS - Enable/Disable Taskbar Search Button. - - .PARAMETER Enabled - Indicates whether to enable or disable Taskbar Search Button. - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Search Button" - $value = 1 - } else { - Write-Host "Disabling Search Button" - $value = 0 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search\" - Set-ItemProperty -Path $Path -Name SearchboxTaskbarMode -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md b/docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md deleted file mode 100644 index 739afe7b66..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md +++ /dev/null @@ -1,76 +0,0 @@ -# Widgets Button in Taskbar - -Last Updated: 2024-08-07 - - -!!! 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 - -If Enabled then Widgets Button in Taskbar will be shown. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Widgets Button in Taskbar", - "Description": "If Enabled then Widgets Button in Taskbar will be shown.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a204_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/TaskbarWidgets" -} -``` - -</details> - -## Function: Invoke-WinUtilTaskbarWidgets - -```powershell -function Invoke-WinUtilTaskbarWidgets { - <# - - .SYNOPSIS - Enable/Disable Taskbar Widgets - - .PARAMETER Enabled - Indicates whether to enable or disable Taskbar Widgets - - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Taskbar Widgets" - $value = 1 - } else { - Write-Host "Disabling Taskbar Widgets" - $value = 0 - } - $Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" - Set-ItemProperty -Path $Path -Name TaskbarDa -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Customize-Preferences/VerboseLogon.md b/docs/dev/tweaks/Customize-Preferences/VerboseLogon.md deleted file mode 100644 index 44bf183a27..0000000000 --- a/docs/dev/tweaks/Customize-Preferences/VerboseLogon.md +++ /dev/null @@ -1,73 +0,0 @@ -# Verbose Messages During Logon - -Last Updated: 2024-08-07 - - -!!! 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 - -Show detailed messages during the login process for troubleshooting and diagnostics. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Verbose Messages During Logon", - "Description": "Show detailed messages during the login process for troubleshooting and diagnostics.", - "category": "Customize Preferences", - "panel": "2", - "Order": "a103_", - "Type": "Toggle", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Customize-Preferences/VerboseLogon" -} -``` - -</details> - -## Function: Invoke-WinUtilVerboseLogon - -```powershell -function Invoke-WinUtilVerboseLogon { - <# - .SYNOPSIS - Disables/Enables VerboseLogon Messages - .PARAMETER Enabled - Indicates whether to enable or disable VerboseLogon messages - #> - Param($Enabled) - try { - if ($Enabled -eq $false) { - Write-Host "Enabling Verbose Logon Messages" - $value = 1 - } else { - Write-Host "Disabling Verbose Logon Messages" - $value = 0 - } - $Path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" - Set-ItemProperty -Path $Path -Name VerboseStatus -Value $value - } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" - } catch [System.Management.Automation.ItemNotFoundException] { - Write-Warning $psitem.Exception.ErrorRecord - } catch { - Write-Warning "Unable to set $Name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/AH.md b/docs/dev/tweaks/Essential-Tweaks/AH.md deleted file mode 100644 index eae8dfdfc5..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/AH.md +++ /dev/null @@ -1,93 +0,0 @@ -# Disable Activity History - -Last Updated: 2024-08-07 - - -!!! 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 - -This erases recent docs, clipboard, and run history. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Activity History", - "Description": "This erases recent docs, clipboard, and run history.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", - "Name": "EnableActivityFeed", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", - "Name": "PublishUserActivities", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\System", - "Name": "UploadUserActivities", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/AH" -} -``` - -</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: EnableActivityFeed - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PublishUserActivities - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: UploadUserActivities - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md b/docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md deleted file mode 100644 index 19f5f7ee92..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md +++ /dev/null @@ -1,63 +0,0 @@ -# Disable ConsumerFeatures - -Last Updated: 2024-08-07 - - -!!! 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 - -Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link) - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable ConsumerFeatures", - "Description": "Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a003_", - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", - "OriginalValue": "0", - "Name": "DisableWindowsConsumerFeatures", - "Value": "1", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/ConsumerFeatures" -} -``` - -</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: DisableWindowsConsumerFeatures - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/DVR.md b/docs/dev/tweaks/Essential-Tweaks/DVR.md deleted file mode 100644 index 7d909f6122..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/DVR.md +++ /dev/null @@ -1,123 +0,0 @@ -# Disable GameDVR - -Last Updated: 2024-08-07 - - -!!! 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 - -GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable GameDVR", - "Description": "GameDVR is a Windows App that is a dependency for some Store Games. I've never met someone that likes it, but it's there for the XBOX crowd.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_FSEBehavior", - "Value": "2", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_Enabled", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_HonorUserFSEBehaviorMode", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_EFSEFeatureFlags", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\GameDVR", - "Name": "AllowGameDVR", - "Value": "0", - "OriginalValue": "1", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DVR" -} -``` - -</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: GameDVR_FSEBehavior - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 2 - -### Registry Key: GameDVR_Enabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: GameDVR_HonorUserFSEBehaviorMode - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: GameDVR_EFSEFeatureFlags - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: AllowGameDVR - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md b/docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md deleted file mode 100644 index 50e34e8f99..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md +++ /dev/null @@ -1,50 +0,0 @@ -# Delete Temporary Files - -Last Updated: 2024-08-07 - - -!!! 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 - -Erases TEMP Folders - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Delete Temporary Files", - "Description": "Erases TEMP Folders", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a002_", - "InvokeScript": [ - "Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse - Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DeleteTempFiles" -} -``` - -</details> - -## Invoke Script - -```powershell -Get-ChildItem -Path "C:\Windows\Temp" *.* -Recurse | Remove-Item -Force -Recurse - Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md b/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md deleted file mode 100644 index a6ceaa733e..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/DisableRecall.md +++ /dev/null @@ -1,91 +0,0 @@ -# Disable Microsoft Recall - -Last Updated: 2024-10-24 - - -!!! 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 - -Disables MS Recall built into Windows since 24H2. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -"WPFTweaksRecallOff": { - "Content": "Disable Recall", - "Description": "Turn Recall off", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a011_", - "registry": [ - { - - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsAI", - "Name": "DisableAIDataAnalysis", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - } - ], - "InvokeScript": [ - " - Write-Host \"Disable Recall\" - DISM /Online /Disable-Feature /FeatureName:Recall - " - ], - "UndoScript": [ - " - Write-Host \"Enable Recall\" - DISM /Online /Enable-Feature /FeatureName:Recall - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DisableRecall" - }, -``` - -</details> - -## Invoke Script - -```powershell - - Write-Host "Disable Recall" - DISM /Online /Disable-Feature /FeatureName:Recall - - -``` -## Undo Script - -```powershell - - Write-Host "Enable Recall" - DISM /Online /Enable-Feature /FeatureName:Recall - - -``` -## 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: DisableAIDataAnalysis - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) diff --git a/docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md b/docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md deleted file mode 100644 index fedad44a18..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md +++ /dev/null @@ -1,54 +0,0 @@ -# Run Disk Cleanup - -Last Updated: 2024-08-07 - - -!!! 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 - -Runs Disk Cleanup on Drive C: and removes old Windows Updates. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Run Disk Cleanup", - "Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a009_", - "InvokeScript": [ - " - cleanmgr.exe /d C: /VERYLOWDISK - Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/DiskCleanup" -} -``` - -</details> - -## Invoke Script - -```powershell - - cleanmgr.exe /d C: /VERYLOWDISK - Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md b/docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md deleted file mode 100644 index a9af5d7d4c..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md +++ /dev/null @@ -1,363 +0,0 @@ -# Debloat Edge - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables various telemetry options, popups, and other annoyances in Edge. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Debloat Edge", - "Description": "Disables various telemetry options, popups, and other annoyances in Edge.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a016_", - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\EdgeUpdate", - "Name": "CreateDesktopShortcutDefault", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeEnhanceImagesEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "PersonalizationReportingEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ShowRecommendationsEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "HideFirstRunExperience", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "UserFeedbackAllowed", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ConfigureDoNotTrack", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "AlternateErrorPagesEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeCollectionsEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeFollowEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeShoppingAssistantEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "MicrosoftEdgeInsiderPromotionEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "PersonalizationReportingEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ShowMicrosoftRewards", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "WebWidgetAllowed", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "DiagnosticData", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeAssetDeliveryServiceEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "EdgeCollectionsEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "CryptoWalletEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "ConfigureDoNotTrack", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge", - "Name": "WalletDonationEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EdgeDebloat" -} -``` - -</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: CreateDesktopShortcutDefault - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeEnhanceImagesEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PersonalizationReportingEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ShowRecommendationsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: HideFirstRunExperience - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: UserFeedbackAllowed - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ConfigureDoNotTrack - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: AlternateErrorPagesEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeCollectionsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeFollowEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeShoppingAssistantEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: MicrosoftEdgeInsiderPromotionEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PersonalizationReportingEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ShowMicrosoftRewards - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: WebWidgetAllowed - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: DiagnosticData - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeAssetDeliveryServiceEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EdgeCollectionsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: CryptoWalletEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ConfigureDoNotTrack - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: WalletDonationEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md b/docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md deleted file mode 100644 index de6192bc6d..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md +++ /dev/null @@ -1,97 +0,0 @@ -# Enable End Task With Right Click - -Last Updated: 2024-08-07 - - -!!! 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 - -Enables option to end task when right clicking a program in the taskbar - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Enable End Task With Right Click", - "Description": "Enables option to end task when right clicking a program in the taskbar", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a006_", - "InvokeScript": [ - "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" - $name = \"TaskbarEndTask\" - $value = 1 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null - } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" - ], - "UndoScript": [ - "$path = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" - $name = \"TaskbarEndTask\" - $value = 0 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null - } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar" -} -``` - -</details> - -## Invoke Script - -```powershell -$path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings" - $name = "TaskbarEndTask" - $value = 1 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null - } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null - -``` -## Undo Script - -```powershell -$path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings" - $name = "TaskbarEndTask" - $value = 0 - - # Ensure the registry key exists - if (-not (Test-Path $path)) { - New-Item -Path $path -Force | Out-Null - } - - # Set the property, creating it if it doesn't exist - New-ItemProperty -Path $path -Name $name -PropertyType DWord -Value $value -Force | Out-Null - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Hiber.md b/docs/dev/tweaks/Essential-Tweaks/Hiber.md deleted file mode 100644 index 1fde36f358..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Hiber.md +++ /dev/null @@ -1,96 +0,0 @@ -# Disable Hibernation - -Last Updated: 2024-08-07 - - -!!! 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 - -Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Hibernation", - "Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power", - "Name": "HibernateEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FlyoutMenuSettings", - "Name": "ShowHibernateOption", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "InvokeScript": [ - "powercfg.exe /hibernate off" - ], - "UndoScript": [ - "powercfg.exe /hibernate on" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Hiber" -} -``` - -</details> - -## Invoke Script - -```powershell -powercfg.exe /hibernate off - -``` -## Undo Script - -```powershell -powercfg.exe /hibernate on - -``` -## 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: HibernateEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ShowHibernateOption - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Home.md b/docs/dev/tweaks/Essential-Tweaks/Home.md deleted file mode 100644 index b49fb13155..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Home.md +++ /dev/null @@ -1,70 +0,0 @@ -# Disable Homegroup - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Homegroup", - "Description": "Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "service": [ - { - "Name": "HomeGroupListener", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "HomeGroupProvider", - "StartupType": "Manual", - "OriginalType": "Automatic" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Home" -} -``` - -</details> - -## Service Changes - -Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed. - -You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications). - -### Service Name: HomeGroupListener - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: HomeGroupProvider - -**Startup Type:** Manual - -**Original Type:** Automatic - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/IPv46.md b/docs/dev/tweaks/Essential-Tweaks/IPv46.md deleted file mode 100644 index 471ca31256..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/IPv46.md +++ /dev/null @@ -1,63 +0,0 @@ -# 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) - diff --git a/docs/dev/tweaks/Essential-Tweaks/LaptopHibernation.md b/docs/dev/tweaks/Essential-Tweaks/LaptopHibernation.md deleted file mode 100644 index ff8cce93ec..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/LaptopHibernation.md +++ /dev/null @@ -1,132 +0,0 @@ -# Set Hibernation as default (good for laptops) - -Last Updated: 2024-08-07 - - -!!! 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 - -Most modern laptops have connected standby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399 - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Hibernation as default (good for laptops)", - "Description": "Most modern laptops have connected standby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a014_", - "registry": [ - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0", - "OriginalValue": "1", - "Name": "Attributes", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\abfc2519-3608-4c2a-94ea-171b0ed546ab\\94ac6d29-73ce-41a6-809f-6363ba21b47e", - "OriginalValue": "0", - "Name": "Attributes ", - "Value": "2", - "Type": "DWord" - } - ], - "InvokeScript": [ - " - Write-Host \"Turn on Hibernation\" - Start-Process -FilePath powercfg -ArgumentList \"/hibernate on\" -NoNewWindow -Wait - - # Set hibernation as the default action - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 60\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 60\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 10\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 1\" -NoNewWindow -Wait - " - ], - "UndoScript": [ - " - Write-Host \"Turn off Hibernation\" - Start-Process -FilePath powercfg -ArgumentList \"/hibernate off\" -NoNewWindow -Wait - - # Set standby to detault values - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 15\" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 15\" -NoNewWindow -Wait - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/LaptopHibernation" -} -``` - -</details> - -## Invoke Script - -```powershell - - Write-Host "Turn on Hibernation" - Start-Process -FilePath powercfg -ArgumentList "/hibernate on" -NoNewWindow -Wait - - # Set hibernation as the default action - Start-Process -FilePath powercfg -ArgumentList "/change standby-timeout-ac 60" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change standby-timeout-dc 60" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change monitor-timeout-ac 10" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change monitor-timeout-dc 1" -NoNewWindow -Wait - - -``` -## Undo Script - -```powershell - - Write-Host "Turn off Hibernation" - Start-Process -FilePath powercfg -ArgumentList "/hibernate off" -NoNewWindow -Wait - - # Set standby to detault values - Start-Process -FilePath powercfg -ArgumentList "/change standby-timeout-ac 15" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change standby-timeout-dc 15" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change monitor-timeout-ac 15" -NoNewWindow -Wait - Start-Process -FilePath powercfg -ArgumentList "/change monitor-timeout-dc 15" -NoNewWindow -Wait - - -``` -## 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: Attributes - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 2 - -### Registry Key: Attributes - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 2 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Loc.md b/docs/dev/tweaks/Essential-Tweaks/Loc.md deleted file mode 100644 index e4b9f426b8..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Loc.md +++ /dev/null @@ -1,108 +0,0 @@ -# Disable Location Tracking - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables Location Tracking...DUH! - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Location Tracking", - "Description": "Disables Location Tracking...DUH!", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location", - "Name": "Value", - "Type": "String", - "Value": "Deny", - "OriginalValue": "Allow" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Sensor\\Overrides\\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}", - "Name": "SensorPermissionState", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\lfsvc\\Service\\Configuration", - "Name": "Status", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SYSTEM\\Maps", - "Name": "AutoUpdateEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Loc" -} -``` - -</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: Value - -**Type:** String - -**Original Value:** Allow - -**New Value:** Deny - -### Registry Key: SensorPermissionState - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: Status - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: AutoUpdateEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Powershell7.md b/docs/dev/tweaks/Essential-Tweaks/Powershell7.md deleted file mode 100644 index ab9ae36c97..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Powershell7.md +++ /dev/null @@ -1,416 +0,0 @@ -# Change Windows Terminal default: PowerShell 5 -> PowerShell 7 - -Last Updated: 2024-08-07 - - -!!! 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 - -This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Change Windows Terminal default: PowerShell 5 -> PowerShell 7", - "Description": "This will edit the config file of the Windows Terminal replacing PowerShell 5 with PowerShell 7 and installing PS7 if necessary", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a009_", - "InvokeScript": [ - "Invoke-WPFTweakPS7 -action \"PS7\"" - ], - "UndoScript": [ - "Invoke-WPFTweakPS7 -action \"PS5\"" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Powershell7" -} -``` - -</details> - -## Invoke Script - -```powershell -Invoke-WPFTweakPS7 -action "PS7" - -``` -## Undo Script - -```powershell -Invoke-WPFTweakPS7 -action "PS5" - -``` -## Function: Invoke-WPFTweakPS7 - -```powershell -function Invoke-WPFTweakPS7{ - <# - .SYNOPSIS - This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary - .PARAMETER action - PS7: Configures Powershell 7 to be the default Terminal - PS5: Configures Powershell 5 to be the default Terminal - #> - param ( - [ValidateSet("PS7", "PS5")] - [string]$action - ) - - switch ($action) { - "PS7"{ - if (Test-Path -Path "$env:ProgramFiles\PowerShell\7") { - Write-Host "Powershell 7 is already installed." - } else { - Write-Host "Installing Powershell 7..." - Install-WinUtilProgramWinget -Action Install -Programs @("Microsoft.PowerShell") - } - $targetTerminalName = "PowerShell" - } - "PS5"{ - $targetTerminalName = "Windows PowerShell" - } - } - # Check if the Windows Terminal is installed and return if not (Prerequisite for the following code) - if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)) { - Write-Host "Windows Terminal not installed. Skipping Terminal preference" - return - } - # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) - $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" - if (-not (Test-Path -Path $settingsPath)) { - Write-Host "Windows Terminal Settings file not found at $settingsPath" - return - } - - Write-Host "Settings file found." - $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json - $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } - if ($ps7Profile) { - $settingsContent.defaultProfile = $ps7Profile.guid - $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 - Set-Content -Path $settingsPath -Value $updatedSettings - Write-Host "Default profile updated to " -NoNewline - Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline - Write-Host "using the name attribute." - } else { - Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." - } -} - -``` -## Function: Install-WinUtilProgramWinget - -```powershell -Function Install-WinUtilProgramWinget { - <# - .SYNOPSIS - Runs the designated action on the provided programs using Winget - - .PARAMETER Programs - A list of programs to process - - .PARAMETER action - The action to perform on the programs, can be either 'Install' or 'Uninstall' - - .NOTES - The triple quotes are required any time you need a " in a normal script block. - The winget Return codes are documented here: https://github.com/microsoft/winget-cli/blob/master/doc/windows/package-actionr/winget/returnCodes.md - #> - - param( - [Parameter(Mandatory, Position=0)]$Programs, - - [Parameter(Mandatory, Position=1)] - [ValidateSet("Install", "Uninstall")] - [String]$Action - ) - - Function Invoke-Winget { - <# - .SYNOPSIS - Invokes the winget.exe with the provided arguments and return the exit code - - .PARAMETER wingetId - The Id of the Program that Winget should Install/Uninstall - - .PARAMETER scope - Determines the installation mode. Can be "user" or "machine" (For more info look at the winget documentation) - - .PARAMETER credential - The PSCredential Object of the user that should be used to run winget - - .NOTES - Invoke Winget uses the public variable $Action defined outside the function to determine if a Program should be installed or removed - #> - param ( - [string]$wingetId, - [string]$scope = "", - [PScredential]$credential = $null - ) - - $commonArguments = "--id $wingetId --silent" - $arguments = if ($Action -eq "Install") { - "install $commonArguments --accept-source-agreements --accept-package-agreements $(if ($scope) {" --scope $scope"})" - } else { - "uninstall $commonArguments" - } - - $processParams = @{ - FilePath = "winget" - ArgumentList = $arguments - Wait = $true - PassThru = $true - NoNewWindow = $true - } - - if ($credential) { - $processParams.credential = $credential - } - - return (Start-Process @processParams).ExitCode - } - - Function Invoke-Install { - <# - .SYNOPSIS - Contains the Install Logic and return code handling from winget - - .PARAMETER Program - The Winget ID of the Program that should be installed - #> - param ( - [string]$Program - ) - $status = Invoke-Winget -wingetId $Program - if ($status -eq 0) { - Write-Host "$($Program) installed successfully." - return $true - } elseif ($status -eq -1978335189) { - Write-Host "$($Program) No applicable update found" - return $true - } - - Write-Host "Attempt installation of $($Program) with User scope" - $status = Invoke-Winget -wingetId $Program -scope "user" - if ($status -eq 0) { - Write-Host "$($Program) installed successfully with User scope." - return $true - } elseif ($status -eq -1978335189) { - Write-Host "$($Program) No applicable update found" - return $true - } - - $userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $($Program) installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User credential Prompt", [System.Windows.MessageBoxButton]::YesNo) - if ($userChoice -eq 'Yes') { - $getcreds = Get-Credential - $status = Invoke-Winget -wingetId $Program -credential $getcreds - if ($status -eq 0) { - Write-Host "$($Program) installed successfully with User prompt." - return $true - } - } else { - Write-Host "Skipping installation with specific user credentials." - } - - Write-Host "Failed to install $($Program)." - return $false - } - - Function Invoke-Uninstall { - <# - .SYNOPSIS - Contains the Uninstall Logic and return code handling from winget - - .PARAMETER Program - The Winget ID of the Program that should be uninstalled - #> - param ( - [psobject]$Program - ) - - try { - $status = Invoke-Winget -wingetId $Program - if ($status -eq 0) { - Write-Host "$($Program) uninstalled successfully." - return $true - } else { - Write-Host "Failed to uninstall $($Program)." - return $false - } - } catch { - Write-Host "Failed to uninstall $($Program) due to an error: $_" - return $false - } - } - - $count = $Programs.Count - $failedPackages = @() - - Write-Host "===========================================" - Write-Host "-- Configuring winget packages ---" - Write-Host "===========================================" - - for ($i = 0; $i -lt $count; $i++) { - $Program = $Programs[$i] - $result = $false - Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($i / $count * 100) - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i / $count)}) - - $result = switch ($Action) { - "Install" {Invoke-Install -Program $Program} - "Uninstall" {Invoke-Uninstall -Program $Program} - default {throw "[Install-WinUtilProgramWinget] Invalid action: $Action"} - } - - if (-not $result) { - $failedPackages += $Program - } - } - - Set-WinUtilProgressBar -label "$($Action)ation done" -percent 100 - return $failedPackages -} - -``` -## Function: Set-WinUtilProgressbar - -```powershell -function Set-WinUtilProgressbar{ - <# - .SYNOPSIS - This function is used to Update the Progress Bar displayed in the winutil GUI. - It will be automatically hidden if the user clicks something and no process is running - .PARAMETER Label - The Text to be overlayed onto the Progress Bar - .PARAMETER PERCENT - The percentage of the Progress Bar that should be filled (0-100) - .PARAMETER Hide - If provided, the Progress Bar and the label will be hidden - #> - param( - [string]$Label, - [ValidateRange(0,100)] - [int]$Percent, - $Hide - ) - if ($hide) { - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"}) - } else { - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"}) - } - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.Text = $label}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.ToolTip = $label}) - $sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent}) - -} - -``` -## Function: Set-WinUtilTaskbarItem - -```powershell -function Set-WinUtilTaskbaritem { - <# - - .SYNOPSIS - Modifies the Taskbaritem of the WPF Form - - .PARAMETER value - Value can be between 0 and 1, 0 being no progress done yet and 1 being fully completed - Value does not affect item without setting the state to 'Normal', 'Error' or 'Paused' - Set-WinUtilTaskbaritem -value 0.5 - - .PARAMETER state - State can be 'None' > No progress, 'Indeterminate' > inf. loading gray, 'Normal' > Gray, 'Error' > Red, 'Paused' > Yellow - no value needed: - - Set-WinUtilTaskbaritem -state "None" - - Set-WinUtilTaskbaritem -state "Indeterminate" - value needed: - - Set-WinUtilTaskbaritem -state "Error" - - Set-WinUtilTaskbaritem -state "Normal" - - Set-WinUtilTaskbaritem -state "Paused" - - .PARAMETER overlay - Overlay icon to display on the taskbar item, there are the presets 'None', 'logo' and 'checkmark' or you can specify a path/link to an image file. - CTT logo preset: - - Set-WinUtilTaskbaritem -overlay "logo" - Checkmark preset: - - Set-WinUtilTaskbaritem -overlay "checkmark" - Warning preset: - - Set-WinUtilTaskbaritem -overlay "warning" - No overlay: - - Set-WinUtilTaskbaritem -overlay "None" - Custom icon (needs to be supported by WPF): - - Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png" - - .PARAMETER description - Description to display on the taskbar item preview - Set-WinUtilTaskbaritem -description "This is a description" - #> - param ( - [string]$state, - [double]$value, - [string]$overlay, - [string]$description - ) - - if ($value) { - $sync["Form"].taskbarItemInfo.ProgressValue = $value - } - - if ($state) { - switch ($state) { - 'None' { $sync["Form"].taskbarItemInfo.ProgressState = "None" } - 'Indeterminate' { $sync["Form"].taskbarItemInfo.ProgressState = "Indeterminate" } - 'Normal' { $sync["Form"].taskbarItemInfo.ProgressState = "Normal" } - 'Error' { $sync["Form"].taskbarItemInfo.ProgressState = "Error" } - 'Paused' { $sync["Form"].taskbarItemInfo.ProgressState = "Paused" } - default { throw "[Set-WinUtilTaskbarItem] Invalid state" } - } - } - - if ($overlay) { - switch ($overlay) { - 'logo' { - $sync["Form"].taskbarItemInfo.Overlay = "$env:LOCALAPPDATA\winutil\cttlogo.png" - } - 'checkmark' { - $sync["Form"].taskbarItemInfo.Overlay = "$env:LOCALAPPDATA\winutil\checkmark.png" - } - 'warning' { - $sync["Form"].taskbarItemInfo.Overlay = "$env:LOCALAPPDATA\winutil\warning.png" - } - 'None' { - $sync["Form"].taskbarItemInfo.Overlay = $null - } - default { - if (Test-Path $overlay) { - $sync["Form"].taskbarItemInfo.Overlay = $overlay - } - } - } - } - - if ($description) { - $sync["Form"].taskbarItemInfo.Description = $description - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Powershell7Tele.md b/docs/dev/tweaks/Essential-Tweaks/Powershell7Tele.md deleted file mode 100644 index 9da9af90b8..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Powershell7Tele.md +++ /dev/null @@ -1,57 +0,0 @@ -# Disable Powershell 7 Telemetry - -Last Updated: 2024-08-07 - - -!!! 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 - -This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Powershell 7 Telemetry", - "Description": "This will create an Environment Variable called 'POWERSHELL_TELEMETRY_OPTOUT' with a value of '1' which will tell Powershell 7 to not send Telemetry Data.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a009_", - "InvokeScript": [ - "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine')" - ], - "UndoScript": [ - "[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine')" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Powershell7Tele" -} -``` - -</details> - -## Invoke Script - -```powershell -[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', 'Machine') - -``` -## Undo Script - -```powershell -[Environment]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '', 'Machine') - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/RestorePoint.md b/docs/dev/tweaks/Essential-Tweaks/RestorePoint.md deleted file mode 100644 index a7db58af8a..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/RestorePoint.md +++ /dev/null @@ -1,139 +0,0 @@ -# Create Restore Point - -Last Updated: 2024-08-07 - - -!!! 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 - -Creates a restore point at runtime in case a revert is needed from WinUtil modifications - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Create Restore Point", - "Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications", - "category": "Essential Tweaks", - "panel": "1", - "Checked": "False", - "Order": "a001_", - "InvokeScript": [ - " - # Check if the user has administrative privileges - if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { - Write-Host \"Please run this script as an administrator.\" - return - } - - # Check if System Restore is enabled for the main drive - try { - # Try getting restore points to check if System Restore is enabled - Enable-ComputerRestore -Drive \"$env:SystemDrive\" - } catch { - Write-Host \"An error occurred while enabling System Restore: $_\" - } - - # Check if the SystemRestorePointCreationFrequency value exists - $exists = Get-ItemProperty -path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -ErrorAction SilentlyContinue - if($null -eq $exists) { - write-host 'Changing system to allow multiple restore points per day' - Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -Value \"0\" -Type DWord -Force -ErrorAction Stop | Out-Null - } - - # Attempt to load the required module for Get-ComputerRestorePoint - try { - Import-Module Microsoft.PowerShell.Management -ErrorAction Stop - } catch { - Write-Host \"Failed to load the Microsoft.PowerShell.Management module: $_\" - return - } - - # Get all the restore points for the current day - try { - $existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date } - } catch { - Write-Host \"Failed to retrieve restore points: $_\" - return - } - - # Check if there is already a restore point created today - if ($existingRestorePoints.Count -eq 0) { - $description = \"System Restore Point created by WinUtil\" - - Checkpoint-Computer -Description $description -RestorePointType \"MODIFY_SETTINGS\" - Write-Host -ForegroundColor Green \"System Restore Point Created Successfully\" - } - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/RestorePoint" -} -``` - -</details> - -## Invoke Script - -```powershell - - # Check if the user has administrative privileges - if (-Not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { - Write-Host "Please run this script as an administrator." - return - } - - # Check if System Restore is enabled for the main drive - try { - # Try getting restore points to check if System Restore is enabled - Enable-ComputerRestore -Drive "$env:SystemDrive" - } catch { - Write-Host "An error occurred while enabling System Restore: $_" - } - - # Check if the SystemRestorePointCreationFrequency value exists - $exists = Get-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointCreationFrequency" -ErrorAction SilentlyContinue - if($null -eq $exists) { - write-host 'Changing system to allow multiple restore points per day' - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Name "SystemRestorePointCreationFrequency" -Value "0" -Type DWord -Force -ErrorAction Stop | Out-Null - } - - # Attempt to load the required module for Get-ComputerRestorePoint - try { - Import-Module Microsoft.PowerShell.Management -ErrorAction Stop - } catch { - Write-Host "Failed to load the Microsoft.PowerShell.Management module: $_" - return - } - - # Get all the restore points for the current day - try { - $existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date } - } catch { - Write-Host "Failed to retrieve restore points: $_" - return - } - - # Check if there is already a restore point created today - if ($existingRestorePoints.Count -eq 0) { - $description = "System Restore Point created by WinUtil" - - Checkpoint-Computer -Description $description -RestorePointType "MODIFY_SETTINGS" - Write-Host -ForegroundColor Green "System Restore Point Created Successfully" - } - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Services.md b/docs/dev/tweaks/Essential-Tweaks/Services.md deleted file mode 100644 index d96f2ef24f..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Services.md +++ /dev/null @@ -1,3150 +0,0 @@ -# Set Services to Manual - -Last Updated: 2024-08-07 - - -!!! 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 - -Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Services to Manual", - "Description": "Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a014_", - "service": [ - { - "Name": "AJRouter", - "StartupType": "Disabled", - "OriginalType": "Manual" - }, - { - "Name": "ALG", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "AppIDSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "AppMgmt", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "AppReadiness", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "AppVClient", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "AppXSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Appinfo", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "AssignedAccessManagerSvc", - "StartupType": "Disabled", - "OriginalType": "Manual" - }, - { - "Name": "AudioEndpointBuilder", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "AudioSrv", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "Audiosrv", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "AxInstSV", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BDESVC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BFE", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "BITS", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "BTAGService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BcastDVRUserService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BluetoothUserService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BrokerInfrastructure", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "Browser", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "BthAvctpSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "BthHFSrv", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "CDPSvc", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "CDPUserSvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "COMSysApp", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "CaptureService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "CertPropSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ClipSVC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ConsentUxUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "CoreMessagingRegistrar", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "CredentialEnrollmentManagerUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "CryptSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "CscService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DPS", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DcomLaunch", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DcpSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DevQueryBroker", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DeviceAssociationBrokerSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DeviceAssociationService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DeviceInstall", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DevicePickerUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DevicesFlowUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Dhcp", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DiagTrack", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "DialogBlockingService", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "DispBrokerDesktopSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DisplayEnhancementService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DmEnrollmentSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Dnscache", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "DoSvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "DsSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DsmSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "DusmSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "EFS", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "EapHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "EntAppSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "EventLog", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "EventSystem", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "FDResPub", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Fax", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "FontCache", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "FrameServer", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "FrameServerMonitor", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "GraphicsPerfSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "HomeGroupListener", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "HomeGroupProvider", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "HvHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "IEEtwCollectorService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "IKEEXT", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "InstallService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "InventorySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "IpxlatCfgSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "KeyIso", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "KtmRm", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "LSM", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "LanmanServer", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "LanmanWorkstation", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "LicenseManager", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "LxpSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MSDTC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MSiSCSI", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MapsBroker", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "McpManagementService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MessagingService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MicrosoftEdgeElevationService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MixedRealityOpenXRSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "MpsSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "MsKeyboardFilter", - "StartupType": "Manual", - "OriginalType": "Disabled" - }, - { - "Name": "NPSMSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NaturalAuthentication", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NcaSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NcbService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NcdAutoSetup", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NetSetupSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NetTcpPortSharing", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "Netlogon", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "Netman", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NgcCtnrSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NgcSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "NlaSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "OneSyncSvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "P9RdrService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PNRPAutoReg", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PNRPsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PcaSvc", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "PeerDistSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PenService_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PerfHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PhoneSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PimIndexMaintenanceSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PlugPlay", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PolicyAgent", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Power", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "PrintNotify", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "PrintWorkflowUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ProfSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "PushToInstall", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "QWAVE", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RasAuto", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RasMan", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RemoteAccess", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "RemoteRegistry", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "RetailDemo", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RmSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RpcEptMapper", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "RpcLocator", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "RpcSs", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SCPolicySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SCardSvr", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SDRSVC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SEMgrSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SENS", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SNMPTRAP", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SNMPTrap", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SSDPSRV", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SamSs", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "ScDeviceEnum", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Schedule", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SecurityHealthService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Sense", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SensorDataService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SensorService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SensrSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SessionEnv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SgrmBroker", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SharedAccess", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "SharedRealitySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "ShellHWDetection", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SmsRouter", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Spooler", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SstpSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "StateRepository", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "StiSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "StorSvc", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "SysMain", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "SystemEventsBroker", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TabletInputService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TapiSrv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TermService", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TextInputManagementService", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Themes", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TieringEngineService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TimeBroker", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TimeBrokerSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TokenBroker", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TrkWks", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "TroubleshootingSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "TrustedInstaller", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UI0Detect", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UdkUserSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UevAgentService", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "UmRdpService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UnistoreSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UserDataSvc_*", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "UserManager", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "UsoSvc", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "VGAuthService", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "VMTools", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "VSS", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "VacSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "VaultSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "W32Time", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WEPHOSTSVC", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WFDSConMgrSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WMPNetworkSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WManSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WPDBusEnum", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WSService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WSearch", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "WaaSMedicSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WalletService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WarpJITSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WbioSrvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Wcmsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "WcsPlugInService", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WdNisSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WdiServiceHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WdiSystemHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WebClient", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Wecsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WerSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WiaRpc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WinDefend", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "WinHttpAutoProxySvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WinRM", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "Winmgmt", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "WlanSvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "WpcMonSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "WpnService", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "WpnUserService_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "XblAuthManager", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "XblGameSave", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "XboxGipSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "XboxNetApiSvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "autotimesvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "bthserv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "camsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "cbdhsvc_*", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "cloudidsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "dcsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "defragsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "diagnosticshub.standardcollector.service", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "diagsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "dmwappushservice", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "dot3svc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "edgeupdate", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "edgeupdatem", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "embeddedmode", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "fdPHost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "fhsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "gpsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "hidserv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "icssvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "iphlpsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "lfsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "lltdsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "lmhosts", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "mpssvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "msiserver", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "netprofm", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "nsi", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "p2pimsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "p2psvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "perceptionsimulation", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "pla", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "seclogon", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "shpamsvc", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "smphost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "spectrum", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "sppsvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "ssh-agent", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "svsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "swprv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "tiledatamodelsvc", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "tzautoupdate", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "uhssvc", - "StartupType": "Disabled", - "OriginalType": "Disabled" - }, - { - "Name": "upnphost", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vds", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vm3dservice", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "vmicguestinterface", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmicheartbeat", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmickvpexchange", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmicrdv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmicshutdown", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmictimesync", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmicvmsession", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmicvss", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "vmvss", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wbengine", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wcncsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "webthreatdefsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "webthreatdefusersvc_*", - "StartupType": "Automatic", - "OriginalType": "Automatic" - }, - { - "Name": "wercplsupport", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wisvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wlidsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wlpasvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wmiApSrv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "workfolderssvc", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wscsvc", - "StartupType": "AutomaticDelayedStart", - "OriginalType": "Automatic" - }, - { - "Name": "wuauserv", - "StartupType": "Manual", - "OriginalType": "Manual" - }, - { - "Name": "wudfsvc", - "StartupType": "Manual", - "OriginalType": "Manual" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Services" -} -``` - -</details> - -## Service Changes - -Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed. - -You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications). - -### Service Name: AJRouter - -**Startup Type:** Disabled - -**Original Type:** Manual - -### Service Name: ALG - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: AppIDSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: AppMgmt - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: AppReadiness - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: AppVClient - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: AppXSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Appinfo - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: AssignedAccessManagerSvc - -**Startup Type:** Disabled - -**Original Type:** Manual - -### Service Name: AudioEndpointBuilder - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: AudioSrv - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: Audiosrv - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: AxInstSV - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BDESVC - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BFE - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: BITS - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: BTAGService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BcastDVRUserService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BluetoothUserService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BrokerInfrastructure - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: Browser - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: BthAvctpSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: BthHFSrv - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: CDPSvc - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: CDPUserSvc_* - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: COMSysApp - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: CaptureService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: CertPropSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: ClipSVC - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: ConsentUxUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: CoreMessagingRegistrar - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: CredentialEnrollmentManagerUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: CryptSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: CscService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DPS - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: DcomLaunch - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: DcpSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DevQueryBroker - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DeviceAssociationBrokerSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DeviceAssociationService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DeviceInstall - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DevicePickerUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DevicesFlowUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Dhcp - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: DiagTrack - -**Startup Type:** Disabled - -**Original Type:** Automatic - -### Service Name: DialogBlockingService - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: DispBrokerDesktopSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: DisplayEnhancementService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DmEnrollmentSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Dnscache - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: DoSvc - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: DsSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DsmSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: DusmSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: EFS - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: EapHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: EntAppSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: EventLog - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: EventSystem - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: FDResPub - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Fax - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: FontCache - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: FrameServer - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: FrameServerMonitor - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: GraphicsPerfSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: HomeGroupListener - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: HomeGroupProvider - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: HvHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: IEEtwCollectorService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: IKEEXT - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: InstallService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: InventorySvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: IpxlatCfgSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: KeyIso - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: KtmRm - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: LSM - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: LanmanServer - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: LanmanWorkstation - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: LicenseManager - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: LxpSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MSDTC - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MSiSCSI - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MapsBroker - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: McpManagementService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MessagingService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MicrosoftEdgeElevationService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MixedRealityOpenXRSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: MpsSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: MsKeyboardFilter - -**Startup Type:** Manual - -**Original Type:** Disabled - -### Service Name: NPSMSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NaturalAuthentication - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NcaSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NcbService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NcdAutoSetup - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NetSetupSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NetTcpPortSharing - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: Netlogon - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: Netman - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NgcCtnrSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NgcSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: NlaSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: OneSyncSvc_* - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: P9RdrService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PNRPAutoReg - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PNRPsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PcaSvc - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: PeerDistSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PenService_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PerfHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PhoneSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PimIndexMaintenanceSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PlugPlay - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PolicyAgent - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Power - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: PrintNotify - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: PrintWorkflowUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: ProfSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: PushToInstall - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: QWAVE - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RasAuto - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RasMan - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RemoteAccess - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: RemoteRegistry - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: RetailDemo - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RmSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RpcEptMapper - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: RpcLocator - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: RpcSs - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SCPolicySvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SCardSvr - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SDRSVC - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SEMgrSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SENS - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SNMPTRAP - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SNMPTrap - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SSDPSRV - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SamSs - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: ScDeviceEnum - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Schedule - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SecurityHealthService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Sense - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SensorDataService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SensorService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SensrSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SessionEnv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SgrmBroker - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SharedAccess - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: SharedRealitySvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: ShellHWDetection - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SmsRouter - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Spooler - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SstpSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: StateRepository - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: StiSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: StorSvc - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: SysMain - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: SystemEventsBroker - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: TabletInputService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TapiSrv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TermService - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: TextInputManagementService - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: Themes - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: TieringEngineService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TimeBroker - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TimeBrokerSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TokenBroker - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TrkWks - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: TroubleshootingSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: TrustedInstaller - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UI0Detect - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UdkUserSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UevAgentService - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: UmRdpService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UnistoreSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UserDataSvc_* - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: UserManager - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: UsoSvc - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: VGAuthService - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: VMTools - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: VSS - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: VacSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: VaultSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: W32Time - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WEPHOSTSVC - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WFDSConMgrSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WMPNetworkSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WManSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WPDBusEnum - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WSService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WSearch - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: WaaSMedicSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WalletService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WarpJITSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WbioSrvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Wcmsvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: WcsPlugInService - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WdNisSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WdiServiceHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WdiSystemHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WebClient - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Wecsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WerSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WiaRpc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WinDefend - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: WinHttpAutoProxySvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WinRM - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: Winmgmt - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: WlanSvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: WpcMonSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: WpnService - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: WpnUserService_* - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: XblAuthManager - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: XblGameSave - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: XboxGipSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: XboxNetApiSvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: autotimesvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: bthserv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: camsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: cbdhsvc_* - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: cloudidsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: dcsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: defragsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: diagnosticshub.standardcollector.service - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: diagsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: dmwappushservice - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: dot3svc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: edgeupdate - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: edgeupdatem - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: embeddedmode - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: fdPHost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: fhsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: gpsvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: hidserv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: icssvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: iphlpsvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: lfsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: lltdsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: lmhosts - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: mpssvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: msiserver - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: netprofm - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: nsi - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: p2pimsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: p2psvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: perceptionsimulation - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: pla - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: seclogon - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: shpamsvc - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: smphost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: spectrum - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: sppsvc - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: ssh-agent - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: svsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: swprv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: tiledatamodelsvc - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: tzautoupdate - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: uhssvc - -**Startup Type:** Disabled - -**Original Type:** Disabled - -### Service Name: upnphost - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vds - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vm3dservice - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: vmicguestinterface - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmicheartbeat - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmickvpexchange - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmicrdv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmicshutdown - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmictimesync - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmicvmsession - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmicvss - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: vmvss - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wbengine - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wcncsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: webthreatdefsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: webthreatdefusersvc_* - -**Startup Type:** Automatic - -**Original Type:** Automatic - -### Service Name: wercplsupport - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wisvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wlidsvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wlpasvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wmiApSrv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: workfolderssvc - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wscsvc - -**Startup Type:** AutomaticDelayedStart - -**Original Type:** Automatic - -### Service Name: wuauserv - -**Startup Type:** Manual - -**Original Type:** Manual - -### Service Name: wudfsvc - -**Startup Type:** Manual - -**Original Type:** Manual - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Storage.md b/docs/dev/tweaks/Essential-Tweaks/Storage.md deleted file mode 100644 index 2a26929fee..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Storage.md +++ /dev/null @@ -1,57 +0,0 @@ -# Disable Storage Sense - -Last Updated: 2024-08-07 - - -!!! 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 - -Storage Sense deletes temp files automatically. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Storage Sense", - "Description": "Storage Sense deletes temp files automatically.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "InvokeScript": [ - "Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 0 -Type Dword -Force" - ], - "UndoScript": [ - "Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 1 -Type Dword -Force" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Storage" -} -``` - -</details> - -## Invoke Script - -```powershell -Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Value 0 -Type Dword -Force - -``` -## Undo Script - -```powershell -Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Name "01" -Value 1 -Type Dword -Force - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Tele.md b/docs/dev/tweaks/Essential-Tweaks/Tele.md deleted file mode 100644 index 648398b637..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Tele.md +++ /dev/null @@ -1,830 +0,0 @@ -# Disable Telemetry - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Telemetry", - "Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a003_", - "ScheduledTask": [ - { - "Name": "Microsoft\\Windows\\Application Experience\\Microsoft Compatibility Appraiser", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\ProgramDataUpdater", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Autochk\\Proxy", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Customer Experience Improvement Program\\Consolidator", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Customer Experience Improvement Program\\UsbCeip", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\DiskDiagnostic\\Microsoft-Windows-DiskDiagnosticDataCollector", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Feedback\\Siuf\\DmClient", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Feedback\\Siuf\\DmClientOnScenarioDownload", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Windows Error Reporting\\QueueReporting", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\MareBackup", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\StartupAppTask", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Application Experience\\PcaPatchDbTask", - "State": "Disabled", - "OriginalState": "Enabled" - }, - { - "Name": "Microsoft\\Windows\\Maps\\MapsUpdateTask", - "State": "Disabled", - "OriginalState": "Enabled" - } - ], - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\DataCollection", - "Type": "DWord", - "Value": "0", - "Name": "AllowTelemetry", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", - "OriginalValue": "1", - "Name": "AllowTelemetry", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "ContentDeliveryAllowed", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "OemPreInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "PreInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "PreInstalledAppsEverEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SilentInstalledAppsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338387Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338388Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-338389Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SubscribedContent-353698Enabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ContentDeliveryManager", - "OriginalValue": "1", - "Name": "SystemPaneSuggestionsEnabled", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules", - "OriginalValue": "0", - "Name": "NumberOfSIUFInPeriod", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\DataCollection", - "OriginalValue": "0", - "Name": "DoNotShowFeedbackNotifications", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent", - "OriginalValue": "0", - "Name": "DisableTailoredExperiencesWithDiagnosticData", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\AdvertisingInfo", - "OriginalValue": "0", - "Name": "DisabledByGroupPolicy", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting", - "OriginalValue": "0", - "Name": "Disabled", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DeliveryOptimization\\Config", - "OriginalValue": "1", - "Name": "DODownloadMode", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance", - "OriginalValue": "1", - "Name": "fAllowToGetHelp", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\OperationStatusManager", - "OriginalValue": "0", - "Name": "EnthusiastMode", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "ShowTaskViewButton", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\People", - "OriginalValue": "1", - "Name": "PeopleBand", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "LaunchTo", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem", - "OriginalValue": "0", - "Name": "LongPathsEnabled", - "Value": "1", - "Type": "DWord" - }, - { - "_Comment": "Driver searching is a function that should be left in", - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DriverSearching", - "OriginalValue": "1", - "Name": "SearchOrderConfig", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile", - "OriginalValue": "1", - "Name": "SystemResponsiveness", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile", - "OriginalValue": "1", - "Name": "NetworkThrottlingIndex", - "Value": "4294967295", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "MenuShowDelay", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "AutoEndTasks", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management", - "OriginalValue": "0", - "Name": "ClearPageFileAtShutdown", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKLM:\\SYSTEM\\ControlSet001\\Services\\Ndu", - "OriginalValue": "1", - "Name": "Start", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Control Panel\\Mouse", - "OriginalValue": "400", - "Name": "MouseHoverTime", - "Value": "400", - "Type": "String" - }, - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Parameters", - "OriginalValue": "20", - "Name": "IRPStackSize", - "Value": "30", - "Type": "DWord" - }, - { - "Path": "HKCU:\\SOFTWARE\\Policies\\Microsoft\\Windows\\Windows Feeds", - "OriginalValue": "1", - "Name": "EnableFeeds", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Feeds", - "OriginalValue": "1", - "Name": "ShellFeedsTaskbarViewMode", - "Value": "2", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", - "OriginalValue": "1", - "Name": "HideSCAMeetNow", - "Value": "1", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement", - "OriginalValue": "1", - "Name": "ScoobeSystemSettingEnabled", - "Value": "0", - "Type": "DWord" - } - ], - "InvokeScript": [ - " - bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null - If ((get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name CurrentBuild).CurrentBuild -lt 22557) { - $taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru - Do { - Start-Sleep -Milliseconds 100 - $preferences = Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -ErrorAction SilentlyContinue - } Until ($preferences) - Stop-Process $taskmgr - $preferences.Preferences[28] = 0 - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\TaskManager\" -Name \"Preferences\" -Type Binary -Value $preferences.Preferences - } - Remove-Item -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MyComputer\\NameSpace\\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}\" -Recurse -ErrorAction SilentlyContinue - - # Fix Managed by your organization in Edge if regustry path exists then remove it - - If (Test-Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\") { - Remove-Item -Path \"HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge\" -Recurse -ErrorAction SilentlyContinue - } - - # Group svchost.exe processes - $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb - Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name \"SvcHostSplitThresholdInKB\" -Type DWord -Value $ram -Force - - $autoLoggerDir = \"$env:PROGRAMDATA\\Microsoft\\Diagnosis\\ETLLogs\\AutoLogger\" - If (Test-Path \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\") { - Remove-Item \"$autoLoggerDir\\AutoLogger-Diagtrack-Listener.etl\" - } - icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null - - # Disable Defender Auto Sample Submission - Set-MpPreference -SubmitSamplesConsent 2 -ErrorAction SilentlyContinue | Out-Null - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Tele" -} -``` - -</details> - -## Invoke Script - -```powershell - - bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null - If ((get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name CurrentBuild).CurrentBuild -lt 22557) { - $taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru - Do { - Start-Sleep -Milliseconds 100 - $preferences = Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -ErrorAction SilentlyContinue - } Until ($preferences) - Stop-Process $taskmgr - $preferences.Preferences[28] = 0 - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -Type Binary -Value $preferences.Preferences - } - Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" -Recurse -ErrorAction SilentlyContinue - - # Fix Managed by your organization in Edge if regustry path exists then remove it - - If (Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Edge") { - Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Edge" -Recurse -ErrorAction SilentlyContinue - } - - # Group svchost.exe processes - $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $ram -Force - - $autoLoggerDir = "$env:PROGRAMDATA\Microsoft\Diagnosis\ETLLogs\AutoLogger" - If (Test-Path "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl") { - Remove-Item "$autoLoggerDir\AutoLogger-Diagtrack-Listener.etl" - } - icacls $autoLoggerDir /deny SYSTEM:`(OI`)`(CI`)F | Out-Null - - # Disable Defender Auto Sample Submission - Set-MpPreference -SubmitSamplesConsent 2 -ErrorAction SilentlyContinue | Out-Null - - -``` -## 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: AllowTelemetry - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: AllowTelemetry - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ContentDeliveryAllowed - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: OemPreInstalledAppsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PreInstalledAppsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PreInstalledAppsEverEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SilentInstalledAppsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SubscribedContent-338387Enabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SubscribedContent-338388Enabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SubscribedContent-338389Enabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SubscribedContent-353698Enabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SystemPaneSuggestionsEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: NumberOfSIUFInPeriod - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 0 - -### Registry Key: DoNotShowFeedbackNotifications - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: DisableTailoredExperiencesWithDiagnosticData - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: DisabledByGroupPolicy - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: Disabled - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: DODownloadMode - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: fAllowToGetHelp - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: EnthusiastMode - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: ShowTaskViewButton - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: PeopleBand - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: LaunchTo - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: LongPathsEnabled - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: SearchOrderConfig - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: SystemResponsiveness - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: NetworkThrottlingIndex - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 4294967295 - -### Registry Key: MenuShowDelay - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: AutoEndTasks - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: ClearPageFileAtShutdown - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 0 - -### Registry Key: Start - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 2 - -### Registry Key: MouseHoverTime - -**Type:** String - -**Original Value:** 400 - -**New Value:** 400 - -### Registry Key: IRPStackSize - -**Type:** DWord - -**Original Value:** 20 - -**New Value:** 30 - -### Registry Key: EnableFeeds - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ShellFeedsTaskbarViewMode - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 2 - -### Registry Key: HideSCAMeetNow - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 1 - -### Registry Key: ScoobeSystemSettingEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - -## Scheduled Task Changes - -Windows scheduled tasks are used to run scripts or programs at specific times or events. Disabling unnecessary tasks can improve system performance and reduce unwanted background activity. - - -You can find information about scheduled tasks on [Wikipedia](https://www.wikiwand.com/en/Windows_Task_Scheduler) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/desktop/taskschd/about-the-task-scheduler). - -### Task Name: Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Application Experience\ProgramDataUpdater - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Autochk\Proxy - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Customer Experience Improvement Program\Consolidator - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Customer Experience Improvement Program\UsbCeip - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Feedback\Siuf\DmClient - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Windows Error Reporting\QueueReporting - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Application Experience\MareBackup - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Application Experience\StartupAppTask - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Application Experience\PcaPatchDbTask - -**State:** Disabled - -**Original State:** Enabled - -### Task Name: Microsoft\Windows\Maps\MapsUpdateTask - -**State:** Disabled - -**Original State:** Enabled - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Essential-Tweaks/Wifi.md b/docs/dev/tweaks/Essential-Tweaks/Wifi.md deleted file mode 100644 index 9610ae7758..0000000000 --- a/docs/dev/tweaks/Essential-Tweaks/Wifi.md +++ /dev/null @@ -1,78 +0,0 @@ -# Disable Wifi-Sense - -Last Updated: 2024-08-07 - - -!!! 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 - -Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Wifi-Sense", - "Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.", - "category": "Essential Tweaks", - "panel": "1", - "Order": "a005_", - "registry": [ - { - "Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting", - "Name": "Value", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - }, - { - "Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowAutoConnectToWiFiSenseHotspots", - "Name": "Value", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/Essential-Tweaks/Wifi" -} -``` - -</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: Value - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: Value - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Performance-Plans/AddUltPerf.md b/docs/dev/tweaks/Performance-Plans/AddUltPerf.md deleted file mode 100644 index 3565cfc6fb..0000000000 --- a/docs/dev/tweaks/Performance-Plans/AddUltPerf.md +++ /dev/null @@ -1,97 +0,0 @@ -# Add and Activate Ultimate Performance Profile - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Add and Activate Ultimate Performance Profile", - "category": "Performance Plans", - "panel": "2", - "Order": "a080_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/AddUltPerf" -} -``` - -</details> - -## Function: Invoke-WPFUltimatePerformance - -```powershell -Function Invoke-WPFUltimatePerformance { - <# - - .SYNOPSIS - Creates or removes the Ultimate Performance power scheme - - .PARAMETER State - Indicates whether to enable or disable the Ultimate Performance power scheme - - #> - param($State) - try { - # Check if Ultimate Performance plan is installed - $ultimatePlan = powercfg -list | Select-String -Pattern "Ultimate Performance" - if($state -eq "Enable") { - if ($ultimatePlan) { - Write-Host "Ultimate Performance plan is already installed." - } else { - Write-Host "Installing Ultimate Performance plan..." - powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 - Write-Host "> Ultimate Performance plan installed." - } - - # Set the Ultimate Performance plan as active - $ultimatePlanGUID = (powercfg -list | Select-String -Pattern "Ultimate Performance").Line.Split()[3] - powercfg -setactive $ultimatePlanGUID - - Write-Host "Ultimate Performance plan is now active." - - - } - elseif($state -eq "Disable") { - if ($ultimatePlan) { - # Extract the GUID of the Ultimate Performance plan - $ultimatePlanGUID = $ultimatePlan.Line.Split()[3] - - # Set a different power plan as active before deleting the Ultimate Performance plan - $balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3] - powercfg -setactive $balancedPlanGUID - - # Delete the Ultimate Performance plan - powercfg -delete $ultimatePlanGUID - - Write-Host "Ultimate Performance plan has been uninstalled." - Write-Host "> Balanced plan is now active." - } else { - Write-Host "Ultimate Performance plan is not installed." - } - } - } catch { - Write-Warning $psitem.Exception.Message - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/Performance-Plans/RemoveUltPerf.md b/docs/dev/tweaks/Performance-Plans/RemoveUltPerf.md deleted file mode 100644 index 10ca678d4a..0000000000 --- a/docs/dev/tweaks/Performance-Plans/RemoveUltPerf.md +++ /dev/null @@ -1,97 +0,0 @@ -# Remove Ultimate Performance Profile - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove Ultimate Performance Profile", - "category": "Performance Plans", - "panel": "2", - "Order": "a081_", - "Type": "Button", - "ButtonWidth": "300", - "link": "https://christitustech.github.io/winutil/dev/tweaks/Performance-Plans/RemoveUltPerf" -} -``` - -</details> - -## Function: Invoke-WPFUltimatePerformance - -```powershell -Function Invoke-WPFUltimatePerformance { - <# - - .SYNOPSIS - Creates or removes the Ultimate Performance power scheme - - .PARAMETER State - Indicates whether to enable or disable the Ultimate Performance power scheme - - #> - param($State) - try { - # Check if Ultimate Performance plan is installed - $ultimatePlan = powercfg -list | Select-String -Pattern "Ultimate Performance" - if($state -eq "Enable") { - if ($ultimatePlan) { - Write-Host "Ultimate Performance plan is already installed." - } else { - Write-Host "Installing Ultimate Performance plan..." - powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 - Write-Host "> Ultimate Performance plan installed." - } - - # Set the Ultimate Performance plan as active - $ultimatePlanGUID = (powercfg -list | Select-String -Pattern "Ultimate Performance").Line.Split()[3] - powercfg -setactive $ultimatePlanGUID - - Write-Host "Ultimate Performance plan is now active." - - - } - elseif($state -eq "Disable") { - if ($ultimatePlan) { - # Extract the GUID of the Ultimate Performance plan - $ultimatePlanGUID = $ultimatePlan.Line.Split()[3] - - # Set a different power plan as active before deleting the Ultimate Performance plan - $balancedPlanGUID = (powercfg -list | Select-String -Pattern "Balanced").Line.Split()[3] - powercfg -setactive $balancedPlanGUID - - # Delete the Ultimate Performance plan - powercfg -delete $ultimatePlanGUID - - Write-Host "Ultimate Performance plan has been uninstalled." - Write-Host "> Balanced plan is now active." - } else { - Write-Host "Ultimate Performance plan is not installed." - } - } - } catch { - Write-Warning $psitem.Exception.Message - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md deleted file mode 100644 index a4683703f8..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md +++ /dev/null @@ -1,245 +0,0 @@ -# Adobe Network Block - -Last Updated: 2024-08-07 - - -!!! 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 - -Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Adobe Network Block", - "Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a021_", - "InvokeScript": [ - " - # Define the URL of the remote HOSTS file and the local paths - $remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\" - $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" - $tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\" - - # Download the remote HOSTS file to a temporary location - try { - Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath - Write-Output \"Downloaded the remote HOSTS file to a temporary location.\" - } catch { - Write-Error \"Failed to download the HOSTS file. Error: $_\" - } - - # Check if the AdobeNetBlock has already been started - try { - $localHostsContent = Get-Content $localHostsPath -ErrorAction Stop - - # Check if AdobeNetBlock markers exist - $blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\" - if ($blockStartExists) { - Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\" - } else { - # Load the new block from the downloaded file - $newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop - $newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments - $newBlockHeader = \"#AdobeNetBlock-start\" - $newBlockFooter = \"#AdobeNetBlock-end\" - - # Combine the contents, ensuring new block is properly formatted - $combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String - - # Write the combined content back to the original HOSTS file - $combinedContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output \"Successfully added the AdobeNetBlock.\" - } - } catch { - Write-Error \"Error during processing: $_\" - } - - # Clean up temporary file - Remove-Item $tempHostsPath -ErrorAction Ignore - - # Flush the DNS resolver cache - try { - Invoke-Expression \"ipconfig /flushdns\" - Write-Output \"DNS cache flushed successfully.\" - } catch { - Write-Error \"Failed to flush DNS cache. Error: $_\" - } - " - ], - "UndoScript": [ - " - # Define the local path of the HOSTS file - $localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\" - - # Load the content of the HOSTS file - try { - $hostsContent = Get-Content $localHostsPath -ErrorAction Stop - } catch { - Write-Error \"Failed to load the HOSTS file. Error: $_\" - return - } - - # Initialize flags and buffer for new content - $recording = $true - $newContent = @() - - # Iterate over each line of the HOSTS file - foreach ($line in $hostsContent) { - if ($line -match \"#AdobeNetBlock-start\") { - $recording = $false - } - if ($recording) { - $newContent += $line - } - if ($line -match \"#AdobeNetBlock-end\") { - $recording = $true - } - } - - # Write the filtered content back to the HOSTS file - try { - $newContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\" - } catch { - Write-Error \"Failed to write back to the HOSTS file. Error: $_\" - } - - # Flush the DNS resolver cache - try { - Invoke-Expression \"ipconfig /flushdns\" - Write-Output \"DNS cache flushed successfully.\" - } catch { - Write-Error \"Failed to flush DNS cache. Error: $_\" - } - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet" -} -``` - -</details> - -## Invoke Script - -```powershell - - # Define the URL of the remote HOSTS file and the local paths - $remoteHostsUrl = "https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts" - $localHostsPath = "C:\Windows\System32\drivers\etc\hosts" - $tempHostsPath = "C:\Windows\System32\drivers\etc\temp_hosts" - - # Download the remote HOSTS file to a temporary location - try { - Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath - Write-Output "Downloaded the remote HOSTS file to a temporary location." - } catch { - Write-Error "Failed to download the HOSTS file. Error: $_" - } - - # Check if the AdobeNetBlock has already been started - try { - $localHostsContent = Get-Content $localHostsPath -ErrorAction Stop - - # Check if AdobeNetBlock markers exist - $blockStartExists = $localHostsContent -like "*#AdobeNetBlock-start*" - if ($blockStartExists) { - Write-Output "AdobeNetBlock-start already exists. Skipping addition of new block." - } else { - # Load the new block from the downloaded file - $newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop - $newBlockContent = $newBlockContent | Where-Object { $_ -notmatch "^\s*#" -and $_ -ne "" } # Exclude empty lines and comments - $newBlockHeader = "#AdobeNetBlock-start" - $newBlockFooter = "#AdobeNetBlock-end" - - # Combine the contents, ensuring new block is properly formatted - $combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String - - # Write the combined content back to the original HOSTS file - $combinedContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output "Successfully added the AdobeNetBlock." - } - } catch { - Write-Error "Error during processing: $_" - } - - # Clean up temporary file - Remove-Item $tempHostsPath -ErrorAction Ignore - - # Flush the DNS resolver cache - try { - Invoke-Expression "ipconfig /flushdns" - Write-Output "DNS cache flushed successfully." - } catch { - Write-Error "Failed to flush DNS cache. Error: $_" - } - - -``` -## Undo Script - -```powershell - - # Define the local path of the HOSTS file - $localHostsPath = "C:\Windows\System32\drivers\etc\hosts" - - # Load the content of the HOSTS file - try { - $hostsContent = Get-Content $localHostsPath -ErrorAction Stop - } catch { - Write-Error "Failed to load the HOSTS file. Error: $_" - return - } - - # Initialize flags and buffer for new content - $recording = $true - $newContent = @() - - # Iterate over each line of the HOSTS file - foreach ($line in $hostsContent) { - if ($line -match "#AdobeNetBlock-start") { - $recording = $false - } - if ($recording) { - $newContent += $line - } - if ($line -match "#AdobeNetBlock-end") { - $recording = $true - } - } - - # Write the filtered content back to the HOSTS file - try { - $newContent | Set-Content $localHostsPath -Encoding ASCII - Write-Output "Successfully removed the AdobeNetBlock section from the HOSTS file." - } catch { - Write-Error "Failed to write back to the HOSTS file. Error: $_" - } - - # Flush the DNS resolver cache - try { - Invoke-Expression "ipconfig /flushdns" - Write-Output "DNS cache flushed successfully." - } catch { - Write-Error "Failed to flush DNS cache. Error: $_" - } - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md deleted file mode 100644 index c5b0e205ac..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md +++ /dev/null @@ -1,189 +0,0 @@ -# Remove ALL MS Store Apps - NOT RECOMMENDED - -Last Updated: 2024-08-07 - - -!!! 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 - -USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED! - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove ALL MS Store Apps - NOT RECOMMENDED", - "Description": "USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a028_", - "appx": [ - "Microsoft.Microsoft3DViewer", - "Microsoft.AppConnector", - "Microsoft.BingFinance", - "Microsoft.BingNews", - "Microsoft.BingSports", - "Microsoft.BingTranslator", - "Microsoft.BingWeather", - "Microsoft.BingFoodAndDrink", - "Microsoft.BingHealthAndFitness", - "Microsoft.BingTravel", - "Microsoft.MinecraftUWP", - "Microsoft.GamingServices", - "Microsoft.GetHelp", - "Microsoft.Getstarted", - "Microsoft.Messaging", - "Microsoft.Microsoft3DViewer", - "Microsoft.MicrosoftSolitaireCollection", - "Microsoft.NetworkSpeedTest", - "Microsoft.News", - "Microsoft.Office.Lens", - "Microsoft.Office.Sway", - "Microsoft.Office.OneNote", - "Microsoft.OneConnect", - "Microsoft.People", - "Microsoft.Print3D", - "Microsoft.SkypeApp", - "Microsoft.Wallet", - "Microsoft.Whiteboard", - "Microsoft.WindowsAlarms", - "microsoft.windowscommunicationsapps", - "Microsoft.WindowsFeedbackHub", - "Microsoft.WindowsMaps", - "Microsoft.YourPhone", - "Microsoft.WindowsSoundRecorder", - "Microsoft.XboxApp", - "Microsoft.ConnectivityStore", - "Microsoft.ScreenSketch", - "Microsoft.Xbox.TCUI", - "Microsoft.XboxGameOverlay", - "Microsoft.XboxGameCallableUI", - "Microsoft.XboxSpeechToTextOverlay", - "Microsoft.MixedReality.Portal", - "Microsoft.XboxIdentityProvider", - "Microsoft.ZuneMusic", - "Microsoft.ZuneVideo", - "Microsoft.Getstarted", - "Microsoft.MicrosoftOfficeHub", - "*EclipseManager*", - "*ActiproSoftwareLLC*", - "*AdobeSystemsIncorporated.AdobePhotoshopExpress*", - "*Duolingo-LearnLanguagesforFree*", - "*PandoraMediaInc*", - "*CandyCrush*", - "*BubbleWitch3Saga*", - "*Wunderlist*", - "*Flipboard*", - "*Twitter*", - "*Facebook*", - "*Royal Revolt*", - "*Sway*", - "*Speed Test*", - "*Dolby*", - "*Viber*", - "*ACGMediaPlayer*", - "*Netflix*", - "*OneCalendar*", - "*LinkedInforWindows*", - "*HiddenCityMysteryofShadows*", - "*Hulu*", - "*HiddenCity*", - "*AdobePhotoshopExpress*", - "*HotspotShieldFreeVPN*", - "*Microsoft.Advertising.Xaml*" - ], - "InvokeScript": [ - " - $TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams') - $TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe') - - Write-Host \"Stopping Teams process...\" - Stop-Process -Name \"*teams*\" -Force -ErrorAction SilentlyContinue - - Write-Host \"Uninstalling Teams from AppData\\Microsoft\\Teams\" - if ([System.IO.File]::Exists($TeamsUpdateExePath)) { - # Uninstall app - $proc = Start-Process $TeamsUpdateExePath \"-uninstall -s\" -PassThru - $proc.WaitForExit() - } - - Write-Host \"Removing Teams AppxPackage...\" - Get-AppxPackage \"*Teams*\" | Remove-AppxPackage -ErrorAction SilentlyContinue - Get-AppxPackage \"*Teams*\" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue - - Write-Host \"Deleting Teams directory\" - if ([System.IO.Directory]::Exists($TeamsPath)) { - Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue - } - - Write-Host \"Deleting Teams uninstall registry key\" - # Uninstall from Uninstall registry key UninstallString - $us = (Get-ChildItem -Path HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall, HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString - if ($us.Length -gt 0) { - $us = ($us.Replace('/I', '/uninstall ') + ' /quiet').Replace(' ', ' ') - $FilePath = ($us.Substring(0, $us.IndexOf('.exe') + 4).Trim()) - $ProcessArgs = ($us.Substring($us.IndexOf('.exe') + 5).Trim().replace(' ', ' ')) - $proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru - $proc.WaitForExit() - } - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat" -} -``` - -</details> - -## Invoke Script - -```powershell - - $TeamsPath = [System.IO.Path]::Combine($env:LOCALAPPDATA, 'Microsoft', 'Teams') - $TeamsUpdateExePath = [System.IO.Path]::Combine($TeamsPath, 'Update.exe') - - Write-Host "Stopping Teams process..." - Stop-Process -Name "*teams*" -Force -ErrorAction SilentlyContinue - - Write-Host "Uninstalling Teams from AppData\Microsoft\Teams" - if ([System.IO.File]::Exists($TeamsUpdateExePath)) { - # Uninstall app - $proc = Start-Process $TeamsUpdateExePath "-uninstall -s" -PassThru - $proc.WaitForExit() - } - - Write-Host "Removing Teams AppxPackage..." - Get-AppxPackage "*Teams*" | Remove-AppxPackage -ErrorAction SilentlyContinue - Get-AppxPackage "*Teams*" -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue - - Write-Host "Deleting Teams directory" - if ([System.IO.Directory]::Exists($TeamsPath)) { - Remove-Item $TeamsPath -Force -Recurse -ErrorAction SilentlyContinue - } - - Write-Host "Deleting Teams uninstall registry key" - # Uninstall from Uninstall registry key UninstallString - $us = (Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like '*Teams*'}).UninstallString - if ($us.Length -gt 0) { - $us = ($us.Replace('/I', '/uninstall ') + ' /quiet').Replace(' ', ' ') - $FilePath = ($us.Substring(0, $us.IndexOf('.exe') + 4).Trim()) - $ProcessArgs = ($us.Substring($us.IndexOf('.exe') + 5).Trim().replace(' ', ' ')) - $proc = Start-Process -FilePath $FilePath -Args $ProcessArgs -PassThru - $proc.WaitForExit() - } - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md deleted file mode 100644 index ad05c612c5..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md +++ /dev/null @@ -1,342 +0,0 @@ -# Adobe Debloat - -Last Updated: 2024-08-07 - - -!!! 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 - -Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Adobe Debloat", - "Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a021_", - "InvokeScript": [ - " - function CCStopper { - $path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" - - # Test if the path exists before proceeding - if (Test-Path $path) { - Takeown /f $path - $acl = Get-Acl $path - $acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\") - $acl | Set-Acl $path - - Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force - } else { - Write-Host \"Adobe Desktop Service is not in the default location.\" - } - } - - - function AcrobatUpdates { - # Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script. - # Possible Values for the edited key: - # 0 = Do not download or install updates automatically - # 2 = Automatically download updates but let the user choose when to install them - # 3 = Automatically download and install updates (default value) - # 4 = Notify the user when an update is available but don't download or install it automatically - # = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing. - - $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 0 - Write-Host \"Acrobat Updates have been disabled.\" - } catch { - Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" - } - } - } - - CCStopper - AcrobatUpdates - " - ], - "UndoScript": [ - " - function RestoreCCService { - $originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\" - $newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\" - - if (Test-Path -Path $originalPath) { - Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force - Write-Host \"Adobe Desktop Service has been restored.\" - } else { - Write-Host \"Backup file does not exist. No changes were made.\" - } - } - - function AcrobatUpdates { - # Default Value: - # 3 = Automatically download and install updates - - $rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 3 - } catch { - Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\" - } - } - } - - RestoreCCService - AcrobatUpdates - " - ], - "service": [ - { - "Name": "AGSService", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AGMService", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AdobeUpdateService", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Acrobat Update", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Genuine Monitor Service", - "StartupType": "Disabled", - "OriginalType": "Automatic" - }, - { - "Name": "AdobeARMservice", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "Adobe Licensing Console", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "CCXProcess", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "AdobeIPCBroker", - "StartupType": "Manual", - "OriginalType": "Automatic" - }, - { - "Name": "CoreSync", - "StartupType": "Manual", - "OriginalType": "Automatic" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe" -} -``` - -</details> - -## Invoke Script - -```powershell - - function CCStopper { - $path = "C:\Program Files (x86)\Common Files\Adobe\Adobe Desktop Common\ADS\Adobe Desktop Service.exe" - - # Test if the path exists before proceeding - if (Test-Path $path) { - Takeown /f $path - $acl = Get-Acl $path - $acl.SetOwner([System.Security.Principal.NTAccount]"Administrators") - $acl | Set-Acl $path - - Rename-Item -Path $path -NewName "Adobe Desktop Service.exe.old" -Force - } else { - Write-Host "Adobe Desktop Service is not in the default location." - } - } - - - function AcrobatUpdates { - # Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script. - # Possible Values for the edited key: - # 0 = Do not download or install updates automatically - # 2 = Automatically download updates but let the user choose when to install them - # 3 = Automatically download and install updates (default value) - # 4 = Notify the user when an update is available but don't download or install it automatically - # = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing. - - $rootPath = "HKLM:\SOFTWARE\WOW6432Node\Adobe\Adobe ARM\Legacy\Acrobat" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like "{*}" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 0 - Write-Host "Acrobat Updates have been disabled." - } catch { - Write-Host "Registry Key for changing Acrobat Updates does not exist in $fullPath" - } - } - } - - CCStopper - AcrobatUpdates - - -``` -## Undo Script - -```powershell - - function RestoreCCService { - $originalPath = "C:\Program Files (x86)\Common Files\Adobe\Adobe Desktop Common\ADS\Adobe Desktop Service.exe.old" - $newPath = "C:\Program Files (x86)\Common Files\Adobe\Adobe Desktop Common\ADS\Adobe Desktop Service.exe" - - if (Test-Path -Path $originalPath) { - Rename-Item -Path $originalPath -NewName "Adobe Desktop Service.exe" -Force - Write-Host "Adobe Desktop Service has been restored." - } else { - Write-Host "Backup file does not exist. No changes were made." - } - } - - function AcrobatUpdates { - # Default Value: - # 3 = Automatically download and install updates - - $rootPath = "HKLM:\SOFTWARE\WOW6432Node\Adobe\Adobe ARM\Legacy\Acrobat" - - # Get all subkeys under the specified root path - $subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like "{*}" } - - # Loop through each subkey - foreach ($subKey in $subKeys) { - # Get the full registry path - $fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName - try { - Set-ItemProperty -Path $fullPath -Name Mode -Value 3 - } catch { - Write-Host "Registry Key for changing Acrobat Updates does not exist in $fullPath" - } - } - } - - RestoreCCService - AcrobatUpdates - - -``` -## Service Changes - -Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed. - -You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications). - -### Service Name: AGSService - -**Startup Type:** Disabled - -**Original Type:** Automatic - -### Service Name: AGMService - -**Startup Type:** Disabled - -**Original Type:** Automatic - -### Service Name: AdobeUpdateService - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: Adobe Acrobat Update - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: Adobe Genuine Monitor Service - -**Startup Type:** Disabled - -**Original Type:** Automatic - -### Service Name: AdobeARMservice - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: Adobe Licensing Console - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: CCXProcess - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: AdobeIPCBroker - -**Startup Type:** Manual - -**Original Type:** Automatic - -### Service Name: CoreSync - -**Startup Type:** Manual - -**Original Type:** Automatic - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md deleted file mode 100644 index 10722d1647..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md +++ /dev/null @@ -1,63 +0,0 @@ -# Disable Background Apps - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables all Microsoft Store apps from running in the background, which has to be done individually since Win11 - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Background Apps", - "Description": "Disables all Microsoft Store apps from running in the background, which has to be done individually since Win11", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a024_", - "registry": [ - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\BackgroundAccessApplications", - "Name": "GlobalUserDisabled", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps" -} -``` - -</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: GlobalUserDisabled - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md deleted file mode 100644 index 367b1a3a80..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md +++ /dev/null @@ -1,63 +0,0 @@ -# Disable Fullscreen Optimizations - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Fullscreen Optimizations", - "Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a024_", - "registry": [ - { - "Path": "HKCU:\\System\\GameConfigStore", - "Name": "GameDVR_DXGIHonorFSEWindowsCompatible", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO" -} -``` - -</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: GameDVR_DXGIHonorFSEWindowsCompatible - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md deleted file mode 100644 index 834e0c0fcb..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md +++ /dev/null @@ -1,145 +0,0 @@ -# Disable Intel MM (vPro LMS) - -Last Updated: 2024-08-07 - - -!!! 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 - -Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Intel MM (vPro LMS)", - "Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a026_", - "InvokeScript": [ - " - Write-Host \"Kill LMS\" - $serviceName = \"LMS\" - Write-Host \"Stopping and disabling service: $serviceName\" - Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue; - Set-Service -Name $serviceName -StartupType Disabled -ErrorAction SilentlyContinue; - - Write-Host \"Removing service: $serviceName\"; - sc.exe delete $serviceName; - - Write-Host \"Removing LMS driver packages\"; - $lmsDriverPackages = Get-ChildItem -Path \"C:\\Windows\\System32\\DriverStore\\FileRepository\" -Recurse -Filter \"lms.inf*\"; - foreach ($package in $lmsDriverPackages) { - Write-Host \"Removing driver package: $($package.Name)\"; - pnputil /delete-driver $($package.Name) /uninstall /force; - } - if ($lmsDriverPackages.Count -eq 0) { - Write-Host \"No LMS driver packages found in the driver store.\"; - } else { - Write-Host \"All found LMS driver packages have been removed.\"; - } - - Write-Host \"Searching and deleting LMS executable files\"; - $programFilesDirs = @(\"C:\\Program Files\", \"C:\\Program Files (x86)\"); - $lmsFiles = @(); - foreach ($dir in $programFilesDirs) { - $lmsFiles += Get-ChildItem -Path $dir -Recurse -Filter \"LMS.exe\" -ErrorAction SilentlyContinue; - } - foreach ($file in $lmsFiles) { - Write-Host \"Taking ownership of file: $($file.FullName)\"; - & icacls $($file.FullName) /grant Administrators:F /T /C /Q; - & takeown /F $($file.FullName) /A /R /D Y; - Write-Host \"Deleting file: $($file.FullName)\"; - Remove-Item $($file.FullName) -Force -ErrorAction SilentlyContinue; - } - if ($lmsFiles.Count -eq 0) { - Write-Host \"No LMS.exe files found in Program Files directories.\"; - } else { - Write-Host \"All found LMS.exe files have been deleted.\"; - } - Write-Host 'Intel LMS vPro service has been disabled, removed, and blocked.'; - " - ], - "UndoScript": [ - " - Write-Host \"LMS vPro needs to be redownloaded from intel.com\" - - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1" -} -``` - -</details> - -## Invoke Script - -```powershell - - Write-Host "Kill LMS" - $serviceName = "LMS" - Write-Host "Stopping and disabling service: $serviceName" - Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue; - Set-Service -Name $serviceName -StartupType Disabled -ErrorAction SilentlyContinue; - - Write-Host "Removing service: $serviceName"; - sc.exe delete $serviceName; - - Write-Host "Removing LMS driver packages"; - $lmsDriverPackages = Get-ChildItem -Path "C:\Windows\System32\DriverStore\FileRepository" -Recurse -Filter "lms.inf*"; - foreach ($package in $lmsDriverPackages) { - Write-Host "Removing driver package: $($package.Name)"; - pnputil /delete-driver $($package.Name) /uninstall /force; - } - if ($lmsDriverPackages.Count -eq 0) { - Write-Host "No LMS driver packages found in the driver store."; - } else { - Write-Host "All found LMS driver packages have been removed."; - } - - Write-Host "Searching and deleting LMS executable files"; - $programFilesDirs = @("C:\Program Files", "C:\Program Files (x86)"); - $lmsFiles = @(); - foreach ($dir in $programFilesDirs) { - $lmsFiles += Get-ChildItem -Path $dir -Recurse -Filter "LMS.exe" -ErrorAction SilentlyContinue; - } - foreach ($file in $lmsFiles) { - Write-Host "Taking ownership of file: $($file.FullName)"; - & icacls $($file.FullName) /grant Administrators:F /T /C /Q; - & takeown /F $($file.FullName) /A /R /D Y; - Write-Host "Deleting file: $($file.FullName)"; - Remove-Item $($file.FullName) -Force -ErrorAction SilentlyContinue; - } - if ($lmsFiles.Count -eq 0) { - Write-Host "No LMS.exe files found in Program Files directories."; - } else { - Write-Host "All found LMS.exe files have been deleted."; - } - Write-Host 'Intel LMS vPro service has been disabled, removed, and blocked.'; - - -``` -## Undo Script - -```powershell - - Write-Host "LMS vPro needs to be redownloaded from intel.com" - - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md deleted file mode 100644 index c633ac6133..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md +++ /dev/null @@ -1,78 +0,0 @@ -# Disable Notification Tray/Calendar - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables all Notifications INCLUDING Calendar - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Notification Tray/Calendar", - "Description": "Disables all Notifications INCLUDING Calendar", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a026_", - "registry": [ - { - "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer", - "Name": "DisableNotificationCenter", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\PushNotifications", - "Name": "ToastEnabled", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications" -} -``` - -</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: DisableNotificationCenter - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: ToastEnabled - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md deleted file mode 100644 index f71affcf96..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md +++ /dev/null @@ -1,81 +0,0 @@ -# Disable IPv6 - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables IPv6. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable IPv6", - "Description": "Disables IPv6.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a023_", - "registry": [ - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", - "Name": "DisabledComponents", - "Value": "255", - "OriginalValue": "0", - "Type": "DWord" - } - ], - "InvokeScript": [ - "Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6" - ], - "UndoScript": [ - "Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix" -} -``` - -</details> - -## Invoke Script - -```powershell -Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 - -``` -## Undo Script - -```powershell -Enable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 - -``` -## 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:** 255 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md deleted file mode 100644 index e81d6891e0..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md +++ /dev/null @@ -1,261 +0,0 @@ -# Set Display for Performance - -Last Updated: 2024-08-07 - - -!!! 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 - -Sets the system preferences to performance. You can do this manually with sysdm.cpl as well. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Display for Performance", - "Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a027_", - "registry": [ - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "DragFullWindows", - "Value": "0", - "Type": "String" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop", - "OriginalValue": "1", - "Name": "MenuShowDelay", - "Value": "200", - "Type": "String" - }, - { - "Path": "HKCU:\\Control Panel\\Desktop\\WindowMetrics", - "OriginalValue": "1", - "Name": "MinAnimate", - "Value": "0", - "Type": "String" - }, - { - "Path": "HKCU:\\Control Panel\\Keyboard", - "OriginalValue": "1", - "Name": "KeyboardDelay", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "ListviewAlphaSelect", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "ListviewShadow", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "TaskbarAnimations", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VisualEffects", - "OriginalValue": "1", - "Name": "VisualFXSetting", - "Value": "3", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\DWM", - "OriginalValue": "1", - "Name": "EnableAeroPeek", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "TaskbarMn", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "TaskbarDa", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "OriginalValue": "1", - "Name": "ShowTaskViewButton", - "Value": "0", - "Type": "DWord" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Search", - "OriginalValue": "1", - "Name": "SearchboxTaskbarMode", - "Value": "0", - "Type": "DWord" - } - ], - "InvokeScript": [ - "Set-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0))" - ], - "UndoScript": [ - "Remove-ItemProperty -Path \"HKCU:\\Control Panel\\Desktop\" -Name \"UserPreferencesMask\"" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display" -} -``` - -</details> - -## Invoke Script - -```powershell -Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0)) - -``` -## Undo Script - -```powershell -Remove-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" - -``` -## 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: DragFullWindows - -**Type:** String - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: MenuShowDelay - -**Type:** String - -**Original Value:** 1 - -**New Value:** 200 - -### Registry Key: MinAnimate - -**Type:** String - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: KeyboardDelay - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ListviewAlphaSelect - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ListviewShadow - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: TaskbarAnimations - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: VisualFXSetting - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 3 - -### Registry Key: EnableAeroPeek - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: TaskbarMn - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: TaskbarDa - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: ShowTaskViewButton - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - -### Registry Key: SearchboxTaskbarMode - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md deleted file mode 100644 index b0caa5f476..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md +++ /dev/null @@ -1,62 +0,0 @@ -# Run OO Shutup 10 - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Run OO Shutup 10", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a039_", - "Type": "Button", - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton" -} -``` - -</details> - -## Function: Invoke-WPFOOSU - -```powershell -function Invoke-WPFOOSU { - <# - .SYNOPSIS - Downloads and runs OO Shutup 10 - #> - try { - $OOSU_filepath = "$ENV:temp\OOSU10.exe" - $Initial_ProgressPreference = $ProgressPreference - $ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest - Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath - Write-Host "Starting OO Shutup 10 ..." - Start-Process $OOSU_filepath - } catch { - Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red - } - finally { - $ProgressPreference = $Initial_ProgressPreference - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md deleted file mode 100644 index 7ed43cfa8d..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md +++ /dev/null @@ -1,123 +0,0 @@ -# Disable Microsoft Copilot - -Last Updated: 2024-08-07 - - -!!! 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 - -Disables MS Copilot AI built into Windows since 23H2. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Disable Microsoft Copilot", - "Description": "Disables MS Copilot AI built into Windows since 23H2.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a025_", - "registry": [ - { - "Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot", - "Name": "TurnOffWindowsCopilot", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\WindowsCopilot", - "Name": "TurnOffWindowsCopilot", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - }, - { - "Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - "Name": "ShowCopilotButton", - "Type": "DWord", - "Value": "0", - "OriginalValue": "1" - } - ], - "InvokeScript": [ - " - Write-Host \"Remove Copilot\" - dism /online /remove-package /package-name:Microsoft.Windows.Copilot - " - ], - "UndoScript": [ - " - Write-Host \"Install Copilot\" - dism /online /add-package /package-name:Microsoft.Windows.Copilot - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot" -} -``` - -</details> - -## Invoke Script - -```powershell - - Write-Host "Remove Copilot" - dism /online /remove-package /package-name:Microsoft.Windows.Copilot - - -``` -## Undo Script - -```powershell - - Write-Host "Install Copilot" - dism /online /add-package /package-name:Microsoft.Windows.Copilot - - -``` -## 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: TurnOffWindowsCopilot - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: TurnOffWindowsCopilot - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - -### Registry Key: ShowCopilotButton - -**Type:** DWord - -**Original Value:** 1 - -**New Value:** 0 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md deleted file mode 100644 index 6662facef5..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md +++ /dev/null @@ -1,225 +0,0 @@ -# Remove Microsoft Edge - -Last Updated: 2024-08-07 - - -!!! 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 - -Removes MS Edge when it gets reinstalled by updates. Credit: Techie Jack - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove Microsoft Edge", - "Description": "Removes MS Edge when it gets reinstalled by updates. Credit: Techie Jack", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a029_", - "InvokeScript": [ - " - Uninstall-WinUtilEdgeBrowser - " - ], - "UndoScript": [ - " - Write-Host \"Install Microsoft Edge\" - Start-Process -FilePath winget -ArgumentList \"install --force -e --accept-source-agreements --accept-package-agreements --silent Microsoft.Edge \" -NoNewWindow -Wait - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge" -} -``` - -</details> - -## Invoke Script - -```powershell - - Uninstall-WinUtilEdgeBrowser - - -``` -## Undo Script - -```powershell - - Write-Host "Install Microsoft Edge" - Start-Process -FilePath winget -ArgumentList "install --force -e --accept-source-agreements --accept-package-agreements --silent Microsoft.Edge " -NoNewWindow -Wait - - -``` -## Function: Uninstall-WinUtilEdgeBrowser - -```powershell -Function Uninstall-WinUtilEdgeBrowser { - - <# - - .SYNOPSIS - This will uninstall edge by changing the region to Ireland and uninstalling edge the changing it back - - #> - -$msedgeProcess = Get-Process -Name "msedge" -ErrorAction SilentlyContinue -$widgetsProcess = Get-Process -Name "widgets" -ErrorAction SilentlyContinue -# Checking if Microsoft Edge is running -if ($msedgeProcess) { - Stop-Process -Name "msedge" -Force -} else { - Write-Output "msedge process is not running." -} -# Checking if Widgets is running -if ($widgetsProcess) { - Stop-Process -Name "widgets" -Force -} else { - Write-Output "widgets process is not running." -} - -function Uninstall-Process { - param ( - [Parameter(Mandatory = $true)] - [string]$Key - ) - - $originalNation = [microsoft.win32.registry]::GetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', [Microsoft.Win32.RegistryValueKind]::String) - - # Set Nation to 84 (France) temporarily - [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', 68, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null - - # credits to he3als for the Acl commands - $fileName = "IntegratedServicesRegionPolicySet.json" - $pathISRPS = [Environment]::SystemDirectory + "\" + $fileName - $aclISRPS = Get-Acl -Path $pathISRPS - $aclISRPSBackup = [System.Security.AccessControl.FileSecurity]::new() - $aclISRPSBackup.SetSecurityDescriptorSddlForm($acl.Sddl) - if (Test-Path -Path $pathISRPS) { - try { - $admin = [System.Security.Principal.NTAccount]$(New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value - - $aclISRPS.SetOwner($admin) - $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admin, 'FullControl', 'Allow') - $aclISRPS.AddAccessRule($rule) - Set-Acl -Path $pathISRPS -AclObject $aclISRPS - - Rename-Item -Path $pathISRPS -NewName ($fileName + '.bak') -Force - } - catch { - Write-Error "[$Mode] Failed to set owner for $pathISRPS" - } - } - - $baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' - $registryPath = $baseKey + '\ClientState\' + $Key - - if (!(Test-Path -Path $registryPath)) { - Write-Host "[$Mode] Registry key not found: $registryPath" - return - } - - Remove-ItemProperty -Path $registryPath -Name "experiment_control_labels" -ErrorAction SilentlyContinue | Out-Null - - $uninstallString = (Get-ItemProperty -Path $registryPath).UninstallString - $uninstallArguments = (Get-ItemProperty -Path $registryPath).UninstallArguments - - if ([string]::IsNullOrEmpty($uninstallString) -or [string]::IsNullOrEmpty($uninstallArguments)) { - Write-Host "[$Mode] Cannot find uninstall methods for $Mode" - return - } - - $uninstallArguments += " --force-uninstall --delete-profile" - - # $uninstallCommand = "`"$uninstallString`"" + $uninstallArguments - if (!(Test-Path -Path $uninstallString)) { - Write-Host "[$Mode] setup.exe not found at: $uninstallString" - return - } - Start-Process -FilePath $uninstallString -ArgumentList $uninstallArguments -Wait -NoNewWindow -Verbose - - # Restore Acl - if (Test-Path -Path ($pathISRPS + '.bak')) { - Rename-Item -Path ($pathISRPS + '.bak') -NewName $fileName -Force - Set-Acl -Path $pathISRPS -AclObject $aclISRPSBackup - } - - # Restore Nation - [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', $originalNation, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null - - if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) { - Write-Host "[$Mode] Edge Stable has been successfully uninstalled" - } -} - -function Uninstall-Edge { - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null - - Uninstall-Process -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}' - - @( "$env:ProgramData\Microsoft\Windows\Start Menu\Programs", - "$env:PUBLIC\Desktop", - "$env:USERPROFILE\Desktop" ) | ForEach-Object { - $shortcutPath = Join-Path -Path $_ -ChildPath "Microsoft Edge.lnk" - if (Test-Path -Path $shortcutPath) { - Remove-Item -Path $shortcutPath -Force - } - } - -} - -function Uninstall-WebView { - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - # Force to use system-wide WebView2 - # [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\WebView2\BrowserExecutableFolder", "*", "%%SystemRoot%%\System32\Microsoft-Edge-WebView") - - Uninstall-Process -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' -} - -function Uninstall-EdgeUpdate { - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - $registryPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' - if (!(Test-Path -Path $registryPath)) { - Write-Host "Registry key not found: $registryPath" - return - } - $uninstallCmdLine = (Get-ItemProperty -Path $registryPath).UninstallCmdLine - - if ([string]::IsNullOrEmpty($uninstallCmdLine)) { - Write-Host "Cannot find uninstall methods for $Mode" - return - } - - Write-Output "Uninstalling: $uninstallCmdLine" - Start-Process cmd.exe "/c $uninstallCmdLine" -WindowStyle Hidden -Wait -} - -Uninstall-Edge - # "WebView" { Uninstall-WebView } - # "EdgeUpdate" { Uninstall-EdgeUpdate } - - - - -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md deleted file mode 100644 index 25fd709020..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md +++ /dev/null @@ -1,73 +0,0 @@ -# Remove Home and Gallery from explorer - -Last Updated: 2024-08-07 - - -!!! 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 - -Removes the Home and Gallery from explorer and sets This PC as default - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove Home and Gallery from explorer", - "Description": "Removes the Home and Gallery from explorer and sets This PC as default", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a029_", - "InvokeScript": [ - " - REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f - REG DELETE \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f - REG ADD \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" /t REG_DWORD /d \"1\" - " - ], - "UndoScript": [ - " - REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" /f /ve /t REG_SZ /d \"{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\" - REG ADD \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}\" /f /ve /t REG_SZ /d \"CLSID_MSGraphHomeFolder\" - REG DELETE \"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" /f /v \"LaunchTo\" - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery" -} -``` - -</details> - -## Invoke Script - -```powershell - - REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /f - REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}" /f - REG ADD "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "LaunchTo" /t REG_DWORD /d "1" - - -``` -## Undo Script - -```powershell - - REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" /f /ve /t REG_SZ /d "{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}" - REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{f874310e-b6b7-47dc-bc84-b9e6b38f5903}" /f /ve /t REG_SZ /d "CLSID_MSGraphHomeFolder" - REG DELETE "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /f /v "LaunchTo" - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md deleted file mode 100644 index 9bfada6320..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md +++ /dev/null @@ -1,219 +0,0 @@ -# Remove OneDrive - -Last Updated: 2024-08-07 - - -!!! 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 - -Moves OneDrive files to Default Home Folders and Uninstalls it. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Remove OneDrive", - "Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a030_", - "InvokeScript": [ - " - $OneDrivePath = $($env:OneDrive) - Write-Host \"Removing OneDrive\" - $regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\" - if (Test-Path $regPath) { - $OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\" - $OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \") - Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait - } else { - Write-Host \"Onedrive dosn't seem to be installed anymore\" -ForegroundColor Red - return - } - # Check if OneDrive got Uninstalled - if (-not (Test-Path $regPath)) { - Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\" - Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait - - Write-Host \"Removing OneDrive leftovers\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\" - reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f - # check if directory is empty before removing: - If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) { - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\" - } - - Write-Host \"Remove Onedrive from explorer sidebar\" - Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0 - Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0 - - Write-Host \"Removing run hook for new users\" - reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\" - reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f - reg unload \"hku\\Default\" - - Write-Host \"Removing startmenu entry\" - Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\" - - Write-Host \"Removing scheduled task\" - Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false - - # Add Shell folders restoring default locations - Write-Host \"Shell Fixing\" - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -Value \"$env:userprofile\\Documents\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString - Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString - Write-Host \"Restarting explorer\" - taskkill.exe /F /IM \"explorer.exe\" - Start-Process \"explorer.exe\" - - Write-Host \"Waiting for explorer to complete loading\" - Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\" - Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow - Start-Sleep 5 - } else { - Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red - } - " - ], - "UndoScript": [ - " - Write-Host \"Install OneDrive\" - Start-Process -FilePath winget -ArgumentList \"install -e --accept-source-agreements --accept-package-agreements --silent Microsoft.OneDrive \" -NoNewWindow -Wait - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive" -} -``` - -</details> - -## Invoke Script - -```powershell - - $OneDrivePath = $($env:OneDrive) - Write-Host "Removing OneDrive" - $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\OneDriveSetup.exe" - if (Test-Path $regPath) { - $OneDriveUninstallString = Get-ItemPropertyValue "$regPath" -Name "UninstallString" - $OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(" ") - Start-Process -FilePath $OneDriveExe -ArgumentList "$OneDriveArgs /silent" -NoNewWindow -Wait - } else { - Write-Host "Onedrive dosn't seem to be installed anymore" -ForegroundColor Red - return - } - # Check if OneDrive got Uninstalled - if (-not (Test-Path $regPath)) { - Write-Host "Copy downloaded Files from the OneDrive Folder to Root UserProfile" - Start-Process -FilePath powershell -ArgumentList "robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\' /mov /e /xj" -NoNewWindow -Wait - - Write-Host "Removing OneDrive leftovers" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\OneDrive" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive" - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$env:systemdrive\OneDriveTemp" - reg delete "HKEY_CURRENT_USER\Software\Microsoft\OneDrive" -f - # check if directory is empty before removing: - If ((Get-ChildItem "$OneDrivePath" -Recurse | Measure-Object).Count -eq 0) { - Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$OneDrivePath" - } - - Write-Host "Remove Onedrive from explorer sidebar" - Set-ItemProperty -Path "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Name "System.IsPinnedToNameSpaceTree" -Value 0 - Set-ItemProperty -Path "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Name "System.IsPinnedToNameSpaceTree" -Value 0 - - Write-Host "Removing run hook for new users" - reg load "hku\Default" "C:\Users\Default\NTUSER.DAT" - reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f - reg unload "hku\Default" - - Write-Host "Removing startmenu entry" - Remove-Item -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" - - Write-Host "Removing scheduled task" - Get-ScheduledTask -TaskPath '\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false - - # Add Shell folders restoring default locations - Write-Host "Shell Fixing" - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "AppData" -Value "$env:userprofile\AppData\Roaming" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Cache" -Value "$env:userprofile\AppData\Local\Microsoft\Windows\INetCache" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Cookies" -Value "$env:userprofile\AppData\Local\Microsoft\Windows\INetCookies" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Favorites" -Value "$env:userprofile\Favorites" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "History" -Value "$env:userprofile\AppData\Local\Microsoft\Windows\History" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Local AppData" -Value "$env:userprofile\AppData\Local" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Music" -Value "$env:userprofile\Music" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Video" -Value "$env:userprofile\Videos" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "NetHood" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Network Shortcuts" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "PrintHood" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Printer Shortcuts" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Programs" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Recent" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Recent" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "SendTo" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\SendTo" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Start Menu" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Startup" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Templates" -Value "$env:userprofile\AppData\Roaming\Microsoft\Windows\Templates" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{374DE290-123F-4565-9164-39C4925E467B}" -Value "$env:userprofile\Downloads" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Desktop" -Value "$env:userprofile\Desktop" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "My Pictures" -Value "$env:userprofile\Pictures" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "Personal" -Value "$env:userprofile\Documents" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{F42EE2D3-909F-4907-8871-4C22FC0BF756}" -Value "$env:userprofile\Documents" -Type ExpandString - Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" -Name "{0DDD015D-B06C-45D5-8C4C-F59713854639}" -Value "$env:userprofile\Pictures" -Type ExpandString - Write-Host "Restarting explorer" - taskkill.exe /F /IM "explorer.exe" - Start-Process "explorer.exe" - - Write-Host "Waiting for explorer to complete loading" - Write-Host "Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder." - Write-Host "If there are Files missing afterwards, please Login to Onedrive.com and Download them manually" -ForegroundColor Yellow - Start-Sleep 5 - } else { - Write-Host "Something went Wrong during the Unistallation of OneDrive" -ForegroundColor Red - } - - -``` -## Undo Script - -```powershell - - Write-Host "Install OneDrive" - Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent Microsoft.OneDrive " -NoNewWindow -Wait - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md deleted file mode 100644 index 34cbb5691b..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md +++ /dev/null @@ -1,79 +0,0 @@ -# Set Classic Right-Click Menu - -Last Updated: 2024-08-07 - - -!!! 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 - -Great Windows 11 tweak to bring back good context menus when right clicking things in explorer. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Classic Right-Click Menu ", - "Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a027_", - "InvokeScript": [ - " - New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\" - Write-Host Restarting explorer.exe ... - $process = Get-Process -Name \"explorer\" - Stop-Process -InputObject $process - " - ], - "UndoScript": [ - " - Remove-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Recurse -Confirm:$false -Force - # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. - Write-Host Restarting explorer.exe ... - $process = Get-Process -Name \"explorer\" - Stop-Process -InputObject $process - " - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu" -} -``` - -</details> - -## Invoke Script - -```powershell - - New-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Name "InprocServer32" -force -value "" - Write-Host Restarting explorer.exe ... - $process = Get-Process -Name "explorer" - Stop-Process -InputObject $process - - -``` -## Undo Script - -```powershell - - Remove-Item -Path "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" -Recurse -Confirm:$false -Force - # Restarting Explorer in the Undo Script might not be necessary, as the Registry change without restarting Explorer does work, but just to make sure. - Write-Host Restarting explorer.exe ... - $process = Get-Process -Name "explorer" - Stop-Process -InputObject $process - - -``` - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md deleted file mode 100644 index 428d8022f2..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md +++ /dev/null @@ -1,81 +0,0 @@ -# Disable Teredo - -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 - -Teredo network tunneling is a ipv6 feature that can cause additional latency, but may cause problems with some games - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "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": [ - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters", - "Name": "DisabledComponents", - "Value": "1", - "OriginalValue": "0", - "Type": "DWord" - } - ], - "InvokeScript": [ - "netsh interface teredo set state disabled" - ], - "UndoScript": [ - "netsh interface teredo set state default" - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo" -} -``` - -</details> - -## Invoke Script - -```powershell -netsh interface teredo set state disabled - -``` -## Undo Script - -```powershell -netsh interface teredo set state default - -``` -## 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:** 1 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md deleted file mode 100644 index 3cdf8da30c..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md +++ /dev/null @@ -1,63 +0,0 @@ -# Set Time to UTC (Dual Boot) - -Last Updated: 2024-08-07 - - -!!! 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 - -Essential for computers that are dual booting. Fixes the time sync with Linux Systems. - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "Set Time to UTC (Dual Boot)", - "Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a027_", - "registry": [ - { - "Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation", - "Name": "RealTimeIsUniversal", - "Type": "DWord", - "Value": "1", - "OriginalValue": "0" - } - ], - "link": "https://christitustech.github.io/winutil/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC" -} -``` - -</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: RealTimeIsUniversal - -**Type:** DWord - -**Original Value:** 0 - -**New Value:** 1 - - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall.md deleted file mode 100644 index fb0274845f..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Undoall.md +++ /dev/null @@ -1,91 +0,0 @@ -# Undo Selected Tweaks - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "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" -} -``` - -</details> - -## Function: Invoke-WPFundoall - -```powershell -function Invoke-WPFundoall { - <# - - .SYNOPSIS - Undoes every selected tweak - - #> - - if($sync.ProcessRunning) { - $msg = "[Invoke-WPFundoall] Install process is currently running." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - $tweaks = (Get-WinUtilCheckBoxes)["WPFtweaks"] - - if ($tweaks.count -eq 0) { - $msg = "Please check the tweaks you wish to undo." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - Invoke-WPFRunspace -ArgumentList $tweaks -DebugPreference $DebugPreference -ScriptBlock { - param($tweaks, $DebugPreference) - - $sync.ProcessRunning = $true - if ($tweaks.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) - } - - - for ($i = 0; $i -lt $tweaks.Count; $i++) { - Set-WinUtilProgressBar -Label "Undoing $($tweaks[$i])" -Percent ($i / $tweaks.Count * 100) - Invoke-WinUtiltweaks $tweaks[$i] -undo $true - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$tweaks.Count) }) - } - - Set-WinUtilProgressBar -Label "Undo Tweaks Finished" -Percent 100 - $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) - Write-Host "==================================" - Write-Host "--- Undo Tweaks are Finished ---" - Write-Host "==================================" - - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/button.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/button.md deleted file mode 100644 index 4a9d310545..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/button.md +++ /dev/null @@ -1,100 +0,0 @@ -# Run Tweaks - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "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" -} -``` - -</details> - -## Function: Invoke-WPFtweaksbutton - -```powershell -function Invoke-WPFtweaksbutton { - <# - - .SYNOPSIS - Invokes the functions associated with each group of checkboxes - - #> - - if($sync.ProcessRunning) { - $msg = "[Invoke-WPFtweaksbutton] Install process is currently running." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - $Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"] - - Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text - - if ($tweaks.count -eq 0 -and $sync["WPFchangedns"].text -eq "Default") { - $msg = "Please check the tweaks you wish to perform." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - Write-Debug "Number of tweaks to process: $($Tweaks.Count)" - - Invoke-WPFRunspace -ArgumentList $Tweaks -DebugPreference $DebugPreference -ScriptBlock { - param($Tweaks, $DebugPreference) - Write-Debug "Inside Number of tweaks to process: $($Tweaks.Count)" - - $sync.ProcessRunning = $true - - if ($Tweaks.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) - } - # Execute other selected tweaks - - for ($i = 0; $i -lt $Tweaks.Count; $i++) { - Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($i / $Tweaks.Count * 100) - Invoke-WinUtilTweaks $tweaks[$i]$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$Tweaks.Count) }) - } - Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100 - $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) - Write-Host "=================================" - Write-Host "-- Tweaks are Finished ---" - Write-Host "=================================" - - # $ButtonType = [System.Windows.MessageBoxButton]::OK - # $MessageboxTitle = "Tweaks are Finished " - # $Messageboxbody = ("Done") - # $MessageIcon = [System.Windows.MessageBoxImage]::Information - # [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) - } -} - -``` - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md b/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md deleted file mode 100644 index cddb13abb1..0000000000 --- a/docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md +++ /dev/null @@ -1,38 +0,0 @@ -# DNS - -Last Updated: 2024-08-07 - - -!!! 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.** - - -<!-- BEGIN CUSTOM CONTENT --> - -<!-- END CUSTOM CONTENT --> - -<details> -<summary>Preview Code</summary> - -```json -{ - "Content": "DNS", - "category": "z__Advanced Tweaks - CAUTION", - "panel": "1", - "Order": "a040_", - "Type": "Combobox", - "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" -} -``` - -</details> - - -<!-- BEGIN SECOND CUSTOM CONTENT --> - -<!-- END SECOND CUSTOM CONTENT --> - - -[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/config/tweaks.json) - diff --git a/docs/devdocs.md b/docs/devdocs.md deleted file mode 100644 index 2b9b0a306c..0000000000 --- a/docs/devdocs.md +++ /dev/null @@ -1,108 +0,0 @@ -# Table of Contents - - -## Tweaks - -### Essential-Tweaks - -- [Change Windows Terminal default: PowerShell 5 -> PowerShell 7](../docs/dev/tweaks/Essential-Tweaks/Powershell7.md) -- [Create Restore Point](../docs/dev/tweaks/Essential-Tweaks/RestorePoint.md) -- [Debloat Edge](../docs/dev/tweaks/Essential-Tweaks/EdgeDebloat.md) -- [Delete Temporary Files](../docs/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md) -- [Disable Activity History](../docs/dev/tweaks/Essential-Tweaks/AH.md) -- [Disable ConsumerFeatures](../docs/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md) -- [Disable GameDVR](../docs/dev/tweaks/Essential-Tweaks/DVR.md) -- [Disable Hibernation](../docs/dev/tweaks/Essential-Tweaks/Hiber.md) -- [Disable Homegroup](../docs/dev/tweaks/Essential-Tweaks/Home.md) -- [Disable Location Tracking](../docs/dev/tweaks/Essential-Tweaks/Loc.md) -- [Disable Powershell 7 Telemetry](../docs/dev/tweaks/Essential-Tweaks/Powershell7Tele.md) -- [Disable Storage Sense](../docs/dev/tweaks/Essential-Tweaks/Storage.md) -- [Disable Telemetry](../docs/dev/tweaks/Essential-Tweaks/Tele.md) -- [Disable Wifi-Sense](../docs/dev/tweaks/Essential-Tweaks/Wifi.md) -- [Enable End Task With Right Click](../docs/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md) -- [Prefer IPv4 over IPv6](../docs/dev/tweaks/Essential-Tweaks/IPv46.md) -- [Run Disk Cleanup](../docs/dev/tweaks/Essential-Tweaks/DiskCleanup.md) -- [Set Hibernation as default (good for laptops)](../docs/dev/tweaks/Essential-Tweaks/LaptopHibernation.md) -- [Set Services to Manual](../docs/dev/tweaks/Essential-Tweaks/Services.md) -### Shortcuts - -- [Create WinUtil Shortcut](../docs/dev/tweaks/Shortcuts/Shortcut.md) -### z--Advanced-Tweaks---CAUTION - -- [Adobe Debloat](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DebloatAdobe.md) -- [Adobe Network Block](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md) -- [Disable Background Apps](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md) -- [Disable Fullscreen Optimizations](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md) -- [Disable Intel MM (vPro LMS)](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableLMS1.md) -- [Disable IPv6](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Disableipsix.md) -- [Disable Microsoft Copilot](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveCopilot.md) -- [Disable Notification Tray/Calendar](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md) -- [Disable Teredo](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md) -- [DNS](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/changedns.md) -- [Remove ALL MS Store Apps - NOT RECOMMENDED](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md) -- [Remove Home and Gallery from explorer](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHomeGallery.md) -- [Remove Microsoft Edge](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveEdge.md) -- [Remove OneDrive](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOnedrive.md) -- [Run OO Shutup 10](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md) -- [Set Classic Right-Click Menu ](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md) -- [Set Display for Performance](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md) -- [Set Time to UTC (Dual Boot)](../docs/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md) -### Customize-Preferences - -- [Bing Search in Start Menu](../docs/dev/tweaks/Customize-Preferences/BingSearch.md) -- [Center Taskbar Items](../docs/dev/tweaks/Customize-Preferences/TaskbarAlignment.md) -- [Dark Theme for Windows](../docs/dev/tweaks/Customize-Preferences/DarkMode.md) -- [Detailed BSoD](../docs/dev/tweaks/Customize-Preferences/DetailedBSoD.md) -- [Mouse Acceleration](../docs/dev/tweaks/Customize-Preferences/MouseAcceleration.md) -- [NumLock on Startup](../docs/dev/tweaks/Customize-Preferences/NumLock.md) -- [Search Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskbarSearch.md) -- [Show File Extensions](../docs/dev/tweaks/Customize-Preferences/ShowExt.md) -- [Show Hidden Files](../docs/dev/tweaks/Customize-Preferences/HiddenFiles.md) -- [Snap Assist Flyout](../docs/dev/tweaks/Customize-Preferences/SnapFlyout.md) -- [Snap Assist Suggestion](../docs/dev/tweaks/Customize-Preferences/SnapSuggestion.md) -- [Snap Window](../docs/dev/tweaks/Customize-Preferences/SnapWindow.md) -- [Sticky Keys](../docs/dev/tweaks/Customize-Preferences/StickyKeys.md) -- [Task View Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskView.md) -- [Verbose Messages During Logon](../docs/dev/tweaks/Customize-Preferences/VerboseLogon.md) -- [Widgets Button in Taskbar](../docs/dev/tweaks/Customize-Preferences/TaskbarWidgets.md) -### Performance-Plans - -- [Add and Activate Ultimate Performance Profile](../docs/dev/tweaks/Performance-Plans/AddUltPerf.md) -- [Remove Ultimate Performance Profile](../docs/dev/tweaks/Performance-Plans/RemoveUltPerf.md) - -## Features - -### Fixes - -- [Remove Adobe Creative Cloud](../docs/dev/features/Fixes/RunAdobeCCCleanerTool.md) -- [Reset Network](../docs/dev/features/Fixes/Network.md) -- [Reset Windows Update](../docs/dev/features/Fixes/Update.md) -- [Set Up Autologin](../docs/dev/features/Fixes/Autologin.md) -- [System Corruption Scan](../docs/dev/features/Fixes/DISM.md) -- [WinGet Reinstall](../docs/dev/features/Fixes/Winget.md) -### Legacy-Windows-Panels - -- [Control Panel](../docs/dev/features/Legacy-Windows-Panels/control.md) -- [Network Connections](../docs/dev/features/Legacy-Windows-Panels/network.md) -- [Power Panel](../docs/dev/features/Legacy-Windows-Panels/power.md) -- [Printer Settings](../docs/dev/features/Legacy-Windows-Panels/printer.md) -- [Region](../docs/dev/features/Legacy-Windows-Panels/region.md) -- [Sound Settings](../docs/dev/features/Legacy-Windows-Panels/sound.md) -- [System Properties](../docs/dev/features/Legacy-Windows-Panels/system.md) -- [User Accounts](../docs/dev/features/Legacy-Windows-Panels/user.md) -### Features - -- [All .Net Framework (2,3,4)](../docs/dev/features/Features/dotnet.md) -- [Disable Legacy F8 Boot Recovery](../docs/dev/features/Features/DisableLegacyRecovery.md) -- [Disable Search Box Web Suggestions in Registry(explorer restart)](../docs/dev/features/Features/DisableSearchSuggestions.md) -- [Enable Daily Registry Backup Task 12.30am](../docs/dev/features/Features/RegBackup.md) -- [Enable Legacy F8 Boot Recovery](../docs/dev/features/Features/EnableLegacyRecovery.md) -- [Enable Search Box Web Suggestions in Registry(explorer restart)](../docs/dev/features/Features/EnableSearchSuggestions.md) -- [HyperV Virtualization](../docs/dev/features/Features/hyperv.md) -- [Install Features](../docs/dev/features/Features/Install.md) -- [Legacy Media (WMP, DirectPlay)](../docs/dev/features/Features/legacymedia.md) -- [NFS - Network File System](../docs/dev/features/Features/nfs.md) -- [Windows Sandbox](../docs/dev/features/Features/Sandbox.md) -- [Windows Subsystem for Linux](../docs/dev/features/Features/wsl.md) - - diff --git a/docs/faq.md b/docs/faq.md deleted file mode 100644 index 4bde311212..0000000000 --- a/docs/faq.md +++ /dev/null @@ -1,7 +0,0 @@ -# FAQ's - -## How do I uninstall WinUtil? -* You do not have to uninstall WinUtil. As it is a script you run from Powershell it only loads into your RAM. This means as soon as you close WinUtil it will be deleted off your system. - -## I applied a tweak and now something doesn't work, what do I do? -* If you applied a tweak and it breaks something, you can always revert the tweak by selecting the tweak and clicking "Undo Selected Tweaks". diff --git a/docs/go.mod b/docs/go.mod new file mode 100644 index 0000000000..a64f88e1fc --- /dev/null +++ b/docs/go.mod @@ -0,0 +1,5 @@ +module github.com/ChrisTitusTech/WinUtil + +go 1.26 + +require github.com/imfing/hextra v0.12.1 // indirect diff --git a/docs/go.sum b/docs/go.sum new file mode 100644 index 0000000000..2ae2481d5c --- /dev/null +++ b/docs/go.sum @@ -0,0 +1,8 @@ +github.com/imfing/hextra v0.9.7 h1:Zg5n24us36Bn/S/5mEUPkRW6uwE6vHHEqWSgN0bPXaM= +github.com/imfing/hextra v0.9.7/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= +github.com/imfing/hextra v0.11.1 h1:8pTc4ReYbzGTHAnyiebmlT3ijFfIXiGu1r7tM/UGjFI= +github.com/imfing/hextra v0.11.1/go.mod h1:cEfel3lU/bSx7lTE/+uuR4GJaphyOyiwNR3PTqFTXpI= +github.com/imfing/hextra v0.12.0 h1:f6y35hW/WDJEcx9S0dOmbICOBxYE0PmP6IJFsTUgVyY= +github.com/imfing/hextra v0.12.0/go.mod h1:YAv8XRNSmcqjieFwI7fVQK1AoY2Do+45DO9HGqxSGu4= +github.com/imfing/hextra v0.12.1 h1:3t1n0bmJbDzSTVfht93UDcfF1BXMRjeFojA071ri2l8= +github.com/imfing/hextra v0.12.1/go.mod h1:vi+yhpq8YPp/aghvJlNKVnJKcPJ/VyAEcfC1BSV9ARo= diff --git a/docs/hugo.toml b/docs/hugo.toml new file mode 100644 index 0000000000..d1b51de79a --- /dev/null +++ b/docs/hugo.toml @@ -0,0 +1,133 @@ +baseURL = "https://winutil.christitus.com/" +languageCode = "en-us" +title = "Winutil Documentation" +enableGitInfo = true +canonifyURLs = true + +[[module.mounts]] + source = "assets" + target = "assets" + +[[module.imports]] +path = "github.com/imfing/hextra" + +[[menu.main]] +identifier = "userguide" +name = "User Guides" +pageRef = "/userguide" +weight = 1 + +[[menu.main]] +identifier = "documentation" +name = "Developer Documentation" +weight = 2 + +[[menu.main]] +identifier = "contribution-guides" +name = "Contribution Guides" +pageRef = "CONTRIBUTING.md" +weight = 1 +parent = "documentation" + +[[menu.main]] +identifier = "developer-documentation" +name = "Developer Docs" +pageRef = "/dev" +weight = 2 +parent = "documentation" + +[[menu.main]] +identifier = "help" +name = "Help" +weight = 3 + +[[menu.main]] +identifier = "faq" +name = "FAQ" +pageRef = "faq.md" +weight = 1 +parent = "help" + +[[menu.main]] +identifier = "known-issues" +name = "Known Issues" +pageRef = "KnownIssues.md" +weight = 2 +parent = "help" + +[[menu.main]] +name = "Store" +url = "https://christitus.com/downloads/" +weight = 5 + +[[menu.main]] +name = "Search" +weight = 6 + + [menu.main.params] + type = "search" + +[[menu.main]] +name = "GitHub" +weight = 7 +url = "https://github.com/christitustech/Winutil" + + [menu.main.params] + icon = "github" + +[params] +description = "Chris Titus Tech's Windows Utility - Install Programs, Tweaks, Fixes, and Updates" +displayUpdatedDate = true +dateFormat = "January 2, 2006" + + [params.navbar] + displayTitle = false + displayLogo = true + + [params.navbar.logo] + path = "navlogo.png" + dark = "navlogo.png" + link = "/" + width = 150 + height = 50 + + [params.theme] + default = "system" + displayToggle = true + + [params.page] + width = "wide" + + [params.footer] + enable = true + displayCopyright = true + displayPoweredBy = false + width = "normal" + +[params.highlight.copy] +enable = true +display = "hover" + +[menu] + + [[menu.sidebar]] + name = "Links" + weight = 1 + [menu.sidebar.params] + type = "separator" + + [[menu.sidebar]] + name = "Github Repo ↗" + url = "https://github.com/ChrisTitusTech/winutil" + weight = 2 + + [[menu.sidebar]] + name = "Discord Server ↗" + url = "https://discord.gg/RUbZUZyByQ" + weight = 3 + + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true diff --git a/docs/i18n/en.yaml b/docs/i18n/en.yaml new file mode 100644 index 0000000000..8ea7eea28c --- /dev/null +++ b/docs/i18n/en.yaml @@ -0,0 +1,23 @@ +copyright: "&copy; <script>document.write(new Date().getFullYear())</script>&nbsp;<a href='https://christitus.com'>Chris Titus Tech</a>. All rights reserved." +backToTop: "Scroll to top" +changeLanguage: "Change language" +changeTheme: "Change theme" +copy: "Copy" +copied: "Copied!" +copyAsMarkdown: "Copy as Markdown" +copyPage: "Copy Page" +copyCode: "Copy code" +dark: "Dark" +editThisPage: "Edit this page on GitHub →" +lastUpdated: "Last updated on" +light: "Light" +next: "Next" +noResultsFound: "No results found." +onThisPage: "On this page" +poweredBy: "Powered by Chris Titus Tech" +previous: "Prev" +readMore: "Read more →" +searchPlaceholder: "Search..." +system: "System" +tags: "Tags" +viewAsMarkdown: "View as Markdown" diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index f2835352f9..0000000000 --- a/docs/index.md +++ /dev/null @@ -1,19 +0,0 @@ -# Welcome to the WinUtil Documentation! - -[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/winutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/winutil/releases/latest) -![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/winutil.ps1?label=Total%20Downloads&style=for-the-badge) -[![Discord Community Server](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ) - -Welcome to the official documentation for WinUtil, your go-to utility for optimizing and managing your Windows environment. Whether you’re an IT professional, power user, or regular user, WinUtil provides a comprehensive set of tools to enhance your Windows experience. - -## Running the latest release of WinUtil - -* You will first need to start a Powershell terminal **as Admin**. -* Now you can run the following command: - ```ps1 - irm https://christitus.com/win | iex - ``` - -!!! info - - WinUtil is updated weekly as of the time of writing. Consequently, features and functionalities may evolve, and the documentation may not always reflect the most current images or information. diff --git a/docs/layouts/shortcodes/autolinks.html b/docs/layouts/shortcodes/autolinks.html new file mode 100644 index 0000000000..9243b03821 --- /dev/null +++ b/docs/layouts/shortcodes/autolinks.html @@ -0,0 +1,17 @@ +{{- $section := .Get "section" | lower -}} +{{- $pages := slice -}} +{{- range .Site.RegularPages -}} +{{- if in .RelPermalink $section -}} +{{- $pageTitle := .Title -}} +{{- if eq $pageTitle "" -}} + {{- $pageTitle = .File.BaseFileName | humanize | title -}} +{{- end -}} +{{- $pageDesc := .Description -}} +{{- $pages = $pages | append (dict "title" $pageTitle "description" $pageDesc "url" .RelPermalink) -}} +{{- end -}} +{{- end -}} +<ul> +{{- range sort $pages "title" "asc" }} +<li><a href="{{ .url }}">{{ .title }}</a>{{ with .description }} - {{ . }}{{ end }}</li> +{{- end }} +</ul> diff --git a/docs/layouts/shortcodes/image.html b/docs/layouts/shortcodes/image.html new file mode 100644 index 0000000000..5c182f1cce --- /dev/null +++ b/docs/layouts/shortcodes/image.html @@ -0,0 +1,114 @@ +{{/*Retrive Passed Shortcode Parameters*/}} +{{ $src := .Get "src" }} +{{ $alt := .Get "alt" }} + +{{/*Define sizes*/}} +{{ $Small := 200 }} +{{ $Medium := 600 }} +{{ $Large := 1000 }} + +{{/*Define Image variables as global variables to make them easily accessible in this shortcode*/}} +{{ $DarkImage := "" }} {{ $DarkSmallImage := "" }} {{ $DarkMediumImage := "" }} {{ $DarkLargeImage := "" }} +{{ $LightImage := "" }} {{ $LightSmallImage := "" }} {{ $LightMediumImage := "" }} {{ $LightLargeImage := "" }} +{{ $SingleImage := "" }} {{ $SingleSmallImage := "" }} {{ $SingleMediumImage := "" }} {{ $SingleLargeImage := "" }} + +{{/*Find images and update the previous Single,Dark,Light Images variables*/}} +{{ with resources.GetMatch (print $src ".jpg") }} {{ $SingleImage = . }} {{ end }} +{{ with resources.GetMatch (print $src "-Dark" ".jpg") }} {{ $DarkImage = . }} {{ end }} +{{ with resources.GetMatch (print $src "-Light" ".jpg") }} {{ $LightImage = . }} {{ end }} +{{ with resources.GetMatch (print $src ".png") }} {{ $SingleImage = . }} {{ end }} +{{ with resources.GetMatch (print $src "-Dark" ".png") }} {{ $DarkImage = . }} {{ end }} +{{ with resources.GetMatch (print $src "-Light" ".png") }} {{ $LightImage = . }} {{ end }} + +{{/*Applying Image Processing*/}} +{{ with $SingleImage }} + {{ with .Resize (printf "%dx%d webp q50" .Width .Height) }} + {{ $SingleImage = . }} + {{ end }} +{{ end }} +{{ with $DarkImage }} + {{ with .Resize (printf "%dx%d webp q50" .Width .Height) }} + {{ $DarkImage = . }} + {{ end }} +{{ end }} +{{ with $LightImage }} + {{ with .Resize (printf "%dx%d webp q50" .Width .Height) }} + {{ $LightImage = . }} + {{ end }} +{{ end }} + +{{/*Make different sized versions to images if applicable*/}} +{{ with $SingleImage }} + {{ if gt (.Width) ($Small) }} + {{ with .Resize (printf "%dx" $Small) }} + {{ $SingleSmallImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Medium) }} + {{ with .Resize (printf "%dx" $Medium) }} + {{ $SingleMediumImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Large) }} + {{ with .Resize (printf "%dx" $Large) }} + {{ $SingleLargeImage = . }} + {{ end }} + {{ end }} +{{ end }} +{{ with $DarkImage }} + {{ if gt (.Width) ($Small) }} + {{ with .Resize (printf "%dx" $Small) }} + {{ $DarkSmallImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Medium) }} + {{ with .Resize (printf "%dx" $Medium) }} + {{ $DarkMediumImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Large) }} + {{ with .Resize (printf "%dx" $Large) }} + {{ $DarkLargeImage = . }} + {{ end }} + {{ end }} +{{ end }} +{{ with $LightImage }} + {{ if gt (.Width) ($Small) }} + {{ with .Resize (printf "%dx" $Small) }} + {{ $LightSmallImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Medium) }} + {{ with .Resize (printf "%dx" $Medium) }} + {{ $LightMediumImage = . }} + {{ end }} + {{ end }} + {{ if gt (.Width) ($Large) }} + {{ with .Resize (printf "%dx" $Large) }} + {{ $LightLargeImage = . }} + {{ end }} + {{ end }} +{{ end }} + + +{{ if $SingleImage }} +<picture> + {{ with $SingleSmallImage }}<source media='(max-width: {{ printf "%dpx" $Small}})' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $SingleMediumImage }}<source media='(min-width: {{ printf "%dpx" $Small}}) and (max-width: {{ printf "%dpx" $Medium}})' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $SingleLargeImage }}<source media='(min-width: {{ printf "%dpx" $Medium}}) and (max-width: {{ printf "%dpx" $Large}})' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $SingleImage }}<img loading="lazy" src="{{ .RelPermalink }}" Width="{{ .Width }}" height="{{ .Height }}" {{ with $alt }}alt="{{.}}"{{ else }}alt=""{{ end }}/>{{ end }} +</picture> +{{ else }} +<picture> + {{ with $DarkSmallImage }}<source media='(max-width: {{ printf "%dpx" $Small}}) and (prefers-color-scheme: dark)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $DarkMediumImage }}<source media='(min-width: {{ printf "%dpx" $Small}}) and (max-width: {{ printf "%dpx" $Medium}}) and (prefers-color-scheme: dark)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $DarkLargeImage }}<source media='(min-width: {{ printf "%dpx" $Medium}}) and (max-width: {{ printf "%dpx" $Large}}) and (prefers-color-scheme: dark)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $DarkImage }}<source media='(prefers-color-scheme: dark)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $LightSmallImage }}<source media='(max-width: {{ printf "%dpx" $Small}}) and (prefers-color-scheme: light)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $LightMediumImage }}<source media='(min-width: {{ printf "%dpx" $Small}}) and (max-width: {{ printf "%dpx" $Medium}}) and (prefers-color-scheme: light)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $LightLargeImage }}<source media='(min-width: {{ printf "%dpx" $Medium}}) and (max-width: {{ printf "%dpx" $Large}}) and (prefers-color-scheme: light)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $LightImage }}<source media='(prefers-color-scheme: light)' srcset='{{ .RelPermalink }}'>{{ end }} + {{ with $LightImage }}<img loading="lazy" src="{{ .RelPermalink }}" Width="{{ .Width }}" height="{{ .Height }}" {{ with $alt }}alt="{{.}}"{{ else }}alt=""{{ end }}/> + {{ else with $DarkImage }}<img loading="lazy" src="{{ .RelPermalink }}" Width="{{ .Width }}" height="{{ .Height }}" {{ with $alt }}alt="{{.}}"{{ else }}alt=""{{ end }}/>{{ end }} +</picture> +{{ end }} diff --git a/docs/static/CNAME b/docs/static/CNAME new file mode 100644 index 0000000000..5c5e6a6d89 --- /dev/null +++ b/docs/static/CNAME @@ -0,0 +1 @@ +winutil.christitus.com diff --git a/docs/static/android-chrome-192x192.png b/docs/static/android-chrome-192x192.png new file mode 100644 index 0000000000..0fe939a7eb Binary files /dev/null and b/docs/static/android-chrome-192x192.png differ diff --git a/docs/static/android-chrome-512x512.png b/docs/static/android-chrome-512x512.png new file mode 100644 index 0000000000..33d192ca0f Binary files /dev/null and b/docs/static/android-chrome-512x512.png differ diff --git a/docs/static/apple-touch-icon.png b/docs/static/apple-touch-icon.png new file mode 100644 index 0000000000..9ffa995225 Binary files /dev/null and b/docs/static/apple-touch-icon.png differ diff --git a/docs/static/favicon-16x16.png b/docs/static/favicon-16x16.png new file mode 100644 index 0000000000..f476030528 Binary files /dev/null and b/docs/static/favicon-16x16.png differ diff --git a/docs/static/favicon-32x32.png b/docs/static/favicon-32x32.png new file mode 100644 index 0000000000..5532ef6c48 Binary files /dev/null and b/docs/static/favicon-32x32.png differ diff --git a/docs/static/favicon.ico b/docs/static/favicon.ico new file mode 100644 index 0000000000..f95955c6de Binary files /dev/null and b/docs/static/favicon.ico differ diff --git a/docs/static/navlogo.png b/docs/static/navlogo.png new file mode 100644 index 0000000000..1ae83be076 Binary files /dev/null and b/docs/static/navlogo.png differ diff --git a/docs/static/site.webmanifest b/docs/static/site.webmanifest new file mode 100644 index 0000000000..1dd911238a --- /dev/null +++ b/docs/static/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css deleted file mode 100644 index 69b688753c..0000000000 --- a/docs/stylesheets/extra.css +++ /dev/null @@ -1,13 +0,0 @@ -/* Custom styles for MkDocs Material */ -body { - background-color: #c22525; -} - -.md-nav__link { - color: #ff5722; -} - -.md-typeset h1 { - font-size: 2.5em; - color: #3f51b5; -} diff --git a/docs/userguide.md b/docs/userguide.md deleted file mode 100644 index 340cf499f0..0000000000 --- a/docs/userguide.md +++ /dev/null @@ -1,263 +0,0 @@ -# Walkthrough - -## Install ---- - -=== "Installation & Updates" - - * Choose the programs you want to install or upgrade. - * For programs not currently installed, this action will install them. - * For programs already installed, this action will update them to the latest version. - * Click the `Install/Upgrade Selected` button to start the installation or upgrade process. - -=== "Upgrade All" - - * Simply press the `Upgrade All` button. - * This will upgrade all applicable programs that are installed without the need for individual selection. - -=== "Uninstall" - - * Select the programs you wish to uninstall. - * Click the `Uninstall Selected` button to remove the selected programs. - -=== "Get Installed" - - * Click the `Get Installed` button. - * This will scan for and select all installed programs in WinUtil that WinGet supports. - -=== "Clear Selection" - * Click the `Clear Selection` button. - * This will unselect all checked programs. - -=== "prefer Chocolatey" - * Check the `prefer Chocolatey` checkbox - * By default Winutil will use winget to install/upgrade/remove packages and fallback to Chocolatey. This option reverses the preference. - * This preference will be used for all Buttons on the Install page and persist across Winutil restarts - -![Install Image](assets/Install-Tab-Dark.png#only-dark#gh-dark-mode-only) -![Install Image](assets/Install-Tab-Light.png#only-light#gh-light-mode-only) - -!!! tip - - If you have trouble finding an application, press `ctrl + f` and search the name of it. Applications will filter depending on your input. - -## Tweaks ---- - -![Tweaks Image](assets/Tweaks-Tab-Dark.png#only-dark#gh-dark-mode-only) -![Tweaks Image](assets/Tweaks-Tab-Light.png#only-light#gh-light-mode-only) - -### Run Tweaks -* **Open Tweaks Tab**: Navigate to the 'Tweaks' tab in the application. -* **Select Tweaks**: Choose the tweaks you want to apply. You can use the presets available at the top for convenience. -* **Run Tweaks**: After selecting the desired tweaks, click the 'Run Tweaks' button at the bottom of the screen. - -### Undo Tweaks -* **Open Tweaks Tab**: Go to the 'Tweaks' tab located next to 'Install'. -* **Select Tweaks to Remove**: Choose the tweaks you want to disable or remove. -* **Undo Tweaks**: Click the 'Undo Selected Tweaks' button at the bottom of the screen to apply the changes. - -### Essential Tweaks -Essential Tweaks are modifications and optimizations that are generally safe for most users to implement. These tweaks are designed to enhance system performance, improve privacy, and reduce unnecessary system activities. They are considered low-risk and are recommended for users who want to ensure their system runs smoothly and efficiently without delving too deeply into complex configurations. The goal of Essential Tweaks is to provide noticeable improvements with minimal risk, making them suitable for a wide range of users, including those who may not have advanced technical knowledge. - -### Advanced Tweaks - CAUTION -Advanced Tweaks are intended for experienced users who have a solid understanding of their system and the potential implications of making deep-level changes. These tweaks involve more significant alterations to the operating system and can provide substantial customization. However, they also carry a higher risk of causing system instability or unintended side effects if not implemented correctly. Users who choose to apply Advanced Tweaks should proceed with caution, ensuring they have adequate knowledge and backups in place to recover if something goes wrong. These tweaks are not recommended for novice users or those unfamiliar with the inner workings of their operating system. - -### O&O Shutup - - -[O&O ShutUp10++](https://www.oo-software.com/en/shutup10) can be launched from WinUtil with only one button click. It is a free privacy tool for Windows that lets users easily manage their privacy settings. It disables telemetry, controls updates, and manages app permissions to enhance security and privacy. The tool offers recommended settings for optimal privacy with just a few clicks. - -<iframe width="640" height="360" src="https://www.youtube.com/embed/3HvNr8eMcv0" title="O&O ShutUp10++: For Windows 10 & 11, with Dark Mode" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> - - -### DNS - -The utility provides a convenient DNS selection feature, allowing users to choose between various DNS providers for both IPv4 and IPv6. This enables users to optimize their internet connection for speed, security, and privacy according to their specific needs. Here are the available options: - -* **Default**: Uses the default DNS settings configured by your ISP or network. -* **DHCP**: Automatically acquires DNS settings from the DHCP server. -* [**Google**](https://developers.google.com/speed/public-dns?hl=en): A reliable and fast DNS service provided by Google. -* [**Cloudflare**](https://developers.cloudflare.com/1.1.1.1/): Known for speed and privacy, Cloudflare DNS is a popular choice for enhancing internet performance. -* [**Cloudflare_Malware**](https://developers.cloudflare.com/1.1.1.1/setup/#:~:text=Use%20the%20following%20DNS%20resolvers%20to%20block%20malicious%20content%3A): Provides additional protection by blocking malware sites. -* [**Cloudflare_Malware_Adult**](https://developers.cloudflare.com/1.1.1.1/setup/#:~:text=Use%20the%20following%20DNS%20resolvers%20to%20block%20malware%20and%20adult%20content%3A): Blocks both malware and adult content, offering more comprehensive filtering. -* [**Open_DNS**](https://www.opendns.com/setupguide/#familyshield): Offers customizable filtering and enhanced security features. -* [**Quad9**](https://quad9.net/): Focuses on security by blocking known malicious domains. -* [**AdGuard_Ads_Trackers**](https://adguard-dns.io/en/welcome.html) AdGuard DNS will block ads, trackers, or any other DNS requests. Visit website and login for a dashboard, statistics and customize your experience in the server settings. -* [**AdGuard_Ads_Trackers_Malware_Adult**](https://adguard-dns.io/en/welcome.html) AdGuard DNS will block ads, trackers, adult content, and enable Safe Search and Safe Mode, where possible. -* [**dns0.eu_Open**](https://www.dns0.eu/) The European public DNS that makes your Internet safer. Offers general-purpose filtering to block malware, phishing, and tracking domains for enhanced privacy and security. -* [**dns0.eu_ZERO**](https://www.dns0.eu/zero) Provides advanced security with robust filters for highly sensitive environments, blocking high-risk domains using threat intelligence and sophisticated heuristics like Newly Registered Domains (NRD) and Domain Generation Algorithms (DGA). -* [**dns0.eu_KIDS**](https://www.dns0.eu/kids) A child-safe DNS that blocks adult content, explicit search results, mature videos, dating sites, piracy, and ads, creating a secure internet experience for children on any device or network. - -### Customize Preferences - -The Customize Preferences section allows users to personalize their Windows experience by toggling various visual and functional features. These preferences are designed to enhance usability and tailor the system to the user’s specific needs and preferences. - -### Performance Plans - -The Performance Plans section allows users to manage the Ultimate Performance Profile on their system. This feature is designed to optimize the system for maximum performance. - -#### Add and activate the Ultimate Performance Profile: -* Enables and activates the Ultimate Performance Profile to enhance system performance by minimizing latency and increasing efficiency. -#### Remove Ultimate Performance Profile: -* Deactivates the Ultimate Performance Profile, changing the system to the Balanced Profile. - -### Shortcuts - -The utility includes a feature to easily create a desktop shortcut, providing quick access to the script. - -## Config ---- - -### Features -* Install the most used **Windows Features** by checking the checkbox and clicking "Install Features" to install them. - -* All .Net Frameworks (2, 3, 4) -* HyperV Virtualization -* Legacy Media (WMP, DirectPlay) -* NFS - Network File System -* Enable Search Box Web Suggestions in Registry (explorer restart) -* Disables Search Box Web Suggestions in Registry (explorer restart) -* Enable Daily Registry Backup Task 12:30am -* Enable Legacy F8 Boot Recovery -* Disable Legacy F8 Boot Recovery -* Windows Subsystem for Linux -* Windows Sandbox - -### Fixes -* Quick fixes for your system if you are having issues. - -* Set Up Autologin -* Reset Windows Update -* Reset Network -* System Corruption Scan -* WinGet Reinstall -* Remove Adobe Creative Cloud - -### Legacy Windows Panels - -Open old-school Windows panels directly from WinUtil. Following Panels are available: - -* Control Panel -* Network Connections -* Power Panel -* Region -* Sound Settings -* System Properties -* User Accounts - -### Remote Access - -Enables OpenSSH server on your windows machine. - -## Updates ---- - -The utility provides three distinct settings for managing Windows updates: Default (Out of Box) Settings, Security (Recommended) Settings, and Disable ALL Updates (NOT RECOMMENDED!). Each setting offers a different approach to handling updates, catering to various user needs and preferences. - -### Default (Out of Box) Settings -- **Description**: This setting retains the default configurations that come with Windows, ensuring no modifications are made. -- **Functionality**: It will remove any custom Windows update settings previously applied. -- **Note**: If update errors persist, reset all updates in the configuration tab to restore all Microsoft Update Services to their default settings, reinstalling them from their servers. - -### Security (Recommended) Settings -- **Description**: This is the recommended setting for all computers. -- **Update Schedule**: - - **Feature Updates**: Delays feature updates by 2 years to avoid potential bugs and instability. - - **Security Updates**: Installs security updates 4 days after their release to ensure system protection against pressing security flaws. -- **Rationale**: - - **Feature Updates**: Often introduce new features and bugs; delaying these updates minimizes the risk of system disruptions. - - **Security Updates**: Essential for patching critical security vulnerabilities. Delaying them by a few days allows for verification of stability and compatibility without leaving the system exposed for extended periods. - -### Disable ALL Updates (NOT RECOMMENDED!) -- **Description**: This setting completely disables all Windows updates. -- **Suitability**: May be appropriate for systems used for specific purposes that do not require active internet browsing. -- **Warning**: Disabling updates significantly increases the risk of the system being hacked or infected due to the lack of security patches. -- **Note**: It is strongly advised against using this setting due to the heightened security risks. - -!!! bug - - The Updates tab is currently non-functional. We are actively working on a resolution to restore its functionality. - -## MicroWin ---- - -* **MicroWin** lets you customize your Windows 10 and 11 installation images by debloating them however you want. - -![Microwin](assets/Microwin-Dark.png#only-dark#gh-dark-mode-only) -![Microwin](assets/Microwin-Light.png#only-light#gh-light-mode-only) - -#### Basic usage - -1. Specify the source Windows ISO to customize. - - * If you don't have a Windows ISO file prepared, you can download it using the Media Creation Tool for the respective Windows version. [Here](https://go.microsoft.com/fwlink/?linkid=2156295) is the Windows 11 version, and [here](https://go.microsoft.com/fwlink/?LinkId=2265055) is the Windows 10 version - -2. Configure the debloat process. -3. Specify the target location for the new ISO file. -4. Let the magic happen! - -!!! warning "Heads-up" - - This feature is still in development, and you may encounter some issues with the generated images. If that happens, don't hesitate to report an issue! - -#### Options - -* **Download oscdimg.exe from the CTT GitHub repo** will grab an OSCDIMG executable from the GitHub repository instead of a Chocolatey package. - -!!! info - - OSCDIMG is the tool that lets the program create ISO images. Typically, you would find this in the [Windows Assessment and Deployment Kit](https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install) - -* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder in the `%TEMP%` directory. -* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu. - -By default, MicroWin will debloat the Pro edition, but you can choose any edition you want. - - -##### Driver integration options - -* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image. -* **Import drivers from the current system** will add every third-party driver that is present in your active installation. - -This makes the target image have the same hardware compatibility as the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the 'sources` folder. - -##### Custom user settings - -With MicroWin, you can also configure your user before proceeding if you don't want to use the default `User` account. To do this, simply type the account name (20 characters maximum), and a password. Then, let MicroWin do the rest. - -!!! info - - Please make sure that you remember your password. MicroWin will configure auto-login settings, so you won't have to enter your password. However, if you are required to enter your password, it's best that you don't forget it. - - -##### Ventoy options - -* **Copy to Ventoy** will copy the target ISO file to any USB drive with [Ventoy](https://ventoy.net/en/index.html) installed -!!! info - - Ventoy is a solution that lets you boot to any ISO file stored on a drive. Think of it as having multiple bootable USBs in one. Do note, though, that your drive needs to have enough free space for the target ISO file. - -## Automation - -* Some features are available through automation. This allows you to save your config file, pass it to WinUtil, walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15 - -* On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system. -![GetInstalled](assets/Get-Installed-Dark.png#only-dark#gh-dark-mode-only) -![GetInstalled](assets/Get-Installed-Light.png#only-light#gh-light-mode-only) - -* Click on the Settings cog in the upper right corner and choose Export. Choose file file and location; this will export the setting file. -![SettingsExport](assets/Settings-Export-Dark.png#only-dark#gh-dark-mode-only) -![SettingsExport](assets/Settings-Export-Light.png#only-light#gh-light-mode-only) - -* Copy this file to a USB or somewhere you can use it after Windows installation. - -!!! tip - - Use the Microwin tab to create a custom Windows image & install the Windows image. - -* On any supported Windows machine, open PowerShell **as Admin** and run the following command to automatically apply tweaks and install apps from the config file. - ```ps1 - iex "& { $(irm https://christitus.com/win) } -Config [path-to-your-config] -Run" - ``` -* Have a cup of coffee! Come back when it's done. diff --git a/functions/microwin/Invoke-Microwin.ps1 b/functions/microwin/Invoke-Microwin.ps1 deleted file mode 100644 index c6357e8a18..0000000000 --- a/functions/microwin/Invoke-Microwin.ps1 +++ /dev/null @@ -1,481 +0,0 @@ -function Invoke-Microwin { - <# - .DESCRIPTION - Invoke MicroWin routines... - #> - - - if($sync.ProcessRunning) { - $msg = "GetIso process is currently running." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - # Define the constants for Windows API -Add-Type @" -using System; -using System.Runtime.InteropServices; - -public class PowerManagement { - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); - - [FlagsAttribute] - public enum EXECUTION_STATE : uint { - ES_SYSTEM_REQUIRED = 0x00000001, - ES_DISPLAY_REQUIRED = 0x00000002, - ES_CONTINUOUS = 0x80000000, - } -} -"@ - - # Prevent the machine from sleeping - [PowerManagement]::SetThreadExecutionState([PowerManagement]::EXECUTION_STATE::ES_CONTINUOUS -bor [PowerManagement]::EXECUTION_STATE::ES_SYSTEM_REQUIRED -bor [PowerManagement]::EXECUTION_STATE::ES_DISPLAY_REQUIRED) - - # Ask the user where to save the file - $SaveDialog = New-Object System.Windows.Forms.SaveFileDialog - $SaveDialog.InitialDirectory = [Environment]::GetFolderPath('Desktop') - $SaveDialog.Filter = "ISO images (*.iso)|*.iso" - $SaveDialog.ShowDialog() | Out-Null - - if ($SaveDialog.FileName -eq "") { - Write-Host "No file name for the target image was specified" - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - - Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" - - Write-Host "Target ISO location: $($SaveDialog.FileName)" - - $index = $sync.MicrowinWindowsFlavors.SelectedValue.Split(":")[0].Trim() - Write-Host "Index chosen: '$index' from $($sync.MicrowinWindowsFlavors.SelectedValue)" - - $copyToUSB = $sync.WPFMicrowinCopyToUsb.IsChecked - $injectDrivers = $sync.MicrowinInjectDrivers.IsChecked - $importDrivers = $sync.MicrowinImportDrivers.IsChecked - - $importVirtIO = $sync.MicrowinCopyVirtIO.IsChecked - - $mountDir = $sync.MicrowinMountDir.Text - $scratchDir = $sync.MicrowinScratchDir.Text - - # Detect if the Windows image is an ESD file and convert it to WIM - if (-not (Test-Path -Path "$mountDir\sources\install.wim" -PathType Leaf) -and (Test-Path -Path "$mountDir\sources\install.esd" -PathType Leaf)) { - Write-Host "Exporting Windows image to a WIM file, keeping the index we want to work on. This can take several minutes, depending on the performance of your computer..." - Export-WindowsImage -SourceImagePath $mountDir\sources\install.esd -SourceIndex $index -DestinationImagePath $mountDir\sources\install.wim -CompressionType "Max" - if ($?) { - Remove-Item -Path "$mountDir\sources\install.esd" -Force - # Since we've already exported the image index we wanted, switch to the first one - $index = 1 - } else { - $msg = "The export process has failed and MicroWin processing cannot continue" - Write-Host "Failed to export the image" - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - } - - $imgVersion = (Get-WindowsImage -ImagePath $mountDir\sources\install.wim -Index $index).Version - Write-Host "The Windows Image Build Version is: $imgVersion" - - # Detect image version to avoid performing MicroWin processing on Windows 8 and earlier - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,10240,0))) -eq $false) { - $msg = "This image is not compatible with MicroWin processing. Make sure it isn't a Windows 8 or earlier image." - $dlg_msg = $msg + "`n`nIf you want more information, the version of the image selected is $($imgVersion)`n`nIf an image has been incorrectly marked as incompatible, report an issue to the developers." - Write-Host $msg - [System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation) - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - - # Detect whether the image to process contains Windows 10 and show warning - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { - $msg = "Windows 10 has been detected in the image you want to process. While you can continue, Windows 10 is not a recommended target for MicroWin, and you may not get the full experience." - $dlg_msg = $msg - Write-Host $msg - [System.Windows.MessageBox]::Show($dlg_msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Exclamation) - } - - $mountDirExists = Test-Path $mountDir - $scratchDirExists = Test-Path $scratchDir - if (-not $mountDirExists -or -not $scratchDirExists) { - Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist." - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - - try { - - Write-Host "Mounting Windows image. This may take a while." - Mount-WindowsImage -ImagePath "$mountDir\sources\install.wim" -Index $index -Path "$scratchDir" - if ($?) { - Write-Host "The Windows image has been mounted successfully. Continuing processing..." - } else { - Write-Host "Could not mount image. Exiting..." - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - - if ($importDrivers) { - Write-Host "Exporting drivers from active installation..." - if (Test-Path "$env:TEMP\DRV_EXPORT") { - Remove-Item "$env:TEMP\DRV_EXPORT" -Recurse -Force - } - if (($injectDrivers -and (Test-Path "$($sync.MicrowinDriverLocation.Text)"))) { - Write-Host "Using specified driver source..." - dism /english /online /export-driver /destination="$($sync.MicrowinDriverLocation.Text)" | Out-Host - if ($?) { - # Don't add exported drivers yet, that is run later - Write-Host "Drivers have been exported successfully." - } else { - Write-Host "Failed to export drivers." - } - } else { - New-Item -Path "$env:TEMP\DRV_EXPORT" -ItemType Directory -Force - dism /english /online /export-driver /destination="$env:TEMP\DRV_EXPORT" | Out-Host - if ($?) { - Write-Host "Adding exported drivers..." - dism /english /image="$scratchDir" /add-driver /driver="$env:TEMP\DRV_EXPORT" /recurse | Out-Host - } else { - Write-Host "Failed to export drivers. Continuing without importing them..." - } - if (Test-Path "$env:TEMP\DRV_EXPORT") { - Remove-Item "$env:TEMP\DRV_EXPORT" -Recurse -Force - } - } - } - - if ($injectDrivers) { - $driverPath = $sync.MicrowinDriverLocation.Text - if (Test-Path $driverPath) { - Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) " - dism /English /image:$scratchDir /add-driver /driver:$driverPath /recurse | Out-Host - } else { - Write-Host "Path to drivers is invalid continuing without driver injection" - } - } - - if ($importVirtIO) { - Write-Host "Copying VirtIO drivers..." - Microwin-CopyVirtIO - } - - Write-Host "Remove Features from the image" - Microwin-RemoveFeatures -UseCmdlets $true - Write-Host "Removing features complete!" - Write-Host "Removing OS packages" - Microwin-RemovePackages -UseCmdlets $true - Write-Host "Removing Appx Bloat" - Microwin-RemoveProvisionedPackages -UseCmdlets $true - - # Detect Windows 11 24H2 and add dependency to FileExp to prevent Explorer look from going back - thanks @WitherOrNot and @thecatontheceiling - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) { - try { - if (Test-Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -PathType Leaf) { - # Found the culprit. Do the following: - # 1. Take ownership of the file, from TrustedInstaller to Administrators - takeown /F "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /A - # 2. Set ACLs so that we can write to it - icacls "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" /grant "$(Microwin-GetLocalizedUsers -admins $true):(M)" | Out-Host - # 3. Open the file and do the modification - $appxManifest = Get-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" - $originalLine = $appxManifest[13] - $dependency = "`n <PackageDependency Name=`"Microsoft.WindowsAppRuntime.CBS`" MinVersion=`"1.0.0.0`" Publisher=`"CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US`" />" - $appxManifest[13] = "$originalLine$dependency" - Set-Content -Path "$scratchDir\Windows\SystemApps\MicrosoftWindows.Client.FileExp_cw5n1h2txyewy\appxmanifest.xml" -Value $appxManifest -Force -Encoding utf8 - } - } - catch { - # Do nothing - } - } - - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe" - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Media Player" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Media Player" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Mail" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Mail" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Internet Explorer" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Internet Explorer" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\GameBarPresenceWriter" - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDriveSetup.exe" - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\OneDrive.ico" - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*narratorquickstart*" -Directory - Microwin-RemoveFileOrDirectory -pathToDelete "$($scratchDir)\Windows\SystemApps" -mask "*ParentalControls*" -Directory - Write-Host "Removal complete!" - - Write-Host "Create unattend.xml" - - if ($sync.MicrowinUserName.Text -eq "") - { - Microwin-NewUnattend -userName "User" - } - else - { - if ($sync.MicrowinUserPassword.Password -eq "") - { - Microwin-NewUnattend -userName "$($sync.MicrowinUserName.Text)" - } - else - { - Microwin-NewUnattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)" - } - } - Write-Host "Done Create unattend.xml" - Write-Host "Copy unattend.xml file into the ISO" - New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther" - Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\Windows\Panther\unattend.xml" -force - New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\System32\Sysprep" - Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\Windows\System32\Sysprep\unattend.xml" -force - Copy-Item "$env:temp\unattend.xml" "$($scratchDir)\unattend.xml" -force - Write-Host "Done Copy unattend.xml" - - Write-Host "Create FirstRun" - Microwin-NewFirstRun - Write-Host "Done create FirstRun" - Write-Host "Copy FirstRun.ps1 into the ISO" - Copy-Item "$env:temp\FirstStartup.ps1" "$($scratchDir)\Windows\FirstStartup.ps1" -force - Write-Host "Done copy FirstRun.ps1" - - Write-Host "Copy link to winutil.ps1 into the ISO" - $desktopDir = "$($scratchDir)\Windows\Users\Default\Desktop" - New-Item -ItemType Directory -Force -Path "$desktopDir" - dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default" - - Write-Host "Copy checkinstall.cmd into the ISO" - Microwin-NewCheckInstall - Copy-Item "$env:temp\checkinstall.cmd" "$($scratchDir)\Windows\checkinstall.cmd" -force - Write-Host "Done copy checkinstall.cmd" - - Write-Host "Creating a directory that allows to bypass Wifi setup" - New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\System32\OOBE\BYPASSNRO" - - Write-Host "Loading registry" - reg load HKLM\zCOMPONENTS "$($scratchDir)\Windows\System32\config\COMPONENTS" - reg load HKLM\zDEFAULT "$($scratchDir)\Windows\System32\config\default" - reg load HKLM\zNTUSER "$($scratchDir)\Users\Default\ntuser.dat" - reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE" - reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM" - - Write-Host "Disabling Teams" - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" /t REG_DWORD /d 0 /f >$null 2>&1 - reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v ChatIcon /t REG_DWORD /d 2 /f >$null 2>&1 - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d 0 /f >$null 2>&1 - reg query "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" >$null 2>&1 - # Write-Host Error code $LASTEXITCODE - Write-Host "Done disabling Teams" - - Write-Host "Fix Windows Volume Mixer Issue" - reg add "HKLM\zNTUSER\Software\Microsoft\Internet Explorer\LowRegistry\Audio\PolicyConfig\PropertyStore" /f - - Write-Host "Bypassing system requirements (system image)" - reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f - reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f - - # Prevent Windows Update Installing so called Expedited Apps - 24H2 and newer - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) { - @( - 'EdgeUpdate', - 'DevHomeUpdate', - 'OutlookUpdate', - 'CrossDeviceUpdate' - ) | ForEach-Object { - Write-Host "Removing Windows Expedited App: $_" - - # Copied here After Installation (Online) - # reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null - - # When in Offline Image - reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null - } - } - - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f - Write-Host "Setting all services to start manually" - reg add "HKLM\zSOFTWARE\CurrentControlSet\Services" /v Start /t REG_DWORD /d 3 /f - # Write-Host $LASTEXITCODE - - Write-Host "Enabling Local Accounts on OOBE" - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f - - Write-Host "Disabling Sponsored Apps" - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f - reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /f - reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d '{\"pinnedList\": [{}]}' /f - Write-Host "Done removing Sponsored Apps" - - Write-Host "Disabling Reserved Storage" - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d 0 /f - - Write-Host "Changing theme to dark. This only works on Activated Windows" - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d 0 /f - reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d 0 /f - - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,21996,1))) -eq $false) { - # We're dealing with Windows 10. Configure sane desktop settings. NOTE: even though stuff to disable News and Interests is there, - # it doesn't seem to work, and I don't want to waste more time dealing with an operating system that will lose support in a year (2025) - - # I invite anyone to work on improving stuff for News and Interests, but that won't be me! - - Write-Host "Disabling Search Highlights..." - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds\DSB" /v "ShowDynamicContent" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\SearchSettings" /v "IsDynamicSearchBoxEnabled" /t REG_DWORD /d 0 /f - reg add "HKLM\zSOFTWARE\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "TraySearchBoxVisible" /t REG_DWORD /d 1 /f - } - - } catch { - Write-Error "An unexpected error occurred: $_" - } finally { - Write-Host "Unmounting Registry..." - reg unload HKLM\zCOMPONENTS - reg unload HKLM\zDEFAULT - reg unload HKLM\zNTUSER - reg unload HKLM\zSOFTWARE - reg unload HKLM\zSYSTEM - - Write-Host "Cleaning up image..." - dism /English /image:$scratchDir /Cleanup-Image /StartComponentCleanup /ResetBase - Write-Host "Cleanup complete." - - Write-Host "Unmounting image..." - Dismount-WindowsImage -Path "$scratchDir" -Save - } - - try { - - Write-Host "Exporting image into $mountDir\sources\install2.wim" - Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install2.wim" -CompressionType "Max" - Write-Host "Remove old '$mountDir\sources\install.wim' and rename $mountDir\sources\install2.wim" - Remove-Item "$mountDir\sources\install.wim" - Rename-Item "$mountDir\sources\install2.wim" "$mountDir\sources\install.wim" - - if (-not (Test-Path -Path "$mountDir\sources\install.wim")) { - Write-Error "Something went wrong and '$mountDir\sources\install.wim' doesn't exist. Please report this bug to the devs" - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - Write-Host "Windows image completed. Continuing with boot.wim." - - # Next step boot image - Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir" - Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir" - - if ($injectDrivers) { - $driverPath = $sync.MicrowinDriverLocation.Text - if (Test-Path $driverPath) { - Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) " - dism /English /image:$scratchDir /add-driver /driver:$driverPath /recurse | Out-Host - } else { - Write-Host "Path to drivers is invalid continuing without driver injection" - } - } - - Write-Host "Loading registry..." - reg load HKLM\zCOMPONENTS "$($scratchDir)\Windows\System32\config\COMPONENTS" >$null - reg load HKLM\zDEFAULT "$($scratchDir)\Windows\System32\config\default" >$null - reg load HKLM\zNTUSER "$($scratchDir)\Users\Default\ntuser.dat" >$null - reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE" >$null - reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM" >$null - Write-Host "Bypassing system requirements on the setup image" - reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f - reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f - reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f - reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f - # Fix Computer Restarted Unexpectedly Error on New Bare Metal Install - reg add "HKLM\zSYSTEM\Setup\Status\ChildCompletion" /v "setup.exe" /t REG_DWORD /d 3 /f - } catch { - Write-Error "An unexpected error occurred: $_" - } finally { - Write-Host "Unmounting Registry..." - reg unload HKLM\zCOMPONENTS - reg unload HKLM\zDEFAULT - reg unload HKLM\zNTUSER - reg unload HKLM\zSOFTWARE - reg unload HKLM\zSYSTEM - - Write-Host "Unmounting image..." - Dismount-WindowsImage -Path "$scratchDir" -Save - - Write-Host "Creating ISO image" - - # if we downloaded oscdimg from github it will be in the temp directory so use it - # if it is not in temp it is part of ADK and is in global PATH so just set it to oscdimg.exe - $oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe' - $oscdImgFound = Test-Path $oscdimgPath -PathType Leaf - if (!$oscdImgFound) { - $oscdimgPath = "oscdimg.exe" - } - - Write-Host "[INFO] Using oscdimg.exe from: $oscdimgPath" - - $oscdimgProc = Start-Process -FilePath "$oscdimgPath" -ArgumentList "-m -o -u2 -udfver102 -bootdata:2#p0,e,b`"$mountDir\boot\etfsboot.com`"#pEF,e,b`"$mountDir\efi\microsoft\boot\efisys.bin`" `"$mountDir`" `"$($SaveDialog.FileName)`"" -Wait -PassThru -NoNewWindow - - $LASTEXITCODE = $oscdimgProc.ExitCode - - Write-Host "OSCDIMG Error Level : $($oscdimgProc.ExitCode)" - - if ($copyToUSB) { - Write-Host "Copying target ISO to the USB drive" - Microwin-CopyToUSB("$($SaveDialog.FileName)") - if ($?) { Write-Host "Done Copying target ISO to USB drive!" } else { Write-Host "ISO copy failed." } - } - - Write-Host " _____ " - Write-Host "(____ \ " - Write-Host " _ \ \ ___ ____ ____ " - Write-Host "| | | / _ \| _ \ / _ ) " - Write-Host "| |__/ / |_| | | | ( (/ / " - Write-Host "|_____/ \___/|_| |_|\____) " - - # Check if the ISO was successfully created - CTT edit - if ($LASTEXITCODE -eq 0) { - Write-Host "`n`nPerforming Cleanup..." - Remove-Item -Recurse -Force "$($scratchDir)" - Remove-Item -Recurse -Force "$($mountDir)" - $msg = "Done. ISO image is located here: $($SaveDialog.FileName)" - Write-Host $msg - Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Information) - } else { - Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed." - try { - # This creates a new Win32 exception from which we can extract a message in the system language. - # Now, this will NOT throw an exception - $exitCode = New-Object System.ComponentModel.Win32Exception($LASTEXITCODE) - Write-Host "Reason: $($exitCode.Message)" - } catch { - # Could not get error description from Windows APIs - } - } - - $sync.MicrowinOptionsPanel.Visibility = 'Collapsed' - - #$sync.MicrowinFinalIsoLocation.Text = "$env:temp\microwin.iso" - $sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)" - # Allow the machine to sleep again (optional) - [PowerManagement]::SetThreadExecutionState(0) - $sync.ProcessRunning = $false - } -} diff --git a/functions/microwin/Invoke-MicrowinGetIso.ps1 b/functions/microwin/Invoke-MicrowinGetIso.ps1 deleted file mode 100644 index 01db0c182f..0000000000 --- a/functions/microwin/Invoke-MicrowinGetIso.ps1 +++ /dev/null @@ -1,295 +0,0 @@ -function Invoke-MicrowinGetIso { - <# - .DESCRIPTION - Function to get the path to Iso file for MicroWin, unpack that isom=, read basic information and populate the UI Options - #> - - Write-Host "Invoking WPFGetIso" - - if($sync.ProcessRunning) { - $msg = "GetIso process is currently running." - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) - return - } - - $sync.BusyMessage.Visibility="Visible" - $sync.BusyText.Text="N Busy" - - - - Write-Host " _ __ __ _ " - Write-Host " /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ " - Write-Host " / \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \ " - Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | " - Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| " - - $oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe' - $oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf) - Write-Host "oscdimg.exe on system: $oscdImgFound" - - if (!$oscdImgFound) { - $downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked - $sync.BusyMessage.Visibility="Hidden" - - if (!$downloadFromGitHub) { - # only show the message to people who did check the box to download from github, if you check the box - # you consent to downloading it, no need to show extra dialogs - [System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.") - # the step below needs choco to download oscdimg - # Install Choco if not already present - Install-WinUtilChoco - $chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco) - Write-Host "choco on system: $chocoFound" - if (!$chocoFound) { - [System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe") - return - } - - Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install windows-adk-oscdimg" - [System.Windows.MessageBox]::Show("oscdimg is installed, now close, reopen PowerShell terminal and re-launch winutil.ps1") - return - } else { - [System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it from github. This might take a long time.") - Microwin-GetOscdimg -oscdimgPath $oscdimgPath - $oscdImgFound = Test-Path $oscdimgPath -PathType Leaf - if (!$oscdImgFound) { - $msg = "oscdimg was not downloaded can not proceed" - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) - return - } else { - Write-Host "oscdimg.exe was successfully downloaded from github" - } - } - } - - if ($sync["ISOmanual"].IsChecked) { - # Open file dialog to let user choose the ISO file - [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null - $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog - $openFileDialog.initialDirectory = $initialDirectory - $openFileDialog.filter = "ISO files (*.iso)| *.iso" - $openFileDialog.ShowDialog() | Out-Null - $filePath = $openFileDialog.FileName - - if ([string]::IsNullOrEmpty($filePath)) { - Write-Host "No ISO is chosen" - $sync.BusyMessage.Visibility="Hidden" - return - } - } elseif ($sync["ISOdownloader"].IsChecked) { - # Create folder browsers for user-specified locations - [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null - $isoDownloaderFBD = New-Object System.Windows.Forms.FolderBrowserDialog - $isoDownloaderFBD.Description = "Please specify the path to download the ISO file to:" - $isoDownloaderFBD.ShowNewFolderButton = $true - if ($isoDownloaderFBD.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK) - { - return - } - - # Grab the location of the selected path - $targetFolder = $isoDownloaderFBD.SelectedPath - - # Auto download newest ISO - # Credit: https://github.com/pbatard/Fido - $fidopath = "$env:temp\Fido.ps1" - $originalLocation = $PSScriptRoot - - Invoke-WebRequest "https://github.com/pbatard/Fido/raw/master/Fido.ps1" -OutFile $fidopath - - Set-Location -Path $env:temp - # Detect if the first option ("System language") has been selected and get a Fido-approved language from the current culture - $lang = if ($sync["ISOLanguage"].SelectedIndex -eq 0) { - Microwin-GetLangFromCulture -langName (Get-Culture).Name - } else { - $sync["ISOLanguage"].SelectedItem - } - - & $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64" -Lang $lang -Ed "Windows 11 Home/Pro/Edu" - if (-not $?) - { - Write-Host "Could not download the ISO file. Look at the output of the console for more information." - $msg = "The ISO file could not be downloaded" - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) - return - } - Set-Location $originalLocation - # Use the FullName property to only grab the file names. Using this property is necessary as, without it, you're passing the usual output of Get-ChildItem - # to the variable, and let's be honest, that does NOT exist in the file system - $filePath = (Get-ChildItem -Path "$env:temp" -Filter "Win11*.iso").FullName | Sort-Object LastWriteTime -Descending | Select-Object -First 1 - $fileName = [IO.Path]::GetFileName("$filePath") - - if (($targetFolder -ne "") -and (Test-Path "$targetFolder")) - { - try - { - # "Let it download to $env:TEMP and then we **move** it to the file path." - CodingWonders - $destinationFilePath = "$targetFolder\$fileName" - Write-Host "Moving ISO file. Please wait..." - Move-Item -Path "$filePath" -Destination "$destinationFilePath" -Force - $filePath = $destinationFilePath - } - catch - { - Write-Host "Unable to move the ISO file to the location you specified. The downloaded ISO is in the `"$env:TEMP`" folder" - Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow - } - } - } - - Write-Host "File path $($filePath)" - if (-not (Test-Path -Path "$filePath" -PathType Leaf)) { - $msg = "File you've chosen doesn't exist" - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) - return - } - - Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" - - # Detect the file size of the ISO and compare it with the free space of the system drive - $isoSize = (Get-Item -Path "$filePath").Length - Write-Debug "Size of ISO file: $($isoSize) bytes" - # Use this procedure to get the free space of the drive depending on where the user profile folder is stored. - # This is done to guarantee a dynamic solution, as the installation drive may be mounted to a letter different than C - $driveSpace = (Get-Volume -DriveLetter ([IO.Path]::GetPathRoot([Environment]::GetFolderPath([Environment+SpecialFolder]::UserProfile)).Replace(":\", "").Trim())).SizeRemaining - Write-Debug "Free space on installation drive: $($driveSpace) bytes" - if ($driveSpace -lt ($isoSize * 2)) { - # It's not critical and we _may_ continue. Output a warning - Write-Warning "You may not have enough space for this operation. Proceed at your own risk." - } - elseif ($driveSpace -lt $isoSize) { - # It's critical and we can't continue. Output an error - Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations." - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } else { - Write-Host "You have enough space for this operation." - } - - try { - Write-Host "Mounting Iso. Please wait." - $mountedISO = Mount-DiskImage -PassThru "$filePath" - Write-Host "Done mounting Iso `"$($mountedISO.ImagePath)`"" - $driveLetter = (Get-Volume -DiskImage $mountedISO).DriveLetter - Write-Host "Iso mounted to '$driveLetter'" - } catch { - # @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki - Write-Error "Failed to mount the image. Error: $($_.Exception.Message)" - Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system" - Write-Host "Please refer to this wiki for more details: https://christitustech.github.io/winutil/KnownIssues/#troubleshoot-errors-during-microwin-usage" -ForegroundColor Red - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - return - } - # storing off values in hidden fields for further steps - # there is probably a better way of doing this, I don't have time to figure this out - $sync.MicrowinIsoDrive.Text = $driveLetter - - $mountedISOPath = (Split-Path -Path "$filePath") - if ($sync.MicrowinScratchDirBox.Text.Trim() -eq "Scratch") { - $sync.MicrowinScratchDirBox.Text ="" - } - - $UseISOScratchDir = $sync.WPFMicrowinISOScratchDir.IsChecked - - if ($UseISOScratchDir) { - $sync.MicrowinScratchDirBox.Text=$mountedISOPath - } - - if( -Not $sync.MicrowinScratchDirBox.Text.EndsWith('\') -And $sync.MicrowinScratchDirBox.Text.Length -gt 1) { - - $sync.MicrowinScratchDirBox.Text = Join-Path $sync.MicrowinScratchDirBox.Text.Trim() '\' - - } - - # Detect if the folders already exist and remove them - if (($sync.MicrowinMountDir.Text -ne "") -and (Test-Path -Path $sync.MicrowinMountDir.Text)) { - try { - Write-Host "Deleting temporary files from previous run. Please wait..." - Remove-Item -Path $sync.MicrowinMountDir.Text -Recurse -Force - Remove-Item -Path $sync.MicrowinScratchDir.Text -Recurse -Force - } catch { - Write-Host "Could not delete temporary files. You need to delete those manually." - } - } - - Write-Host "Setting up mount dir and scratch dirs" - $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" - $randomNumber = Get-Random -Minimum 1 -Maximum 9999 - $randomMicrowin = "Microwin_${timestamp}_${randomNumber}" - $randomMicrowinScratch = "MicrowinScratch_${timestamp}_${randomNumber}" - $sync.BusyText.Text=" - Mounting" - Write-Host "Mounting Iso. Please wait." - if ($sync.MicrowinScratchDirBox.Text -eq "") { - $mountDir = Join-Path $env:TEMP $randomMicrowin - $scratchDir = Join-Path $env:TEMP $randomMicrowinScratch - } else { - $scratchDir = $sync.MicrowinScratchDirBox.Text+"Scratch" - $mountDir = $sync.MicrowinScratchDirBox.Text+"micro" - } - - $sync.MicrowinMountDir.Text = $mountDir - $sync.MicrowinScratchDir.Text = $scratchDir - Write-Host "Done setting up mount dir and scratch dirs" - Write-Host "Scratch dir is $scratchDir" - Write-Host "Image dir is $mountDir" - - try { - - #$data = @($driveLetter, $filePath) - New-Item -ItemType Directory -Force -Path "$($mountDir)" | Out-Null - New-Item -ItemType Directory -Force -Path "$($scratchDir)" | Out-Null - Write-Host "Copying Windows image. This will take awhile, please don't use UI or cancel this step!" - - # xcopy we can verify files and also not copy files that already exist, but hard to measure - # xcopy.exe /E /I /H /R /Y /J $DriveLetter":" $mountDir >$null - $totalTime = Measure-Command { Copy-Files "$($driveLetter):" "$mountDir" -Recurse -Force } - Write-Host "Copy complete! Total Time: $($totalTime.Minutes) minutes, $($totalTime.Seconds) seconds" - - $wimFile = "$mountDir\sources\install.wim" - Write-Host "Getting image information $wimFile" - - if ((-not (Test-Path -Path "$wimFile" -PathType Leaf)) -and (-not (Test-Path -Path "$($wimFile.Replace(".wim", ".esd").Trim())" -PathType Leaf))) { - $msg = "Neither install.wim nor install.esd exist in the image, this could happen if you use unofficial Windows images. Please don't use shady images from the internet, use only official images. Here are instructions how to download ISO images if the Microsoft website is not showing the link to download and ISO. https://www.techrepublic.com/article/how-to-download-a-windows-10-iso-file-without-using-the-media-creation-tool/" - Write-Host $msg - [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error) - Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning" - throw - } - elseif ((-not (Test-Path -Path $wimFile -PathType Leaf)) -and (Test-Path -Path $wimFile.Replace(".wim", ".esd").Trim() -PathType Leaf)) { - Write-Host "Install.esd found on the image. It needs to be converted to a WIM file in order to begin processing" - $wimFile = $wimFile.Replace(".wim", ".esd").Trim() - } - $sync.MicrowinWindowsFlavors.Items.Clear() - Get-WindowsImage -ImagePath $wimFile | ForEach-Object { - $imageIdx = $_.ImageIndex - $imageName = $_.ImageName - $sync.MicrowinWindowsFlavors.Items.Add("$imageIdx : $imageName") - } - $sync.MicrowinWindowsFlavors.SelectedIndex = 0 - Write-Host "Finding suitable Pro edition. This can take some time. Do note that this is an automatic process that might not select the edition you want." - Get-WindowsImage -ImagePath $wimFile | ForEach-Object { - if ((Get-WindowsImage -ImagePath $wimFile -Index $_.ImageIndex).EditionId -eq "Professional") { - # We have found the Pro edition - $sync.MicrowinWindowsFlavors.SelectedIndex = $_.ImageIndex - 1 - } - } - Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage - Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....." - - $sync.MicrowinOptionsPanel.Visibility = 'Visible' - } catch { - Write-Host "Dismounting bad image..." - Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage - Remove-Item -Recurse -Force "$($scratchDir)" - Remove-Item -Recurse -Force "$($mountDir)" - } - - Write-Host "Done reading and unpacking ISO" - Write-Host "" - Write-Host "*********************************" - Write-Host "Check the UI for further steps!!!" - - $sync.BusyMessage.Visibility="Hidden" - $sync.ProcessRunning = $false - Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" -} diff --git a/functions/microwin/Microwin-Classes.ps1 b/functions/microwin/Microwin-Classes.ps1 deleted file mode 100644 index 4c5ad67697..0000000000 --- a/functions/microwin/Microwin-Classes.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -class ErroredPackage { - [string]$PackageName - [string]$ErrorMessage - ErroredPackage() { $this.Init(@{} )} - # Constructor for packages that have errored out - ErroredPackage([string]$pkgName, [string]$reason) { - $this.PackageName = $pkgName - $this.ErrorMessage = $reason - } -} diff --git a/functions/microwin/Microwin-CopyToUSB.ps1 b/functions/microwin/Microwin-CopyToUSB.ps1 deleted file mode 100644 index f1b37c955d..0000000000 --- a/functions/microwin/Microwin-CopyToUSB.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -function Microwin-CopyToUSB([string]$fileToCopy) { - foreach ($volume in Get-Volume) { - if ($volume -and $volume.FileSystemLabel -ieq "ventoy") { - $destinationPath = "$($volume.DriveLetter):\" - #Copy-Item -Path $fileToCopy -Destination $destinationPath -Force - # Get the total size of the file - $totalSize = (Get-Item "$fileToCopy").length - - Copy-Item -Path "$fileToCopy" -Destination "$destinationPath" -Verbose -Force -Recurse -Container -PassThru | - ForEach-Object { - # Calculate the percentage completed - $completed = ($_.BytesTransferred / $totalSize) * 100 - - # Display the progress bar - Write-Progress -Activity "Copying File" -Status "Progress" -PercentComplete $completed -CurrentOperation ("{0:N2} MB / {1:N2} MB" -f ($_.BytesTransferred / 1MB), ($totalSize / 1MB)) - } - - Write-Host "File copied to Ventoy drive $($volume.DriveLetter)" - - # Detect if config files are present, move them if they are, and configure the Ventoy drive to not bypass the requirements - $customVentoyConfig = @' -{ - "control":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ], - "control_legacy":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ], - "control_uefi":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ], - "control_ia32":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ], - "control_aa64":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ], - "control_mips":[ - { "VTOY_WIN11_BYPASS_CHECK": "0" }, - { "VTOY_WIN11_BYPASS_NRO": "0" } - ] -} -'@ - - try { - Write-Host "Writing custom Ventoy configuration. Please wait..." - if (Test-Path -Path "$($volume.DriveLetter):\ventoy\ventoy.json" -PathType Leaf) { - Write-Host "A Ventoy configuration file exists. Moving it..." - Move-Item -Path "$($volume.DriveLetter):\ventoy\ventoy.json" -Destination "$($volume.DriveLetter):\ventoy\ventoy.json.old" -Force - Write-Host "Existing Ventoy configuration has been moved to `"ventoy.json.old`". Feel free to put your config back into the `"ventoy.json`" file." - } - if (-not (Test-Path -Path "$($volume.DriveLetter):\ventoy")) { - New-Item -Path "$($volume.DriveLetter):\ventoy" -ItemType Directory -Force | Out-Null - } - $customVentoyConfig | Out-File -FilePath "$($volume.DriveLetter):\ventoy\ventoy.json" -Encoding utf8 -Force - Write-Host "The Ventoy drive has been successfully configured." - } catch { - Write-Host "Could not configure Ventoy drive. Error: $($_.Exception.Message)`n" - Write-Host "Be sure to add the following configuration to the Ventoy drive by either creating a `"ventoy.json`" file in the `"ventoy`" directory (create it if it doesn't exist) or by editing an existing one: `n`n$customVentoyConfig`n" - Write-Host "Failure to do this will cause conflicts with your target ISO file." - } - return - } - } - Write-Host "Ventoy USB Key is not inserted" -} diff --git a/functions/microwin/Microwin-CopyVirtIO.ps1 b/functions/microwin/Microwin-CopyVirtIO.ps1 deleted file mode 100644 index d050d6dc77..0000000000 --- a/functions/microwin/Microwin-CopyVirtIO.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -function Microwin-CopyVirtIO { - <# - .SYNOPSIS - Downloads and copies the VirtIO Guest Tools drivers to the target MicroWin ISO - .NOTES - A network connection must be available and the servers of Fedora People must be up. Automatic driver installation will not be added yet - I want this implementation to be reliable. - #> - - try { - Write-Host "Checking existing files..." - if (Test-Path -Path "$($env:TEMP)\virtio.iso" -PathType Leaf) { - Write-Host "VirtIO ISO has been detected. Deleting..." - Remove-Item -Path "$($env:TEMP)\virtio.iso" -Force - } - Write-Host "Getting latest VirtIO drivers. Please wait. This can take some time, depending on your network connection speed and the speed of the servers..." - Start-BitsTransfer -Source "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" -Destination "$($env:TEMP)\virtio.iso" -DisplayName "Downloading VirtIO drivers..." - # Do everything else if the VirtIO ISO exists - if (Test-Path -Path "$($env:TEMP)\virtio.iso" -PathType Leaf) { - Write-Host "Mounting ISO. Please wait." - $virtIO_ISO = Mount-DiskImage -PassThru "$($env:TEMP)\virtio.iso" - $driveLetter = (Get-Volume -DiskImage $virtIO_ISO).DriveLetter - # Create new directory for VirtIO on ISO - New-Item -Path "$mountDir\VirtIO" -ItemType Directory | Out-Null - $totalTime = Measure-Command { Copy-Files "$($driveLetter):" "$mountDir\VirtIO" -Recurse -Force } - Write-Host "VirtIO contents have been successfully copied. Time taken: $($totalTime.Minutes) minutes, $($totalTime.Seconds) seconds`n" - Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage - Remove-Item -Path "$($env:TEMP)\virtio.iso" -Force -ErrorAction SilentlyContinue - Write-Host "To proceed with installation of the MicroWin image in QEMU/Proxmox VE:" - Write-Host "1. Proceed with Setup until you reach the disk selection screen, in which you won't see any drives" - Write-Host "2. Click `"Load Driver`" and click Browse" - Write-Host "3. In the folder selection dialog, point to this path:`n`n `"D:\VirtIO\vioscsi\w11\amd64`" (replace amd64 with ARM64 if you are using Windows on ARM, and `"D:`" with the drive letter of the ISO)`n" - Write-Host "4. Select all drivers that will appear in the list box and click OK" - } else { - throw "Could not download VirtIO drivers" - } - } catch { - Write-Host "We could not download and/or prepare the VirtIO drivers. Error information: $_`n" - Write-Host "You will need to download these drivers manually. Location: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" - } -} diff --git a/functions/microwin/Microwin-GetLangFromCulture.ps1 b/functions/microwin/Microwin-GetLangFromCulture.ps1 deleted file mode 100644 index 5c6d8fd0ba..0000000000 --- a/functions/microwin/Microwin-GetLangFromCulture.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -function Microwin-GetLangFromCulture { - - param ( - [Parameter(Mandatory, Position = 0)] [string]$langName - ) - - switch -Wildcard ($langName) - { - "ar*" { return "Arabic" } - "pt-BR" { return "Brazilian Portuguese" } - "bg*" { return "Bulgarian" } - {($_ -eq "zh-CH") -or ($_ -like "zh-Hans*") -or ($_ -eq "zh-SG") -or ($_ -eq "zh-CHS")} { return "Chinese (Simplified)" } - {($_ -eq "zh") -or ($_ -eq "zh-Hant") -or ($_ -eq "zh-HK") -or ($_ -eq "zh-MO") -or ($_ -eq "zh-TW") -or ($_ -eq "zh-CHT")} { return "Chinese (Traditional)" } - "hr*" { return "Croatian" } - "cs*" { return "Czech" } - "da*" { return "Danish" } - "nl*" { return "Dutch" } - "en-US" { return "English" } - {($_ -like "en*") -and ($_ -ne "en-US")} { return "English International" } - "et*" { return "Estonian" } - "fi*" { return "Finnish" } - {($_ -like "fr*") -and ($_ -ne "fr-CA")} { return "French" } - "fr-CA" { return "French Canadian" } - "de*" { return "German" } - "el*" { return "Greek" } - "he*" { return "Hebrew" } - "hu*" { return "Hungarian" } - "it*" { return "Italian" } - "ja*" { return "Japanese" } - "ko*" { return "Korean" } - "lv*" { return "Latvian" } - "lt*" { return "Lituanian" } - "nb*" { return "Norwegian" } - "pl*" { return "Polish" } - {($_ -like "pt*") -and ($_ -ne "pt-BR")} { return "Portuguese" } - "ro*" { return "Romanian" } - "ru*" { return "Russian" } - "sr-Latn*" { return "Serbian Latin" } - "sk*" { return "Slovak" } - "sl*" { return "Slovenian" } - {($_ -like "es*") -and ($_ -ne "es-MX")} { return "Spanish" } - "es-MX" { return "Spanish (Mexico)" } - "sv*" { return "Swedish" } - "th*" { return "Thai" } - "tr*" { return "Turkish" } - "uk*" { return "Ukrainian" } - default { return "English" } - } -} diff --git a/functions/microwin/Microwin-GetLocalizedUsers.ps1 b/functions/microwin/Microwin-GetLocalizedUsers.ps1 deleted file mode 100644 index 9b1763f396..0000000000 --- a/functions/microwin/Microwin-GetLocalizedUsers.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -function Microwin-GetLocalizedUsers -{ - <# - .SYNOPSIS - Gets a localized user group representation for ICACLS commands (Port from DISMTools PE Helper) - .PARAMETER admins - Determines whether to get a localized user group representation for the Administrators user group - .OUTPUTS - A string containing the localized user group - .EXAMPLE - Microwin-GetLocalizedUsers -admins $true - #> - param ( - [Parameter(Mandatory = $true, Position = 0)] [bool]$admins - ) - if ($admins) { - return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-544" }).Name - } else { - return (Get-LocalGroup | Where-Object { $_.SID.Value -like "S-1-5-32-545" }).Name - } -} diff --git a/functions/microwin/Microwin-GetOscdimg.ps1 b/functions/microwin/Microwin-GetOscdimg.ps1 deleted file mode 100644 index f395f71fc2..0000000000 --- a/functions/microwin/Microwin-GetOscdimg.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -function Microwin-GetOscdimg { - <# - .DESCRIPTION - This function will download oscdimg file from github Release folders and put it into env:temp folder - - .EXAMPLE - Microwin-GetOscdimg - #> - - param( - [Parameter(Mandatory, position=0)] - [string]$oscdimgPath - ) - - $oscdimgPath = "$env:TEMP\oscdimg.exe" - $downloadUrl = "https://github.com/ChrisTitusTech/winutil/raw/main/releases/oscdimg.exe" - Invoke-RestMethod -Uri $downloadUrl -OutFile $oscdimgPath - $hashResult = Get-FileHash -Path $oscdimgPath -Algorithm SHA256 - $sha256Hash = $hashResult.Hash - - Write-Host "[INFO] oscdimg.exe SHA-256 Hash: $sha256Hash" - - $expectedHash = "AB9E161049D293B544961BFDF2D61244ADE79376D6423DF4F60BF9B147D3C78D" # Replace with the actual expected hash - if ($sha256Hash -eq $expectedHash) { - Write-Host "Hashes match. File is verified." - } else { - Write-Host "Hashes do not match. File may be corrupted or tampered with." - } -} diff --git a/functions/microwin/Microwin-NewCheckInstall.ps1 b/functions/microwin/Microwin-NewCheckInstall.ps1 deleted file mode 100644 index 6520ac6a4a..0000000000 --- a/functions/microwin/Microwin-NewCheckInstall.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -function Microwin-NewCheckInstall { - - # using here string to embedd firstrun - $checkInstall = @' - @echo off - if exist "%HOMEDRIVE%\windows\cpu.txt" ( - echo %HOMEDRIVE%\windows\cpu.txt exists - ) else ( - echo %HOMEDRIVE%\windows\cpu.txt does not exist - ) - if exist "%HOMEDRIVE%\windows\SerialNumber.txt" ( - echo %HOMEDRIVE%\windows\SerialNumber.txt exists - ) else ( - echo %HOMEDRIVE%\windows\SerialNumber.txt does not exist - ) - if exist "%HOMEDRIVE%\unattend.xml" ( - echo %HOMEDRIVE%\unattend.xml exists - ) else ( - echo %HOMEDRIVE%\unattend.xml does not exist - ) - if exist "%HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd" ( - echo %HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd exists - ) else ( - echo %HOMEDRIVE%\Windows\Setup\Scripts\SetupComplete.cmd does not exist - ) - if exist "%HOMEDRIVE%\Windows\Panther\unattend.xml" ( - echo %HOMEDRIVE%\Windows\Panther\unattend.xml exists - ) else ( - echo %HOMEDRIVE%\Windows\Panther\unattend.xml does not exist - ) - if exist "%HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml" ( - echo %HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml exists - ) else ( - echo %HOMEDRIVE%\Windows\System32\Sysprep\unattend.xml does not exist - ) - if exist "%HOMEDRIVE%\Windows\FirstStartup.ps1" ( - echo %HOMEDRIVE%\Windows\FirstStartup.ps1 exists - ) else ( - echo %HOMEDRIVE%\Windows\FirstStartup.ps1 does not exist - ) - if exist "%HOMEDRIVE%\Windows\winutil.ps1" ( - echo %HOMEDRIVE%\Windows\winutil.ps1 exists - ) else ( - echo %HOMEDRIVE%\Windows\winutil.ps1 does not exist - ) - if exist "%HOMEDRIVE%\Windows\LogSpecialize.txt" ( - echo %HOMEDRIVE%\Windows\LogSpecialize.txt exists - ) else ( - echo %HOMEDRIVE%\Windows\LogSpecialize.txt does not exist - ) - if exist "%HOMEDRIVE%\Windows\LogAuditUser.txt" ( - echo %HOMEDRIVE%\Windows\LogAuditUser.txt exists - ) else ( - echo %HOMEDRIVE%\Windows\LogAuditUser.txt does not exist - ) - if exist "%HOMEDRIVE%\Windows\LogOobeSystem.txt" ( - echo %HOMEDRIVE%\Windows\LogOobeSystem.txt exists - ) else ( - echo %HOMEDRIVE%\Windows\LogOobeSystem.txt does not exist - ) - if exist "%HOMEDRIVE%\windows\csup.txt" ( - echo %HOMEDRIVE%\windows\csup.txt exists - ) else ( - echo %HOMEDRIVE%\windows\csup.txt does not exist - ) - if exist "%HOMEDRIVE%\windows\LogFirstRun.txt" ( - echo %HOMEDRIVE%\windows\LogFirstRun.txt exists - ) else ( - echo %HOMEDRIVE%\windows\LogFirstRun.txt does not exist - ) -'@ - $checkInstall | Out-File -FilePath "$env:temp\checkinstall.cmd" -Force -Encoding Ascii -} diff --git a/functions/microwin/Microwin-NewFirstRun.ps1 b/functions/microwin/Microwin-NewFirstRun.ps1 deleted file mode 100644 index d6e5d4b7cf..0000000000 --- a/functions/microwin/Microwin-NewFirstRun.ps1 +++ /dev/null @@ -1,84 +0,0 @@ -function Microwin-NewFirstRun { - - # using here string to embedd firstrun - $firstRun = @' - # Set the global error action preference to continue - $ErrorActionPreference = "Continue" - function Remove-RegistryValue { - param ( - [Parameter(Mandatory = $true)] - [string]$RegistryPath, - - [Parameter(Mandatory = $true)] - [string]$ValueName - ) - - # Check if the registry path exists - if (Test-Path -Path $RegistryPath) { - $registryValue = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue - - # Check if the registry value exists - if ($registryValue) { - # Remove the registry value - Remove-ItemProperty -Path $RegistryPath -Name $ValueName -Force - Write-Host "Registry value '$ValueName' removed from '$RegistryPath'." - } else { - Write-Host "Registry value '$ValueName' not found in '$RegistryPath'." - } - } else { - Write-Host "Registry path '$RegistryPath' not found." - } - } - - "FirstStartup has worked" | Out-File -FilePath "$env:HOMEDRIVE\windows\LogFirstRun.txt" -Append -NoClobber - - $taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" - # Delete all files on the Taskbar - Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force - Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesRemovedChanges" - Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges" - Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites" - - # Delete Edge Icon from the desktop - $edgeShortcutFiles = Get-ChildItem -Path $desktopPath -Filter "*Edge*.lnk" - # Check if Edge shortcuts exist on the desktop - if ($edgeShortcutFiles) { - foreach ($shortcutFile in $edgeShortcutFiles) { - # Remove each Edge shortcut - Remove-Item -Path $shortcutFile.FullName -Force - Write-Host "Edge shortcut '$($shortcutFile.Name)' removed from the desktop." - } - } - Remove-Item -Path "$env:USERPROFILE\Desktop\*.lnk" - Remove-Item -Path "$env:HOMEDRIVE\Users\Default\Desktop\*.lnk" - - try - { - if ((Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "Recall" }).Count -gt 0) - { - Disable-WindowsOptionalFeature -Online -FeatureName "Recall" -Remove - } - } - catch - { - - } - - # Get BCD entries and set bootmgr timeout accordingly - try - { - # Check if the number of occurrences of "path" is 2 - this fixes the Boot Manager screen issue (#2562) - if ((bcdedit | Select-String "path").Count -eq 2) - { - # Set bootmgr timeout to 0 - bcdedit /set `{bootmgr`} timeout 0 - } - } - catch - { - - } - -'@ - $firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force -} diff --git a/functions/microwin/Microwin-NewUnattend.ps1 b/functions/microwin/Microwin-NewUnattend.ps1 deleted file mode 100644 index dda71bb3ce..0000000000 --- a/functions/microwin/Microwin-NewUnattend.ps1 +++ /dev/null @@ -1,335 +0,0 @@ -function Microwin-NewUnattend { - - param ( - [Parameter(Mandatory, Position = 0)] [string]$userName, - [Parameter(Position = 1)] [string]$userPassword - ) - - $unattend = @' - <?xml version="1.0" encoding="utf-8"?> - <unattend xmlns="urn:schemas-microsoft-com:unattend" - xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <#REPLACEME#> - <settings pass="auditUser"> - <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <CommandLine>CMD /C echo LAU GG&gt;C:\Windows\LogAuditUser.txt</CommandLine> - <Description>StartMenu</Description> - </RunSynchronousCommand> - </RunSynchronous> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <UserAccounts> - <LocalAccounts> - <LocalAccount wcm:action="add"> - <Name>USER-REPLACEME</Name> - <Group>Administrators</Group> - <Password> - <Value>PW-REPLACEME</Value> - <PlainText>PT-STATUS</PlainText> - </Password> - </LocalAccount> - </LocalAccounts> - </UserAccounts> - <AutoLogon> - <Username>USER-REPLACEME</Username> - <Enabled>true</Enabled> - <LogonCount>1</LogonCount> - <Password> - <Value>PW-REPLACEME</Value> - <PlainText>PT-STATUS</PlainText> - </Password> - </AutoLogon> - <OOBE> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <SkipUserOOBE>true</SkipUserOOBE> - <SkipMachineOOBE>true</SkipMachineOOBE> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <HideEULAPage>true</HideEULAPage> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <Order>1</Order> - <CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine> - </SynchronousCommand> - <SynchronousCommand wcm:action="add"> - <Order>2</Order> - <CommandLine>cmd.exe /c echo 23&gt;c:\windows\csup.txt</CommandLine> - </SynchronousCommand> - <SynchronousCommand wcm:action="add"> - <Order>3</Order> - <CommandLine>CMD /C echo GG&gt;C:\Windows\LogOobeSystem.txt</CommandLine> - </SynchronousCommand> - <SynchronousCommand wcm:action="add"> - <Order>4</Order> - <CommandLine>powershell -ExecutionPolicy Bypass -File c:\windows\FirstStartup.ps1</CommandLine> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> - </unattend> -'@ - $specPass = @' -<settings pass="specialize"> - <component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <CEIPEnabled>0</CEIPEnabled> - </component> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <ConfigureChatAutoInstall>false</ConfigureChatAutoInstall> - </component> - <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>2</Order> - <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>3</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "UninstallCopilot" /t REG_SZ /d "powershell.exe -NoProfile -Command \"Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage;\"" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>4</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>5</Order> - <Path>reg.exe unload "HKU\DefaultUser"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>6</Order> - <Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>7</Order> - <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>8</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Notepad" /v ShowStoreBanner /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>9</Order> - <Path>reg.exe unload "HKU\DefaultUser"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>10</Order> - <Path>cmd.exe /c "del "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>11</Order> - <Path>cmd.exe /c "del "C:\Windows\System32\OneDriveSetup.exe""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>12</Order> - <Path>cmd.exe /c "del "C:\Windows\SysWOW64\OneDriveSetup.exe""</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>13</Order> - <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>14</Order> - <Path>reg.exe delete "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>15</Order> - <Path>reg.exe unload "HKU\DefaultUser"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>16</Order> - <Path>reg.exe delete "HKLM\SOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>17</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v ConfigureChatAutoInstall /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>18</Order> - <Path>powershell.exe -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>19</Order> - <Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\Microwin-RemovePackages.ps1' -Raw | Invoke-Expression;"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>20</Order> - <Path>powershell.exe -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Temp\remove-caps.ps1' -Raw | Invoke-Expression;"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>21</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>22</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_ProviderSet /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>23</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v ConfigureStartPins_WinningProvider /t REG_SZ /d B5292708-1619-419B-9923-E5D9F3925E71 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>24</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins /t REG_SZ /d "{ \"pinnedList\": [] }" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>25</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\providers\B5292708-1619-419B-9923-E5D9F3925E71\default\Device\Start" /v ConfigureStartPins_LastWrite /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>26</Order> - <Path>net.exe accounts /maxpwage:UNLIMITED</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>27</Order> - <Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>28</Order> - <Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>29</Order> - <Path>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>30</Order> - <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>31</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "ContentDeliveryAllowed" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>32</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "FeatureManagementEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>33</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OEMPreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>34</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>35</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEverEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>36</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>37</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>38</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContentEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>39</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-310093Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>40</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338387Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>41</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338388Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>42</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338389Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>43</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-338393Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>44</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SubscribedContent-353698Enabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>45</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SystemPaneSuggestionsEnabled" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>46</Order> - <Path>reg.exe unload "HKU\DefaultUser"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>47</Order> - <Path>reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 0 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>48</Order> - <Path>reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>49</Order> - <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>50</Order> - <Path>reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Runonce" /v "ClassicContextMenu" /t REG_SZ /d "reg.exe add \"HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32\" /ve /f" /f</Path> - </RunSynchronousCommand> - <RunSynchronousCommand wcm:action="add"> - <Order>51</Order> - <Path>reg.exe unload "HKU\DefaultUser"</Path> - </RunSynchronousCommand> - </RunSynchronous> - </component> - </settings> -'@ - if ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,22000,1))) -eq $false) { - # Replace the placeholder text with an empty string to make it valid for Windows 10 Setup - $unattend = $unattend.Replace("<#REPLACEME#>", "").Trim() - } else { - # Replace the placeholder text with the Specialize pass - $unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim() - } - - # User password in Base64. According to Microsoft, this is the way you can hide this sensitive information. - # More information can be found here: https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/wsim/hide-sensitive-data-in-an-answer-file - # Yeah, I know this is not the best way to protect this kind of data, but we all know how Microsoft is - "the Apple of security" (in a sense, it takes them - # an eternity to implement basic security features right. Just look at the NTLM and Kerberos situation!) - - $b64pass = "" - - # Replace default User and Password values with the provided parameters - $unattend = $unattend.Replace("USER-REPLACEME", $userName).Trim() - try { - # I want to play it safe here - I don't want encoding mismatch problems like last time - - # NOTE: "Password" needs to be appended to the password specified by the user. Otherwise, a parse error will occur when processing oobeSystem. - # This will not be added to the actual password stored in the target system's SAM file - only the provided password - $b64pass = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes("$($userPassword)Password")) - } catch { - $b64pass = "" - } - if ($b64pass -ne "") { - # If we could encode the password with Base64, put it in the answer file and indicate that it's NOT in plain text - $unattend = $unattend.Replace("PW-REPLACEME", $b64pass).Trim() - $unattend = $unattend.Replace("PT-STATUS", "false").Trim() - $b64pass = "" - } else { - $unattend = $unattend.Replace("PW-REPLACEME", $userPassword).Trim() - $unattend = $unattend.Replace("PT-STATUS", "true").Trim() - } - - # Save unattended answer file with UTF-8 encoding - $unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8 -} diff --git a/functions/microwin/Microwin-RemoveFeatures.ps1 b/functions/microwin/Microwin-RemoveFeatures.ps1 deleted file mode 100644 index be5888dc9d..0000000000 --- a/functions/microwin/Microwin-RemoveFeatures.ps1 +++ /dev/null @@ -1,82 +0,0 @@ -function Microwin-RemoveFeatures() { - <# - .SYNOPSIS - Removes certain features from ISO image - - .PARAMETER UseCmdlets - Determines whether or not to use the DISM cmdlets for processing. - - If true, DISM cmdlets will be used - - If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before - the DISM conversion to cmdlets) - - .EXAMPLE - Microwin-RemoveFeatures -UseCmdlets $true - #> - param ( - [Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets - ) - try { - if ($UseCmdlets) { - $featlist = (Get-WindowsOptionalFeature -Path "$scratchDir") - - $featlist = $featlist | Where-Object { - $_.FeatureName -NotLike "*Defender*" -AND - $_.FeatureName -NotLike "*Printing*" -AND - $_.FeatureName -NotLike "*TelnetClient*" -AND - $_.FeatureName -NotLike "*PowerShell*" -AND - $_.FeatureName -NotLike "*NetFx*" -AND - $_.FeatureName -NotLike "*Media*" -AND - $_.FeatureName -NotLike "*NFS*" -AND - $_.FeatureName -NotLike "*SearchEngine*" -AND - $_.FeatureName -NotLike "*RemoteDesktop*" -AND - $_.State -ne "Disabled" - } - } else { - $featList = dism /english /image="$scratchDir" /get-features | Select-String -Pattern "Feature Name : " -CaseSensitive -SimpleMatch - if ($?) { - $featList = $featList -split "Feature Name : " | Where-Object {$_} - # Exclude the same items. Note: for now, this doesn't exclude those features that are disabled. - # This will appear in the future - $featList = $featList | Where-Object { - $_ -NotLike "*Defender*" -AND - $_ -NotLike "*Printing*" -AND - $_ -NotLike "*TelnetClient*" -AND - $_ -NotLike "*PowerShell*" -AND - $_ -NotLike "*NetFx*" -AND - $_ -NotLike "*Media*" -AND - $_ -NotLike "*NFS*" -AND - $_ -NotLike "*SearchEngine*" -AND - $_ -NotLike "*RemoteDesktop*" - } - } else { - Write-Host "Features could not be obtained with DISM. MicroWin processing will continue, but features will be skipped." - return - } - } - - if ($UseCmdlets) { - foreach ($feature in $featList) { - $status = "Removing feature $($feature.FeatureName)" - Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100) - Write-Debug "Removing feature $($feature.FeatureName)" - Disable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName $($feature.FeatureName) -Remove -ErrorAction SilentlyContinue -NoRestart - } - } else { - foreach ($feature in $featList) { - $status = "Removing feature $feature" - Write-Progress -Activity "Removing features" -Status $status -PercentComplete ($counter++/$featlist.Count*100) - Write-Debug "Removing feature $feature" - dism /english /image="$scratchDir" /disable-feature /featurename=$feature /remove /quiet /norestart | Out-Null - if ($? -eq $false) { - Write-Host "Feature $feature could not be disabled." - } - } - } - Write-Progress -Activity "Removing features" -Status "Ready" -Completed - 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 { - Write-Host "Unable to get information about the features. A fallback will be used..." - Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow - Microwin-RemoveFeatures -UseCmdlets $false - } -} diff --git a/functions/microwin/Microwin-RemoveFileOrDirectory.ps1 b/functions/microwin/Microwin-RemoveFileOrDirectory.ps1 deleted file mode 100644 index 002e7a654a..0000000000 --- a/functions/microwin/Microwin-RemoveFileOrDirectory.ps1 +++ /dev/null @@ -1,42 +0,0 @@ -function Microwin-RemoveFileOrDirectory([string]$pathToDelete, [string]$mask = "", [switch]$Directory = $false) { - if(([string]::IsNullOrEmpty($pathToDelete))) { return } - if (-not (Test-Path -Path "$($pathToDelete)")) { return } - - $yesNo = Get-LocalizedYesNo - Write-Host "[INFO] In Your local takeown expects '$($yesNo[0])' as a Yes answer." - - $itemsToDelete = [System.Collections.ArrayList]::new() - - if ($mask -eq "") { - Write-Debug "Adding $($pathToDelete) to array." - [void]$itemsToDelete.Add($pathToDelete) - } else { - Write-Debug "Adding $($pathToDelete) to array and mask is $($mask)" - if ($Directory) { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse -Directory } else { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse } - } - - foreach($itemToDelete in $itemsToDelete) { - $status = "Deleting $($itemToDelete)" - Write-Progress -Activity "Removing Items" -Status $status -PercentComplete ($counter++/$itemsToDelete.Count*100) - - if (Test-Path -Path "$($itemToDelete)" -PathType Container) { - $status = "Deleting directory: $($itemToDelete)" - - takeown /r /d $yesNo[0] /a /f "$($itemToDelete)" - icacls "$($itemToDelete)" /q /c /t /reset - icacls $itemToDelete /setowner "*S-1-5-32-544" - icacls $itemToDelete /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q - Remove-Item -Force -Recurse "$($itemToDelete)" - } - elseif (Test-Path -Path "$($itemToDelete)" -PathType Leaf) { - $status = "Deleting file: $($itemToDelete)" - - takeown /a /f "$($itemToDelete)" - icacls "$($itemToDelete)" /q /c /t /reset - icacls "$($itemToDelete)" /setowner "*S-1-5-32-544" - icacls "$($itemToDelete)" /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q - Remove-Item -Force "$($itemToDelete)" - } - } - Write-Progress -Activity "Removing Items" -Status "Ready" -Completed -} diff --git a/functions/microwin/Microwin-RemovePackages.ps1 b/functions/microwin/Microwin-RemovePackages.ps1 deleted file mode 100644 index 68662e8142..0000000000 --- a/functions/microwin/Microwin-RemovePackages.ps1 +++ /dev/null @@ -1,129 +0,0 @@ -function Microwin-RemovePackages { - <# - .SYNOPSIS - Removes certain packages from ISO image - - .PARAMETER UseCmdlets - Determines whether or not to use the DISM cmdlets for processing. - - If true, DISM cmdlets will be used - - If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before - the DISM conversion to cmdlets) - - .EXAMPLE - Microwin-RemovePackages -UseCmdlets $true - #> - param ( - [Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets - ) - try { - if ($useCmdlets) { - $pkglist = (Get-WindowsPackage -Path "$scratchDir").PackageName - - $pkglist = $pkglist | Where-Object { - $_ -NotLike "*ApplicationModel*" -AND - $_ -NotLike "*indows-Client-LanguagePack*" -AND - $_ -NotLike "*LanguageFeatures-Basic*" -AND - $_ -NotLike "*Package_for_ServicingStack*" -AND - $_ -NotLike "*DotNet*" -AND - $_ -NotLike "*Notepad*" -AND - $_ -NotLike "*WMIC*" -AND - $_ -NotLike "*Ethernet*" -AND - $_ -NotLike "*Wifi*" -AND - $_ -NotLike "*FodMetadata*" -AND - $_ -NotLike "*Foundation*" -AND - $_ -NotLike "*LanguageFeatures*" -AND - $_ -NotLike "*VBSCRIPT*" -AND - $_ -NotLike "*License*" -AND - $_ -NotLike "*Hello-Face*" -AND - $_ -NotLike "*ISE*" -AND - $_ -NotLike "*OpenSSH*" - } - } else { - $pkgList = dism /english /image="$scratchDir" /get-packages | Select-String -Pattern "Package Identity : " -CaseSensitive -SimpleMatch - if ($?) { - $pkgList = $pkgList -split "Package Identity : " | Where-Object {$_} - # Exclude the same items. - $pkgList = $pkgList | Where-Object { - $_ -NotLike "*ApplicationModel*" -AND - $_ -NotLike "*indows-Client-LanguagePack*" -AND - $_ -NotLike "*LanguageFeatures-Basic*" -AND - $_ -NotLike "*Package_for_ServicingStack*" -AND - $_ -NotLike "*DotNet*" -AND - $_ -NotLike "*Notepad*" -AND - $_ -NotLike "*WMIC*" -AND - $_ -NotLike "*Ethernet*" -AND - $_ -NotLike "*Wifi*" -AND - $_ -NotLike "*FodMetadata*" -AND - $_ -NotLike "*Foundation*" -AND - $_ -NotLike "*LanguageFeatures*" -AND - $_ -NotLike "*VBSCRIPT*" -AND - $_ -NotLike "*License*" -AND - $_ -NotLike "*Hello-Face*" -AND - $_ -NotLike "*ISE*" -AND - $_ -NotLike "*OpenSSH*" - } - } else { - Write-Host "Packages could not be obtained with DISM. MicroWin processing will continue, but packages will be skipped." - return - } - } - - if ($UseCmdlets) { - $failedCount = 0 - - $erroredPackages = [System.Collections.Generic.List[ErroredPackage]]::new() - - foreach ($pkg in $pkglist) { - try { - $status = "Removing $pkg" - Write-Progress -Activity "Removing Packages" -Status $status -PercentComplete ($counter++/$pkglist.Count*100) - Remove-WindowsPackage -Path "$scratchDir" -PackageName $pkg -NoRestart -ErrorAction SilentlyContinue - } catch { - # This can happen if the package that is being removed is a permanent one - $erroredPackages.Add([ErroredPackage]::new($pkg, $_.Exception.Message)) - $failedCount += 1 - continue - } - } - } else { - foreach ($package in $pkgList) { - $status = "Removing package $package" - Write-Progress -Activity "Removing Packages" -Status $status -PercentComplete ($counter++/$pkglist.Count*100) - Write-Debug "Removing package $package" - dism /english /image="$scratchDir" /remove-package /packagename=$package /remove /quiet /norestart | Out-Null - if ($? -eq $false) { - Write-Host "Package $package could not be removed." - } - } - } - Write-Progress -Activity "Removing Packages" -Status "Ready" -Completed - if ($UseCmdlets -and $failedCount -gt 0) - { - Write-Host "$failedCount package(s) could not be removed. Your image will still work fine, however. Below is information on what packages failed to be removed and why." - if ($erroredPackages.Count -gt 0) - { - $erroredPackages = $erroredPackages | Sort-Object -Property ErrorMessage - - $previousErroredPackage = $erroredPackages[0] - $counter = 0 - Write-Host "" - Write-Host "- $($previousErroredPackage.ErrorMessage)" - foreach ($erroredPackage in $erroredPackages) { - if ($erroredPackage.ErrorMessage -ne $previousErroredPackage.ErrorMessage) { - Write-Host "" - $counter = 0 - Write-Host "- $($erroredPackage.ErrorMessage)" - } - $counter += 1 - Write-Host " $counter) $($erroredPackage.PackageName)" - $previousErroredPackage = $erroredPackage - } - Write-Host "" - } - } - } catch { - Write-Host "Unable to get information about the packages. A fallback will be used..." - Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow - Microwin-RemovePackages -UseCmdlets $false - } -} diff --git a/functions/microwin/Microwin-RemoveProvisionedPackages.ps1 b/functions/microwin/Microwin-RemoveProvisionedPackages.ps1 deleted file mode 100644 index b148c2d92e..0000000000 --- a/functions/microwin/Microwin-RemoveProvisionedPackages.ps1 +++ /dev/null @@ -1,96 +0,0 @@ -function Microwin-RemoveProvisionedPackages() { - <# - .SYNOPSIS - Removes AppX packages from a Windows image during MicroWin processing - - .PARAMETER UseCmdlets - Determines whether or not to use the DISM cmdlets for processing. - - If true, DISM cmdlets will be used - - If false, calls to the DISM executable will be made whilst selecting bits and pieces from the output as a string (that was how MicroWin worked before - the DISM conversion to cmdlets) - - .EXAMPLE - Microwin-RemoveProvisionedPackages - #> - param ( - [Parameter(Mandatory = $true, Position = 0)] [bool]$UseCmdlets - ) - try - { - if ($UseCmdlets) { - $appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object { - $_.PackageName -NotLike "*AppInstaller*" -AND - $_.PackageName -NotLike "*Store*" -and - $_.PackageName -NotLike "*Notepad*" -and - $_.PackageName -NotLike "*Printing*" -and - $_.PackageName -NotLike "*YourPhone*" -and - $_.PackageName -NotLike "*Xbox*" -and - $_.PackageName -NotLike "*WindowsTerminal*" -and - $_.PackageName -NotLike "*Calculator*" -and - $_.PackageName -NotLike "*Photos*" -and - $_.PackageName -NotLike "*VCLibs*" -and - $_.PackageName -NotLike "*Paint*" -and - $_.PackageName -NotLike "*Gaming*" -and - $_.PackageName -NotLike "*Extension*" -and - $_.PackageName -NotLike "*SecHealthUI*" -and - $_.PackageName -NotLike "*ScreenSketch*" - } - } else { - $appxProvisionedPackages = dism /english /image="$scratchDir" /get-provisionedappxpackages | Select-String -Pattern "PackageName : " -CaseSensitive -SimpleMatch - if ($?) { - $appxProvisionedPackages = $appxProvisionedPackages -split "PackageName : " | Where-Object {$_} - # Exclude the same items. - $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { - $_ -NotLike "*AppInstaller*" -AND - $_ -NotLike "*Store*" -and - $_ -NotLike "*Notepad*" -and - $_ -NotLike "*Printing*" -and - $_ -NotLike "*YourPhone*" -and - $_ -NotLike "*Xbox*" -and - $_ -NotLike "*WindowsTerminal*" -and - $_ -NotLike "*Calculator*" -and - $_ -NotLike "*Photos*" -and - $_ -NotLike "*VCLibs*" -and - $_ -NotLike "*Paint*" -and - $_ -NotLike "*Gaming*" -and - $_ -NotLike "*Extension*" -and - $_ -NotLike "*SecHealthUI*" -and - $_ -NotLike "*ScreenSketch*" - } - } else { - Write-Host "AppX packages could not be obtained with DISM. MicroWin processing will continue, but AppX packages will be skipped." - return - } - } - - $counter = 0 - if ($UseCmdlets) { - foreach ($appx in $appxProvisionedPackages) { - $status = "Removing Provisioned $($appx.PackageName)" - Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100) - try { - Remove-AppxProvisionedPackage -Path "$scratchDir" -PackageName $appx.PackageName -ErrorAction SilentlyContinue - } catch { - Write-Host "Application $($appx.PackageName) could not be removed" - continue - } - } - } else { - foreach ($appx in $appxProvisionedPackages) { - $status = "Removing Provisioned $appx" - Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100) - dism /english /image="$scratchDir" /remove-provisionedappxpackage /packagename=$appx /quiet /norestart | Out-Null - if ($? -eq $false) { - Write-Host "AppX package $appx could not be removed." - } - } - } - Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed - } - catch - { - Write-Host "Unable to get information about the AppX packages. A fallback will be used..." - Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow - Microwin-RemoveProvisionedPackages -UseCmdlets $false - } -} diff --git a/functions/microwin/Microwin-TestCompatibleImage.ps1 b/functions/microwin/Microwin-TestCompatibleImage.ps1 deleted file mode 100644 index f1305e927c..0000000000 --- a/functions/microwin/Microwin-TestCompatibleImage.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -function Microwin-TestCompatibleImage() { - <# - .SYNOPSIS - Checks the version of a Windows image and determines whether or not it is compatible with a specific feature depending on a desired version - - .PARAMETER Name - imgVersion - The version of the Windows image - desiredVersion - The version to compare the image version with - #> - - param - ( - [Parameter(Mandatory, position=0)] - [string]$imgVersion, - - [Parameter(Mandatory, position=1)] - [Version]$desiredVersion - ) - - try { - $version = [Version]$imgVersion - return $version -ge $desiredVersion - } catch { - return $False - } -} diff --git a/functions/private/Add-SelectedAppsMenuItem.ps1 b/functions/private/Add-SelectedAppsMenuItem.ps1 new file mode 100644 index 0000000000..c52bb7c839 --- /dev/null +++ b/functions/private/Add-SelectedAppsMenuItem.ps1 @@ -0,0 +1,50 @@ + function Add-SelectedAppsMenuItem { + <# + .SYNOPSIS + This is a helper function that generates and adds the Menu Items to the Selected Apps Popup. + + .Parameter name + The actual Name of an App like "Chrome" or "Brave" + This name is contained in the "Content" property inside the applications.json + .PARAMETER key + The key which identifies an app object in applications.json + For Chrome this would be "WPFInstallchrome" because "WPFInstall" is prepended automatically for each key in applications.json + #> + + param ([string]$name, [string]$key) + + $selectedAppGrid = New-Object Windows.Controls.Grid + + $selectedAppGrid.ColumnDefinitions.Add((New-Object System.Windows.Controls.ColumnDefinition -Property @{Width = "*"})) + $selectedAppGrid.ColumnDefinitions.Add((New-Object System.Windows.Controls.ColumnDefinition -Property @{Width = "30"})) + + # Sets the name to the Content as well as the Tooltip, because the parent Popup Border has a fixed width and text could "overflow". + # With the tooltip, you can still read the whole entry on hover + $selectedAppLabel = New-Object Windows.Controls.Label + $selectedAppLabel.Content = $name + $selectedAppLabel.ToolTip = $name + $selectedAppLabel.HorizontalAlignment = "Left" + $selectedAppLabel.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") + [System.Windows.Controls.Grid]::SetColumn($selectedAppLabel, 0) + $selectedAppGrid.Children.Add($selectedAppLabel) + + $selectedAppRemoveButton = New-Object Windows.Controls.Button + $selectedAppRemoveButton.FontFamily = "Segoe MDL2 Assets" + $selectedAppRemoveButton.Content = [string]([char]0xE711) + $selectedAppRemoveButton.HorizontalAlignment = "Center" + $selectedAppRemoveButton.Tag = $key + $selectedAppRemoveButton.ToolTip = "Remove the App from Selection" + $selectedAppRemoveButton.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") + $selectedAppRemoveButton.SetResourceReference([Windows.Controls.Control]::StyleProperty, "HoverButtonStyle") + + # Highlight the Remove icon on Hover + $selectedAppRemoveButton.Add_MouseEnter({ $this.Foreground = "Red" }) + $selectedAppRemoveButton.Add_MouseLeave({ $this.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") }) + $selectedAppRemoveButton.Add_Click({ + $sync.($this.Tag).isChecked = $false # On click of the remove button, we only have to uncheck the corresponding checkbox. This will kick of all necessary changes to update the UI + }) + [System.Windows.Controls.Grid]::SetColumn($selectedAppRemoveButton, 1) + $selectedAppGrid.Children.Add($selectedAppRemoveButton) + # Add new Element to Popup + $sync.selectedAppsstackPanel.Children.Add($selectedAppGrid) + } diff --git a/functions/private/Copy-Files.ps1 b/functions/private/Copy-Files.ps1 deleted file mode 100644 index cec7869a26..0000000000 --- a/functions/private/Copy-Files.ps1 +++ /dev/null @@ -1,53 +0,0 @@ -function Copy-Files { - <# - - .DESCRIPTION - Copies the contents of a given ISO file to a given destination - .PARAMETER Path - The source of the files to copy - .PARAMETER Destination - The destination to copy the files to - .PARAMETER Recurse - Determines whether or not to copy all files of the ISO file, including those in subdirectories - .PARAMETER Force - Determines whether or not to overwrite existing files - .EXAMPLE - Copy-Files "D:" "C:\ISOFile" -Recurse -Force - - #> - param ( - [string]$Path, - [string]$Destination, - [switch]$Recurse = $false, - [switch]$Force = $false - ) - - try { - - $files = Get-ChildItem -Path $path -Recurse:$recurse - Write-Host "Copy $($files.Count) file(s) from $path to $destination" - - foreach ($file in $files) { - $status = "Copying file {0} of {1}: {2}" -f $counter, $files.Count, $file.Name - Write-Progress -Activity "Copy disc image files" -Status $status -PercentComplete ($counter++/$files.count*100) - $restpath = $file.FullName -Replace $path, '' - - if ($file.PSIsContainer -eq $true) { - Write-Debug "Creating $($destination + $restpath)" - New-Item ($destination+$restpath) -Force:$force -Type Directory -ErrorAction SilentlyContinue - } else { - Write-Debug "Copy from $($file.FullName) to $($destination+$restpath)" - Copy-Item $file.FullName ($destination+$restpath) -ErrorAction SilentlyContinue -Force:$force - Set-ItemProperty -Path ($destination+$restpath) -Name IsReadOnly -Value $false - } - } - Write-Progress -Activity "Copy disc image files" -Status "Ready" -Completed - } catch { - Write-Host "Unable to Copy all the files due to an unhandled exception" -ForegroundColor Yellow - Write-Host "Error information: $($_.Exception.Message)`n" -ForegroundColor Yellow - Write-Host "Additional information:" -ForegroundColor Yellow - Write-Host $PSItem.Exception.StackTrace - # Write possible suggestions - Write-Host "`nIf you are using an antivirus, try configuring exclusions" - } -} diff --git a/functions/private/Find-AppsByNameOrDescription.ps1 b/functions/private/Find-AppsByNameOrDescription.ps1 new file mode 100644 index 0000000000..4bf55cb7d3 --- /dev/null +++ b/functions/private/Find-AppsByNameOrDescription.ps1 @@ -0,0 +1,80 @@ +function Find-AppsByNameOrDescription { + <# + .SYNOPSIS + Searches through the Apps on the Install Tab and hides all entries that do not match the string + + .PARAMETER SearchString + The string to be searched for + #> + param( + [Parameter(Mandatory=$false)] + [string]$SearchString = "" + ) + # Reset the visibility if the search string is empty or the search is cleared + if ([string]::IsNullOrWhiteSpace($SearchString)) { + $sync.ItemsControl.Items | ForEach-Object { + # Each item is a StackPanel container + $_.Visibility = [Windows.Visibility]::Visible + + if ($_.Children.Count -ge 2) { + $categoryLabel = $_.Children[0] + $wrapPanel = $_.Children[1] + + # Keep category label visible + $categoryLabel.Visibility = [Windows.Visibility]::Visible + + # Respect the collapsed state of categories (indicated by + prefix) + if ($categoryLabel.Content -like "+*") { + $wrapPanel.Visibility = [Windows.Visibility]::Collapsed + } else { + $wrapPanel.Visibility = [Windows.Visibility]::Visible + } + + # Show all apps within the category + $wrapPanel.Children | ForEach-Object { + $_.Visibility = [Windows.Visibility]::Visible + } + } + } + return + } + + # Perform search + $sync.ItemsControl.Items | ForEach-Object { + # Each item is a StackPanel container with Children[0] = label, Children[1] = WrapPanel + if ($_.Children.Count -ge 2) { + $categoryLabel = $_.Children[0] + $wrapPanel = $_.Children[1] + $categoryHasMatch = $false + + # Keep category label visible + $categoryLabel.Visibility = [Windows.Visibility]::Visible + + # Search through apps in this category + $wrapPanel.Children | ForEach-Object { + $appEntry = $sync.configs.applicationsHashtable.$($_.Tag) + if ($appEntry.Content -like "*$SearchString*" -or $appEntry.Description -like "*$SearchString*") { + # Show the App and mark that this category has a match + $_.Visibility = [Windows.Visibility]::Visible + $categoryHasMatch = $true + } + else { + $_.Visibility = [Windows.Visibility]::Collapsed + } + } + + # If category has matches, show the WrapPanel and update the category label to expanded state + if ($categoryHasMatch) { + $wrapPanel.Visibility = [Windows.Visibility]::Visible + $_.Visibility = [Windows.Visibility]::Visible + # Update category label to show expanded state (-) + if ($categoryLabel.Content -like "+*") { + $categoryLabel.Content = $categoryLabel.Content -replace "^\+ ", "- " + } + } else { + # Hide the entire category container if no matches + $_.Visibility = [Windows.Visibility]::Collapsed + } + } + } +} diff --git a/functions/private/Find-TweaksByNameOrDescription.ps1 b/functions/private/Find-TweaksByNameOrDescription.ps1 new file mode 100644 index 0000000000..81e9cb391b --- /dev/null +++ b/functions/private/Find-TweaksByNameOrDescription.ps1 @@ -0,0 +1,100 @@ +function Find-TweaksByNameOrDescription { + <# + .SYNOPSIS + Searches through the Tweaks on the Tweaks Tab and hides all entries that do not match the search string + + .PARAMETER SearchString + The string to be searched for + #> + param( + [Parameter(Mandatory=$false)] + [string]$SearchString = "" + ) + + # Reset the visibility if the search string is empty or the search is cleared + if ([string]::IsNullOrWhiteSpace($SearchString)) { + # Show all categories + $tweakspanel = $sync.Form.FindName("tweakspanel") + $tweakspanel.Children | ForEach-Object { + $_.Visibility = [Windows.Visibility]::Visible + + # Foreach category section, show all items + if ($_ -is [Windows.Controls.Border]) { + $_.Visibility = [Windows.Visibility]::Visible + + # Find ItemsControl + $dockPanel = $_.Child + if ($dockPanel -is [Windows.Controls.DockPanel]) { + $itemsControl = $dockPanel.Children | Where-Object { $_ -is [Windows.Controls.ItemsControl] } + if ($itemsControl) { + # Show items in the category + foreach ($item in $itemsControl.Items) { + if ($item -is [Windows.Controls.Label]) { + $item.Visibility = [Windows.Visibility]::Visible + } elseif ($item -is [Windows.Controls.DockPanel] -or + $item -is [Windows.Controls.StackPanel]) { + $item.Visibility = [Windows.Visibility]::Visible + } + } + } + } + } + } + return + } + + # Search for matching tweaks when search string is not null + $tweakspanel = $sync.Form.FindName("tweakspanel") + + $tweakspanel.Children | ForEach-Object { + $categoryBorder = $_ + $categoryVisible = $false + + if ($_ -is [Windows.Controls.Border]) { + # Find the ItemsControl + $dockPanel = $_.Child + if ($dockPanel -is [Windows.Controls.DockPanel]) { + $itemsControl = $dockPanel.Children | Where-Object { $_ -is [Windows.Controls.ItemsControl] } + if ($itemsControl) { + $categoryLabel = $null + + # Process all items in the ItemsControl + for ($i = 0; $i -lt $itemsControl.Items.Count; $i++) { + $item = $itemsControl.Items[$i] + + if ($item -is [Windows.Controls.Label]) { + $categoryLabel = $item + $item.Visibility = [Windows.Visibility]::Collapsed + } elseif ($item -is [Windows.Controls.DockPanel]) { + $checkbox = $item.Children | Where-Object { $_ -is [Windows.Controls.CheckBox] } | Select-Object -First 1 + $label = $item.Children | Where-Object { $_ -is [Windows.Controls.Label] } | Select-Object -First 1 + + if ($label -and ($label.Content -like "*$SearchString*" -or $label.ToolTip -like "*$SearchString*")) { + $item.Visibility = [Windows.Visibility]::Visible + if ($categoryLabel) { $categoryLabel.Visibility = [Windows.Visibility]::Visible } + $categoryVisible = $true + } else { + $item.Visibility = [Windows.Visibility]::Collapsed + } + } elseif ($item -is [Windows.Controls.StackPanel]) { + # StackPanel which contain checkboxes or other elements + $checkbox = $item.Children | Where-Object { $_ -is [Windows.Controls.CheckBox] } | Select-Object -First 1 + + if ($checkbox -and ($checkbox.Content -like "*$SearchString*" -or $checkbox.ToolTip -like "*$SearchString*")) { + $item.Visibility = [Windows.Visibility]::Visible + if ($categoryLabel) { $categoryLabel.Visibility = [Windows.Visibility]::Visible } + $categoryVisible = $true + } else { + $item.Visibility = [Windows.Visibility]::Collapsed + } + } + } + } + } + + # Set the visibility based on if any item matched + $categoryBorder.Visibility = if ($categoryVisible) { [Windows.Visibility]::Visible } else { [Windows.Visibility]::Collapsed } + + } + } +} diff --git a/functions/private/Get-LocalizedYesNo.ps1 b/functions/private/Get-LocalizedYesNo.ps1 index 0c8e939012..01be563f18 100644 --- a/functions/private/Get-LocalizedYesNo.ps1 +++ b/functions/private/Get-LocalizedYesNo.ps1 @@ -13,7 +13,7 @@ function Get-LocalizedYesNo { #> # Run choice and capture its options as output - # The output shows the options for Yes and No as "[Y,N]?" in the (partitially) localized format. + # The output shows the options for Yes and No as "[Y,N]?" in the (partially) localized format. # eg. English: [Y,N]? # Dutch: [Y,N]? # German: [J,N]? diff --git a/functions/private/Get-WinUtilCheckBoxes.ps1 b/functions/private/Get-WinUtilCheckBoxes.ps1 deleted file mode 100644 index 2f33183615..0000000000 --- a/functions/private/Get-WinUtilCheckBoxes.ps1 +++ /dev/null @@ -1,83 +0,0 @@ -Function Get-WinUtilCheckBoxes { - - <# - - .SYNOPSIS - Finds all checkboxes that are checked on the specific tab and inputs them into a script. - - .PARAMETER unCheck - Whether to uncheck the checkboxes that are checked. Defaults to true - - .OUTPUTS - A List containing the name of each checked checkbox - - .EXAMPLE - Get-WinUtilCheckBoxes "WPFInstall" - - #> - - Param( - [boolean]$unCheck = $false - ) - - $Output = @{ - Install = @() - WPFTweaks = @() - WPFFeature = @() - WPFInstall = @() - } - - $CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] } - - # First check and add WPFTweaksRestorePoint if checked - $RestorePoint = $CheckBoxes | Where-Object { $_.Key -eq 'WPFTweaksRestorePoint' -and $_.Value.IsChecked -eq $true } - if ($RestorePoint) { - $Output["WPFTweaks"] = @('WPFTweaksRestorePoint') - Write-Debug "Adding WPFTweaksRestorePoint as first in WPFTweaks" - - if ($unCheck) { - $RestorePoint.Value.IsChecked = $false - } - } - - foreach ($CheckBox in $CheckBoxes) { - if ($CheckBox.Key -eq 'WPFTweaksRestorePoint') { continue } # Skip since it's already handled - - $group = if ($CheckBox.Key.StartsWith("WPFInstall")) { "Install" } - elseif ($CheckBox.Key.StartsWith("WPFTweaks")) { "WPFTweaks" } - elseif ($CheckBox.Key.StartsWith("WPFFeature")) { "WPFFeature" } - if ($group) { - if ($CheckBox.Value.IsChecked -eq $true) { - $feature = switch ($group) { - "Install" { - # Get the winget value - [PsCustomObject]@{ - winget="$($sync.configs.applications.$($CheckBox.Name).winget)"; - choco="$($sync.configs.applications.$($CheckBox.Name).choco)"; - } - - } - default { - $CheckBox.Name - } - } - - if (-not $Output.ContainsKey($group)) { - $Output[$group] = @() - } - if ($group -eq "Install") { - $Output["WPFInstall"] += $CheckBox.Name - Write-Debug "Adding: $($CheckBox.Name) under: WPFInstall" - } - - Write-Debug "Adding: $($feature) under: $($group)" - $Output[$group] += $feature - - if ($unCheck) { - $CheckBox.Value.IsChecked = $false - } - } - } - } - return $Output -} diff --git a/functions/private/Get-WinUtilSelectedPackages.ps1 b/functions/private/Get-WinUtilSelectedPackages.ps1 new file mode 100644 index 0000000000..cc45d57919 --- /dev/null +++ b/functions/private/Get-WinUtilSelectedPackages.ps1 @@ -0,0 +1,59 @@ +function Get-WinUtilSelectedPackages +{ + <# + .SYNOPSIS + Sorts given packages based on installer preference and availability. + + .OUTPUTS + Hashtable. Key = Package Manager, Value = ArrayList of packages to install + #> + param ( + [Parameter(Mandatory=$true)] + $PackageList, + [Parameter(Mandatory=$true)] + [PackageManagers]$Preference + ) + + if ($PackageList.count -eq 1) { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" } + } else { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" } + } + + $packages = [System.Collections.Hashtable]::new() + $packagesWinget = [System.Collections.ArrayList]::new() + $packagesChoco = [System.Collections.ArrayList]::new() + $packages[[PackageManagers]::Winget] = $packagesWinget + $packages[[PackageManagers]::Choco] = $packagesChoco + + Write-Debug "Checking packages using Preference '$($Preference)'" + + foreach ($package in $PackageList) { + switch ($Preference) { + "Choco" { + if ($package.choco -eq "na") { + Write-Debug "$($package.content) has no Choco value." + $null = $packagesWinget.add($($package.winget)) + Write-Host "Queueing $($package.winget) for WinGet..." + } else { + $null = $packagesChoco.add($package.choco) + Write-Host "Queueing $($package.choco) for Chocolatey..." + } + break + } + "Winget" { + if ($package.winget -eq "na") { + Write-Debug "$($package.content) has no WinGet value." + $null = $packagesChoco.add($package.choco) + Write-Host "Queueing $($package.choco) for Chocolatey..." + } else { + $null = $packagesWinget.add($($package.winget)) + Write-Host "Queueing $($package.winget) for WinGet..." + } + break + } + } + } + + return $packages +} diff --git a/functions/private/Get-WinUtilToggleStatus.ps1 b/functions/private/Get-WinUtilToggleStatus.ps1 index a19dbf9b9e..f96109fa1a 100644 --- a/functions/private/Get-WinUtilToggleStatus.ps1 +++ b/functions/private/Get-WinUtilToggleStatus.ps1 @@ -20,9 +20,9 @@ Function Get-WinUtilToggleStatus { if (($ToggleSwitchReg.path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) { $null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS) if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) { - Write-Debug "HKU drive created successfully" + Write-Debug "HKU drive created successfully." } else { - Write-Debug "Failed to create HKU drive" + Write-Debug "Failed to create HKU drive." } } } catch { @@ -45,7 +45,7 @@ Function Get-WinUtilToggleStatus { } else { Write-Debug "$($regentry.Name) is false (state: $regstate, value: $($regentry.Value), original: $($regentry.OriginalValue))" } - if (!$regstate) { + if ($null -eq $regstate) { switch ($regentry.DefaultState) { "true" { $regstate = $regentry.Value diff --git a/functions/private/Get-WinUtilWingetLatest.ps1 b/functions/private/Get-WinUtilWingetLatest.ps1 deleted file mode 100644 index 4dfe9423c0..0000000000 --- a/functions/private/Get-WinUtilWingetLatest.ps1 +++ /dev/null @@ -1,104 +0,0 @@ -function Get-WinUtilWingetLatest { - [CmdletBinding()] - param() - - <# - .SYNOPSIS - Uses GitHub API to check for the latest release of Winget. - .DESCRIPTION - This function first attempts to update WinGet using winget itself, then falls back to manual installation if needed. - #> - $ProgressPreference = "SilentlyContinue" - $InformationPreference = 'Continue' - - try { - $wingetCmd = Get-Command winget -ErrorAction Stop - Write-Information "Attempting to update WinGet using WinGet..." - $result = Start-Process -FilePath "`"$($wingetCmd.Source)`"" -ArgumentList "install -e --accept-source-agreements --accept-package-agreements Microsoft.AppInstaller" -Wait -NoNewWindow -PassThru - if ($result.ExitCode -ne 0) { - throw "WinGet update failed with exit code: $($result.ExitCode)" - } - return $true - } - catch { - Write-Information "WinGet not found or update failed. Attempting to install from Microsoft Store..." - try { - # Try to close any running WinGet processes - Get-Process -Name "DesktopAppInstaller", "winget" -ErrorAction SilentlyContinue | ForEach-Object { - Write-Information "Stopping running WinGet process..." - $_.Kill() - Start-Sleep -Seconds 2 - } - - # Try to load Windows Runtime assemblies more reliably - $null = [System.Runtime.WindowsRuntime.WindowsRuntimeSystemExtensions] - Add-Type -AssemblyName System.Runtime.WindowsRuntime - - # Load required assemblies from Windows SDK - $null = @( - [Windows.Management.Deployment.PackageManager, Windows.Management.Deployment, ContentType = WindowsRuntime] - [Windows.Foundation.Uri, Windows.Foundation, ContentType = WindowsRuntime] - [Windows.Management.Deployment.DeploymentOptions, Windows.Management.Deployment, ContentType = WindowsRuntime] - ) - - # Initialize PackageManager - $packageManager = New-Object Windows.Management.Deployment.PackageManager - - # Rest of the Microsoft Store installation logic - $appxPackage = "https://aka.ms/getwinget" - $uri = New-Object Windows.Foundation.Uri($appxPackage) - $deploymentOperation = $packageManager.AddPackageAsync($uri, $null, "Add") - - # Add timeout check for deployment operation - $timeout = 300 - $timer = [System.Diagnostics.Stopwatch]::StartNew() - - while ($deploymentOperation.Status -eq 0) { - if ($timer.Elapsed.TotalSeconds -gt $timeout) { - throw "Installation timed out after $timeout seconds" - } - Start-Sleep -Milliseconds 100 - } - - if ($deploymentOperation.Status -eq 1) { - Write-Information "Successfully installed WinGet from Microsoft Store" - return $true - } else { - throw "Installation failed with status: $($deploymentOperation.Status)" - } - } - catch [System.Management.Automation.RuntimeException] { - Write-Information "Windows Runtime components not available. Attempting manual download..." - try { - # Try to close any running WinGet processes - Get-Process -Name "DesktopAppInstaller", "winget" -ErrorAction SilentlyContinue | ForEach-Object { - Write-Information "Stopping running WinGet process..." - $_.Kill() - Start-Sleep -Seconds 2 - } - - # Fallback to direct download from GitHub - $apiUrl = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" - $release = Invoke-RestMethod -Uri $apiUrl - $msixBundleUrl = ($release.assets | Where-Object { $_.name -like "*.msixbundle" }).browser_download_url - - $tempFile = Join-Path $env:TEMP "Microsoft.DesktopAppInstaller.msixbundle" - Invoke-WebRequest -Uri $msixBundleUrl -OutFile $tempFile - - Add-AppxPackage -Path $tempFile -ErrorAction Stop - Remove-Item $tempFile -Force - - Write-Information "Successfully installed WinGet from GitHub release" - return $true - } - catch { - Write-Error "Failed to install WinGet: $_" - return $false - } - } - catch { - Write-Error "Failed to install WinGet: $_" - return $false - } - } -} diff --git a/functions/private/Hide-WPFInstallAppBusy.ps1 b/functions/private/Hide-WPFInstallAppBusy.ps1 new file mode 100644 index 0000000000..7cf7b7da33 --- /dev/null +++ b/functions/private/Hide-WPFInstallAppBusy.ps1 @@ -0,0 +1,12 @@ +function Hide-WPFInstallAppBusy { + <# + .SYNOPSIS + Hides the busy overlay in the install app area of the WPF form. + This is used to indicate that an install or uninstall has finished. + #> + Invoke-WPFUIThread -ScriptBlock { + $sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Collapsed + $sync.InstallAppAreaBorder.IsEnabled = $true + $sync.InstallAppAreaScrollViewer.Effect.Radius = 0 + } +} diff --git a/functions/private/Initialize-InstallAppArea.ps1 b/functions/private/Initialize-InstallAppArea.ps1 new file mode 100644 index 0000000000..85bd50a759 --- /dev/null +++ b/functions/private/Initialize-InstallAppArea.ps1 @@ -0,0 +1,112 @@ + function Initialize-InstallAppArea { + <# + .SYNOPSIS + Creates a [Windows.Controls.ScrollViewer] containing a [Windows.Controls.ItemsControl] which is setup to use Virtualization to only load the visible elements for performance reasons. + This is used as the parent object for all category and app entries on the install tab + Used to as part of the Install Tab UI generation + + Also creates an overlay with a progress bar and text to indicate that an install or uninstall is in progress + + .PARAMETER TargetElement + The element to which the AppArea should be added + + #> + param($TargetElement) + $targetGrid = $sync.Form.FindName($TargetElement) + $null = $targetGrid.Children.Clear() + + # Create the outer Border for the aren where the apps will be placed + $Border = New-Object Windows.Controls.Border + $Border.VerticalAlignment = "Stretch" + $Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle") + $sync.InstallAppAreaBorder = $Border + + # Add a ScrollViewer, because the ItemsControl does not support scrolling by itself + $scrollViewer = New-Object Windows.Controls.ScrollViewer + $scrollViewer.VerticalScrollBarVisibility = 'Auto' + $scrollViewer.HorizontalAlignment = 'Stretch' + $scrollViewer.VerticalAlignment = 'Stretch' + $scrollViewer.CanContentScroll = $true + $sync.InstallAppAreaScrollViewer = $scrollViewer + $Border.Child = $scrollViewer + + # Initialize the Blur Effect for the ScrollViewer, which will be used to indicate that an install/uninstall is in progress + $blurEffect = New-Object Windows.Media.Effects.BlurEffect + $blurEffect.Radius = 0 + $scrollViewer.Effect = $blurEffect + + ## Create the ItemsControl, which will be the parent of all the app entries + $itemsControl = New-Object Windows.Controls.ItemsControl + $itemsControl.HorizontalAlignment = 'Stretch' + $itemsControl.VerticalAlignment = 'Stretch' + $scrollViewer.Content = $itemsControl + + # Use WrapPanel to create dynamic columns based on AppEntryWidth and window width + $itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate + $factory = New-Object Windows.FrameworkElementFactory ([Windows.Controls.WrapPanel]) + $factory.SetValue([Windows.Controls.WrapPanel]::OrientationProperty, [Windows.Controls.Orientation]::Horizontal) + $factory.SetValue([Windows.Controls.WrapPanel]::HorizontalAlignmentProperty, [Windows.HorizontalAlignment]::Left) + $itemsPanelTemplate.VisualTree = $factory + $itemsControl.ItemsPanel = $itemsPanelTemplate + + # Add the Border containing the App Area to the target Grid + $targetGrid.Children.Add($Border) | Out-Null + + $overlay = New-Object Windows.Controls.Border + $overlay.CornerRadius = New-Object Windows.CornerRadius(10) + $overlay.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallOverlayBackgroundColor") + $overlay.Visibility = [Windows.Visibility]::Collapsed + + # Also add the overlay to the target Grid on top of the App Area + $targetGrid.Children.Add($overlay) | Out-Null + $sync.InstallAppAreaOverlay = $overlay + + $overlayText = New-Object Windows.Controls.TextBlock + $overlayText.Text = "Installing apps..." + $overlayText.HorizontalAlignment = 'Center' + $overlayText.VerticalAlignment = 'Center' + $overlayText.SetResourceReference([Windows.Controls.TextBlock]::ForegroundProperty, "MainForegroundColor") + $overlayText.Background = "Transparent" + $overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontSizeProperty, "HeaderFontSize") + $overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontFamilyProperty, "MainFontFamily") + $overlayText.SetResourceReference([Windows.Controls.TextBlock]::FontWeightProperty, "MainFontWeight") + $overlayText.SetResourceReference([Windows.Controls.TextBlock]::MarginProperty, "MainMargin") + $sync.InstallAppAreaOverlayText = $overlayText + + $progressbar = New-Object Windows.Controls.ProgressBar + $progressbar.Name = "ProgressBar" + $progressbar.Width = 250 + $progressbar.Height = 50 + $sync.ProgressBar = $progressbar + + # Add a TextBlock overlay for the progress bar text + $progressBarTextBlock = New-Object Windows.Controls.TextBlock + $progressBarTextBlock.Name = "progressBarTextBlock" + $progressBarTextBlock.FontWeight = [Windows.FontWeights]::Bold + $progressBarTextBlock.FontSize = 16 + $progressBarTextBlock.Width = $progressbar.Width + $progressBarTextBlock.Height = $progressbar.Height + $progressBarTextBlock.SetResourceReference([Windows.Controls.TextBlock]::ForegroundProperty, "ProgressBarTextColor") + $progressBarTextBlock.TextTrimming = "CharacterEllipsis" + $progressBarTextBlock.Background = "Transparent" + $sync.progressBarTextBlock = $progressBarTextBlock + + # Create a Grid to overlay the text on the progress bar + $progressGrid = New-Object Windows.Controls.Grid + $progressGrid.Width = $progressbar.Width + $progressGrid.Height = $progressbar.Height + $progressGrid.Margin = "0,10,0,10" + $progressGrid.Children.Add($progressbar) | Out-Null + $progressGrid.Children.Add($progressBarTextBlock) | Out-Null + + $overlayStackPanel = New-Object Windows.Controls.StackPanel + $overlayStackPanel.Orientation = "Vertical" + $overlayStackPanel.HorizontalAlignment = 'Center' + $overlayStackPanel.VerticalAlignment = 'Center' + $overlayStackPanel.Children.Add($overlayText) | Out-Null + $overlayStackPanel.Children.Add($progressGrid) | Out-Null + + $overlay.Child = $overlayStackPanel + + return $itemsControl + } diff --git a/functions/private/Initialize-InstallAppEntry.ps1 b/functions/private/Initialize-InstallAppEntry.ps1 new file mode 100644 index 0000000000..74d72f0677 --- /dev/null +++ b/functions/private/Initialize-InstallAppEntry.ps1 @@ -0,0 +1,83 @@ +function Initialize-InstallAppEntry { + <# + .SYNOPSIS + Creates the app entry to be placed on the install tab for a given app + Used to as part of the Install Tab UI generation + .PARAMETER TargetElement + The Element into which the Apps should be placed + .PARAMETER appKey + The Key of the app inside the $sync.configs.applicationsHashtable + #> + param( + [Windows.Controls.WrapPanel]$TargetElement, + $appKey + ) + + # Create the outer Border for the application type + $border = New-Object Windows.Controls.Border + $border.Style = $sync.Form.Resources.AppEntryBorderStyle + $border.Tag = $appKey + $border.ToolTip = $Apps.$appKey.description + $border.Add_MouseLeftButtonUp({ + $childCheckbox = ($this.Child | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0] + $childCheckBox.isChecked = -not $childCheckbox.IsChecked + }) + $border.Add_MouseEnter({ + if (($sync.$($this.Tag).IsChecked) -eq $false) { + $this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallHighlightedColor") + } + }) + $border.Add_MouseLeave({ + if (($sync.$($this.Tag).IsChecked) -eq $false) { + $this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor") + } + }) + $border.Add_MouseRightButtonUp({ + # Store the selected app in a global variable so it can be used in the popup + $sync.appPopupSelectedApp = $this.Tag + # Set the popup position to the current mouse position + $sync.appPopup.PlacementTarget = $this + $sync.appPopup.IsOpen = $true + }) + + $checkBox = New-Object Windows.Controls.CheckBox + # Sanitize the name for WPF + $checkBox.Name = $appKey -replace '-', '_' + # Store the original appKey in Tag + $checkBox.Tag = $appKey + $checkbox.Style = $sync.Form.Resources.AppEntryCheckboxStyle + $checkbox.Add_Checked({ + Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $this.Parent.Tag + $borderElement = $this.Parent + $borderElement.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallSelectedColor") + }) + + $checkbox.Add_Unchecked({ + Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $this.Parent.Tag + $borderElement = $this.Parent + $borderElement.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor") + }) + + # Create the TextBlock for the application name + $appName = New-Object Windows.Controls.TextBlock + $appName.Style = $sync.Form.Resources.AppEntryNameStyle + $appName.Text = $Apps.$appKey.content + + # Change color to Green if FOSS + if ($Apps.$appKey.foss -eq $true) { + $appName.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "FOSSColor") + $appName.FontWeight = "Bold" + } + + # Add the name to the Checkbox + $checkBox.Content = $appName + + # Add accessibility properties to make the elements screen reader friendly + $checkBox.SetValue([Windows.Automation.AutomationProperties]::NameProperty, $Apps.$appKey.content) + $border.SetValue([Windows.Automation.AutomationProperties]::NameProperty, $Apps.$appKey.content) + + $border.Child = $checkBox + # Add the border to the corresponding Category + $TargetElement.Children.Add($border) | Out-Null + return $checkbox + } diff --git a/functions/private/Initialize-InstallCategoryAppList.ps1 b/functions/private/Initialize-InstallCategoryAppList.ps1 new file mode 100644 index 0000000000..f736342bd0 --- /dev/null +++ b/functions/private/Initialize-InstallCategoryAppList.ps1 @@ -0,0 +1,97 @@ +function Initialize-InstallCategoryAppList { + <# + .SYNOPSIS + Clears the Target Element and sets up a "Loading" message. This is done, because loading of all apps can take a bit of time in some scenarios + Iterates through all Categories and Apps and adds them to the UI + Used to as part of the Install Tab UI generation + .PARAMETER TargetElement + The Element into which the Categories and Apps should be placed + .PARAMETER Apps + The Hashtable of Apps to be added to the UI + The Categories are also extracted from the Apps Hashtable + + #> + param( + $TargetElement, + $Apps + ) + + # Pre-group apps by category + $appsByCategory = @{} + foreach ($appKey in $Apps.Keys) { + $category = $Apps.$appKey.Category + if (-not $appsByCategory.ContainsKey($category)) { + $appsByCategory[$category] = @() + } + $appsByCategory[$category] += $appKey + } + foreach ($category in $($appsByCategory.Keys | Sort-Object)) { + # Create a container for category label + apps + $categoryContainer = New-Object Windows.Controls.StackPanel + $categoryContainer.Orientation = "Vertical" + $categoryContainer.Margin = New-Object Windows.Thickness(0, 0, 0, 0) + $categoryContainer.HorizontalAlignment = [Windows.HorizontalAlignment]::Stretch + [System.Windows.Automation.AutomationProperties]::SetName($categoryContainer, $Category) + + # Bind Width to the ItemsControl's ActualWidth to force full-row layout in WrapPanel + $binding = New-Object Windows.Data.Binding + $binding.Path = New-Object Windows.PropertyPath("ActualWidth") + $binding.RelativeSource = New-Object Windows.Data.RelativeSource([Windows.Data.RelativeSourceMode]::FindAncestor, [Windows.Controls.ItemsControl], 1) + [void][Windows.Data.BindingOperations]::SetBinding($categoryContainer, [Windows.FrameworkElement]::WidthProperty, $binding) + + # Add category label to container + $toggleButton = New-Object Windows.Controls.Label + $toggleButton.Content = "- $Category" + $toggleButton.Tag = "CategoryToggleButton" + $toggleButton.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "HeaderFontSize") + $toggleButton.SetResourceReference([Windows.Controls.Control]::FontFamilyProperty, "HeaderFontFamily") + $toggleButton.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "LabelboxForegroundColor") + $toggleButton.Cursor = [System.Windows.Input.Cursors]::Hand + $toggleButton.HorizontalAlignment = [Windows.HorizontalAlignment]::Stretch + $sync.$Category = $toggleButton + + # Add click handler to toggle category visibility + $toggleButton.Add_MouseLeftButtonUp({ + param($sender, $e) + + # Find the parent StackPanel (categoryContainer) + $categoryContainer = $sender.Parent + if ($categoryContainer -and $categoryContainer.Children.Count -ge 2) { + # The WrapPanel is the second child + $wrapPanel = $categoryContainer.Children[1] + + # Toggle visibility + if ($wrapPanel.Visibility -eq [Windows.Visibility]::Visible) { + $wrapPanel.Visibility = [Windows.Visibility]::Collapsed + # Change - to + + $sender.Content = $sender.Content -replace "^- ", "+ " + } else { + $wrapPanel.Visibility = [Windows.Visibility]::Visible + # Change + to - + $sender.Content = $sender.Content -replace "^\+ ", "- " + } + } + }) + + $null = $categoryContainer.Children.Add($toggleButton) + + # Add wrap panel for apps to container + $wrapPanel = New-Object Windows.Controls.WrapPanel + $wrapPanel.Orientation = "Horizontal" + $wrapPanel.HorizontalAlignment = "Left" + $wrapPanel.VerticalAlignment = "Top" + $wrapPanel.Margin = New-Object Windows.Thickness(0, 0, 0, 0) + $wrapPanel.Visibility = [Windows.Visibility]::Visible + $wrapPanel.Tag = "CategoryWrapPanel_$category" + + $null = $categoryContainer.Children.Add($wrapPanel) + + # Add the entire category container to the target element + $null = $TargetElement.Items.Add($categoryContainer) + + # Add apps to the wrap panel + $appsByCategory[$category] | Sort-Object | ForEach-Object { + $sync.$_ = $(Initialize-InstallAppEntry -TargetElement $wrapPanel -AppKey $_) + } + } + } diff --git a/functions/private/Install-WinUtilChoco.ps1 b/functions/private/Install-WinUtilChoco.ps1 index bb4460e2fa..dc2d4f155d 100644 --- a/functions/private/Install-WinUtilChoco.ps1 +++ b/functions/private/Install-WinUtilChoco.ps1 @@ -6,23 +6,10 @@ function Install-WinUtilChoco { Installs Chocolatey if it is not already installed #> - - try { - Write-Host "Checking if Chocolatey is Installed..." - - if((Test-WinUtilPackageManager -choco) -eq "installed") { - return - } - # Install logic taken from https://chocolatey.org/install#individual - Write-Host "Seems Chocolatey is not installed, installing now." - Set-ExecutionPolicy Bypass -Scope Process -Force; - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; - Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - - } catch { - Write-Host "===========================================" -Foregroundcolor Red - Write-Host "-- Chocolatey failed to install ---" -Foregroundcolor Red - Write-Host "===========================================" -Foregroundcolor Red + if ((Test-WinUtilPackageManager -choco) -eq "installed") { + return } + Write-Host "Chocolatey is not installed. Installing now..." + Invoke-WebRequest -Uri https://community.chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression } diff --git a/functions/private/Install-WinUtilProgramChoco.ps1 b/functions/private/Install-WinUtilProgramChoco.ps1 index 3f9aae409c..c8b071a0eb 100644 --- a/functions/private/Install-WinUtilProgramChoco.ps1 +++ b/functions/private/Install-WinUtilProgramChoco.ps1 @@ -113,7 +113,7 @@ function Install-WinUtilProgramChoco { [int]$totalPrograms ) $progressState = if ($currentIndex -eq $totalPrograms) { "Normal" } else { "Error" } - $sync.form.Dispatcher.Invoke([action] { Set-WinUtilTaskbaritem -state $progressState -value ($currentIndex / $totalPrograms) }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state $progressState -value ($currentIndex / $totalPrograms) } } function Install-ChocoPackage { @@ -205,7 +205,7 @@ function Install-WinUtilProgramChoco { Write-Host "Searching for metapackages of $Program (.install or .portable)" $chocoPackages = ((choco list | Select-String -Pattern "$Program(\.install|\.portable)?").Matches.Value) -join " " if ($chocoPackages) { - Write-Host "Starting uninstallation of $chocoPackages with Chocolatey." + Write-Host "Starting uninstallation of $chocoPackages with Chocolatey..." try { $uninstallStatusCode = Invoke-ChocoCommand "uninstall $chocoPackages -y" Write-Host "$Program" $(if ($uninstallStatusCode -eq 0) { "uninstalled successfully." } else { "failed to uninstall." }) @@ -234,7 +234,7 @@ function Install-WinUtilProgramChoco { for ($currentIndex = 0; $currentIndex -lt $totalPrograms; $currentIndex++) { $Program = $Programs[$currentIndex] Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($currentIndex / $totalPrograms * 100) - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($currentIndex / $totalPrograms)}) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value ($currentIndex / $totalPrograms)} switch ($Action) { "Install" { diff --git a/functions/private/Install-WinUtilProgramWinget.ps1 b/functions/private/Install-WinUtilProgramWinget.ps1 index 994d10b7d6..7c968a4e8a 100644 --- a/functions/private/Install-WinUtilProgramWinget.ps1 +++ b/functions/private/Install-WinUtilProgramWinget.ps1 @@ -28,28 +28,20 @@ Function Install-WinUtilProgramWinget { Invokes the winget.exe with the provided arguments and return the exit code .PARAMETER wingetId - The Id of the Program that Winget should Install/Uninstall - - .PARAMETER scope - Determines the installation mode. Can be "user" or "machine" (For more info look at the winget documentation) - - .PARAMETER credential - The PSCredential Object of the user that should be used to run winget + The Id of the Program that WinGet should Install/Uninstall .NOTES - Invoke Winget uses the public variable $Action defined outside the function to determine if a Program should be installed or removed + Invoke WinGet uses the public variable $Action defined outside the function to determine if a Program should be installed or removed #> param ( - [string]$wingetId, - [string]$scope = "", - [PScredential]$credential = $null + [string]$wingetId ) $commonArguments = "--id $wingetId --silent" $arguments = if ($Action -eq "Install") { - "install $commonArguments --accept-source-agreements --accept-package-agreements $(if ($scope) {" --scope $scope"})" + "install $commonArguments --accept-source-agreements --accept-package-agreements --source winget" } else { - "uninstall $commonArguments" + "uninstall $commonArguments --source winget" } $processParams = @{ @@ -60,10 +52,6 @@ Function Install-WinUtilProgramWinget { NoNewWindow = $true } - if ($credential) { - $processParams.credential = $credential - } - return (Start-Process @processParams).ExitCode } @@ -73,7 +61,7 @@ Function Install-WinUtilProgramWinget { Contains the Install Logic and return code handling from winget .PARAMETER Program - The Winget ID of the Program that should be installed + The WinGet ID of the Program that should be installed #> param ( [string]$Program @@ -83,32 +71,10 @@ Function Install-WinUtilProgramWinget { Write-Host "$($Program) installed successfully." return $true } elseif ($status -eq -1978335189) { - Write-Host "$($Program) No applicable update found" + Write-Host "No applicable update found for $($Program)." return $true } - Write-Host "Attempt installation of $($Program) with User scope" - $status = Invoke-Winget -wingetId $Program -scope "user" - if ($status -eq 0) { - Write-Host "$($Program) installed successfully with User scope." - return $true - } elseif ($status -eq -1978335189) { - Write-Host "$($Program) No applicable update found" - return $true - } - - $userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $($Program) installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User credential Prompt", [System.Windows.MessageBoxButton]::YesNo) - if ($userChoice -eq 'Yes') { - $getcreds = Get-Credential - $status = Invoke-Winget -wingetId $Program -credential $getcreds - if ($status -eq 0) { - Write-Host "$($Program) installed successfully with User prompt." - return $true - } - } else { - Write-Host "Skipping installation with specific user credentials." - } - Write-Host "Failed to install $($Program)." return $false } @@ -116,13 +82,13 @@ Function Install-WinUtilProgramWinget { Function Invoke-Uninstall { <# .SYNOPSIS - Contains the Uninstall Logic and return code handling from winget + Contains the Uninstall Logic and return code handling from WinGet .PARAMETER Program - The Winget ID of the Program that should be uninstalled + The WinGet ID of the Program that should be uninstalled #> param ( - [psobject]$Program + [string]$Program ) try { @@ -144,14 +110,14 @@ Function Install-WinUtilProgramWinget { $failedPackages = @() Write-Host "===========================================" - Write-Host "-- Configuring winget packages ---" + Write-Host "-- Configuring WinGet packages ---" Write-Host "===========================================" for ($i = 0; $i -lt $count; $i++) { $Program = $Programs[$i] $result = $false Set-WinUtilProgressBar -label "$Action $($Program)" -percent ($i / $count * 100) - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i / $count)}) + Invoke-WPFUIThread -ScriptBlock{ Set-WinUtilTaskbaritem -value ($i / $count)} $result = switch ($Action) { "Install" {Invoke-Install -Program $Program} @@ -164,6 +130,6 @@ Function Install-WinUtilProgramWinget { } } - Set-WinUtilProgressBar -label "$($Action)ation done" -percent 100 + Set-WinUtilProgressBar -label "$($Action) action done." -percent 100 return $failedPackages } diff --git a/functions/private/Install-WinUtilWinget.ps1 b/functions/private/Install-WinUtilWinget.ps1 index 7621ef913d..f3fc4627f6 100644 --- a/functions/private/Install-WinUtilWinget.ps1 +++ b/functions/private/Install-WinUtilWinget.ps1 @@ -2,49 +2,18 @@ function Install-WinUtilWinget { <# .SYNOPSIS - Installs Winget if it is not already installed. + Installs WinGet if not already installed. .DESCRIPTION - This function will download the latest version of Winget and install it. If Winget is already installed, it will do nothing. + installs winGet if needed #> - $isWingetInstalled = Test-WinUtilPackageManager -winget - - try { - if ($isWingetInstalled -eq "installed") { - Write-Host "`nWinget is already installed.`r" -ForegroundColor Green - return - } elseif ($isWingetInstalled -eq "outdated") { - Write-Host "`nWinget is Outdated. Continuing with install.`r" -ForegroundColor Yellow - } else { - Write-Host "`nWinget is not Installed. Continuing with install.`r" -ForegroundColor Red - } - - - # Gets the computer's information - if ($null -eq $sync.ComputerInfo) { - $ComputerInfo = Get-ComputerInfo -ErrorAction Stop - } else { - $ComputerInfo = $sync.ComputerInfo - } - - if (($ComputerInfo.WindowsVersion) -lt "1809") { - # Checks if Windows Version is too old for Winget - Write-Host "Winget is not supported on this version of Windows (Pre-1809)" -ForegroundColor Red - return - } - - # Install Winget via GitHub method. - # Used part of my own script with some modification: ruxunderscore/windows-initialization - Write-Host "Downloading Winget and License File`r" - Get-WinUtilWingetLatest - Write-Host "Enabling NuGet and Module..." - Install-PackageProvider -Name NuGet -Force - Install-Module -Name Microsoft.WinGet.Client -Force - # Winget only needs a refresh of the environment variables to be used. - Write-Output "Refreshing Environment Variables...`n" - $ENV:PATH = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User") - } catch { - Write-Error "Failed to install Winget: $($_.Exception.Message)" + if ((Test-WinUtilPackageManager -winget) -eq "installed") { + return } + Write-Host "WinGet is not installed. Installing now..." -ForegroundColor Red + + Install-PackageProvider -Name NuGet -Force + Install-Module -Name Microsoft.WinGet.Client -Force + Repair-WinGetPackageManager -AllUsers } diff --git a/functions/private/Invoke-WinUtilCurrentSystem.ps1 b/functions/private/Invoke-WinUtilCurrentSystem.ps1 index 82d7938f55..ebcdc38f8c 100644 --- a/functions/private/Invoke-WinUtilCurrentSystem.ps1 +++ b/functions/private/Invoke-WinUtilCurrentSystem.ps1 @@ -6,7 +6,7 @@ Function Invoke-WinUtilCurrentSystem { Checks to see what tweaks have already been applied and what programs are installed, and checks the according boxes .EXAMPLE - Get-WinUtilCheckBoxes "WPFInstall" + InvokeWinUtilCurrentSystem -Checkbox "winget" #> @@ -41,43 +41,73 @@ Function Invoke-WinUtilCurrentSystem { } } - if($CheckBox -eq "tweaks") { + if ($CheckBox -eq "tweaks") { - if(!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)} + if (!(Test-Path 'HKU:\')) {$null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS)} $ScheduledTasks = Get-ScheduledTask $sync.configs.tweaks | Get-Member -MemberType NoteProperty | ForEach-Object { $Config = $psitem.Name #WPFEssTweaksTele - $registryKeys = $sync.configs.tweaks.$Config.registry - $scheduledtaskKeys = $sync.configs.tweaks.$Config.scheduledtask - $serviceKeys = $sync.configs.tweaks.$Config.service - - if($registryKeys -or $scheduledtaskKeys -or $serviceKeys) { + $entry = $sync.configs.tweaks.$Config + $registryKeys = $entry.registry + $scheduledtaskKeys = $entry.scheduledtask + $serviceKeys = $entry.service + $appxKeys = $entry.appx + $invokeScript = $entry.InvokeScript + $entryType = $entry.Type + + if ($registryKeys -or $scheduledtaskKeys -or $serviceKeys) { $Values = @() + if ($entryType -eq "Toggle") { + if (-not (Get-WinUtilToggleStatus $Config)) { + $values += $False + } + } else { + $registryMatchCount = 0 + $registryTotal = 0 - Foreach ($tweaks in $registryKeys) { - Foreach($tweak in $tweaks) { + Foreach ($tweaks in $registryKeys) { + Foreach ($tweak in $tweaks) { + $registryTotal++ + $regstate = $null - if(test-path $tweak.Path) { - $actualValue = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name) - $expectedValue = $tweak.Value - if ($expectedValue -notlike $actualValue) { - $values += $False + if (Test-Path $tweak.Path) { + $regstate = Get-ItemProperty -Name $tweak.Name -Path $tweak.Path -ErrorAction SilentlyContinue | Select-Object -ExpandProperty $($tweak.Name) + } + + if ($null -eq $regstate) { + switch ($tweak.DefaultState) { + "true" { + $regstate = $tweak.Value + } + "false" { + $regstate = $tweak.OriginalValue + } + default { + $regstate = $tweak.OriginalValue + } + } + } + + if ($regstate -eq $tweak.Value) { + $registryMatchCount++ } - } else { - $values += $False } } + + if ($registryTotal -gt 0 -and $registryMatchCount -ne $registryTotal) { + $values += $False + } } Foreach ($tweaks in $scheduledtaskKeys) { - Foreach($tweak in $tweaks) { + Foreach ($tweak in $tweaks) { $task = $ScheduledTasks | Where-Object {$($psitem.TaskPath + $psitem.TaskName) -like "\$($tweak.name)"} - if($task) { + if ($task) { $actualValue = $task.State $expectedValue = $tweak.State if ($expectedValue -ne $actualValue) { @@ -88,10 +118,10 @@ Function Invoke-WinUtilCurrentSystem { } Foreach ($tweaks in $serviceKeys) { - Foreach($tweak in $tweaks) { + Foreach ($tweak in $tweaks) { $Service = Get-Service -Name $tweak.Name - if($Service) { + if ($Service) { $actualValue = $Service.StartType $expectedValue = $tweak.StartupType if ($expectedValue -ne $actualValue) { @@ -101,9 +131,13 @@ Function Invoke-WinUtilCurrentSystem { } } - if($values -notcontains $false) { + if ($values -notcontains $false) { Write-Output $Config } + } else { + if ($invokeScript -or $appxKeys) { + Write-Debug "Skipping $Config in Get Installed: no detectable registry, scheduled task, or service state." + } } } } diff --git a/functions/private/Invoke-WinUtilExplorerUpdate.ps1 b/functions/private/Invoke-WinUtilExplorerUpdate.ps1 index 5984f7a881..d51a8133f3 100644 --- a/functions/private/Invoke-WinUtilExplorerUpdate.ps1 +++ b/functions/private/Invoke-WinUtilExplorerUpdate.ps1 @@ -1,42 +1,37 @@ function Invoke-WinUtilExplorerUpdate { - <# + <# .SYNOPSIS Refreshes the Windows Explorer #> - param ( [string]$action = "refresh" ) if ($action -eq "refresh") { - Invoke-WPFRunspace -DebugPreference $DebugPreference -ScriptBlock { - # Send the WM_SETTINGCHANGE message to all windows - Add-Type -TypeDefinition @" + Invoke-WPFRunspace -ScriptBlock { + # Define the Win32 type only if it doesn't exist + if (-not ([System.Management.Automation.PSTypeName]'Win32').Type) { + Add-Type -TypeDefinition @" using System; using System.Runtime.InteropServices; public class Win32 { [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] public static extern IntPtr SendMessageTimeout( - IntPtr hWnd, - uint Msg, - IntPtr wParam, - string lParam, - uint fuFlags, - uint uTimeout, - out IntPtr lpdwResult); + IntPtr hWnd, uint Msg, IntPtr wParam, string lParam, + uint fuFlags, uint uTimeout, out IntPtr lpdwResult); } "@ + } $HWND_BROADCAST = [IntPtr]0xffff $WM_SETTINGCHANGE = 0x1A $SMTO_ABORTIFHUNG = 0x2 - $timeout = 100 - # Send the broadcast message to all windows - [Win32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [IntPtr]::Zero, "ImmersiveColorSet", $SMTO_ABORTIFHUNG, $timeout, [ref]([IntPtr]::Zero)) + [Win32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, + [IntPtr]::Zero, "ImmersiveColorSet", $SMTO_ABORTIFHUNG, 100, + [ref]([IntPtr]::Zero)) } } elseif ($action -eq "restart") { - # Restart the Windows Explorer taskkill.exe /F /IM "explorer.exe" Start-Process "explorer.exe" } diff --git a/functions/private/Invoke-WinUtilFeatureInstall.ps1 b/functions/private/Invoke-WinUtilFeatureInstall.ps1 index 72a22d9a98..3f63b0f845 100644 --- a/functions/private/Invoke-WinUtilFeatureInstall.ps1 +++ b/functions/private/Invoke-WinUtilFeatureInstall.ps1 @@ -10,46 +10,40 @@ function Invoke-WinUtilFeatureInstall { $CheckBox ) - $x = 0 + if($sync.configs.feature.$CheckBox.feature) { + Foreach( $feature in $sync.configs.feature.$CheckBox.feature ) { + try { + Write-Host "Installing $feature" + Enable-WindowsOptionalFeature -Online -FeatureName $feature -All -NoRestart + } catch { + if ($CheckBox.Exception.Message -like "*requires elevation*") { + Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" } + } else { - $CheckBox | ForEach-Object { - if($sync.configs.feature.$psitem.feature) { - Foreach( $feature in $sync.configs.feature.$psitem.feature ) { - try { - Write-Host "Installing $feature" - Enable-WindowsOptionalFeature -Online -FeatureName $feature -All -NoRestart - } catch { - if ($psitem.Exception.Message -like "*requires elevation*") { - Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" }) - } else { - - Write-Warning "Unable to Install $feature due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } + Write-Warning "Unable to Install $feature due to unhandled exception." + Write-Warning $CheckBox.Exception.StackTrace } } } - if($sync.configs.feature.$psitem.InvokeScript) { - Foreach( $script in $sync.configs.feature.$psitem.InvokeScript ) { - try { - $Scriptblock = [scriptblock]::Create($script) + } + if($sync.configs.feature.$CheckBox.InvokeScript) { + Foreach( $script in $sync.configs.feature.$CheckBox.InvokeScript ) { + try { + $Scriptblock = [scriptblock]::Create($script) - Write-Host "Running Script for $psitem" - Invoke-Command $scriptblock -ErrorAction stop - } catch { - if ($psitem.Exception.Message -like "*requires elevation*") { - Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" }) - Write-Warning "Unable to Install $feature due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } + Write-Host "Running Script for $CheckBox" + Invoke-Command $scriptblock -ErrorAction stop + } catch { + if ($CheckBox.Exception.Message -like "*requires elevation*") { + Write-Warning "Unable to Install $feature due to permissions. Are you running as admin?" + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" } + } else { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" } + Write-Warning "Unable to Install $feature due to unhandled exception." + Write-Warning $CheckBox.Exception.StackTrace } } } - $X++ - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($x/$CheckBox.Count) }) } } diff --git a/functions/private/Invoke-WinUtilFontScaling.ps1 b/functions/private/Invoke-WinUtilFontScaling.ps1 new file mode 100644 index 0000000000..e57e8d8c87 --- /dev/null +++ b/functions/private/Invoke-WinUtilFontScaling.ps1 @@ -0,0 +1,87 @@ +function Invoke-WinUtilFontScaling { + <# + + .SYNOPSIS + Applies UI and font scaling for accessibility + + .PARAMETER ScaleFactor + Sets the scaling from 0.75 and 2.0. + Default is 1.0 (100% - no scaling) + + .EXAMPLE + Invoke-WinUtilFontScaling -ScaleFactor 1.25 + # Applies 125% scaling + #> + + param ( + [double]$ScaleFactor = 1.0 + ) + + # Validate if scale factor is within the range + if ($ScaleFactor -lt 0.75 -or $ScaleFactor -gt 2.0) { + Write-Warning "Scale factor must be between 0.75 and 2.0. Using 1.0 instead." + $ScaleFactor = 1.0 + } + + # Define an array for resources to be scaled + $fontResources = @( + # Fonts + "FontSize", + "ButtonFontSize", + "HeaderFontSize", + "TabButtonFontSize", + "ConfigTabButtonFontSize", + "IconFontSize", + "SettingsIconFontSize", + "CloseIconFontSize", + "AppEntryFontSize", + "SearchBarTextBoxFontSize", + "SearchBarClearButtonFontSize", + "CustomDialogFontSize", + "CustomDialogFontSizeHeader", + "ConfigUpdateButtonFontSize", + # Buttons and UI + "CheckBoxBulletDecoratorSize", + "ButtonWidth", + "ButtonHeight", + "TabButtonWidth", + "TabButtonHeight", + "IconButtonSize", + "AppEntryWidth", + "SearchBarWidth", + "SearchBarHeight", + "CustomDialogWidth", + "CustomDialogHeight", + "CustomDialogLogoSize", + "ToolTipWidth" + ) + + # Apply scaling to each resource + foreach ($resourceName in $fontResources) { + try { + # Get the default font size from the theme configuration + $originalValue = $sync.configs.themes.shared.$resourceName + if ($originalValue) { + # Convert string to double since values are stored as strings + $originalValue = [double]$originalValue + # Calculates and applies the new font size + $newValue = [math]::Round($originalValue * $ScaleFactor, 1) + $sync.Form.Resources[$resourceName] = $newValue + Write-Debug "Scaled $resourceName from original $originalValue to $newValue (factor: $ScaleFactor)" + } + } + catch { + Write-Warning "Failed to scale resource $resourceName : $_" + } + } + + # Update the font scaling percentage displayed on the UI + if ($sync.FontScalingValue) { + $percentage = [math]::Round($ScaleFactor * 100) + $sync.FontScalingValue.Text = "$percentage%" + } + + Write-Debug "Font scaling applied with factor: $ScaleFactor" +} + + diff --git a/functions/private/Invoke-WinUtilGPU.ps1 b/functions/private/Invoke-WinUtilGPU.ps1 deleted file mode 100644 index 6ec42d7afe..0000000000 --- a/functions/private/Invoke-WinUtilGPU.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -function Invoke-WinUtilGPU { - $gpuInfo = Get-CimInstance Win32_VideoController - - # GPUs to blacklist from using Demanding Theming - $lowPowerGPUs = ( - "*NVIDIA GeForce*M*", - "*NVIDIA GeForce*Laptop*", - "*NVIDIA GeForce*GT*", - "*AMD Radeon(TM)*", - "*Intel(R) HD Graphics*", - "*UHD*" - - ) - - foreach ($gpu in $gpuInfo) { - foreach ($gpuPattern in $lowPowerGPUs) { - if ($gpu.Name -like $gpuPattern) { - return $false - } - } - } - return $true -} diff --git a/functions/private/Invoke-WinUtilISO.ps1 b/functions/private/Invoke-WinUtilISO.ps1 new file mode 100644 index 0000000000..3f1b1fbf0b --- /dev/null +++ b/functions/private/Invoke-WinUtilISO.ps1 @@ -0,0 +1,659 @@ +function Write-Win11ISOLog { + param([string]$Message) + $ts = (Get-Date).ToString("HH:mm:ss") + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $current = $sync["WPFWin11ISOStatusLog"].Text + if ($current -eq "Ready. Please select a Windows 11 ISO to begin.") { + $sync["WPFWin11ISOStatusLog"].Text = "[$ts] $Message" + } else { + $sync["WPFWin11ISOStatusLog"].Text += "`n[$ts] $Message" + } + $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length + $sync["WPFWin11ISOStatusLog"].ScrollToEnd() + }) +} + +function Invoke-WinUtilISOBrowse { + Add-Type -AssemblyName System.Windows.Forms + + $dlg = [System.Windows.Forms.OpenFileDialog]::new() + $dlg.Title = "Select Windows 11 ISO" + $dlg.Filter = "ISO files (*.iso)|*.iso|All files (*.*)|*.*" + $dlg.InitialDirectory = [System.Environment]::GetFolderPath("Desktop") + + if ($dlg.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK) { return } + + $isoPath = $dlg.FileName + $fileSizeGB = [math]::Round((Get-Item $isoPath).Length / 1GB, 2) + + $sync["WPFWin11ISOPath"].Text = $isoPath + $sync["WPFWin11ISOFileInfo"].Text = "File size: $fileSizeGB GB" + $sync["WPFWin11ISOFileInfo"].Visibility = "Visible" + $sync["WPFWin11ISOMountSection"].Visibility = "Visible" + $sync["WPFWin11ISOVerifyResultPanel"].Visibility = "Collapsed" + $sync["WPFWin11ISOModifySection"].Visibility = "Collapsed" + $sync["WPFWin11ISOOutputSection"].Visibility = "Collapsed" + + Write-Win11ISOLog "ISO selected: $isoPath ($fileSizeGB GB)" +} + +function Invoke-WinUtilISOMountAndVerify { + $isoPath = $sync["WPFWin11ISOPath"].Text + + if ([string]::IsNullOrWhiteSpace($isoPath) -or $isoPath -eq "No ISO selected...") { + [System.Windows.MessageBox]::Show("Please select an ISO file first.", "No ISO Selected", "OK", "Warning") + return + } + + Write-Win11ISOLog "Mounting ISO: $isoPath" + Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10 + + try { + Mount-DiskImage -ImagePath $isoPath -ErrorAction Stop | Out-Null + + do { + Start-Sleep -Milliseconds 500 + } until ((Get-DiskImage -ImagePath $isoPath | Get-Volume).DriveLetter) + + $driveLetter = (Get-DiskImage -ImagePath $isoPath | Get-Volume).DriveLetter + ":" + Write-Win11ISOLog "Mounted at drive $driveLetter" + + Set-WinUtilProgressBar -Label "Verifying ISO contents..." -Percent 30 + + $wimPath = Join-Path $driveLetter "sources\install.wim" + $esdPath = Join-Path $driveLetter "sources\install.esd" + + if (-not (Test-Path $wimPath) -and -not (Test-Path $esdPath)) { + Dismount-DiskImage -ImagePath $isoPath | Out-Null + Write-Win11ISOLog "ERROR: install.wim/install.esd not found — not a valid Windows ISO." + [System.Windows.MessageBox]::Show( + "This does not appear to be a valid Windows ISO.`n`ninstall.wim / install.esd was not found.", + "Invalid ISO", "OK", "Error") + Set-WinUtilProgressBar -Label "" -Percent 0 + return + } + + $activeWim = if (Test-Path $wimPath) { $wimPath } else { $esdPath } + + Set-WinUtilProgressBar -Label "Reading image metadata..." -Percent 55 + $imageInfo = Get-WindowsImage -ImagePath $activeWim | Select-Object ImageIndex, ImageName + + if (-not ($imageInfo | Where-Object { $_.ImageName -match "Windows 11" })) { + Dismount-DiskImage -ImagePath $isoPath | Out-Null + Write-Win11ISOLog "ERROR: No 'Windows 11' edition found in the image." + [System.Windows.MessageBox]::Show( + "No Windows 11 edition was found in this ISO.`n`nOnly official Windows 11 ISOs are supported.", + "Not a Windows 11 ISO", "OK", "Error") + Set-WinUtilProgressBar -Label "" -Percent 0 + return + } + + $sync["Win11ISOImageInfo"] = $imageInfo + + $sync["WPFWin11ISOMountDriveLetter"].Text = "Mounted at: $driveLetter | Image file: $(Split-Path $activeWim -Leaf)" + $sync["WPFWin11ISOEditionComboBox"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOEditionComboBox"].Items.Clear() + foreach ($img in $imageInfo) { + [void]$sync["WPFWin11ISOEditionComboBox"].Items.Add("$($img.ImageIndex): $($img.ImageName)") + } + if ($sync["WPFWin11ISOEditionComboBox"].Items.Count -gt 0) { + $proIndex = -1 + for ($i = 0; $i -lt $sync["WPFWin11ISOEditionComboBox"].Items.Count; $i++) { + if ($sync["WPFWin11ISOEditionComboBox"].Items[$i] -match "Windows 11 Pro(?![\w ])") { + $proIndex = $i; break + } + } + $sync["WPFWin11ISOEditionComboBox"].SelectedIndex = if ($proIndex -ge 0) { $proIndex } else { 0 } + } + }) + $sync["WPFWin11ISOVerifyResultPanel"].Visibility = "Visible" + + $sync["Win11ISODriveLetter"] = $driveLetter + $sync["Win11ISOWimPath"] = $activeWim + $sync["Win11ISOImagePath"] = $isoPath + $sync["WPFWin11ISOModifySection"].Visibility = "Visible" + + Set-WinUtilProgressBar -Label "ISO verified" -Percent 100 + Write-Win11ISOLog "ISO verified OK. Editions found: $($imageInfo.Count)" + } catch { + Write-Win11ISOLog "ERROR during mount/verify: $_" + [System.Windows.MessageBox]::Show( + "An error occurred while mounting or verifying the ISO:`n`n$_", + "Error", "OK", "Error") + } finally { + Start-Sleep -Milliseconds 800 + Set-WinUtilProgressBar -Label "" -Percent 0 + } +} + +function Invoke-WinUtilISOModify { + $isoPath = $sync["Win11ISOImagePath"] + $driveLetter = $sync["Win11ISODriveLetter"] + $wimPath = $sync["Win11ISOWimPath"] + + if (-not $isoPath) { + [System.Windows.MessageBox]::Show( + "No verified ISO found. Please complete Steps 1 and 2 first.", + "Not Ready", "OK", "Warning") + return + } + + $selectedItem = $sync["WPFWin11ISOEditionComboBox"].SelectedItem + $selectedWimIndex = 1 + if ($selectedItem -and $selectedItem -match '^(\d+):') { + $selectedWimIndex = [int]$Matches[1] + } elseif ($sync["Win11ISOImageInfo"]) { + $selectedWimIndex = $sync["Win11ISOImageInfo"][0].ImageIndex + } + $selectedEditionName = if ($selectedItem) { ($selectedItem -replace '^\d+:\s*', '') } else { "Unknown" } + Write-Win11ISOLog "Selected edition: $selectedEditionName (Index $selectedWimIndex)" + + $sync["WPFWin11ISOModifyButton"].IsEnabled = $false + $sync["Win11ISOModifying"] = $true + + $existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue | + Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + + $workDir = if ($existingWorkDir) { + Write-Win11ISOLog "Reusing existing temp directory: $($existingWorkDir.FullName)" + $existingWorkDir.FullName + } else { + Join-Path $env:TEMP "WinUtil_Win11ISO_$(Get-Date -Format 'yyyyMMdd_HHmmss')" + } + + $autounattendContent = if ($WinUtilAutounattendXml) { + $WinUtilAutounattendXml + } else { + $toolsXml = Join-Path $PSScriptRoot "..\..\tools\autounattend.xml" + if (Test-Path $toolsXml) { Get-Content $toolsXml -Raw } else { "" } + } + + $runspace = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace() + $runspace.ApartmentState = "STA" + $runspace.ThreadOptions = "ReuseThread" + $runspace.Open() + $injectDrivers = $sync["WPFWin11ISOInjectDrivers"].IsChecked -eq $true + + $runspace.SessionStateProxy.SetVariable("sync", $sync) + $runspace.SessionStateProxy.SetVariable("isoPath", $isoPath) + $runspace.SessionStateProxy.SetVariable("driveLetter", $driveLetter) + $runspace.SessionStateProxy.SetVariable("wimPath", $wimPath) + $runspace.SessionStateProxy.SetVariable("workDir", $workDir) + $runspace.SessionStateProxy.SetVariable("selectedWimIndex", $selectedWimIndex) + $runspace.SessionStateProxy.SetVariable("selectedEditionName", $selectedEditionName) + $runspace.SessionStateProxy.SetVariable("autounattendContent", $autounattendContent) + $runspace.SessionStateProxy.SetVariable("injectDrivers", $injectDrivers) + + $isoScriptFuncDef = "function Invoke-WinUtilISOScript {`n" + ${function:Invoke-WinUtilISOScript}.ToString() + "`n}" + $win11ISOLogFuncDef = "function Write-Win11ISOLog {`n" + ${function:Write-Win11ISOLog}.ToString() + "`n}" + $runspace.SessionStateProxy.SetVariable("isoScriptFuncDef", $isoScriptFuncDef) + $runspace.SessionStateProxy.SetVariable("win11ISOLogFuncDef", $win11ISOLogFuncDef) + + $script = [Management.Automation.PowerShell]::Create() + $script.Runspace = $runspace + $script.AddScript({ + . ([scriptblock]::Create($isoScriptFuncDef)) + . ([scriptblock]::Create($win11ISOLogFuncDef)) + + function Log($msg) { + $ts = (Get-Date).ToString("HH:mm:ss") + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOStatusLog"].Text += "`n[$ts] $msg" + $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length + $sync["WPFWin11ISOStatusLog"].ScrollToEnd() + }) + Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg" -ErrorAction SilentlyContinue + } + + function SetProgress($label, $pct) { + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = $label + $sync.progressBarTextBlock.ToolTip = $label + $sync.ProgressBar.Value = [Math]::Max($pct, 5) + }) + } + + try { + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOSelectSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOMountSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOModifySection"].Visibility = "Collapsed" + }) + + Log "Creating working directory: $workDir" + $isoContents = Join-Path $workDir "iso_contents" + $mountDir = Join-Path $workDir "wim_mount" + New-Item -ItemType Directory -Path $isoContents, $mountDir -Force | Out-Null + SetProgress "Copying ISO contents..." 10 + + Log "Copying ISO contents from $driveLetter to $isoContents..." + & robocopy $driveLetter $isoContents /E /NFL /NDL /NJH /NJS | Out-Null + Log "ISO contents copied." + SetProgress "Mounting install.wim..." 25 + + $localWim = Join-Path $isoContents "sources\install.wim" + if (-not (Test-Path $localWim)) { $localWim = Join-Path $isoContents "sources\install.esd" } + Set-ItemProperty -Path $localWim -Name IsReadOnly -Value $false + + Log "Mounting install.wim (Index ${selectedWimIndex}: $selectedEditionName) at $mountDir..." + Mount-WindowsImage -ImagePath $localWim -Index $selectedWimIndex -Path $mountDir -ErrorAction Stop | Out-Null + SetProgress "Modifying install.wim..." 45 + + Log "Applying WinUtil modifications to install.wim..." + Invoke-WinUtilISOScript -ScratchDir $mountDir -ISOContentsDir $isoContents -AutoUnattendXml $autounattendContent -InjectCurrentSystemDrivers $injectDrivers -Log { param($m) Log $m } + + SetProgress "Cleaning up component store (WinSxS)..." 56 + Log "Running DISM component store cleanup (/ResetBase)..." + & dism /English "/image:$mountDir" /Cleanup-Image /StartComponentCleanup /ResetBase | ForEach-Object { Log $_ } + Log "Component store cleanup complete." + + SetProgress "Saving modified install.wim..." 65 + Log "Dismounting and saving install.wim. This will take several minutes..." + Dismount-WindowsImage -Path $mountDir -Save -ErrorAction Stop | Out-Null + Log "install.wim saved." + + SetProgress "Removing unused editions from install.wim..." 70 + Log "Exporting edition '$selectedEditionName' (Index $selectedWimIndex) to a single-edition install.wim..." + $exportWim = Join-Path $isoContents "sources\install_export.wim" + Export-WindowsImage -SourceImagePath $localWim -SourceIndex $selectedWimIndex -DestinationImagePath $exportWim -ErrorAction Stop | Out-Null + Remove-Item -Path $localWim -Force + Rename-Item -Path $exportWim -NewName "install.wim" -Force + $localWim = Join-Path $isoContents "sources\install.wim" + Log "Unused editions removed. install.wim now contains only '$selectedEditionName'." + + SetProgress "Dismounting source ISO..." 80 + Log "Dismounting original ISO..." + Dismount-DiskImage -ImagePath $isoPath | Out-Null + + $sync["Win11ISOWorkDir"] = $workDir + $sync["Win11ISOContentsDir"] = $isoContents + + SetProgress "Modification complete" 100 + Log "install.wim modification complete. Choose an output option in Step 4." + + $sync["WPFWin11ISOOutputSection"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOOutputSection"].Visibility = "Visible" + }) + } catch { + Log "ERROR during modification: $_" + + try { + if (Test-Path $mountDir) { + $mountedImages = Get-WindowsImage -Mounted -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq $mountDir } + if ($mountedImages) { + Log "Cleaning up: dismounting install.wim (discarding changes)..." + Dismount-WindowsImage -Path $mountDir -Discard -ErrorAction SilentlyContinue | Out-Null + } + } + } catch { Log "Warning: could not dismount install.wim during cleanup: $_" } + + try { + $mountedISO = Get-DiskImage -ImagePath $isoPath -ErrorAction SilentlyContinue + if ($mountedISO -and $mountedISO.Attached) { + Log "Cleaning up: dismounting source ISO..." + Dismount-DiskImage -ImagePath $isoPath -ErrorAction SilentlyContinue | Out-Null + } + } catch { Log "Warning: could not dismount ISO during cleanup: $_" } + + try { + if (Test-Path $workDir) { + Log "Cleaning up: removing temp directory $workDir..." + Remove-Item -Path $workDir -Recurse -Force -ErrorAction SilentlyContinue + } + } catch { Log "Warning: could not remove temp directory during cleanup: $_" } + + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show( + "An error occurred during install.wim modification:`n`n$_", + "Modification Error", "OK", "Error") + }) + } finally { + Start-Sleep -Milliseconds 800 + $sync["Win11ISOModifying"] = $false + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = "" + $sync.progressBarTextBlock.ToolTip = "" + $sync.ProgressBar.Value = 0 + $sync["WPFWin11ISOModifyButton"].IsEnabled = $true + if ($sync["WPFWin11ISOOutputSection"].Visibility -ne "Visible") { + $sync["WPFWin11ISOSelectSection"].Visibility = "Visible" + $sync["WPFWin11ISOMountSection"].Visibility = "Visible" + $sync["WPFWin11ISOModifySection"].Visibility = "Visible" + } + }) + } + }) | Out-Null + + $script.BeginInvoke() | Out-Null +} + +function Invoke-WinUtilISOCheckExistingWork { + if ($sync["Win11ISOContentsDir"] -and (Test-Path $sync["Win11ISOContentsDir"])) { return } + + # Check if ISO modification is currently in progress + if ($sync["Win11ISOModifying"]) { + return + } + + $existingWorkDir = Get-Item -Path (Join-Path $env:TEMP "WinUtil_Win11ISO*") -ErrorAction SilentlyContinue | + Where-Object { $_.PSIsContainer } | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + + if (-not $existingWorkDir) { return } + + $isoContents = Join-Path $existingWorkDir.FullName "iso_contents" + if (-not (Test-Path $isoContents)) { return } + + $sync["Win11ISOWorkDir"] = $existingWorkDir.FullName + $sync["Win11ISOContentsDir"] = $isoContents + + $sync["WPFWin11ISOSelectSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOMountSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOModifySection"].Visibility = "Collapsed" + $sync["WPFWin11ISOOutputSection"].Visibility = "Visible" + + $modified = $existingWorkDir.LastWriteTime.ToString("yyyy-MM-dd HH:mm") + Write-Win11ISOLog "Existing working directory found: $($existingWorkDir.FullName)" + Write-Win11ISOLog "Last modified: $modified - Skipping Steps 1-3 and resuming at Step 4." + Write-Win11ISOLog "Click 'Clean & Reset' if you want to start over with a new ISO." + + [System.Windows.MessageBox]::Show( + "A previous WinUtil ISO working directory was found:`n`n$($existingWorkDir.FullName)`n`n(Last modified: $modified)`n`nStep 4 (output options) has been restored so you can save the already-modified image.`n`nClick 'Clean & Reset' in Step 4 if you want to start over.", + "Existing Work Found", "OK", "Info") +} + +function Invoke-WinUtilISOCleanAndReset { + $workDir = $sync["Win11ISOWorkDir"] + + if ($workDir -and (Test-Path $workDir)) { + $confirm = [System.Windows.MessageBox]::Show( + "This will delete the temporary working directory:`n`n$workDir`n`nAnd reset the interface back to the start.`n`nContinue?", + "Clean & Reset", "YesNo", "Warning") + if ($confirm -ne "Yes") { return } + } + + $sync["WPFWin11ISOCleanResetButton"].IsEnabled = $false + + $runspace = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace() + $runspace.ApartmentState = "STA" + $runspace.ThreadOptions = "ReuseThread" + $runspace.Open() + $runspace.SessionStateProxy.SetVariable("sync", $sync) + $runspace.SessionStateProxy.SetVariable("workDir", $workDir) + + $script = [Management.Automation.PowerShell]::Create() + $script.Runspace = $runspace + $script.AddScript({ + + function Log($msg) { + $ts = (Get-Date).ToString("HH:mm:ss") + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOStatusLog"].Text += "`n[$ts] $msg" + $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length + $sync["WPFWin11ISOStatusLog"].ScrollToEnd() + }) + Add-Content -Path (Join-Path $workDir "WinUtil_Win11ISO.log") -Value "[$ts] $msg" -ErrorAction SilentlyContinue + } + + function SetProgress($label, $pct) { + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = $label + $sync.progressBarTextBlock.ToolTip = $label + $sync.ProgressBar.Value = [Math]::Max($pct, 5) + }) + } + + try { + if ($workDir) { + $mountDir = Join-Path $workDir "wim_mount" + try { + $mountedImages = Get-WindowsImage -Mounted -ErrorAction SilentlyContinue | + Where-Object { $_.Path -like "$workDir*" } + if ($mountedImages) { + foreach ($img in $mountedImages) { + Log "Dismounting WIM at: $($img.Path) (discarding changes)..." + SetProgress "Dismounting WIM image..." 3 + Dismount-WindowsImage -Path $img.Path -Discard -ErrorAction Stop | Out-Null + Log "WIM dismounted successfully." + } + } elseif (Test-Path $mountDir) { + Log "No mounted WIM reported by Get-WindowsImage. Running DISM /Cleanup-Wim as a precaution..." + SetProgress "Running DISM cleanup..." 3 + & dism /English /Cleanup-Wim 2>&1 | ForEach-Object { Log $_ } + } + } catch { + Log "Warning: could not dismount WIM cleanly. Attempting DISM /Cleanup-Wim fallback: $_" + try { & dism /English /Cleanup-Wim 2>&1 | ForEach-Object { Log $_ } } + catch { Log "Warning: DISM /Cleanup-Wim also failed: $_" } + } + } + + if ($workDir -and (Test-Path $workDir)) { + Log "Scanning files to delete in: $workDir" + SetProgress "Scanning files..." 5 + + $allFiles = @(Get-ChildItem -Path $workDir -File -Recurse -Force -ErrorAction SilentlyContinue) + $allDirs = @(Get-ChildItem -Path $workDir -Directory -Recurse -Force -ErrorAction SilentlyContinue | + Sort-Object { $_.FullName.Length } -Descending) + $total = $allFiles.Count + $deleted = 0 + + Log "Found $total files to delete." + + foreach ($f in $allFiles) { + try { Remove-Item -Path $f.FullName -Force -ErrorAction Stop } catch { Log "WARNING: could not delete $($f.FullName): $_" } + $deleted++ + if ($deleted % 100 -eq 0 -or $deleted -eq $total) { + $pct = [math]::Round(($deleted / [Math]::Max($total, 1)) * 85) + 5 + SetProgress "Deleting files in $($f.Directory.Name)... ($deleted / $total)" $pct + } + } + + foreach ($d in $allDirs) { + try { Remove-Item -Path $d.FullName -Force -ErrorAction SilentlyContinue } catch {} + } + + try { Remove-Item -Path $workDir -Recurse -Force -ErrorAction Stop } catch {} + + if (Test-Path $workDir) { + Log "WARNING: some items could not be deleted in $workDir" + } else { + Log "Temp directory deleted successfully." + } + } else { + Log "No temp directory found — resetting UI." + } + + SetProgress "Resetting UI..." 95 + Log "Resetting interface..." + + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync["Win11ISOWorkDir"] = $null + $sync["Win11ISOContentsDir"] = $null + $sync["Win11ISOImagePath"] = $null + $sync["Win11ISODriveLetter"] = $null + $sync["Win11ISOWimPath"] = $null + $sync["Win11ISOImageInfo"] = $null + $sync["Win11ISOUSBDisks"] = $null + + $sync["WPFWin11ISOPath"].Text = "No ISO selected..." + $sync["WPFWin11ISOFileInfo"].Visibility = "Collapsed" + $sync["WPFWin11ISOVerifyResultPanel"].Visibility = "Collapsed" + $sync["WPFWin11ISOOptionUSB"].Visibility = "Collapsed" + $sync["WPFWin11ISOOutputSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOModifySection"].Visibility = "Collapsed" + $sync["WPFWin11ISOMountSection"].Visibility = "Collapsed" + $sync["WPFWin11ISOSelectSection"].Visibility = "Visible" + $sync["WPFWin11ISOModifyButton"].IsEnabled = $true + $sync["WPFWin11ISOCleanResetButton"].IsEnabled = $true + + $sync.progressBarTextBlock.Text = "" + $sync.progressBarTextBlock.ToolTip = "" + $sync.ProgressBar.Value = 0 + + $sync["WPFWin11ISOStatusLog"].Text = "Ready. Please select a Windows 11 ISO to begin." + }) + } catch { + Log "ERROR during Clean & Reset: $_" + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = "" + $sync.progressBarTextBlock.ToolTip = "" + $sync.ProgressBar.Value = 0 + $sync["WPFWin11ISOCleanResetButton"].IsEnabled = $true + }) + } + }) | Out-Null + + $script.BeginInvoke() | Out-Null +} + +function Invoke-WinUtilISOExport { + $contentsDir = $sync["Win11ISOContentsDir"] + + if (-not $contentsDir -or -not (Test-Path $contentsDir)) { + [System.Windows.MessageBox]::Show( + "No modified ISO content found. Please complete Steps 1-3 first.", + "Not Ready", "OK", "Warning") + return + } + + Add-Type -AssemblyName System.Windows.Forms + + $dlg = [System.Windows.Forms.SaveFileDialog]::new() + $dlg.Title = "Save Modified Windows 11 ISO" + $dlg.Filter = "ISO files (*.iso)|*.iso" + $dlg.FileName = "Win11_Modified_$(Get-Date -Format 'yyyyMMdd').iso" + $dlg.InitialDirectory = [System.Environment]::GetFolderPath("Desktop") + + if ($dlg.ShowDialog() -ne [System.Windows.Forms.DialogResult]::OK) { return } + + $outputISO = $dlg.FileName + + # Locate oscdimg.exe (Windows ADK or winget per-user install) + $oscdimg = Get-ChildItem "C:\Program Files (x86)\Windows Kits" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | + Select-Object -First 1 -ExpandProperty FullName + if (-not $oscdimg) { + $oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | + Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } | + Select-Object -First 1 -ExpandProperty FullName + } + + if (-not $oscdimg) { + Write-Win11ISOLog "oscdimg.exe not found. Attempting to install via winget..." + try { + # First ensure winget is installed and operational + Install-WinUtilWinget + + $winget = Get-Command winget -ErrorAction Stop + $result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1 + Write-Win11ISOLog "winget output: $result" + $oscdimg = Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages" -Recurse -Filter "oscdimg.exe" -ErrorAction SilentlyContinue | + Where-Object { $_.FullName -match 'Microsoft\.OSCDIMG' } | + Select-Object -First 1 -ExpandProperty FullName + } catch { + Write-Win11ISOLog "winget not available or install failed: $_" + } + + if (-not $oscdimg) { + Write-Win11ISOLog "oscdimg.exe still not found after install attempt." + [System.Windows.MessageBox]::Show( + "oscdimg.exe could not be found or installed automatically.`n`nPlease install it manually:`n winget install -e --id Microsoft.OSCDIMG`n`nOr install the Windows ADK from:`nhttps://learn.microsoft.com/windows-hardware/get-started/adk-install", + "oscdimg Not Found", "OK", "Warning") + return + } + Write-Win11ISOLog "oscdimg.exe installed successfully." + } + + $sync["WPFWin11ISOChooseISOButton"].IsEnabled = $false + + $runspace = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace() + $runspace.ApartmentState = "STA" + $runspace.ThreadOptions = "ReuseThread" + $runspace.Open() + $runspace.SessionStateProxy.SetVariable("sync", $sync) + $runspace.SessionStateProxy.SetVariable("contentsDir", $contentsDir) + $runspace.SessionStateProxy.SetVariable("outputISO", $outputISO) + $runspace.SessionStateProxy.SetVariable("oscdimg", $oscdimg) + + $win11ISOLogFuncDef = "function Write-Win11ISOLog {`n" + ${function:Write-Win11ISOLog}.ToString() + "`n}" + $runspace.SessionStateProxy.SetVariable("win11ISOLogFuncDef", $win11ISOLogFuncDef) + + $script = [Management.Automation.PowerShell]::Create() + $script.Runspace = $runspace + $script.AddScript({ + . ([scriptblock]::Create($win11ISOLogFuncDef)) + + function SetProgress($label, $pct) { + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = $label + $sync.progressBarTextBlock.ToolTip = $label + $sync.ProgressBar.Value = [Math]::Max($pct, 5) + }) + } + + try { + Write-Win11ISOLog "Exporting to ISO: $outputISO" + SetProgress "Building ISO..." 10 + + $bootData = "2#p0,e,b`"$contentsDir\boot\etfsboot.com`"#pEF,e,b`"$contentsDir\efi\microsoft\boot\efisys.bin`"" + $oscdimgArgs = @("-m", "-o", "-u2", "-udfver102", "-bootdata:$bootData", "-l`"CTOS_MODIFIED`"", "`"$contentsDir`"", "`"$outputISO`"") + + Write-Win11ISOLog "Running oscdimg..." + + $psi = [System.Diagnostics.ProcessStartInfo]::new() + $psi.FileName = $oscdimg + $psi.Arguments = $oscdimgArgs -join " " + $psi.RedirectStandardOutput = $true + $psi.RedirectStandardError = $true + $psi.UseShellExecute = $false + $psi.CreateNoWindow = $true + + $proc = [System.Diagnostics.Process]::new() + $proc.StartInfo = $psi + $proc.Start() | Out-Null + + # Stream stdout line-by-line as oscdimg runs + while (-not $proc.StandardOutput.EndOfStream) { + $line = $proc.StandardOutput.ReadLine() + if ($line.Trim()) { Write-Win11ISOLog $line } + } + + $proc.WaitForExit() + + # Flush any stderr after process exits + $stderr = $proc.StandardError.ReadToEnd() + foreach ($line in ($stderr -split "`r?`n")) { + if ($line.Trim()) { Write-Win11ISOLog "[stderr]$line" } + } + + if ($proc.ExitCode -eq 0) { + SetProgress "ISO exported" 100 + Write-Win11ISOLog "ISO exported successfully: $outputISO" + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show("ISO exported successfully!`n`n$outputISO", "Export Complete", "OK", "Info") + }) + } else { + Write-Win11ISOLog "oscdimg exited with code $($proc.ExitCode)." + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show( + "oscdimg exited with code $($proc.ExitCode).`nCheck the status log for details.", + "Export Error", "OK", "Error") + }) + } + } catch { + Write-Win11ISOLog "ERROR during ISO export: $_" + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show("ISO export failed:`n`n$_", "Error", "OK", "Error") + }) + } finally { + Start-Sleep -Milliseconds 800 + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = "" + $sync.progressBarTextBlock.ToolTip = "" + $sync.ProgressBar.Value = 0 + $sync["WPFWin11ISOChooseISOButton"].IsEnabled = $true + }) + } + }) | Out-Null + + $script.BeginInvoke() | Out-Null +} diff --git a/functions/private/Invoke-WinUtilISOScript.ps1 b/functions/private/Invoke-WinUtilISOScript.ps1 new file mode 100644 index 0000000000..16dc7e2081 --- /dev/null +++ b/functions/private/Invoke-WinUtilISOScript.ps1 @@ -0,0 +1,354 @@ +function Invoke-WinUtilISOScript { + <# + .SYNOPSIS + Applies WinUtil modifications to a mounted Windows 11 install.wim image. + + .DESCRIPTION + Removes AppX bloatware and OneDrive, optionally injects all drivers exported from + the running system into install.wim and boot.wim (controlled by the + -InjectCurrentSystemDrivers switch), applies offline registry tweaks (hardware + bypass, privacy, OOBE, telemetry, update suppression), deletes CEIP/WU + scheduled-task definition files, and optionally writes autounattend.xml to the ISO + root and removes the support\ folder from the ISO contents directory. + + All setup scripts embedded in the autounattend.xml <Extensions><File> nodes are + written directly into the WIM at their target paths under C:\Windows\Setup\Scripts\ + to ensure they survive Windows Setup stripping unrecognised-namespace XML elements + from the Panther copy of the answer file. + + Mounting/dismounting the WIM is the caller's responsibility (e.g. Invoke-WinUtilISO). + + .PARAMETER ScratchDir + Mandatory. Full path to the directory where the Windows image is currently mounted. + + .PARAMETER ISOContentsDir + Optional. Root directory of the extracted ISO contents. When supplied, + autounattend.xml is written here and the support\ folder is removed. + + .PARAMETER AutoUnattendXml + Optional. Full XML content for autounattend.xml. If empty, the OOBE bypass + file is skipped and a warning is logged. + + .PARAMETER InjectCurrentSystemDrivers + Optional. When $true, exports all drivers from the running system and injects + them into install.wim and boot.wim index 2 (Windows Setup PE). + Defaults to $false. + + .PARAMETER Log + Optional ScriptBlock for progress/status logging. Receives a single [string] argument. + + .EXAMPLE + Invoke-WinUtilISOScript -ScratchDir "C:\Temp\wim_mount" + + .EXAMPLE + Invoke-WinUtilISOScript ` + -ScratchDir $mountDir ` + -ISOContentsDir $isoRoot ` + -AutoUnattendXml (Get-Content .\tools\autounattend.xml -Raw) ` + -Log { param($m) Write-Host $m } + + .NOTES + Author : Chris Titus @christitustech + GitHub : https://github.com/ChrisTitusTech + #> + param ( + [Parameter(Mandatory)][string]$ScratchDir, + [string]$ISOContentsDir = "", + [string]$AutoUnattendXml = "", + [bool]$InjectCurrentSystemDrivers = $false, + [scriptblock]$Log = { param($m) Write-Output $m } + ) + + $adminSID = New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544') + $adminGroup = $adminSID.Translate([System.Security.Principal.NTAccount]) + + function Set-ISOScriptReg { + param ([string]$path, [string]$name, [string]$type, [string]$value) + try { + & reg add $path /v $name /t $type /d $value /f + & $Log "Set registry value: $path\$name" + } catch { + & $Log "Error setting registry value: $_" + } + } + + function Remove-ISOScriptReg { + param ([string]$path) + try { + & reg delete $path /f + & $Log "Removed registry key: $path" + } catch { + & $Log "Error removing registry key: $_" + } + } + + function Add-DriversToImage { + param ([string]$MountPath, [string]$DriverDir, [string]$Label = "image", [scriptblock]$Logger) + & dism /English "/image:$MountPath" /Add-Driver "/Driver:$DriverDir" /Recurse 2>&1 | + ForEach-Object { & $Logger " dism[$Label]: $_" } + } + + function Invoke-BootWimInject { + param ([string]$BootWimPath, [string]$DriverDir, [scriptblock]$Logger) + Set-ItemProperty -Path $BootWimPath -Name IsReadOnly -Value $false -ErrorAction SilentlyContinue + $mountDir = Join-Path $env:TEMP "WinUtil_BootMount_$(Get-Random)" + New-Item -Path $mountDir -ItemType Directory -Force | Out-Null + try { + & $Logger "Mounting boot.wim (index 2) for driver injection..." + Mount-WindowsImage -ImagePath $BootWimPath -Index 2 -Path $mountDir -ErrorAction Stop | Out-Null + Add-DriversToImage -MountPath $mountDir -DriverDir $DriverDir -Label "boot" -Logger $Logger + & $Logger "Saving boot.wim..." + Dismount-WindowsImage -Path $mountDir -Save -ErrorAction Stop | Out-Null + & $Logger "boot.wim driver injection complete." + } catch { + & $Logger "Warning: boot.wim driver injection failed: $_" + try { Dismount-WindowsImage -Path $mountDir -Discard -ErrorAction SilentlyContinue | Out-Null } catch {} + } finally { + Remove-Item -Path $mountDir -Recurse -Force -ErrorAction SilentlyContinue + } + } + + # ── 1. Remove provisioned AppX packages ────────────────────────────────── + & $Log "Removing provisioned AppX packages..." + + $packages = & dism /English "/image:$ScratchDir" /Get-ProvisionedAppxPackages | + ForEach-Object { if ($_ -match 'PackageName : (.*)') { $matches[1] } } + + $packagePrefixes = @( + 'Clipchamp.Clipchamp', + 'Microsoft.BingNews', + 'Microsoft.BingSearch', + 'Microsoft.BingWeather', + 'Microsoft.GetHelp', + 'Microsoft.MicrosoftOfficeHub', + 'Microsoft.MicrosoftSolitaireCollection', + 'Microsoft.MicrosoftStickyNotes', + 'Microsoft.OutlookForWindows', + 'Microsoft.Paint', + 'Microsoft.PowerAutomateDesktop', + 'Microsoft.StartExperiencesApp', + 'Microsoft.Todos', + 'Microsoft.Windows.DevHome', + 'Microsoft.WindowsFeedbackHub', + 'Microsoft.WindowsSoundRecorder', + 'Microsoft.ZuneMusic', + 'MicrosoftCorporationII.QuickAssist', + 'MSTeams' + ) + + $packages | Where-Object { $pkg = $_; $packagePrefixes | Where-Object { $pkg -like "*$_*" } } | + ForEach-Object { & dism /English "/image:$ScratchDir" /Remove-ProvisionedAppxPackage "/PackageName:$_" } + + # ── 2. Inject current system drivers (optional) ─────────────────────────── + if ($InjectCurrentSystemDrivers) { + & $Log "Exporting all drivers from running system..." + $driverExportRoot = Join-Path $env:TEMP "WinUtil_DriverExport_$(Get-Random)" + New-Item -Path $driverExportRoot -ItemType Directory -Force | Out-Null + try { + Export-WindowsDriver -Online -Destination $driverExportRoot | Out-Null + + & $Log "Injecting current system drivers into install.wim..." + Add-DriversToImage -MountPath $ScratchDir -DriverDir $driverExportRoot -Label "install" -Logger $Log + & $Log "install.wim driver injection complete." + + if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) { + $bootWim = Join-Path $ISOContentsDir "sources\boot.wim" + if (Test-Path $bootWim) { + & $Log "Injecting current system drivers into boot.wim..." + Invoke-BootWimInject -BootWimPath $bootWim -DriverDir $driverExportRoot -Logger $Log + } else { + & $Log "Warning: boot.wim not found — skipping boot.wim driver injection." + } + } + } catch { + & $Log "Error during driver export/injection: $_" + } finally { + Remove-Item -Path $driverExportRoot -Recurse -Force -ErrorAction SilentlyContinue + } + } else { + & $Log "Driver injection skipped." + } + + # ── 3. Remove OneDrive ──────────────────────────────────────────────────── + & $Log "Removing OneDrive..." + & takeown /f "$ScratchDir\Windows\System32\OneDriveSetup.exe" | Out-Null + & icacls "$ScratchDir\Windows\System32\OneDriveSetup.exe" /grant "$($adminGroup.Value):(F)" /T /C | Out-Null + Remove-Item -Path "$ScratchDir\Windows\System32\OneDriveSetup.exe" -Force -ErrorAction SilentlyContinue + + # ── 4. Registry tweaks ──────────────────────────────────────────────────── + & $Log "Loading offline registry hives..." + reg load HKLM\zCOMPONENTS "$ScratchDir\Windows\System32\config\COMPONENTS" + reg load HKLM\zDEFAULT "$ScratchDir\Windows\System32\config\default" + reg load HKLM\zNTUSER "$ScratchDir\Users\Default\ntuser.dat" + reg load HKLM\zSOFTWARE "$ScratchDir\Windows\System32\config\SOFTWARE" + reg load HKLM\zSYSTEM "$ScratchDir\Windows\System32\config\SYSTEM" + + & $Log "Bypassing system requirements..." + Set-ISOScriptReg 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' 'SV1' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' 'SV2' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' 'SV1' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' 'SV2' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\LabConfig' 'BypassCPUCheck' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\LabConfig' 'BypassRAMCheck' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\LabConfig' 'BypassSecureBootCheck' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\LabConfig' 'BypassStorageCheck' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\LabConfig' 'BypassTPMCheck' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSYSTEM\Setup\MoSetup' 'AllowUpgradesWithUnsupportedTPMOrCPU' 'REG_DWORD' '1' + + & $Log "Disabling sponsored apps..." + Set-ISOScriptReg 'HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'OemPreInstalledAppsEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'PreInstalledAppsEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SilentInstalledAppsEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableWindowsConsumerFeatures' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'ContentDeliveryAllowed' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start' 'ConfigureStartPins' 'REG_SZ' '{"pinnedList": [{}]}' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'FeatureManagementEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'PreInstalledAppsEverEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SoftLandingEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContentEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-310093Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-338388Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-338389Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-338393Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-353694Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SubscribedContent-353696Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' 'SystemPaneSuggestionsEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\PushToInstall' 'DisablePushToInstall' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\MRT' 'DontOfferThroughWUAU' 'REG_DWORD' '1' + Remove-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\Subscriptions' + Remove-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager\SuggestedApps' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableConsumerAccountStateContent' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableCloudOptimizedContent' 'REG_DWORD' '1' + + & $Log "Enabling local accounts on OOBE..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE' 'BypassNRO' 'REG_DWORD' '1' + + if ($AutoUnattendXml) { + try { + $xmlDoc = [xml]::new() + $xmlDoc.LoadXml($AutoUnattendXml) + + $nsMgr = New-Object System.Xml.XmlNamespaceManager($xmlDoc.NameTable) + $nsMgr.AddNamespace("sg", "https://schneegans.de/windows/unattend-generator/") + + $fileNodes = $xmlDoc.SelectNodes("//sg:File", $nsMgr) + if ($fileNodes -and $fileNodes.Count -gt 0) { + foreach ($fileNode in $fileNodes) { + $absPath = $fileNode.GetAttribute("path") + $relPath = $absPath -replace '^[A-Za-z]:[/\\]', '' + $destPath = Join-Path $ScratchDir $relPath + New-Item -Path (Split-Path $destPath -Parent) -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null + + $ext = [IO.Path]::GetExtension($destPath).ToLower() + $encoding = switch ($ext) { + { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8 } + { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new($false, $true) } + default { [System.Text.Encoding]::Default } + } + [System.IO.File]::WriteAllBytes($destPath, ($encoding.GetPreamble() + $encoding.GetBytes($fileNode.InnerText.Trim()))) + & $Log "Pre-staged setup script: $relPath" + } + } else { + & $Log "Warning: no <Extensions><File> nodes found in autounattend.xml — setup scripts not pre-staged." + } + } catch { + & $Log "Warning: could not pre-stage setup scripts from autounattend.xml: $_" + } + + if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) { + $isoDest = Join-Path $ISOContentsDir "autounattend.xml" + Set-Content -Path $isoDest -Value $AutoUnattendXml -Encoding UTF8 -Force + & $Log "Written autounattend.xml to ISO root ($isoDest)." + } + } else { + & $Log "Warning: autounattend.xml content is empty — skipping OOBE bypass file." + } + + & $Log "Disabling reserved storage..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager' 'ShippedWithReserves' 'REG_DWORD' '0' + + & $Log "Disabling BitLocker device encryption..." + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Control\BitLocker' 'PreventDeviceEncryption' 'REG_DWORD' '1' + + & $Log "Disabling Chat icon..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat' 'ChatIcon' 'REG_DWORD' '3' + Set-ISOScriptReg 'HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced' 'TaskbarMn' 'REG_DWORD' '0' + + & $Log "Disabling OneDrive folder backup..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\OneDrive' 'DisableFileSyncNGSC' 'REG_DWORD' '1' + + & $Log "Disabling telemetry..." + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo' 'Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Windows\CurrentVersion\Privacy' 'TailoredExperiencesWithDiagnosticDataEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy' 'HasAccepted' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Input\TIPC' 'Enabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\InputPersonalization' 'RestrictImplicitInkCollection' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\InputPersonalization' 'RestrictImplicitTextCollection' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\InputPersonalization\TrainedDataStore' 'HarvestContacts' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zNTUSER\Software\Microsoft\Personalization\Settings' 'AcceptedPrivacyPolicy' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\DataCollection' 'AllowTelemetry' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Services\dmwappushservice' 'Start' 'REG_DWORD' '4' + + & $Log "Preventing installation of DevHome and Outlook..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate' 'workCompleted' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\OutlookUpdate' 'workCompleted' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\DevHomeUpdate' 'workCompleted' 'REG_DWORD' '1' + Remove-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\OutlookUpdate' + Remove-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate' + + & $Log "Disabling Copilot..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' 'TurnOffWindowsCopilot' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Edge' 'HubsSidebarEnabled' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\Explorer' 'DisableSearchBoxSuggestions' 'REG_DWORD' '1' + + & $Log "Disabling Windows Update during OOBE (re-enabled on first logon via FirstLogon.ps1)..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' 'NoAutoUpdate' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' 'AUOptions' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' 'UseWUServer' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' 'DisableWindowsUpdateAccess' 'REG_DWORD' '1' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' 'WUServer' 'REG_SZ' 'http://localhost:8080' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\WindowsUpdate' 'WUStatusServer' 'REG_SZ' 'http://localhost:8080' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler_Oobe\WindowsUpdate' 'workCompleted' 'REG_DWORD' '1' + Remove-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\WindowsUpdate' + Set-ISOScriptReg 'HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config' 'DODownloadMode' 'REG_DWORD' '0' + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Services\BITS' 'Start' 'REG_DWORD' '4' + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Services\wuauserv' 'Start' 'REG_DWORD' '4' + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Services\UsoSvc' 'Start' 'REG_DWORD' '4' + Set-ISOScriptReg 'HKLM\zSYSTEM\ControlSet001\Services\WaaSMedicSvc' 'Start' 'REG_DWORD' '4' + + & $Log "Preventing installation of Teams..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Teams' 'DisableInstallation' 'REG_DWORD' '1' + + & $Log "Preventing installation of new Outlook..." + Set-ISOScriptReg 'HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Mail' 'PreventRun' 'REG_DWORD' '1' + + & $Log "Unloading offline registry hives..." + reg unload HKLM\zCOMPONENTS + reg unload HKLM\zDEFAULT + reg unload HKLM\zNTUSER + reg unload HKLM\zSOFTWARE + reg unload HKLM\zSYSTEM + + # ── 5. Delete scheduled task definition files ───────────────────────────── + & $Log "Deleting scheduled task definition files..." + $tasksPath = "$ScratchDir\Windows\System32\Tasks" + Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\Customer Experience Improvement Program" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\Application Experience\ProgramDataUpdater" -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\Chkdsk\Proxy" -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\Windows Error Reporting\QueueReporting" -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\InstallService" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\UpdateOrchestrator" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\UpdateAssistant" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\WaaSMedic" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\Windows\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item "$tasksPath\Microsoft\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue + & $Log "Scheduled task files deleted." + + # ── 6. Remove ISO support folder ───────────────────────────────────────── + if ($ISOContentsDir -and (Test-Path $ISOContentsDir)) { + & $Log "Removing ISO support\ folder..." + Remove-Item -Path (Join-Path $ISOContentsDir "support") -Recurse -Force -ErrorAction SilentlyContinue + & $Log "ISO support\ folder removed." + } +} diff --git a/functions/private/Invoke-WinUtilISOUSB.ps1 b/functions/private/Invoke-WinUtilISOUSB.ps1 new file mode 100644 index 0000000000..4f1df01555 --- /dev/null +++ b/functions/private/Invoke-WinUtilISOUSB.ps1 @@ -0,0 +1,268 @@ +function Invoke-WinUtilISORefreshUSBDrives { + $combo = $sync["WPFWin11ISOUSBDriveComboBox"] + $removable = @(Get-Disk | Where-Object { $_.BusType -eq "USB" } | Sort-Object Number) + + $combo.Items.Clear() + + if ($removable.Count -eq 0) { + $combo.Items.Add("No USB drives detected.") + $combo.SelectedIndex = 0 + $sync["Win11ISOUSBDisks"] = @() + Write-Win11ISOLog "No USB drives detected." + return + } + + foreach ($disk in $removable) { + $sizeGB = [math]::Round($disk.Size / 1GB, 1) + $combo.Items.Add("Disk $($disk.Number): $($disk.FriendlyName) [$sizeGB GB] - $($disk.PartitionStyle)") + } + $combo.SelectedIndex = 0 + Write-Win11ISOLog "Found $($removable.Count) USB drive(s)." + $sync["Win11ISOUSBDisks"] = $removable +} + +function Invoke-WinUtilISOWriteUSB { + $contentsDir = $sync["Win11ISOContentsDir"] + $usbDisks = $sync["Win11ISOUSBDisks"] + + if (-not $contentsDir -or -not (Test-Path $contentsDir)) { + [System.Windows.MessageBox]::Show("No modified ISO content found. Please complete Steps 1-3 first.", "Not Ready", "OK", "Warning") + return + } + + $combo = $sync["WPFWin11ISOUSBDriveComboBox"] + $selectedIndex = $combo.SelectedIndex + $selectedItemText = [string]$combo.SelectedItem + $usbDisks = @($usbDisks) + + $targetDisk = $null + if ($selectedIndex -ge 0 -and $selectedIndex -lt $usbDisks.Count) { + $targetDisk = $usbDisks[$selectedIndex] + } elseif ($selectedItemText -match 'Disk\s+(\d+):') { + $selectedDiskNum = [int]$matches[1] + $targetDisk = $usbDisks | Where-Object { $_.Number -eq $selectedDiskNum } | Select-Object -First 1 + } + + if (-not $targetDisk) { + [System.Windows.MessageBox]::Show("Please select a USB drive from the dropdown.", "No Drive Selected", "OK", "Warning") + return + } + + $diskNum = $targetDisk.Number + $sizeGB = [math]::Round($targetDisk.Size / 1GB, 1) + + $confirm = [System.Windows.MessageBox]::Show( + "ALL data on Disk $diskNum ($($targetDisk.FriendlyName), $sizeGB GB) will be PERMANENTLY ERASED.`n`nAre you sure you want to continue?", + "Confirm USB Erase", "YesNo", "Warning") + + if ($confirm -ne "Yes") { + Write-Win11ISOLog "USB write cancelled by user." + return + } + + $sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $false + Write-Win11ISOLog "Starting USB write to Disk $diskNum..." + + $runspace = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace() + $runspace.ApartmentState = "STA" + $runspace.ThreadOptions = "ReuseThread" + $runspace.Open() + $runspace.SessionStateProxy.SetVariable("sync", $sync) + $runspace.SessionStateProxy.SetVariable("diskNum", $diskNum) + $runspace.SessionStateProxy.SetVariable("contentsDir", $contentsDir) + + $script = [Management.Automation.PowerShell]::Create() + $script.Runspace = $runspace + $script.AddScript({ + + function Log($msg) { + $ts = (Get-Date).ToString("HH:mm:ss") + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync["WPFWin11ISOStatusLog"].Text += "`n[$ts] $msg" + $sync["WPFWin11ISOStatusLog"].CaretIndex = $sync["WPFWin11ISOStatusLog"].Text.Length + $sync["WPFWin11ISOStatusLog"].ScrollToEnd() + }) + } + + function SetProgress($label, $pct) { + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = $label + $sync.progressBarTextBlock.ToolTip = $label + $sync.ProgressBar.Value = [Math]::Max($pct, 5) + }) + } + + function Get-FreeDriveLetter { + $used = (Get-PSDrive -PSProvider FileSystem -ErrorAction SilentlyContinue).Name + foreach ($c in [char[]](68..90)) { + if ($used -notcontains [string]$c) { return $c } + } + return $null + } + + try { + SetProgress "Formatting USB drive..." 10 + + # Phase 1: Clean disk via diskpart (retry once if the drive is not yet ready) + $dpFile1 = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt" + "select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1 -Encoding ASCII + Log "Running diskpart clean on Disk $diskNum..." + $dpCleanOut = diskpart /s $dpFile1 2>&1 + $dpCleanOut | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } + Remove-Item $dpFile1 -Force -ErrorAction SilentlyContinue + + if (($dpCleanOut -join ' ') -match 'device is not ready') { + Log "Disk $diskNum was not ready; waiting 5 seconds and retrying clean..." + Start-Sleep -Seconds 5 + Update-Disk -Number $diskNum -ErrorAction SilentlyContinue + $dpFile1b = Join-Path $env:TEMP "winutil_diskpart_$(Get-Random).txt" + "select disk $diskNum`nclean`nexit" | Set-Content -Path $dpFile1b -Encoding ASCII + diskpart /s $dpFile1b 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } + Remove-Item $dpFile1b -Force -ErrorAction SilentlyContinue + } + + # Phase 2: Initialize as GPT + Start-Sleep -Seconds 2 + Update-Disk -Number $diskNum -ErrorAction SilentlyContinue + $diskObj = Get-Disk -Number $diskNum -ErrorAction Stop + if ($diskObj.PartitionStyle -eq 'RAW') { + Initialize-Disk -Number $diskNum -PartitionStyle GPT -ErrorAction Stop + Log "Disk $diskNum initialized as GPT." + } else { + Set-Disk -Number $diskNum -PartitionStyle GPT -ErrorAction Stop + Log "Disk $diskNum converted to GPT (was $($diskObj.PartitionStyle))." + } + + # Phase 3: Create FAT32 partition via diskpart, then format with Format-Volume + # (diskpart's 'format' command can fail with "no volume selected" on fresh/never-formatted drives) + $volLabel = "W11-" + (Get-Date).ToString('yyMMdd') + $dpFile2 = Join-Path $env:TEMP "winutil_diskpart2_$(Get-Random).txt" + $maxFat32PartitionMB = 32768 + $diskSizeMB = [int][Math]::Floor((Get-Disk -Number $diskNum -ErrorAction Stop).Size / 1MB) + $createPartitionCommand = "create partition primary" + if ($diskSizeMB -gt $maxFat32PartitionMB) { + $createPartitionCommand = "create partition primary size=$maxFat32PartitionMB" + Log "Disk $diskNum is $diskSizeMB MB; creating FAT32 partition capped at $maxFat32PartitionMB MB (32 GB)." + } + + @( + "select disk $diskNum" + $createPartitionCommand + "exit" + ) | Set-Content -Path $dpFile2 -Encoding ASCII + Log "Creating partitions on Disk $diskNum..." + diskpart /s $dpFile2 2>&1 | Where-Object { $_ -match '\S' } | ForEach-Object { Log " diskpart: $_" } + Remove-Item $dpFile2 -Force -ErrorAction SilentlyContinue + + SetProgress "Formatting USB partition..." 25 + Start-Sleep -Seconds 3 + Update-Disk -Number $diskNum -ErrorAction SilentlyContinue + + $partitions = Get-Partition -DiskNumber $diskNum -ErrorAction Stop + Log "Partitions on Disk $diskNum after creation: $($partitions.Count)" + foreach ($p in $partitions) { + Log " Partition $($p.PartitionNumber) Type=$($p.Type) Letter=$($p.DriveLetter) Size=$([math]::Round($p.Size/1MB))MB" + } + + $winpePart = $partitions | Where-Object { $_.Type -eq "Basic" } | Select-Object -Last 1 + if (-not $winpePart) { + throw "Could not find the Basic partition on Disk $diskNum after creation." + } + + # Format using Format-Volume (reliable on fresh drives; diskpart format fails + # with 'no volume selected' when the partition has never been formatted before) + Log "Formatting Partition $($winpePart.PartitionNumber) as FAT32 (label: $volLabel)..." + Get-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber | + Format-Volume -FileSystem FAT32 -NewFileSystemLabel $volLabel -Force -Confirm:$false | Out-Null + Log "Partition $($winpePart.PartitionNumber) formatted as FAT32." + + SetProgress "Assigning drive letters..." 30 + Start-Sleep -Seconds 2 + Update-Disk -Number $diskNum -ErrorAction SilentlyContinue + + try { Remove-PartitionAccessPath -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -AccessPath "$($winpePart.DriveLetter):" -ErrorAction SilentlyContinue } catch {} + $usbLetter = Get-FreeDriveLetter + if (-not $usbLetter) { throw "No free drive letters (D-Z) available to assign to the USB data partition." } + Set-Partition -DiskNumber $diskNum -PartitionNumber $winpePart.PartitionNumber -NewDriveLetter $usbLetter + Log "Assigned drive letter $usbLetter to WINPE partition (Partition $($winpePart.PartitionNumber))." + Start-Sleep -Seconds 2 + + $usbDrive = "${usbLetter}:" + $retries = 0 + while (-not (Test-Path $usbDrive) -and $retries -lt 6) { + $retries++ + Log "Waiting for $usbDrive to become accessible (attempt $retries/6)..." + Start-Sleep -Seconds 2 + } + if (-not (Test-Path $usbDrive)) { throw "Drive $usbDrive is not accessible after letter assignment." } + Log "USB data partition: $usbDrive" + + $contentSizeBytes = (Get-ChildItem -LiteralPath $contentsDir -File -Recurse -Force -ErrorAction Stop | Measure-Object -Property Length -Sum).Sum + if (-not $contentSizeBytes) { $contentSizeBytes = 0 } + $usbVolume = Get-Volume -DriveLetter $usbLetter -ErrorAction Stop + $partitionCapacityBytes = [int64]$usbVolume.Size + $partitionFreeBytes = [int64]$usbVolume.SizeRemaining + + $contentSizeGB = [math]::Round($contentSizeBytes / 1GB, 2) + $partitionCapacityGB = [math]::Round($partitionCapacityBytes / 1GB, 2) + $partitionFreeGB = [math]::Round($partitionFreeBytes / 1GB, 2) + + Log "Source content size: $contentSizeGB GB. USB partition capacity: $partitionCapacityGB GB, free: $partitionFreeGB GB." + + if ($contentSizeBytes -gt $partitionCapacityBytes) { + throw "ISO content ($contentSizeGB GB) is larger than the USB partition capacity ($partitionCapacityGB GB). Use a larger USB drive or reduce image size." + } + + if ($contentSizeBytes -gt $partitionFreeBytes) { + throw "Insufficient free space on USB partition. Required: $contentSizeGB GB, available: $partitionFreeGB GB." + } + + SetProgress "Copying Windows 11 files to USB..." 45 + + # Copy files; split install.wim if > 4 GB (FAT32 limit) + $installWim = Join-Path $contentsDir "sources\install.wim" + if (Test-Path $installWim) { + $wimSizeMB = [math]::Round((Get-Item $installWim).Length / 1MB) + if ($wimSizeMB -gt 3800) { + Log "install.wim is $wimSizeMB MB - splitting for FAT32 compatibility... This will take several minutes." + $splitDest = Join-Path $usbDrive "sources\install.swm" + New-Item -ItemType Directory -Path (Split-Path $splitDest) -Force | Out-Null + Split-WindowsImage -ImagePath $installWim -SplitImagePath $splitDest -FileSize 3800 -CheckIntegrity + Log "install.wim split complete." + Log "Copying remaining files to USB..." + & robocopy $contentsDir $usbDrive /E /XF install.wim /NFL /NDL /NJH /NJS + } else { + & robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS + } + } else { + & robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS + } + + SetProgress "Finalising USB drive..." 90 + Log "Files copied to USB." + SetProgress "USB write complete" 100 + Log "USB drive is ready for use." + + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show( + "USB drive created successfully!`n`nYou can now boot from this drive to install Windows 11.", + "USB Ready", "OK", "Info") + }) + } catch { + Log "ERROR during USB write: $_" + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + [System.Windows.MessageBox]::Show("USB write failed:`n`n$_", "USB Write Error", "OK", "Error") + }) + } finally { + Start-Sleep -Milliseconds 800 + $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ + $sync.progressBarTextBlock.Text = "" + $sync.progressBarTextBlock.ToolTip = "" + $sync.ProgressBar.Value = 0 + $sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $true + }) + } + }) | Out-Null + + $script.BeginInvoke() | Out-Null +} diff --git a/functions/private/Invoke-WinUtilInstallPSProfile.ps1 b/functions/private/Invoke-WinUtilInstallPSProfile.ps1 index 551c935a71..f5eba446a3 100644 --- a/functions/private/Invoke-WinUtilInstallPSProfile.ps1 +++ b/functions/private/Invoke-WinUtilInstallPSProfile.ps1 @@ -1,103 +1,8 @@ function Invoke-WinUtilInstallPSProfile { - <# - .SYNOPSIS - Backs up your original profile then installs and applies the CTT PowerShell profile. - #> - Invoke-WPFRunspace -ArgumentList $PROFILE -DebugPreference $DebugPreference -ScriptBlock { - # Remap the automatic built-in $PROFILE variable to the parameter named $PSProfile. - param ($PSProfile) - - function Invoke-PSSetup { - # Define the URL used to download Chris Titus Tech's PowerShell profile. - $url = "https://raw.githubusercontent.com/ChrisTitusTech/powershell-profile/main/Microsoft.PowerShell_profile.ps1" - - # Get the file hash for the user's current PowerShell profile. - $OldHash = Get-FileHash $PSProfile -ErrorAction SilentlyContinue - - # Download Chris Titus Tech's PowerShell profile to the 'TEMP' folder. - Invoke-RestMethod $url -OutFile "$env:TEMP/Microsoft.PowerShell_profile.ps1" - - # Get the file hash for Chris Titus Tech's PowerShell profile. - $NewHash = Get-FileHash "$env:TEMP/Microsoft.PowerShell_profile.ps1" - - # Store the file hash of Chris Titus Tech's PowerShell profile. - if (!(Test-Path "$PSProfile.hash")) { - $NewHash.Hash | Out-File "$PSProfile.hash" - } - - # Check if the new profile's hash doesn't match the old profile's hash. - if ($NewHash.Hash -ne $OldHash.Hash) { - # Check if oldprofile.ps1 exists and use it as a profile backup source. - if (Test-Path "$env:USERPROFILE\oldprofile.ps1") { - Write-Host "===> Backup File Exists... <===" -ForegroundColor Yellow - Write-Host "===> Moving Backup File... <===" -ForegroundColor Yellow - Copy-Item "$env:USERPROFILE\oldprofile.ps1" "$PSProfile.bak" - Write-Host "===> Profile Backup: Done. <===" -ForegroundColor Yellow - } else { - # If oldprofile.ps1 does not exist use $PSProfile as a profile backup source. - # Check if the profile backup file has not already been created on the disk. - if ((Test-Path $PSProfile) -and (-not (Test-Path "$PSProfile.bak"))) { - # Let the user know their PowerShell profile is being backed up. - Write-Host "===> Backing Up Profile... <===" -ForegroundColor Yellow - - # Copy the user's current PowerShell profile to the backup file path. - Copy-Item -Path $PSProfile -Destination "$PSProfile.bak" - - # Let the user know the profile backup has been completed successfully. - Write-Host "===> Profile Backup: Done. <===" -ForegroundColor Yellow - } - } - - # Let the user know Chris Titus Tech's PowerShell profile is being installed. - Write-Host "===> Installing Profile... <===" -ForegroundColor Yellow - - # Start a new hidden PowerShell instance because setup.ps1 does not work in runspaces. - Start-Process -FilePath "pwsh" -ArgumentList "-ExecutionPolicy Bypass -NoProfile -Command `"Invoke-Expression (Invoke-WebRequest `'https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1`')`"" -WindowStyle Hidden -Wait - - # Let the user know Chris Titus Tech's PowerShell profile has been installed successfully. - Write-Host "Profile has been installed. Please restart your shell to reflect the changes!" -ForegroundColor Magenta - - # Let the user know Chris Titus Tech's PowerShell profile has been setup successfully. - Write-Host "===> Finished Profile Setup <===" -ForegroundColor Yellow - } else { - # Let the user know Chris Titus Tech's PowerShell profile is already fully up-to-date. - Write-Host "Profile is up to date" -ForegroundColor Magenta - } - } - - # Check if PowerShell Core is currently installed as a program and is available as a command. - if (Get-Command "pwsh" -ErrorAction SilentlyContinue) { - # Check if the version of PowerShell Core currently in use is version 7 or higher. - if ($PSVersionTable.PSVersion.Major -ge 7) { - # Invoke the PowerShell Profile setup script to install Chris Titus Tech's PowerShell Profile. - Invoke-PSSetup - } else { - # Let the user know that PowerShell 7 is installed but is not currently in use. - Write-Host "This profile requires Powershell 7, which is currently installed but not used!" -ForegroundColor Red - - # Load the necessary .NET library required to use Windows Forms to show dialog boxes. - Add-Type -AssemblyName System.Windows.Forms - - # Display the message box asking if the user wants to install PowerShell 7 or not. - $question = [System.Windows.Forms.MessageBox]::Show( - "Profile requires Powershell 7, which is currently installed but not used! Do you want to install the profile for Powershell 7?", - "Question", - [System.Windows.Forms.MessageBoxButtons]::YesNo, - [System.Windows.Forms.MessageBoxIcon]::Question - ) - - # Proceed with the installation and setup of the profile as the user pressed the 'Yes' button. - if ($question -eq [System.Windows.Forms.DialogResult]::Yes) { - Invoke-PSSetup - } else { - # Let the user know the setup of the profile will not proceed as they pressed the 'No' button. - Write-Host "Not proceeding with the profile setup!" -ForegroundColor Magenta - } - } - } else { - # Let the user know that the profile requires PowerShell Core but it is not currently installed. - Write-Host "This profile requires Powershell Core, which is currently not installed!" -ForegroundColor Red - } + if (Test-Path $Profile) { + Rename-Item $Profile -NewName ($Profile + '.bak') } + + Start-Process pwsh -ArgumentList '-Command "irm https://github.com/ChrisTitusTech/powershell-profile/raw/main/setup.ps1 | iex"' } diff --git a/functions/private/Invoke-WinUtilSSHServer.ps1 b/functions/private/Invoke-WinUtilSSHServer.ps1 index 7185af7ed3..08903f6c59 100644 --- a/functions/private/Invoke-WinUtilSSHServer.ps1 +++ b/functions/private/Invoke-WinUtilSSHServer.ps1 @@ -4,63 +4,29 @@ function Invoke-WinUtilSSHServer { Enables OpenSSH server to remote into your windows device #> - # Get the latest version of OpenSSH Server - $FeatureName = Get-WindowsCapability -Online | Where-Object { $_.Name -like "OpenSSH.Server*" } - # Install the OpenSSH Server feature if not already installed - if ($FeatureName.State -ne "Installed") { - Write-Host "Enabling OpenSSH Server" - Add-WindowsCapability -Online -Name $FeatureName.Name + if ((Get-WindowsCapability -Name OpenSSH.Server -Online).State -ne "Installed") { + Write-Host "Enabling OpenSSH Server... This will take a long time" + Add-WindowsCapability -Name OpenSSH.Server -Online } - # Sets up the OpenSSH Server service Write-Host "Starting the services" - Start-Service -Name sshd - Set-Service -Name sshd -StartupType Automatic - - # Sets up the ssh-agent service - Start-Service 'ssh-agent' - Set-Service -Name 'ssh-agent' -StartupType 'Automatic' - # Confirm the required services are running - $SSHDaemonService = Get-Service -Name sshd - $SSHAgentService = Get-Service -Name 'ssh-agent' + Set-Service -Name sshd -StartupType Automatic + Start-Service -Name sshd - if ($SSHDaemonService.Status -eq 'Running') { - Write-Host "OpenSSH Server is running." - } else { - try { - Write-Host "OpenSSH Server is not running. Attempting to restart..." - Restart-Service -Name sshd -Force - Write-Host "OpenSSH Server has been restarted successfully." - } catch { - Write-Host "Failed to restart OpenSSH Server: $_" - } - } - if ($SSHAgentService.Status -eq 'Running') { - Write-Host "ssh-agent is running." - } else { - try { - Write-Host "ssh-agent is not running. Attempting to restart..." - Restart-Service -Name sshd -Force - Write-Host "ssh-agent has been restarted successfully." - } catch { - Write-Host "Failed to restart ssh-agent : $_" - } - } + Set-Service -Name ssh-agent -StartupType Automatic + Start-Service -Name ssh-agent #Adding Firewall rule for port 22 Write-Host "Setting up firewall rules" - $firewallRule = (Get-NetFirewallRule -Name 'sshd').Enabled - if ($firewallRule) { - Write-Host "Firewall rule for OpenSSH Server (sshd) already exists." - } else { + if (-not ((Get-NetFirewallRule -Name 'sshd').Enabled)) { New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 Write-Host "Firewall rule for OpenSSH Server created and enabled." } # Check for the authorized_keys file - $sshFolderPath = "$env:HOMEDRIVE\$env:HOMEPATH\.ssh" + $sshFolderPath = "$Home\.ssh" $authorizedKeysPath = "$sshFolderPath\authorized_keys" if (-not (Test-Path -Path $sshFolderPath)) { @@ -72,10 +38,23 @@ function Invoke-WinUtilSSHServer { Write-Host "Creating authorized_keys file..." New-Item -Path $authorizedKeysPath -ItemType File -Force Write-Host "authorized_keys file created at $authorizedKeysPath." - } else { - Write-Host "authorized_keys file already exists at $authorizedKeysPath." } + + Write-Host "Configuring sshd_config for standard authorized_keys behavior..." + $sshdConfigPath = "C:\ProgramData\ssh\sshd_config" + + $configContent = Get-Content -Path $sshdConfigPath -Raw + + $updatedContent = $configContent -replace '(?m)^(Match Group administrators)$', '# $1' + $updatedContent = $updatedContent -replace '(?m)^(\s+AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys)$', '# $1' + + if ($updatedContent -ne $configContent) { + Set-Content -Path $sshdConfigPath -Value $updatedContent -Force + Write-Host "Commented out administrator-specific SSH key configuration in sshd_config" + Restart-Service -Name sshd -Force + } + Write-Host "OpenSSH server was successfully enabled." - Write-Host "The config file can be located at C:\ProgramData\ssh\sshd_config " + Write-Host "The config file can be located at C:\ProgramData\ssh\sshd_config" Write-Host "Add your public keys to this file -> $authorizedKeysPath" } diff --git a/functions/private/Invoke-WinUtilScript.ps1 b/functions/private/Invoke-WinUtilScript.ps1 index 05cef26a10..d49b9f4623 100644 --- a/functions/private/Invoke-WinUtilScript.ps1 +++ b/functions/private/Invoke-WinUtilScript.ps1 @@ -21,7 +21,7 @@ function Invoke-WinUtilScript { ) try { - Write-Host "Running Script for $name" + Write-Host "Running Script for $Name" Invoke-Command $scriptblock -ErrorAction Stop } catch [System.Management.Automation.CommandNotFoundException] { Write-Warning "The specified command was not found." @@ -37,7 +37,7 @@ function Invoke-WinUtilScript { Write-Warning $PSItem.Exception.message } catch { # Generic catch block to handle any other type of exception - Write-Warning "Unable to run script for $name due to unhandled exception" + Write-Warning "Unable to run script for $Name due to unhandled exception." Write-Warning $psitem.Exception.StackTrace } diff --git a/functions/private/Invoke-WinUtilTweaks.ps1 b/functions/private/Invoke-WinUtilTweaks.ps1 index a682211157..2c8a669116 100644 --- a/functions/private/Invoke-WinUtilTweaks.ps1 +++ b/functions/private/Invoke-WinUtilTweaks.ps1 @@ -21,10 +21,6 @@ function Invoke-WinUtilTweaks { $KeepServiceStartup = $true ) - if ($Checkbox -contains "Toggle") { - $CheckBox = $sync.configs.tweaks.$CheckBox - } - Write-Debug "Tweaks: $($CheckBox)" if($undo) { $Values = @{ @@ -54,7 +50,7 @@ function Invoke-WinUtilTweaks { $sync.configs.tweaks.$CheckBox.service | ForEach-Object { $changeservice = $true - # The check for !($undo) is required, without it the script will throw an error for accessing unavailable memeber, which's the 'OriginalService' Property + # The check for !($undo) is required, without it the script will throw an error for accessing unavailable member, which's the 'OriginalService' Property if($KeepServiceStartup -AND !($undo)) { try { # Check if the service exists @@ -64,7 +60,7 @@ function Invoke-WinUtilTweaks { $changeservice = $false } } catch [System.ServiceProcess.ServiceNotFoundException] { - Write-Warning "Service $($psitem.Name) was not found" + Write-Warning "Service $($psitem.Name) was not found." } } @@ -80,9 +76,9 @@ function Invoke-WinUtilTweaks { if (($psitem.Path -imatch "hku") -and !(Get-PSDrive -Name HKU -ErrorAction SilentlyContinue)) { $null = (New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS) if (Get-PSDrive -Name HKU -ErrorAction SilentlyContinue) { - Write-Debug "HKU drive created successfully" + Write-Debug "HKU drive created successfully." } else { - Write-Debug "Failed to create HKU drive" + Write-Debug "Failed to create HKU drive." } } Set-WinUtilRegistry -Name $psitem.Name -Path $psitem.Path -Type $psitem.Type -Value $psitem.$($values.registry) diff --git a/functions/private/Invoke-WinUtilUninstallPSProfile.ps1 b/functions/private/Invoke-WinUtilUninstallPSProfile.ps1 index 72272993ed..1a2addc252 100644 --- a/functions/private/Invoke-WinUtilUninstallPSProfile.ps1 +++ b/functions/private/Invoke-WinUtilUninstallPSProfile.ps1 @@ -1,231 +1,11 @@ function Invoke-WinUtilUninstallPSProfile { - <# - .SYNOPSIS - # Uninstalls the CTT PowerShell profile then restores the original profile. - #> - - Invoke-WPFRunspace -ArgumentList $PROFILE -DebugPreference $DebugPreference -ScriptBlock { - # Remap the automatic built-in $PROFILE variable to the parameter named $PSProfile. - param ($PSProfile) - - # Helper function used to uninstall a specific Nerd Fonts font package. - function Uninstall-NerdFonts { - # Define the parameters block for the Uninstall-NerdFonts function. - param ( - [string]$FontsPath = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts", - [string]$FontFamilyName = "CaskaydiaCoveNerdFont" - ) - - # Get the list of installed fonts as specified by the FontFamilyName parameter. - $Fonts = Get-ChildItem $FontsPath -Recurse -Filter "*.ttf" | Where-Object { $_.Name -match $FontFamilyName } - - # Check if the specified fonts are currently installed on the system. - if ($Fonts) { - # Let the user know that the Nerd Fonts are currently being uninstalled. - Write-Host "===> Uninstalling: Nerd Fonts... <===" -ForegroundColor Yellow - - # Loop over the font files and remove each installed font file one-by-one. - $Fonts | ForEach-Object { - # Check if the font file exists on the disk before attempting to remove it. - if (Test-Path "$($_.FullName)") { - # Remove the found font files from the disk; uninstalling the font. - Remove-Item "$($_.FullName)" - } - } - } - - # Let the user know that the Nerd Fonts package has been uninstalled from the system. - if (-not $Fonts) { - Write-Host "===> Successfully Uninstalled: Nerd Fonts. <===" -ForegroundColor Yellow - } - - } - - # Helper function used to uninstall a specific Nerd Fonts font corresponding registry keys. - function Uninstall-NerdFontRegKeys { - # Define the parameters block for the Uninstall-NerdFontsRegKey function. - param ( - [string]$FontsRegPath = "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", - [string]$FontFamilyName = "CaskaydiaCove" - ) - - try { - # Get all properties (font registrations) from the registry path - $registryProperties = Get-ItemProperty -Path $FontsRegPath - - # Filter and remove properties that match the font family name - $registryProperties.PSObject.Properties | - Where-Object { $_.Name -match $FontFamilyName } | - ForEach-Object { - If ($_.Name -like "*$FontFamilyName*") { - Remove-ItemProperty -path $FontsRegPath -Name $_.Name -ErrorAction SilentlyContinue - } - } - } catch { - Write-Host "Error removing registry keys: $($_.exception.message)" -ForegroundColor Red - } - } - - # Check if Chris Titus Tech's PowerShell profile is currently available in the PowerShell profile folder. - if (Test-Path $PSProfile -PathType Leaf) { - # Set the GitHub repo path used for looking up the name of Chris Titus Tech's powershell-profile repo. - $GitHubRepoPath = "ChrisTitusTech/powershell-profile" - - # Get the unique identifier used to test for the presence of Chris Titus Tech's PowerShell profile. - $PSProfileIdentifier = (Invoke-RestMethod "https://api.github.com/repos/$GitHubRepoPath").full_name - - # Check if Chris Titus Tech's PowerShell profile is currently installed in the PowerShell profile folder. - if ((Get-Content $PSProfile) -match $PSProfileIdentifier) { - # Attempt to uninstall Chris Titus Tech's PowerShell profile from the PowerShell profile folder. - try { - # Get the content of the backup PowerShell profile and store it in-memory. - $PSProfileContent = Get-Content "$PSProfile.bak" - - # Store the flag used to check if OhMyPosh is in use by the backup PowerShell profile. - $OhMyPoshInUse = $PSProfileContent -match "oh-my-posh init" - - # Check if OhMyPosh is not currently in use by the backup PowerShell profile. - if (-not $OhMyPoshInUse) { - # If OhMyPosh is currently installed attempt to uninstall it from the system. - if (Get-Command oh-my-posh -ErrorAction SilentlyContinue) { - # Let the user know that OhMyPosh is currently being uninstalled from their system. - Write-Host "===> Uninstalling: OhMyPosh... <===" -ForegroundColor Yellow - - # Attempt to uninstall OhMyPosh from the system with the WinGet package manager. - winget uninstall -e --id JanDeDobbeleer.OhMyPosh - } - } else { - # Let the user know that the uninstallation of OhMyPosh has been skipped because it is in use. - Write-Host "===> Skipped Uninstall: OhMyPosh In-Use. <===" -ForegroundColor Yellow - } - } catch { - # Let the user know that an error was encountered when uninstalling OhMyPosh. - Write-Host "Failed to uninstall OhMyPosh. Error: $_" -ForegroundColor Red - } - - # Attempt to uninstall the specified Nerd Fonts package from the system. - try { - # Specify the directory that the specified font package will be uninstalled from. - [string]$FontsPath = "$env:LOCALAPPDATA\Microsoft\Windows\Fonts" - - # Specify the name of the font package that is to be uninstalled from the system. - [string]$FontFamilyName = "CaskaydiaCoveNerdFont" - - # Call the function used to uninstall the specified Nerd Fonts package from the system. - Uninstall-NerdFonts -FontsPath $FontsPath -FontFamilyName $FontFamilyName - - } catch { - # Let the user know that an error was encountered when uninstalling Nerd Fonts. - Write-Host "Failed to uninstall Nerd Fonts. Error: $_" -ForegroundColor Red - } - - # Attempt to uninstall the specified Nerd Fonts registry keys from the system. - try { - # Specify the registry path that the specified font registry keys will be uninstalled from. - [string]$FontsRegPath = "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" - - # Specify the name of the font registry keys that is to be uninstalled from the system. - [string]$FontFamilyName = "CaskaydiaCove" - - # Call the function used to uninstall the specified Nerd Fonts registry keys from the system. - Uninstall-NerdFontRegKeys -FontsPath $FontsRegPath -FontFamilyName $FontFamilyName - - } catch { - # Let the user know that an error was encountered when uninstalling Nerd Font registry keys. - Write-Host "Failed to uninstall Nerd Font Registry Keys. Error: $_" -ForegroundColor Red - } - - # Attempt to uninstall the Terminal-Icons PowerShell module from the system. - try { - # Get the content of the backup PowerShell profile and store it in-memory. - $PSProfileContent = Get-Content "$PSProfile.bak" - - # Store the flag used to check if Terminal-Icons is in use by the backup PowerShell profile. - $TerminalIconsInUse = $PSProfileContent -match "Import-Module" -and $PSProfileContent -match "Terminal-Icons" - - # Check if Terminal-Icons is not currently in use by the backup PowerShell profile. - if (-not $TerminalIconsInUse) { - # If Terminal-Icons is currently installed attempt to uninstall it from the system. - if (Get-Module -ListAvailable Terminal-Icons) { - # Let the user know that Terminal-Icons is currently being uninstalled from their system. - Write-Host "===> Uninstalling: Terminal-Icons... <===" -ForegroundColor Yellow - - # Attempt to uninstall Terminal-Icons from the system with Uninstall-Module. - Uninstall-Module -Name Terminal-Icons - } - } else { - # Let the user know that the uninstallation of Terminal-Icons has been skipped because it is in use. - Write-Host "===> Skipped Uninstall: Terminal-Icons In-Use. <===" -ForegroundColor Yellow - } - } catch { - # Let the user know that an error was encountered when uninstalling Terminal-Icons. - Write-Host "Failed to uninstall Terminal-Icons. Error: $_" -ForegroundColor Red - } - - # Attempt to uninstall the Zoxide application from the system. - try { - # Get the content of the backup PowerShell profile and store it in-memory. - $PSProfileContent = Get-Content "$PSProfile.bak" - - # Store the flag used to check if Zoxide is in use by the backup PowerShell profile. - $ZoxideInUse = $PSProfileContent -match "zoxide init" - - # Check if Zoxide is not currently in use by the backup PowerShell profile. - if (-not $ZoxideInUse) { - # If Zoxide is currently installed attempt to uninstall it from the system. - if (Get-Command zoxide -ErrorAction SilentlyContinue) { - # Let the user know that Zoxide is currently being uninstalled from their system. - Write-Host "===> Uninstalling: Zoxide... <===" -ForegroundColor Yellow - - # Attempt to uninstall Zoxide from the system with the WinGet package manager. - winget uninstall -e --id ajeetdsouza.zoxide - } - } else { - # Let the user know that the uninstallation of Zoxide been skipped because it is in use. - Write-Host "===> Skipped Uninstall: Zoxide In-Use. <===" -ForegroundColor Yellow - } - } catch { - # Let the user know that an error was encountered when uninstalling Zoxide. - Write-Host "Failed to uninstall Zoxide. Error: $_" -ForegroundColor Red - } - - # Attempt to uninstall the CTT PowerShell profile from the system. - try { - # Try and remove the CTT PowerShell Profile file from the disk with Remove-Item. - Remove-Item $PSProfile - - # Let the user know that the CTT PowerShell profile has been uninstalled from the system. - Write-Host "Profile has been uninstalled. Please restart your shell to reflect the changes!" -ForegroundColor Magenta - } catch { - # Let the user know that an error was encountered when uninstalling the profile. - Write-Host "Failed to uninstall profile. Error: $_" -ForegroundColor Red - } - - # Attempt to move the user's original PowerShell profile backup back to its original location. - try { - # Check if the backup PowerShell profile exists before attempting to restore the backup. - if (Test-Path "$PSProfile.bak") { - # Restore the backup PowerShell profile and move it to its original location. - Move-Item "$PSProfile.bak" $PSProfile - - # Let the user know that their PowerShell profile backup has been successfully restored. - Write-Host "===> Restored Profile Backup. <===" -ForegroundColor Yellow - } - } catch { - # Let the user know that an error was encountered when restoring the profile backup. - Write-Host "Failed to restore profile backup. Error: $_" -ForegroundColor Red - } - - # Silently cleanup the oldprofile.ps1 file that was created when the CTT PowerShell profile was installed. - Remove-Item "$env:USERPROFILE\oldprofile.ps1" | Out-Null - } else { - # Let the user know that the CTT PowerShell profile is not installed and that the uninstallation was skipped. - Write-Host "===> Chris Titus Tech's PowerShell Profile Not Found. Skipped Uninstallation. <===" -ForegroundColor Magenta - } - } else { - # Let the user know that no PowerShell profile was found and that the uninstallation was skipped. - Write-Host "===> No PowerShell Profile Found. Skipped Uninstallation. <===" -ForegroundColor Magenta - } + if (Test-Path ($Profile + '.bak')) { + Remove-Item $Profile + Rename-Item ($Profile + '.bak') -NewName $Profile + } + else { + Remove-Item $Profile } -} + Write-Host "Successfully uninstalled CTT PowerShell Profile." -ForegroundColor Green +} diff --git a/functions/private/Invoke-WinutilThemeChange.ps1 b/functions/private/Invoke-WinutilThemeChange.ps1 index 0bf8f3fd7a..c85e5c9063 100644 --- a/functions/private/Invoke-WinutilThemeChange.ps1 +++ b/functions/private/Invoke-WinutilThemeChange.ps1 @@ -8,20 +8,14 @@ function Invoke-WinutilThemeChange { modifying various UI elements such as colors, margins, corner radii, font families, etc. If the '-init' switch is used, it initializes the theme based on the system's current dark mode setting. - .PARAMETER init - A switch parameter. If set to $true, the function initializes the theme based on the system’s current dark mode setting. - .EXAMPLE Invoke-WinutilThemeChange # Toggles the theme between 'Light' and 'Dark'. - .EXAMPLE - Invoke-WinutilThemeChange -init - # Initializes the theme based on the system's dark mode and applies the shared theme. + #> param ( - [switch]$init = $false, - [string]$theme + [string]$theme = "Auto" ) function Set-WinutilTheme { @@ -129,51 +123,45 @@ function Invoke-WinutilThemeChange { } } - $LightPreferencePath = "$env:LOCALAPPDATA\winutil\LightTheme.ini" - $DarkPreferencePath = "$env:LOCALAPPDATA\winutil\DarkTheme.ini" + $sync.preferences.theme = $theme + Set-Preferences -save + Set-WinutilTheme -currentTheme "shared" - if ($init) { - Set-WinutilTheme -currentTheme "shared" - if (Test-Path $LightPreferencePath) { - $theme = "Light" - } - elseif (Test-Path $DarkPreferencePath) { - $theme = "Dark" - } - else { - $theme = "Auto" - } - } - - switch ($theme) { + switch ($sync.preferences.theme) { "Auto" { $systemUsesDarkMode = Get-WinUtilToggleStatus WPFToggleDarkMode if ($systemUsesDarkMode) { - Set-WinutilTheme -currentTheme "Dark" + $theme = "Dark" } else{ - Set-WinutilTheme -currentTheme "Light" + $theme = "Light" } - + Set-WinutilTheme -currentTheme $theme $themeButtonIcon = [char]0xF08C - Remove-Item $LightPreferencePath -Force -ErrorAction SilentlyContinue - Remove-Item $DarkPreferencePath -Force -ErrorAction SilentlyContinue } "Dark" { - Set-WinutilTheme -currentTheme $theme + Set-WinutilTheme -currentTheme $sync.preferences.theme $themeButtonIcon = [char]0xE708 - $null = New-Item $DarkPreferencePath -Force - Remove-Item $LightPreferencePath -Force -ErrorAction SilentlyContinue } "Light" { - Set-WinutilTheme -currentTheme $theme + Set-WinutilTheme -currentTheme $sync.preferences.theme $themeButtonIcon = [char]0xE706 - $null = New-Item $LightPreferencePath -Force - Remove-Item $DarkPreferencePath -Force -ErrorAction SilentlyContinue } } + # Set FOSS Highlight Color + $fossEnabled = $true + if ($sync.WPFToggleFOSSHighlight) { + $fossEnabled = $sync.WPFToggleFOSSHighlight.IsChecked + } + + if ($fossEnabled) { + $sync.Form.Resources["FOSSColor"] = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(76, 175, 80)) # #4CAF50 + } else { + $sync.Form.Resources["FOSSColor"] = $sync.Form.Resources["MainForegroundColor"] + } + # Update the theme selector button with the appropriate icon $ThemeButton = $sync.Form.FindName("ThemeButton") $ThemeButton.Content = [string]$themeButtonIcon diff --git a/functions/private/Remove-WinUtilAPPX.ps1 b/functions/private/Remove-WinUtilAPPX.ps1 index e90a101b3e..12c0ed4232 100644 --- a/functions/private/Remove-WinUtilAPPX.ps1 +++ b/functions/private/Remove-WinUtilAPPX.ps1 @@ -15,19 +15,7 @@ function Remove-WinUtilAPPX { $Name ) - try { - Write-Host "Removing $Name" - Get-AppxPackage "*$Name*" | Remove-AppxPackage -ErrorAction SilentlyContinue - Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*$Name*" | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue - } catch [System.Exception] { - if ($psitem.Exception.Message -like "*The requested operation requires elevation*") { - Write-Warning "Unable to uninstall $name due to a Security Exception" - } else { - Write-Warning "Unable to uninstall $name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } - } catch { - Write-Warning "Unable to uninstall $name due to unhandled exception" - Write-Warning $psitem.Exception.StackTrace - } + Write-Host "Removing $Name" + Get-AppxPackage $Name -AllUsers | Remove-AppxPackage -AllUsers + Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Name | Remove-AppxProvisionedPackage -Online } diff --git a/functions/private/Reset-WPFCheckBoxes.ps1 b/functions/private/Reset-WPFCheckBoxes.ps1 new file mode 100644 index 0000000000..59ae653318 --- /dev/null +++ b/functions/private/Reset-WPFCheckBoxes.ps1 @@ -0,0 +1,77 @@ +function Reset-WPFCheckBoxes { + <# + + .SYNOPSIS + Set winutil checkboxs to match $sync.selected values. + Should only need to be run if $sync.selected updated outside of UI (i.e. presets or import) + + .PARAMETER doToggles + Whether or not to set UI toggles. WARNING: they will trigger if altered + + .PARAMETER checkboxfilterpattern + The Pattern to use when filtering through CheckBoxes, defaults to "**" + Used to make reset blazingly fast. + #> + + param ( + [Parameter(position=0)] + [bool]$doToggles = $false, + + [Parameter(position=1)] + [string]$checkboxfilterpattern = "**" + ) + + $CheckBoxesToCheck = $sync.selectedApps + $sync.selectedTweaks + $sync.selectedFeatures + $CheckBoxes = ($sync.GetEnumerator()).where{ $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" -and $_.Name -like "$checkboxfilterpattern"} + Write-Debug "Getting checkboxes to set, number of checkboxes: $($CheckBoxes.Count)" + + if ($CheckBoxesToCheck -ne "") { + $debugMsg = "CheckBoxes to Check are: " + $CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " } + $debugMsg = $debugMsg -replace (',\s*$', '') + Write-Debug "$debugMsg" + } + + foreach ($CheckBox in $CheckBoxes) { + $checkboxName = $CheckBox.Key + if (-not $CheckBoxesToCheck) { + $sync.$checkBoxName.IsChecked = $false + continue + } + + # Check if the checkbox name exists in the flattened JSON hashtable + if ($CheckBoxesToCheck -contains $checkboxName) { + # If it exists, set IsChecked to true + $sync.$checkboxName.IsChecked = $true + Write-Debug "$checkboxName is checked" + } else { + # If it doesn't exist, set IsChecked to false + $sync.$checkboxName.IsChecked = $false + Write-Debug "$checkboxName is not checked" + } + } + + # Update Installs tab UI values + $count = $sync.SelectedApps.Count + $sync.WPFselectedAppsButton.Content = "Selected Apps: $count" + # On every change, remove all entries inside the Popup Menu. This is done, so we can keep the alphabetical order even if elements are selected in a random way + $sync.selectedAppsstackPanel.Children.Clear() + $sync.selectedApps | Foreach-Object { Add-SelectedAppsMenuItem -name $($sync.configs.applicationsHashtable.$_.Content) -key $_ } + + if($doToggles) { + # Restore toggle switch states from imported config. + # Only act on toggles that are explicitly listed in the import — toggles absent + # from the export file were not part of the saved config and should keep whatever + # state the live system already has (set during UI initialisation via Get-WinUtilToggleStatus). + $importedToggles = $sync.selectedToggles + $allToggles = $sync.GetEnumerator() | Where-Object { $_.Key -like "WPFToggle*" -and $_.Value -is [System.Windows.Controls.CheckBox] } + foreach ($toggle in $allToggles) { + if ($importedToggles -contains $toggle.Key) { + $sync[$toggle.Key].IsChecked = $true + Write-Debug "Restoring toggle: $($toggle.Key) = checked" + } + # Toggles not present in the import are intentionally left untouched; + # their current UI state already reflects the real system state. + } + } +} diff --git a/functions/private/Set-Preferences.ps1 b/functions/private/Set-Preferences.ps1 new file mode 100644 index 0000000000..56338c5302 --- /dev/null +++ b/functions/private/Set-Preferences.ps1 @@ -0,0 +1,83 @@ +function Set-Preferences{ + + param( + [switch]$save=$false + ) + + # TODO delete this function sometime later + function Clean-OldPrefs{ + if (Test-Path -Path "$winutildir\LightTheme.ini") { + $sync.preferences.theme = "Light" + Remove-Item -Path "$winutildir\LightTheme.ini" + } + + if (Test-Path -Path "$winutildir\DarkTheme.ini") { + $sync.preferences.theme = "Dark" + Remove-Item -Path "$winutildir\DarkTheme.ini" + } + + # check old prefs, if its first line has no =, then absorb it as pm + if (Test-Path -Path $iniPath) { + $oldPM = Get-Content $iniPath + if ($oldPM -notlike "*=*") { + $sync.preferences.packagemanager = $oldPM + } + } + + if (Test-Path -Path "$winutildir\preferChocolatey.ini") { + $sync.preferences.packagemanager = "Choco" + Remove-Item -Path "$winutildir\preferChocolatey.ini" + } + } + + function Save-Preferences{ + $ini = "" + foreach($key in $sync.preferences.Keys) { + $pref = "$($key)=$($sync.preferences.$key)" + Write-Debug "Saving pref: $($pref)" + $ini = $ini + $pref + "`r`n" + } + $ini | Out-File $iniPath + } + + function Load-Preferences{ + Clean-OldPrefs + if (Test-Path -Path $iniPath) { + $iniData = Get-Content "$winutildir\preferences.ini" + foreach ($line in $iniData) { + if ($line -like "*=*") { + $arr = $line -split "=",-2 + $key = $arr[0] -replace "\s","" + $value = $arr[1] -replace "\s","" + Write-Debug "Preference: Key = '$($key)' Value ='$($value)'" + $sync.preferences.$key = $value + } + } + } + + # write defaults in case preferences dont exist + if ($null -eq $sync.preferences.theme) { + $sync.preferences.theme = "Auto" + } + if ($null -eq $sync.preferences.packagemanager) { + $sync.preferences.packagemanager = "Winget" + } + + # convert packagemanager to enum + if ($sync.preferences.packagemanager -eq "Choco") { + $sync.preferences.packagemanager = [PackageManagers]::Choco + } + elseif ($sync.preferences.packagemanager -eq "Winget") { + $sync.preferences.packagemanager = [PackageManagers]::Winget + } + } + + $iniPath = "$winutildir\preferences.ini" + + if ($save) { + Save-Preferences + } + else { + Load-Preferences + } +} diff --git a/functions/private/Set-WinUtilDNS.ps1 b/functions/private/Set-WinUtilDNS.ps1 index 3aa4f157dd..04be90be45 100644 --- a/functions/private/Set-WinUtilDNS.ps1 +++ b/functions/private/Set-WinUtilDNS.ps1 @@ -15,7 +15,7 @@ function Set-WinUtilDNS { if($DNSProvider -eq "Default") {return} try { $Adapters = Get-NetAdapter | Where-Object {$_.Status -eq "Up"} - Write-Host "Ensuring DNS is set to $DNSProvider on the following interfaces" + Write-Host "Ensuring DNS is set to $DNSProvider on the following interfaces:" Write-Host $($Adapters | Out-String) Foreach ($Adapter in $Adapters) { @@ -27,7 +27,7 @@ function Set-WinUtilDNS { } } } catch { - Write-Warning "Unable to set DNS Provider due to an unhandled exception" + Write-Warning "Unable to set DNS Provider due to an unhandled exception." Write-Warning $psitem.Exception.StackTrace } } diff --git a/functions/private/Set-WinUtilProgressbar.ps1 b/functions/private/Set-WinUtilProgressbar.ps1 index e63bd202db..2241e053c5 100644 --- a/functions/private/Set-WinUtilProgressbar.ps1 +++ b/functions/private/Set-WinUtilProgressbar.ps1 @@ -4,27 +4,25 @@ function Set-WinUtilProgressbar{ This function is used to Update the Progress Bar displayed in the winutil GUI. It will be automatically hidden if the user clicks something and no process is running .PARAMETER Label - The Text to be overlayed onto the Progress Bar + The Text to be overlaid onto the Progress Bar .PARAMETER PERCENT The percentage of the Progress Bar that should be filled (0-100) - .PARAMETER Hide - If provided, the Progress Bar and the label will be hidden #> param( [string]$Label, [ValidateRange(0,100)] - [int]$Percent, - $Hide + [int]$Percent ) - if ($hide) { - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Collapsed"}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Collapsed"}) - } else { - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Visibility = "Visible"}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBar.Visibility = "Visible"}) + + if($PARAM_NOUI) { + return; + } + + Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.Text = $label} + Invoke-WPFUIThread -ScriptBlock {$sync.progressBarTextBlock.ToolTip = $label} + if ($percent -lt 5 ) { + $percent = 5 # Ensure the progress bar is not empty, as it looks weird } - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.Text = $label}) - $sync.form.Dispatcher.Invoke([action]{$sync.ProgressBarLabel.Content.ToolTip = $label}) - $sync.form.Dispatcher.Invoke([action]{ $sync.ProgressBar.Value = $percent}) + Invoke-WPFUIThread -ScriptBlock { $sync.ProgressBar.Value = $percent} } diff --git a/functions/private/Set-WinUtilRegistry.ps1 b/functions/private/Set-WinUtilRegistry.ps1 index e99aa66972..3eacaf45e7 100644 --- a/functions/private/Set-WinUtilRegistry.ps1 +++ b/functions/private/Set-WinUtilRegistry.ps1 @@ -31,7 +31,7 @@ function Set-WinUtilRegistry { if(!(Test-Path 'HKU:\')) {New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS} If (!(Test-Path $Path)) { - Write-Host "$Path was not found, Creating..." + Write-Host "$Path was not found. Creating..." New-Item -Path $Path -Force -ErrorAction Stop | Out-Null } @@ -44,13 +44,13 @@ function Set-WinUtilRegistry { Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction Stop | Out-Null } } catch [System.Security.SecurityException] { - Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception" + Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception." } catch [System.Management.Automation.ItemNotFoundException] { Write-Warning $psitem.Exception.ErrorRecord } catch [System.UnauthorizedAccessException] { Write-Warning $psitem.Exception.Message } catch { - Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning "Unable to set $Name due to unhandled exception." Write-Warning $psitem.Exception.StackTrace } } diff --git a/functions/private/Set-WinUtilScheduledTask.ps1 b/functions/private/Set-WinUtilScheduledTask.ps1 index e6ee2bef9e..8cff7aa422 100644 --- a/functions/private/Set-WinUtilScheduledTask.ps1 +++ b/functions/private/Set-WinUtilScheduledTask.ps1 @@ -30,13 +30,13 @@ function Set-WinUtilScheduledTask { } } catch [System.Exception] { if($psitem.Exception.Message -like "*The system cannot find the file specified*") { - Write-Warning "Scheduled Task $name was not Found" + Write-Warning "Scheduled Task $Name was not found." } else { - Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning "Unable to set $Name due to unhandled exception." Write-Warning $psitem.Exception.Message } } catch { - Write-Warning "Unable to run script for $name due to unhandled exception" + Write-Warning "Unable to run script for $name due to unhandled exception." Write-Warning $psitem.Exception.StackTrace } } diff --git a/functions/private/Set-WinUtilService.ps1 b/functions/private/Set-WinUtilService.ps1 index d2a7d45959..3ef8bd0630 100644 --- a/functions/private/Set-WinUtilService.ps1 +++ b/functions/private/Set-WinUtilService.ps1 @@ -24,12 +24,16 @@ Function Set-WinUtilService { # Check if the service exists $service = Get-Service -Name $Name -ErrorAction Stop - # Service exists, proceed with changing properties - $service | Set-Service -StartupType $StartupType -ErrorAction Stop + # Service exists, proceed with changing properties -- while handling auto delayed start for PWSH 5 + if (($PSVersionTable.PSVersion.Major -lt 7) -and ($StartupType -eq "AutomaticDelayedStart")) { + sc.exe config $Name start=delayed-auto + } else { + $service | Set-Service -StartupType $StartupType -ErrorAction Stop + } } catch [System.ServiceProcess.ServiceNotFoundException] { - Write-Warning "Service $Name was not found" + Write-Warning "Service $Name was not found." } catch { - Write-Warning "Unable to set $Name due to unhandled exception" + Write-Warning "Unable to set $Name due to unhandled exception." Write-Warning $_.Exception.Message } diff --git a/functions/private/Show-WPFInstallAppBusy.ps1 b/functions/private/Show-WPFInstallAppBusy.ps1 new file mode 100644 index 0000000000..94d0c0f9ba --- /dev/null +++ b/functions/private/Show-WPFInstallAppBusy.ps1 @@ -0,0 +1,21 @@ +function Show-WPFInstallAppBusy { + <# + .SYNOPSIS + Displays a busy overlay in the install app area of the WPF form. + This is used to indicate that an install or uninstall is in progress. + Dynamically updates the size of the overlay based on the app area on each invocation. + .PARAMETER text + The text to display in the busy overlay. Defaults to "Installing apps...". + #> + param ( + $text = "Installing apps..." + ) + Invoke-WPFUIThread -ScriptBlock { + $sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Visible + $sync.InstallAppAreaOverlay.Width = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4) + $sync.InstallAppAreaOverlay.Height = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4) + $sync.InstallAppAreaOverlayText.Text = $text + $sync.InstallAppAreaBorder.IsEnabled = $false + $sync.InstallAppAreaScrollViewer.Effect.Radius = 5 + } +} diff --git a/functions/private/Test-WinUtilPackageManager.ps1 b/functions/private/Test-WinUtilPackageManager.ps1 index 04feb83c33..ed7546d85b 100644 --- a/functions/private/Test-WinUtilPackageManager.ps1 +++ b/functions/private/Test-WinUtilPackageManager.ps1 @@ -2,10 +2,10 @@ function Test-WinUtilPackageManager { <# .SYNOPSIS - Checks if Winget and/or Choco are installed + Checks if WinGet and/or Choco are installed .PARAMETER winget - Check if Winget is installed + Check if WinGet is installed .PARAMETER choco Check if Chocolatey is installed @@ -17,72 +17,25 @@ function Test-WinUtilPackageManager { [System.Management.Automation.SwitchParameter]$choco ) - $status = "not-installed" - if ($winget) { - # Check if Winget is available while getting it's Version if it's available - $wingetExists = $true - try { - $wingetVersionFull = winget --version - } catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] { - Write-Warning "Winget was not found due to un-availablity reasons" - $wingetExists = $false - } catch { - Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)" - $wingetExists = $false - } - - # If Winget is available, Parse it's Version and give proper information to Terminal Output. - # If it isn't available, the return of this funtion will be "not-installed", indicating that - # Winget isn't installed/available on The System. - if ($wingetExists) { - # Check if Preview Version - if ($wingetVersionFull.Contains("-preview")) { - $wingetVersion = $wingetVersionFull.Trim("-preview") - $wingetPreview = $true - } else { - $wingetVersion = $wingetVersionFull - $wingetPreview = $false - } - - # Check if Winget's Version is too old. - $wingetCurrentVersion = [System.Version]::Parse($wingetVersion.Trim('v')) - # Grabs the latest release of Winget from the Github API for version check process. - $response = Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/Winget-cli/releases/latest" -Method Get -ErrorAction Stop - $wingetLatestVersion = [System.Version]::Parse(($response.tag_name).Trim('v')) #Stores version number of latest release. - $wingetOutdated = $wingetCurrentVersion -lt $wingetLatestVersion + if (Get-Command winget -ErrorAction SilentlyContinue) { Write-Host "===========================================" -ForegroundColor Green - Write-Host "--- Winget is installed ---" -ForegroundColor Green + Write-Host "--- WinGet is installed ---" -ForegroundColor Green Write-Host "===========================================" -ForegroundColor Green - Write-Host "Version: $wingetVersionFull" -ForegroundColor White - - if (!$wingetPreview) { - Write-Host " - Winget is a release version." -ForegroundColor Green - } else { - Write-Host " - Winget is a preview version. Unexpected problems may occur." -ForegroundColor Yellow - } - - if (!$wingetOutdated) { - Write-Host " - Winget is Up to Date" -ForegroundColor Green - $status = "installed" - } else { - Write-Host " - Winget is Out of Date" -ForegroundColor Red - $status = "outdated" - } + $status = "installed" } else { Write-Host "===========================================" -ForegroundColor Red - Write-Host "--- Winget is not installed ---" -ForegroundColor Red + Write-Host "--- WinGet is not installed ---" -ForegroundColor Red Write-Host "===========================================" -ForegroundColor Red $status = "not-installed" } } if ($choco) { - if ((Get-Command -Name choco -ErrorAction Ignore) -and ($chocoVersion = (Get-Item "$env:ChocolateyInstall\choco.exe" -ErrorAction Ignore).VersionInfo.ProductVersion)) { + if (Get-Command choco -ErrorAction SilentlyContinue) { Write-Host "===========================================" -ForegroundColor Green Write-Host "--- Chocolatey is installed ---" -ForegroundColor Green Write-Host "===========================================" -ForegroundColor Green - Write-Host "Version: v$chocoVersion" -ForegroundColor White $status = "installed" } else { Write-Host "===========================================" -ForegroundColor Red diff --git a/functions/private/Uninstall-WinUtilEdgeBrowser.ps1 b/functions/private/Uninstall-WinUtilEdgeBrowser.ps1 deleted file mode 100644 index f090e95fa9..0000000000 --- a/functions/private/Uninstall-WinUtilEdgeBrowser.ps1 +++ /dev/null @@ -1,138 +0,0 @@ -Function Uninstall-WinUtilEdgeBrowser { - <# - .SYNOPSIS - Uninstall the Edge Browser (Chromium) from the system in an elegant way. - .DESCRIPTION - This will switch up the region to one of the EEA countries temporarily and uninstall the Edge Browser (Chromium). - #> - - param ( - [Parameter(Mandatory = $true)] - [ValidateSet("install", "uninstall")] - [string]$action - ) - - function Uninstall-EdgeClient { - param ( - [Parameter(Mandatory = $true)] - [string]$Key - ) - - $originalNation = [microsoft.win32.registry]::GetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', [Microsoft.Win32.RegistryValueKind]::String) - - # Set Nation to any of the EEA regions temporarily - # Refer: https://learn.microsoft.com/en-us/windows/win32/intl/table-of-geographical-locations - $tmpNation = 68 # Ireland - [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', $tmpNation, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null - - $baseKey = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' - $registryPath = $baseKey + '\ClientState\' + $Key - - if (!(Test-Path -Path $registryPath)) { - Write-Host "[$Mode] Registry key not found: $registryPath" - return - } - - # Remove the status flag - Remove-ItemProperty -Path $baseKey -Name "IsEdgeStableUninstalled" -ErrorAction SilentlyContinue | Out-Null - - Remove-ItemProperty -Path $registryPath -Name "experiment_control_labels" -ErrorAction SilentlyContinue | Out-Null - - $uninstallString = (Get-ItemProperty -Path $registryPath).UninstallString - $uninstallArguments = (Get-ItemProperty -Path $registryPath).UninstallArguments - - if ([string]::IsNullOrEmpty($uninstallString) -or [string]::IsNullOrEmpty($uninstallArguments)) { - Write-Host "[$Mode] Cannot find uninstall methods for $Mode" - return - } - - # Extra arguments to nuke it - $uninstallArguments += " --force-uninstall --delete-profile" - - # $uninstallCommand = "`"$uninstallString`"" + $uninstallArguments - if (!(Test-Path -Path $uninstallString)) { - Write-Host "[$Mode] setup.exe not found at: $uninstallString" - return - } - Start-Process -FilePath $uninstallString -ArgumentList $uninstallArguments -Wait -NoNewWindow -Verbose - - # Restore Nation back to the original - [microsoft.win32.registry]::SetValue('HKEY_USERS\.DEFAULT\Control Panel\International\Geo', 'Nation', $originalNation, [Microsoft.Win32.RegistryValueKind]::String) | Out-Null - - # might not exist in some cases - if ((Get-ItemProperty -Path $baseKey).IsEdgeStableUninstalled -eq 1) { - Write-Host "[$Mode] Edge Stable has been successfully uninstalled" - } - } - - function Uninstall-Edge { - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - [microsoft.win32.registry]::SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev", "AllowUninstall", 1, [Microsoft.Win32.RegistryValueKind]::DWord) | Out-Null - - Uninstall-EdgeClient -Key '{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}' - - Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgePDF" -ErrorAction SilentlyContinue | Out-Null - Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgeHTM" -ErrorAction SilentlyContinue | Out-Null - Remove-Item -Path "Computer\\HKEY_CLASSES_ROOT\\MSEdgeMHT" -ErrorAction SilentlyContinue | Out-Null - - # Remove Edge Polocy reg keys - Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Edge" -Recurse -ErrorAction SilentlyContinue | Out-Null - - # Remove Edge reg keys - Remove-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Edge" -Recurse -ErrorAction SilentlyContinue | Out-Null - } - - function Uninstall-WebView { - # FIXME: might not work on some systems - - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - Uninstall-EdgeClient -Key '{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}' - } - - function Uninstall-EdgeUpdate { - # FIXME: might not work on some systems - - Remove-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -Name "NoRemove" -ErrorAction SilentlyContinue | Out-Null - - $registryPath = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate' - if (!(Test-Path -Path $registryPath)) { - Write-Host "Registry key not found: $registryPath" - return - } - $uninstallCmdLine = (Get-ItemProperty -Path $registryPath).UninstallCmdLine - - if ([string]::IsNullOrEmpty($uninstallCmdLine)) { - Write-Host "Cannot find uninstall methods for $Mode" - return - } - - Start-Process cmd.exe "/c $uninstallCmdLine" -WindowStyle Hidden -Wait - - # Remove EdgeUpdate reg keys - Remove-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate" -Recurse -ErrorAction SilentlyContinue | Out-Null - } - - function Install-Edge { - $tempEdgePath = "$env:TEMP\MicrosoftEdgeSetup.exe" - - try { - write-host "Installing Edge ..." - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2109047&Channel=Stable&language=en&consent=1" -OutFile $tempEdgePath - Start-Process -FilePath $tempEdgePath -ArgumentList "/silent /install" -Wait - Remove-item $tempEdgePath - write-host "Edge Installed Successfully" - } catch { - write-host "Failed to install Edge" - } - } - - if ($action -eq "Install") { - Install-Edge - } elseif ($action -eq "Uninstall") { - Uninstall-Edge - Uninstall-EdgeUpdate - # Uninstall-WebView - WebView is needed for Visual Studio and some MS Store Games like Forza - } -} diff --git a/functions/private/Update-WinUtilProgramWinget.ps1 b/functions/private/Update-WinUtilProgramWinget.ps1 index 7f50d35e6c..4a40e22096 100644 --- a/functions/private/Update-WinUtilProgramWinget.ps1 +++ b/functions/private/Update-WinUtilProgramWinget.ps1 @@ -3,13 +3,13 @@ Function Update-WinUtilProgramWinget { <# .SYNOPSIS - This will update all programs using Winget + This will update all programs using WinGet #> [ScriptBlock]$wingetinstall = { - $host.ui.RawUI.WindowTitle = """Winget Install""" + $host.ui.RawUI.WindowTitle = """WinGet Install""" Start-Transcript "$logdir\winget-update_$dateTime.log" -Append winget upgrade --all --accept-source-agreements --accept-package-agreements --scope=machine --silent diff --git a/functions/private/Update-WinUtilSelections.ps1 b/functions/private/Update-WinUtilSelections.ps1 new file mode 100644 index 0000000000..a4d65f0e61 --- /dev/null +++ b/functions/private/Update-WinUtilSelections.ps1 @@ -0,0 +1,61 @@ +function Update-WinUtilSelections { + <# + + .SYNOPSIS + Updates the $sync.selected variables with a given preset. + + .PARAMETER flatJson + The flattened json list of $sync values to select. + #> + + param ( + $flatJson + ) + + Write-Debug "JSON to import: $($flatJson)" + + foreach ($item in $flatJson) { + # Ensure each item is treated as a string to handle PSCustomObject from JSON deserialization + $cbkey = [string]$item + $group = if ($cbkey.StartsWith("WPFInstall")) { "Install" } + elseif ($cbkey.StartsWith("WPFTweaks")) { "Tweaks" } + elseif ($cbkey.StartsWith("WPFToggle")) { "Toggle" } + elseif ($cbkey.StartsWith("WPFFeature")) { "Feature" } + else { "na" } + + switch ($group) { + "Install" { + if (!$sync.selectedApps.Contains($cbkey)) { + $sync.selectedApps.Add($cbkey) + # The List type needs to be specified again, because otherwise Sort-Object will convert the list to a string if there is only a single entry + [System.Collections.Generic.List[string]]$sync.selectedApps = $sync.SelectedApps | Sort-Object + } + } + "Tweaks" { + if (!$sync.selectedTweaks.Contains($cbkey)) { + $sync.selectedTweaks.Add($cbkey) + } + } + "Toggle" { + if (!$sync.selectedToggles.Contains($cbkey)) { + $sync.selectedToggles.Add($cbkey) + } + } + "Feature" { + if (!$sync.selectedFeatures.Contains($cbkey)) { + $sync.selectedFeatures.Add($cbkey) + } + } + default { + Write-Host "Unknown group for checkbox: $($cbkey)" + } + } + } + + Write-Debug "-------------------------------------" + Write-Debug "Selected Apps: $($sync.selectedApps)" + Write-Debug "Selected Tweaks: $($sync.selectedTweaks)" + Write-Debug "Selected Toggles: $($sync.selectedToggles)" + Write-Debug "Selected Features: $($sync.selectedFeatures)" + Write-Debug "--------------------------------------" +} diff --git a/functions/public/Initialize-WPFUI.ps1 b/functions/public/Initialize-WPFUI.ps1 new file mode 100644 index 0000000000..46d8b9e893 --- /dev/null +++ b/functions/public/Initialize-WPFUI.ps1 @@ -0,0 +1,120 @@ +function Initialize-WPFUI { + [OutputType([void])] + param( + [Parameter(Mandatory)] + [string]$TargetGridName + ) + + switch ($TargetGridName) { + "appscategory"{ + # TODO + # Switch UI generation of the sidebar to this function + # $sync.ItemsControl = Initialize-InstallAppArea -TargetElement $TargetGridName + # ... + + # Create and configure a popup for displaying selected apps + $selectedAppsPopup = New-Object Windows.Controls.Primitives.Popup + $selectedAppsPopup.IsOpen = $false + $selectedAppsPopup.PlacementTarget = $sync.WPFselectedAppsButton + $selectedAppsPopup.Placement = [System.Windows.Controls.Primitives.PlacementMode]::Bottom + $selectedAppsPopup.AllowsTransparency = $true + + # Style the popup with a border and background + $selectedAppsBorder = New-Object Windows.Controls.Border + $selectedAppsBorder.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "MainBackgroundColor") + $selectedAppsBorder.SetResourceReference([Windows.Controls.Control]::BorderBrushProperty, "MainForegroundColor") + $selectedAppsBorder.SetResourceReference([Windows.Controls.Control]::BorderThicknessProperty, "ButtonBorderThickness") + $selectedAppsBorder.Width = 200 + $selectedAppsBorder.Padding = 5 + $selectedAppsPopup.Child = $selectedAppsBorder + $sync.selectedAppsPopup = $selectedAppsPopup + + # Add a stack panel inside the popup's border to organize its child elements + $sync.selectedAppsstackPanel = New-Object Windows.Controls.StackPanel + $selectedAppsBorder.Child = $sync.selectedAppsstackPanel + + # Close selectedAppsPopup when mouse leaves both button and selectedAppsPopup + $sync.WPFselectedAppsButton.Add_MouseLeave({ + if (-not $sync.selectedAppsPopup.IsMouseOver) { + $sync.selectedAppsPopup.IsOpen = $false + } + }) + $selectedAppsPopup.Add_MouseLeave({ + if (-not $sync.WPFselectedAppsButton.IsMouseOver) { + $sync.selectedAppsPopup.IsOpen = $false + } + }) + + # Creates the popup that is displayed when the user right-clicks on an app entry + # This popup contains buttons for installing, uninstalling, and viewing app information + + $appPopup = New-Object Windows.Controls.Primitives.Popup + $appPopup.StaysOpen = $false + $appPopup.Placement = [System.Windows.Controls.Primitives.PlacementMode]::Bottom + $appPopup.AllowsTransparency = $true + # Store the popup globally so the position can be set later + $sync.appPopup = $appPopup + + $appPopupStackPanel = New-Object Windows.Controls.StackPanel + $appPopupStackPanel.Orientation = "Horizontal" + $appPopupStackPanel.Add_MouseLeave({ + $sync.appPopup.IsOpen = $false + }) + $appPopup.Child = $appPopupStackPanel + + $appButtons = @( + [PSCustomObject]@{ Name = "Install"; Icon = [char]0xE118 }, + [PSCustomObject]@{ Name = "Uninstall"; Icon = [char]0xE74D }, + [PSCustomObject]@{ Name = "Info"; Icon = [char]0xE946 } + ) + foreach ($button in $appButtons) { + $newButton = New-Object Windows.Controls.Button + $newButton.Style = $sync.Form.Resources.AppEntryButtonStyle + $newButton.Content = $button.Icon + $appPopupStackPanel.Children.Add($newButton) | Out-Null + + # Dynamically load the selected app object so the buttons can be reused and do not need to be created for each app + switch ($button.Name) { + "Install" { + $newButton.Add_MouseEnter({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + $this.ToolTip = "Install or Upgrade $($appObject.content)" + }) + $newButton.Add_Click({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + Invoke-WPFInstall -PackagesToInstall $appObject + }) + } + "Uninstall" { + $newButton.Add_MouseEnter({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + $this.ToolTip = "Uninstall $($appObject.content)" + }) + $newButton.Add_Click({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + Invoke-WPFUnInstall -PackagesToUninstall $appObject + }) + } + "Info" { + $newButton.Add_MouseEnter({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + $this.ToolTip = "Open the application's website in your default browser`n$($appObject.link)" + }) + $newButton.Add_Click({ + $appObject = $sync.configs.applicationsHashtable.$($sync.appPopupSelectedApp) + Start-Process $appObject.link + }) + } + } + } + } + "appspanel" { + $sync.ItemsControl = Initialize-InstallAppArea -TargetElement $TargetGridName + Initialize-InstallCategoryAppList -TargetElement $sync.ItemsControl -Apps $sync.configs.applicationsHashtable + } + default { + Write-Output "$TargetGridName not yet implemented" + } + } +} + diff --git a/functions/public/Invoke-ScratchDialog.ps1 b/functions/public/Invoke-ScratchDialog.ps1 deleted file mode 100644 index 53ffc8fdc2..0000000000 --- a/functions/public/Invoke-ScratchDialog.ps1 +++ /dev/null @@ -1,28 +0,0 @@ - -function Invoke-ScratchDialog { - - <# - - .SYNOPSIS - Enable Editable Text box Alternate Scartch path - - .PARAMETER Button - #> - $sync.WPFMicrowinISOScratchDir.IsChecked - - - [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null - $Dialog = New-Object System.Windows.Forms.FolderBrowserDialog - $Dialog.SelectedPath = $sync.MicrowinScratchDirBox.Text - $Dialog.ShowDialog() - $filePath = $Dialog.SelectedPath - Write-Host "No ISO is chosen+ $filePath" - - if ([string]::IsNullOrEmpty($filePath)) { - Write-Host "No Folder had chosen" - return - } - - $sync.MicrowinScratchDirBox.Text = Join-Path $filePath "\" - -} diff --git a/functions/public/Invoke-WPFButton.ps1 b/functions/public/Invoke-WPFButton.ps1 index 68cdfa28be..b0bc813a1f 100644 --- a/functions/public/Invoke-WPFButton.ps1 +++ b/functions/public/Invoke-WPFButton.ps1 @@ -15,50 +15,63 @@ function Invoke-WPFButton { # Use this to get the name of the button #[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info") if (-not $sync.ProcessRunning) { - Set-WinUtilProgressBar -label "" -percent 0 -hide $true + Set-WinUtilProgressBar -label "" -percent 0 } + # Check if button is defined in feature config with function or InvokeScript + if ($sync.configs.feature.$Button) { + $buttonConfig = $sync.configs.feature.$Button + + # If button has a function defined, call it + if ($buttonConfig.function) { + $functionName = $buttonConfig.function + if (Get-Command $functionName -ErrorAction SilentlyContinue) { + & $functionName + return + } + } + + # If button has InvokeScript defined, execute the scripts + if ($buttonConfig.InvokeScript -and $buttonConfig.InvokeScript.Count -gt 0) { + foreach ($script in $buttonConfig.InvokeScript) { + if (-not [string]::IsNullOrWhiteSpace($script)) { + Invoke-Expression $script + } + } + return + } + } + + # Fallback to hard-coded switch for buttons not in feature.json Switch -Wildcard ($Button) { "WPFTab?BT" {Invoke-WPFTab $Button} "WPFInstall" {Invoke-WPFInstall} "WPFUninstall" {Invoke-WPFUnInstall} "WPFInstallUpgrade" {Invoke-WPFInstallUpgrade} + "WPFCollapseAllCategories" {Invoke-WPFToggleAllCategories -Action "Collapse"} + "WPFExpandAllCategories" {Invoke-WPFToggleAllCategories -Action "Expand"} "WPFStandard" {Invoke-WPFPresets "Standard" -checkboxfilterpattern "WPFTweak*"} "WPFMinimal" {Invoke-WPFPresets "Minimal" -checkboxfilterpattern "WPFTweak*"} "WPFClearTweaksSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFTweak*"} "WPFClearInstallSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*"} "WPFtweaksbutton" {Invoke-WPFtweaksbutton} "WPFOOSUbutton" {Invoke-WPFOOSU} - "WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"} - "WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disable"} + "WPFAddUltPerf" {Invoke-WPFUltimatePerformance -Do} + "WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance} "WPFundoall" {Invoke-WPFundoall} - "WPFFeatureInstall" {Invoke-WPFFeatureInstall} - "WPFPanelDISM" {Invoke-WPFPanelDISM} - "WPFPanelAutologin" {Invoke-WPFPanelAutologin} - "WPFPanelcontrol" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelnetwork" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelpower" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelregion" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelsound" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelprinter" {Invoke-WPFControlPanel -Panel $button} - "WPFPanelsystem" {Invoke-WPFControlPanel -Panel $button} - "WPFPaneluser" {Invoke-WPFControlPanel -Panel $button} - "WPFUpdatesdefault" {Invoke-WPFFixesUpdate} - "WPFFixesUpdate" {Invoke-WPFFixesUpdate} - "WPFFixesWinget" {Invoke-WPFFixesWinget} - "WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool} - "WPFFixesNetwork" {Invoke-WPFFixesNetwork} + "WPFUpdatesdefault" {Invoke-WPFUpdatesdefault} "WPFUpdatesdisable" {Invoke-WPFUpdatesdisable} "WPFUpdatessecurity" {Invoke-WPFUpdatessecurity} - "WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true} "WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"} "WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"} - "WPFGetIso" {Invoke-MicrowinGetIso} - "WPFMicrowin" {Invoke-Microwin} - "WPFCloseButton" {Invoke-WPFCloseButton} - "MicrowinScratchDirBT" {Invoke-ScratchDialog} - "WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile} - "WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile} - "WPFWinUtilSSHServer" {Invoke-WPFSSHServer} + "WPFCloseButton" {$sync.Form.Close(); Write-Host "Bye bye!"} + "WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen} + "WPFToggleFOSSHighlight" { + if ($sync.WPFToggleFOSSHighlight.IsChecked) { + $sync.Form.Resources["FOSSColor"] = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(76, 175, 80)) # #4CAF50 + } else { + $sync.Form.Resources["FOSSColor"] = $sync.Form.Resources["MainForegroundColor"] + } + } } } diff --git a/functions/public/Invoke-WPFCloseButton.ps1 b/functions/public/Invoke-WPFCloseButton.ps1 deleted file mode 100644 index 5ffff15aa7..0000000000 --- a/functions/public/Invoke-WPFCloseButton.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -function Invoke-WPFCloseButton { - - <# - - .SYNOPSIS - Close application - - .PARAMETER Button - #> - $sync["Form"].Close() - Write-Host "Bye bye!" -} diff --git a/functions/public/Invoke-WPFControlPanel.ps1 b/functions/public/Invoke-WPFControlPanel.ps1 deleted file mode 100644 index b7a628e7a8..0000000000 --- a/functions/public/Invoke-WPFControlPanel.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -function Invoke-WPFControlPanel { - <# - - .SYNOPSIS - Opens the requested legacy panel - - .PARAMETER Panel - The panel to open - - #> - param($Panel) - - switch ($Panel) { - "WPFPanelcontrol" {cmd /c control} - "WPFPanelnetwork" {cmd /c ncpa.cpl} - "WPFPanelpower" {cmd /c powercfg.cpl} - "WPFPanelregion" {cmd /c intl.cpl} - "WPFPanelsound" {cmd /c mmsys.cpl} - "WPFPanelprinter" {Start-Process "shell:::{A8A91A66-3A7D-4424-8D24-04E180695C7A}"} - "WPFPanelsystem" {cmd /c sysdm.cpl} - "WPFPaneluser" {cmd /c "control userpasswords2"} - } -} diff --git a/functions/public/Invoke-WPFFeatureInstall.ps1 b/functions/public/Invoke-WPFFeatureInstall.ps1 index dd9995d254..958ba434ed 100644 --- a/functions/public/Invoke-WPFFeatureInstall.ps1 +++ b/functions/public/Invoke-WPFFeatureInstall.ps1 @@ -12,21 +12,25 @@ function Invoke-WPFFeatureInstall { return } - $Features = (Get-WinUtilCheckBoxes)["WPFFeature"] - - Invoke-WPFRunspace -ArgumentList $Features -DebugPreference $DebugPreference -ScriptBlock { - param($Features, $DebugPreference) + $handle = Invoke-WPFRunspace -ScriptBlock { + $Features = $sync.selectedFeatures $sync.ProcessRunning = $true if ($Features.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" } } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" } } - Invoke-WinUtilFeatureInstall $Features + $x = 0 + + $Features | ForEach-Object { + Invoke-WinUtilFeatureInstall $_ + $X++ + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value ($x/$CheckBox.Count) } + } $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } Write-Host "===================================" Write-Host "--- Features are Installed ---" diff --git a/functions/public/Invoke-WPFFixesNTPPool.ps1 b/functions/public/Invoke-WPFFixesNTPPool.ps1 new file mode 100644 index 0000000000..f858879f2d --- /dev/null +++ b/functions/public/Invoke-WPFFixesNTPPool.ps1 @@ -0,0 +1,20 @@ +function Invoke-WPFFixesNTPPool { + <# + .SYNOPSIS + Configures Windows to use pool.ntp.org for NTP synchronization + + .DESCRIPTION + Replaces the default Windows NTP server (time.windows.com) with + pool.ntp.org for improved time synchronization accuracy and reliability. + #> + + Start-Service w32time + w32tm /config /update /manualpeerlist:"pool.ntp.org,0x8" /syncfromflags:MANUAL + + Restart-Service w32time + w32tm /resync + + Write-Host "=================================" + Write-Host "-- NTP Configuration Complete ---" + Write-Host "=================================" +} diff --git a/functions/public/Invoke-WPFFixesNetwork.ps1 b/functions/public/Invoke-WPFFixesNetwork.ps1 index d741752829..5c3b4f87e4 100644 --- a/functions/public/Invoke-WPFFixesNetwork.ps1 +++ b/functions/public/Invoke-WPFFixesNetwork.ps1 @@ -8,13 +8,20 @@ function Invoke-WPFFixesNetwork { Write-Host "Resetting Network with netsh" + Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" # Reset WinSock catalog to a clean state Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winsock", "reset" + + Set-WinUtilTaskbaritem -state "Normal" -value 0.35 -overlay "logo" # Resets WinHTTP proxy setting to DIRECT Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "winhttp", "reset", "proxy" + + Set-WinUtilTaskbaritem -state "Normal" -value 0.7 -overlay "logo" # Removes all user configured IP settings Start-Process -NoNewWindow -FilePath "netsh" -ArgumentList "int", "ip", "reset" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + Write-Host "Process complete. Please reboot your computer." $ButtonType = [System.Windows.MessageBoxButton]::OK diff --git a/functions/public/Invoke-WPFFixesUpdate.ps1 b/functions/public/Invoke-WPFFixesUpdate.ps1 index 85beac60f3..4d7cfcefa4 100644 --- a/functions/public/Invoke-WPFFixesUpdate.ps1 +++ b/functions/public/Invoke-WPFFixesUpdate.ps1 @@ -6,19 +6,7 @@ function Invoke-WPFFixesUpdate { Performs various tasks in an attempt to repair Windows Update .DESCRIPTION - 1. (Aggressive Only) Scans the system for corruption using chkdsk, SFC, and DISM - Steps: - 1. Runs chkdsk /scan /perf - /scan - Runs an online scan on the volume - /perf - Uses more system resources to complete a scan as fast as possible - 2. Runs SFC /scannow - /scannow - Scans integrity of all protected system files and repairs files with problems when possible - 3. Runs DISM /Online /Cleanup-Image /RestoreHealth - /Online - Targets the running operating system - /Cleanup-Image - Performs cleanup and recovery operations on the image - /RestoreHealth - Scans the image for component store corruption and attempts to repair the corruption using Windows Update - 4. Runs SFC /scannow - Ran twice in case DISM repaired SFC + 1. (Aggressive Only) Scans the system for corruption using the Invoke-WPFSystemRepair function 2. Stops Windows Update Services 3. Remove the QMGR Data file, which stores BITS jobs 4. (Aggressive Only) Renames the DataStore and CatRoot2 folders @@ -42,108 +30,13 @@ function Invoke-WPFFixesUpdate { param($Aggressive = $false) Write-Progress -Id 0 -Activity "Repairing Windows Update" -PercentComplete 0 + Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" + Write-Host "Starting Windows Update Repair..." # Wait for the first progress bar to show, otherwise the second one won't show Start-Sleep -Milliseconds 200 if ($Aggressive) { - # Scan system for corruption - Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Scanning for corruption..." -PercentComplete 0 - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk..." -PercentComplete 0 - # 2>&1 redirects stdout, alowing iteration over the output - chkdsk.exe /scan /perf 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Get the index of the total percentage - $index = $_.IndexOf("Total:") - if ( - # If the percent is found - ($percent = try {( - $_.Substring( - $index + 6, - $_.IndexOf("%", $index) - $index - 6 - ) - ).Trim()} catch {0}) ` - <# And the current percentage is greater than the previous one #>` - -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running chkdsk... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC..." -PercentComplete 0 - $oldpercent = 0 - # SFC has a bug when redirected which causes it to output only when the stdout buffer is full, causing the progress bar to move in chunks - sfc /scannow 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ( - # Use a different method to get the percentage that accounts for SFC's Unicode output - [int]$percent = try {( - ( - $_.Substring( - $_.IndexOf("n") + 2, - $_.IndexOf("%") - $_.IndexOf("n") - 2 - ).ToCharArray() | Where-Object {$_} - ) -join '' - ).TrimStart()} catch {0} - ) -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM..." -PercentComplete 0 - $oldpercent = 0 - DISM /Online /Cleanup-Image /RestoreHealth | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ($percent = try { - [int]($_ -replace "\[" -replace "=" -replace " " -replace "%" -replace "\]") - } catch {0}) ` - -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running DISM... ($percent%)" -PercentComplete $percent - } - } - - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC again..." -PercentComplete 0 - $oldpercent = 0 - sfc /scannow 2>&1 | ForEach-Object { - # Write stdout to the Verbose stream - Write-Verbose $_ - - # Filter for lines that contain a percentage that is greater than the previous one - if ( - ( - [int]$percent = try {( - ( - $_.Substring( - $_.IndexOf("n") + 2, - $_.IndexOf("%") - $_.IndexOf("n") - 2 - ).ToCharArray() | Where-Object {$_} - ) -join '' - ).TrimStart()} catch {0} - ) -and $percent -gt $oldpercent - ) { - # Update the progress bar - $oldpercent = $percent - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Running SFC... ($percent%)" -PercentComplete $percent - } - } - Write-Progress -Id 1 -ParentId 0 -Activity "Scanning for corruption" -Status "Completed" -PercentComplete 100 + Invoke-WPFSystemRepair } @@ -299,12 +192,15 @@ function Invoke-WPFFixesUpdate { try { (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() } catch { + Set-WinUtilTaskbaritem -state "Error" -overlay "warning" Write-Warning "Failed to create Windows Update COM object: $_" } Start-Process -NoNewWindow -FilePath "wuauclt" -ArgumentList "/resetauthorization", "/detectnow" Write-Progress -Id 10 -ParentId 0 -Activity "Forcing discovery" -Status "Completed" -PercentComplete 100 Write-Progress -Id 0 -Activity "Repairing Windows Update" -Status "Completed" -PercentComplete 100 + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + $ButtonType = [System.Windows.MessageBoxButton]::OK $MessageboxTitle = "Reset Windows Update " $Messageboxbody = ("Stock settings loaded.`n Please reboot your computer") diff --git a/functions/public/Invoke-WPFFixesWinget.ps1 b/functions/public/Invoke-WPFFixesWinget.ps1 index f380c2ab4a..f41f371081 100644 --- a/functions/public/Invoke-WPFFixesWinget.ps1 +++ b/functions/public/Invoke-WPFFixesWinget.ps1 @@ -3,12 +3,21 @@ function Invoke-WPFFixesWinget { <# .SYNOPSIS - Fixes Winget by running choco install winget + Fixes WinGet by running `choco install winget` .DESCRIPTION - BravoNorris for the fantastic idea of a button to reinstall winget + BravoNorris for the fantastic idea of a button to reinstall WinGet #> # Install Choco if not already present - Install-WinUtilChoco - Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait + try { + Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo" + Write-Host "==> Starting WinGet Repair" + Install-WinUtilWinget + } catch { + Write-Error "Failed to install WinGet: $_" + Set-WinUtilTaskbaritem -state "Error" -overlay "warning" + } finally { + Write-Host "==> Finished WinGet Repair" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" + } } diff --git a/functions/public/Invoke-WPFFormVariables.ps1 b/functions/public/Invoke-WPFFormVariables.ps1 deleted file mode 100644 index 6a2d2e7ab3..0000000000 --- a/functions/public/Invoke-WPFFormVariables.ps1 +++ /dev/null @@ -1,36 +0,0 @@ -Function Invoke-WPFFormVariables { - <# - - .SYNOPSIS - Prints the logo - - #> - #If ($global:ReadmeDisplay -ne $true) { Write-Host "If you need to reference this display again, run Get-FormVariables" -ForegroundColor Yellow; $global:ReadmeDisplay = $true } - - - Write-Host "" - Write-Host " CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT " - Write-Host " CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T " - Write-Host "CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T " - Write-Host "C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T " - Write-Host "C:::::C CCCCCCTTTTTT T:::::T TTTTTTTTTTTT T:::::T TTTTTT" - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C T:::::T T:::::T " - Write-Host "C:::::C CCCCCC T:::::T T:::::T " - Write-Host "C:::::CCCCCCCC::::C TT:::::::TT TT:::::::TT " - Write-Host "CC:::::::::::::::C T:::::::::T T:::::::::T " - Write-Host "CCC::::::::::::C T:::::::::T T:::::::::T " - Write-Host " CCCCCCCCCCCCC TTTTTTTTTTT TTTTTTTTTTT " - Write-Host "" - Write-Host "====Chris Titus Tech=====" - Write-Host "=====Windows Toolbox=====" - - #====DEBUG GUI Elements==== - - #Write-Host "Found the following interactable elements from our form" -ForegroundColor Cyan - #get-variable WPF* -} diff --git a/functions/public/Invoke-WPFGetInstalled.ps1 b/functions/public/Invoke-WPFGetInstalled.ps1 index c27fd13ce1..7b30a8cb78 100644 --- a/functions/public/Invoke-WPFGetInstalled.ps1 +++ b/functions/public/Invoke-WPFGetInstalled.ps1 @@ -9,44 +9,45 @@ function Invoke-WPFGetInstalled { #> param($checkbox) - - if($sync.ProcessRunning) { + if ($sync.ProcessRunning) { $msg = "[Invoke-WPFGetInstalled] Install process is currently running." [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) return } - if(($sync.WPFpreferChocolatey.IsChecked -eq $false) -and ((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") { + if (($sync.ChocoRadioButton.IsChecked -eq $false) -and ((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") { return } - $preferChoco = $sync.WPFpreferChocolatey.IsChecked - Invoke-WPFRunspace -ArgumentList $checkbox, $preferChoco -DebugPreference $DebugPreference -ScriptBlock { - param($checkbox, $preferChoco, $DebugPreference) + $managerPreference = $sync.preferences.packagemanager + Invoke-WPFRunspace -ParameterList @(("managerPreference", $managerPreference),("checkbox", $checkbox)) -ScriptBlock { + param ( + [string]$checkbox, + [PackageManagers]$managerPreference + ) $sync.ProcessRunning = $true - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" } - if($checkbox -eq "winget") { + if ($checkbox -eq "winget") { Write-Host "Getting Installed Programs..." + switch ($managerPreference) { + "Choco"{$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox "choco"; break} + "Winget"{$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox; break} + } } - if($checkbox -eq "tweaks") { + elseif ($checkbox -eq "tweaks") { Write-Host "Getting Installed Tweaks..." - } - if ($preferChoco -and $checkbox -eq "winget") { - $Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox "choco" - } - else{ $Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox } $sync.form.Dispatcher.invoke({ - foreach($checkbox in $Checkboxes) { + foreach ($checkbox in $Checkboxes) { $sync.$checkbox.ischecked = $True } }) Write-Host "Done..." $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action] { Set-WinUtilTaskbaritem -state "None" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" } } } diff --git a/functions/public/Invoke-WPFImpex.ps1 b/functions/public/Invoke-WPFImpex.ps1 index 94bd9f1744..08a6138f4f 100644 --- a/functions/public/Invoke-WPFImpex.ps1 +++ b/functions/public/Invoke-WPFImpex.ps1 @@ -44,7 +44,14 @@ function Invoke-WPFImpex { try { $Config = ConfigDialog if ($Config) { - $jsonFile = Get-WinUtilCheckBoxes -unCheck $false | ConvertTo-Json + $allConfs = ($sync.selectedApps + $sync.selectedTweaks + $sync.selectedToggles + $sync.selectedFeatures) | ForEach-Object { [string]$_ } + if (-not $allConfs) { + [System.Windows.MessageBox]::Show( + "No settings are selected to export. Please select at least one app, tweak, toggle, or feature before exporting.", + "Nothing to Export", "OK", "Warning") + return + } + $jsonFile = $allConfs | ConvertTo-Json $jsonFile | Out-File $Config -Force "iex ""& { `$(irm https://christitus.com/win) } -Config '$Config'""" | Set-Clipboard } @@ -66,8 +73,36 @@ function Invoke-WPFImpex { Write-Error "Failed to load the JSON file from the specified path or URL: $_" return } - $flattenedJson = $jsonFile.PSObject.Properties.Where({ $_.Name -ne "Install" }).ForEach({ $_.Value }) - Invoke-WPFPresets -preset $flattenedJson -imported $true + # TODO how to handle old style? detected json type then flatten it in a func? + # $flattenedJson = $jsonFile.PSObject.Properties.Where({ $_.Name -ne "Install" }).ForEach({ $_.Value }) + $flattenedJson = $jsonFile + + if (-not $flattenedJson) { + [System.Windows.MessageBox]::Show( + "The selected file contains no settings to import. No changes have been made.", + "Empty Configuration", "OK", "Warning") + return + } + + # Clear all existing selections before importing so the import replaces + # the current state rather than merging with it + $sync.selectedApps = [System.Collections.Generic.List[string]]::new() + $sync.selectedTweaks = [System.Collections.Generic.List[string]]::new() + $sync.selectedToggles = [System.Collections.Generic.List[string]]::new() + $sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() + + Update-WinUtilSelections -flatJson $flattenedJson + + if (!$PARAM_NOUI) { + # Set flag so toggle Checked/Unchecked events don't trigger registry writes + # while we're programmatically restoring UI state from the imported config + $sync.ImportInProgress = $true + try { + Reset-WPFCheckBoxes -doToggles $true + } finally { + $sync.ImportInProgress = $false + } + } } } catch { Write-Error "An error occurred while importing: $_" diff --git a/functions/public/Invoke-WPFInstall.ps1 b/functions/public/Invoke-WPFInstall.ps1 index ef03af36da..3d052e3115 100644 --- a/functions/public/Invoke-WPFInstall.ps1 +++ b/functions/public/Invoke-WPFInstall.ps1 @@ -1,80 +1,55 @@ function Invoke-WPFInstall { <# - .SYNOPSIS Installs the selected programs using winget, if one or more of the selected programs are already installed on the system, winget will try and perform an upgrade if there's a newer version to install. - #> + $PackagesToInstall = $sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ } + + if($sync.ProcessRunning) { $msg = "[Invoke-WPFInstall] An Install process is currently running." [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) return } - $PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"] - Write-Host $PackagesToInstall if ($PackagesToInstall.Count -eq 0) { - $WarningMsg = "Please select the program(s) to install or upgrade" + $WarningMsg = "Please select the program(s) to install or upgrade." [System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) return } - $ChocoPreference = $($sync.WPFpreferChocolatey.IsChecked) - $installHandle = Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock { - param($PackagesToInstall, $ChocoPreference, $DebugPreference) - if ($PackagesToInstall.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) - } - $packagesWinget, $packagesChoco = { - $packagesWinget = [System.Collections.ArrayList]::new() - $packagesChoco = [System.Collections.ArrayList]::new() - foreach ($package in $PackagesToInstall) { - if ($ChocoPreference) { - if ($package.choco -eq "na") { - $packagesWinget.add($package.winget) - Write-Host "Queueing $($package.winget) for Winget install" - } else { - $null = $packagesChoco.add($package.choco) - Write-Host "Queueing $($package.choco) for Chocolatey install" - } - } - else { - if ($package.winget -eq "na") { - $packagesChoco.add($package.choco) - Write-Host "Queueing $($package.choco) for Chocolatey install" - } else { - $null = $packagesWinget.add($($package.winget)) - Write-Host "Queueing $($package.winget) for Winget install" - } - } - } - return $packagesWinget, $packagesChoco - }.Invoke($PackagesToInstall) + $ManagerPreference = $sync.preferences.packagemanager + + $handle = Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ManagerPreference", $ManagerPreference)) -ScriptBlock { + param($PackagesToInstall, $ManagerPreference) + + $packagesSorted = Get-WinUtilSelectedPackages -PackageList $PackagesToInstall -Preference $ManagerPreference + + $packagesWinget = $packagesSorted[[PackageManagers]::Winget] + $packagesChoco = $packagesSorted[[PackageManagers]::Choco] try { $sync.ProcessRunning = $true - $errorPackages = @() - if($packagesWinget.Count -gt 0) { + if($packagesWinget.Count -gt 0 -and $packagesWinget -ne "0") { + Show-WPFInstallAppBusy -text "Installing apps..." Install-WinUtilWinget Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget - } if($packagesChoco.Count -gt 0) { Install-WinUtilChoco Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco } + Hide-WPFInstallAppBusy Write-Host "===========================================" Write-Host "-- Installs have finished ---" Write-Host "===========================================" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } } catch { Write-Host "===========================================" Write-Host "Error: $_" Write-Host "===========================================" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -overlay "warning" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" -overlay "warning" } } $sync.ProcessRunning = $False } diff --git a/functions/public/Invoke-WPFInstallUpgrade.ps1 b/functions/public/Invoke-WPFInstallUpgrade.ps1 index c86ee12327..0f262a0d64 100644 --- a/functions/public/Invoke-WPFInstallUpgrade.ps1 +++ b/functions/public/Invoke-WPFInstallUpgrade.ps1 @@ -5,14 +5,14 @@ function Invoke-WPFInstallUpgrade { Invokes the function that upgrades all installed programs #> - if ($sync.WPFpreferChocolatey.IsChecked) { + if ($sync.ChocoRadioButton.IsChecked) { Install-WinUtilChoco $chocoUpgradeStatus = (Start-Process "choco" -ArgumentList "upgrade all -y" -Wait -PassThru -NoNewWindow).ExitCode if ($chocoUpgradeStatus -eq 0) { Write-Host "Upgrade Successful" } else{ - Write-Host "Error Occured. Return Code: $chocoUpgradeStatus" + Write-Host "Error Occurred. Return Code: $chocoUpgradeStatus" } } else{ diff --git a/functions/public/Invoke-WPFPanelDISM.ps1 b/functions/public/Invoke-WPFPanelDISM.ps1 deleted file mode 100644 index 31b36364d6..0000000000 --- a/functions/public/Invoke-WPFPanelDISM.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -function Invoke-WPFPanelDISM { - <# - - .SYNOPSIS - Checks for system corruption using Chkdsk, SFC, and DISM - - .DESCRIPTION - 1. Chkdsk - Fixes disk and filesystem corruption - 2. SFC Run 1 - Fixes system file corruption, and fixes DISM if it was corrupted - 3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted - 4. SFC Run 2 - Fixes system file corruption, this time with an almost guaranteed uncorrupted system image - - .NOTES - Command Arguments: - 1. Chkdsk - /Scan - Runs an online scan on the system drive, attempts to fix any corruption, and queues other corruption for fixing on reboot - 2. SFC - /ScanNow - Performs a scan of the system files and fixes any corruption - 3. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted - /Online - Fixes the currently running system image - /Cleanup-Image - Performs cleanup operations on the image, could remove some unneeded temporary files - /Restorehealth - Performs a scan of the image and fixes any corruption - - #> - Start-Process PowerShell -ArgumentList "Write-Host '(1/4) Chkdsk' -ForegroundColor Green; Chkdsk /scan; - Write-Host '`n(2/4) SFC - 1st scan' -ForegroundColor Green; sfc /scannow; - Write-Host '`n(3/4) DISM' -ForegroundColor Green; DISM /Online /Cleanup-Image /Restorehealth; - Write-Host '`n(4/4) SFC - 2nd scan' -ForegroundColor Green; sfc /scannow; - Read-Host '`nPress Enter to Continue'" -verb runas -} diff --git a/functions/public/Invoke-WPFPresets.ps1 b/functions/public/Invoke-WPFPresets.ps1 index 1535ffe5f6..2139c47ee9 100644 --- a/functions/public/Invoke-WPFPresets.ps1 +++ b/functions/public/Invoke-WPFPresets.ps1 @@ -2,10 +2,10 @@ function Invoke-WPFPresets { <# .SYNOPSIS - Sets the options in the tweaks panel to the given preset + Sets the checkboxes in winutil to the given preset .PARAMETER preset - The preset to set the options to + The preset to set the checkboxes to .PARAMETER imported If the preset is imported from a file, defaults to false @@ -17,7 +17,7 @@ function Invoke-WPFPresets { param ( [Parameter(position=0)] - [Array]$preset = "", + [Array]$preset = $null, [Parameter(position=1)] [bool]$imported = $false, @@ -32,33 +32,19 @@ function Invoke-WPFPresets { $CheckBoxesToCheck = $sync.configs.preset.$preset } - $CheckBoxes = ($sync.GetEnumerator()).where{ $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" -and $_.Name -like "$checkboxfilterpattern"} - Write-Debug "Getting checkboxes to set, number of checkboxes: $($CheckBoxes.Count)" - - if ($CheckBoxesToCheck -ne "") { - $debugMsg = "CheckBoxes to Check are: " - $CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " } - $debugMsg = $debugMsg -replace (',\s*$', '') - Write-Debug "$debugMsg" + # clear out the filtered pattern so applying a preset replaces the current + # state rather than merging with it + switch ($checkboxfilterpattern) { + "WPFTweak*" { $sync.selectedTweaks = [System.Collections.Generic.List[string]]::new() } + "WPFInstall*" { $sync.selectedApps = [System.Collections.Generic.List[string]]::new() } + "WPFeatures" { $sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() } + "WPFToggle" { $sync.selectedToggles = [System.Collections.Generic.List[string]]::new() } + default {} } - foreach ($CheckBox in $CheckBoxes) { - $checkboxName = $CheckBox.Key - - if (-not $CheckBoxesToCheck) { - $sync.$checkboxName.IsChecked = $false - continue - } - - # Check if the checkbox name exists in the flattened JSON hashtable - if ($CheckBoxesToCheck -contains $checkboxName) { - # If it exists, set IsChecked to true - $sync.$checkboxName.IsChecked = $true - Write-Debug "$checkboxName is checked" - } else { - # If it doesn't exist, set IsChecked to false - $sync.$checkboxName.IsChecked = $false - Write-Debug "$checkboxName is not checked" - } + if ($preset) { + Update-WinUtilSelections -flatJson $CheckBoxesToCheck } + + Reset-WPFCheckBoxes -doToggles $false -checkboxfilterpattern $checkboxfilterpattern } diff --git a/functions/public/Invoke-WPFRunAdobeCCCleanerTool.ps1 b/functions/public/Invoke-WPFRunAdobeCCCleanerTool.ps1 deleted file mode 100644 index 84768974c6..0000000000 --- a/functions/public/Invoke-WPFRunAdobeCCCleanerTool.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -function Invoke-WPFRunAdobeCCCleanerTool { - <# - .SYNOPSIS - It removes or fixes problem files and resolves permission issues in registry keys. - .DESCRIPTION - The Creative Cloud Cleaner tool is a utility for experienced users to clean up corrupted installations. - #> - - [string]$url="https://swupmf.adobe.com/webfeed/CleanerTool/win/AdobeCreativeCloudCleanerTool.exe" - - Write-Host "The Adobe Creative Cloud Cleaner tool is hosted at" - Write-Host "$url" - - try { - # Don't show the progress because it will slow down the download speed - $ProgressPreference='SilentlyContinue' - - Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -UseBasicParsing -ErrorAction SilentlyContinue -Verbose - - # Revert back the ProgressPreference variable to the default value since we got the file desired - $ProgressPreference='Continue' - - Start-Process -FilePath "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Wait -ErrorAction SilentlyContinue -Verbose - } catch { - Write-Error $_.Exception.Message - } finally { - if (Test-Path -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe") { - Write-Host "Cleaning up..." - Remove-Item -Path "$env:TEMP\AdobeCreativeCloudCleanerTool.exe" -Verbose - } - } -} diff --git a/functions/public/Invoke-WPFRunspace.ps1 b/functions/public/Invoke-WPFRunspace.ps1 index 67c01b8f3f..bccdd5df2a 100644 --- a/functions/public/Invoke-WPFRunspace.ps1 +++ b/functions/public/Invoke-WPFRunspace.ps1 @@ -27,8 +27,7 @@ function Invoke-WPFRunspace { Param ( $ScriptBlock, $ArgumentList, - $ParameterList, - $DebugPreference + $ParameterList ) # Create a PowerShell instance @@ -41,7 +40,7 @@ function Invoke-WPFRunspace { foreach ($parameter in $ParameterList) { $script:powershell.AddParameter($parameter[0], $parameter[1]) } - $script:powershell.AddArgument($DebugPreference) # Pass DebugPreference to the script block + $script:powershell.RunspacePool = $sync.runspace # Execute the RunspacePool diff --git a/functions/public/Invoke-WPFSSHServer.ps1 b/functions/public/Invoke-WPFSSHServer.ps1 index 503f867736..0ea6de59ad 100644 --- a/functions/public/Invoke-WPFSSHServer.ps1 +++ b/functions/public/Invoke-WPFSSHServer.ps1 @@ -6,7 +6,7 @@ function Invoke-WPFSSHServer { #> - Invoke-WPFRunspace -DebugPreference $DebugPreference -ScriptBlock { + Invoke-WPFRunspace -ScriptBlock { Invoke-WinUtilSSHServer diff --git a/functions/public/Invoke-WPFSelectedCheckboxesUpdate.ps1 b/functions/public/Invoke-WPFSelectedCheckboxesUpdate.ps1 new file mode 100644 index 0000000000..6bdee481f4 --- /dev/null +++ b/functions/public/Invoke-WPFSelectedCheckboxesUpdate.ps1 @@ -0,0 +1,95 @@ +function Invoke-WPFSelectedCheckboxesUpdate{ + <# + .SYNOPSIS + This is a helper function that is called by the Checked and Unchecked events of the Checkboxes. + It also Updates the "Selected Apps" selectedAppLabel on the Install Tab to represent the current collection + .PARAMETER type + Either: Add | Remove + .PARAMETER checkboxName + should contain the name of the current instance of the checkbox that triggered the Event. + Most of the time will be the automatic variable $this.Parent.Tag + .EXAMPLE + $checkbox.Add_Unchecked({Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $this.Parent.Tag}) + OR + Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $specificCheckbox.Parent.Tag + #> + param ( + $type, + $checkboxName + ) + + if (($type -ne "Add") -and ($type -ne "Remove")) + { + Write-Error "Type: $type not implemented" + return + } + + # Get the actual Name from the selectedAppLabel inside the Checkbox + $appKey = $checkboxName + $group = if ($appKey.StartsWith("WPFInstall")) { "Install" } + elseif ($appKey.StartsWith("WPFTweaks")) { "Tweaks" } + elseif ($appKey.StartsWith("WPFToggle")) { "Toggle" } + elseif ($appKey.StartsWith("WPFFeature")) { "Feature" } + else { "na" } + + switch ($group) { + "Install" { + if ($type -eq "Add") { + if (!$sync.selectedApps.Contains($appKey)) { + $sync.selectedApps.Add($appKey) + # The List type needs to be specified again, because otherwise Sort-Object will convert the list to a string if there is only a single entry + [System.Collections.Generic.List[string]]$sync.selectedApps = $sync.SelectedApps | Sort-Object + } + } + else{ + $sync.selectedApps.Remove($appKey) + } + + $count = $sync.SelectedApps.Count + $sync.WPFselectedAppsButton.Content = "Selected Apps: $count" + # On every change, remove all entries inside the Popup Menu. This is done, so we can keep the alphabetical order even if elements are selected in a random way + $sync.selectedAppsstackPanel.Children.Clear() + $sync.selectedApps | Foreach-Object { Add-SelectedAppsMenuItem -name $($sync.configs.applicationsHashtable.$_.Content) -key $_ } + } + "Tweaks" { + if ($type -eq "Add") { + if (!$sync.selectedTweaks.Contains($appKey)) { + $sync.selectedTweaks.Add($appKey) + } + } + else{ + $sync.selectedTweaks.Remove($appKey) + } + } + "Toggle" { + if ($type -eq "Add") { + if (!$sync.selectedToggles.Contains($appKey)) { + $sync.selectedToggles.Add($appKey) + } + } + else{ + $sync.selectedToggles.Remove($appKey) + } + } + "Feature" { + if ($type -eq "Add") { + if (!$sync.selectedFeatures.Contains($appKey)) { + $sync.selectedFeatures.Add($appKey) + } + } + else{ + $sync.selectedFeatures.Remove($appKey) + } + } + default { + Write-Host "Unknown group for checkbox: $($appKey)" + } + } + + Write-Debug "-------------------------------------" + Write-Debug "Selected Apps: $($sync.selectedApps)" + Write-Debug "Selected Tweaks: $($sync.selectedTweaks)" + Write-Debug "Selected Toggles: $($sync.selectedToggles)" + Write-Debug "Selected Features: $($sync.selectedFeatures)" + Write-Debug "--------------------------------------" +} diff --git a/functions/public/Invoke-WPFSystemRepair.ps1 b/functions/public/Invoke-WPFSystemRepair.ps1 new file mode 100644 index 0000000000..a44a5c0c25 --- /dev/null +++ b/functions/public/Invoke-WPFSystemRepair.ps1 @@ -0,0 +1,19 @@ +function Invoke-WPFSystemRepair { + <# + .SYNOPSIS + Checks for system corruption using SFC, and DISM + Checks for disk failure using Chkdsk + + .DESCRIPTION + 1. Chkdsk - Checks for disk errors, which can cause system file corruption and notifies of early disk failure + 2. SFC - scans protected system files for corruption and fixes them + 3. DISM - Repair a corrupted Windows operating system image + #> + + Start-Process cmd.exe -ArgumentList "/c chkdsk /scan /perf" -NoNewWindow -Wait + Start-Process cmd.exe -ArgumentList "/c sfc /scannow" -NoNewWindow -Wait + Start-Process cmd.exe -ArgumentList "/c dism /online /cleanup-image /restorehealth" -NoNewWindow -Wait + + Write-Host "==> Finished System Repair" + Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" +} diff --git a/functions/public/Invoke-WPFTab.ps1 b/functions/public/Invoke-WPFTab.ps1 index 15d64bbdd0..530a7dc2da 100644 --- a/functions/public/Invoke-WPFTab.ps1 +++ b/functions/public/Invoke-WPFTab.ps1 @@ -28,4 +28,31 @@ function Invoke-WPFTab { $sync.$tabNav.Items[$tabNumber].IsSelected = $true } } + $sync.currentTab = $sync.$tabNav.Items[$tabNumber].Header + + # Always reset the filter for the current tab + if ($sync.currentTab -eq "Install") { + # Reset Install tab filter + Find-AppsByNameOrDescription -SearchString "" + } elseif ($sync.currentTab -eq "Tweaks") { + # Reset Tweaks tab filter + Find-TweaksByNameOrDescription -SearchString "" + } + + # Show search bar in Install and Tweaks tabs + if ($tabNumber -eq 0 -or $tabNumber -eq 1) { + $sync.SearchBar.Visibility = "Visible" + $searchIcon = ($sync.Form.FindName("SearchBar").Parent.Children | Where-Object { $_ -is [System.Windows.Controls.TextBlock] -and $_.Text -eq [char]0xE721 })[0] + if ($searchIcon) { + $searchIcon.Visibility = "Visible" + } + } else { + $sync.SearchBar.Visibility = "Collapsed" + $searchIcon = ($sync.Form.FindName("SearchBar").Parent.Children | Where-Object { $_ -is [System.Windows.Controls.TextBlock] -and $_.Text -eq [char]0xE721 })[0] + if ($searchIcon) { + $searchIcon.Visibility = "Collapsed" + } + # Hide the clear button if it's visible + $sync.SearchBarClearButton.Visibility = "Collapsed" + } } diff --git a/functions/public/Invoke-WPFToggleAllCategories.ps1 b/functions/public/Invoke-WPFToggleAllCategories.ps1 new file mode 100644 index 0000000000..6b0745d175 --- /dev/null +++ b/functions/public/Invoke-WPFToggleAllCategories.ps1 @@ -0,0 +1,52 @@ +function Invoke-WPFToggleAllCategories { + <# + .SYNOPSIS + Expands or collapses all categories in the Install tab + + .PARAMETER Action + The action to perform: "Expand" or "Collapse" + + .DESCRIPTION + This function iterates through all category containers in the Install tab + and expands or collapses their WrapPanels while updating the toggle button labels + #> + + param( + [Parameter(Mandatory=$true)] + [ValidateSet("Expand", "Collapse")] + [string]$Action + ) + + try { + if ($null -eq $sync.ItemsControl) { + Write-Warning "ItemsControl not initialized" + return + } + + $targetVisibility = if ($Action -eq "Expand") { [Windows.Visibility]::Visible } else { [Windows.Visibility]::Collapsed } + $targetPrefix = if ($Action -eq "Expand") { "-" } else { "+" } + $sourcePrefix = if ($Action -eq "Expand") { "+" } else { "-" } + + # Iterate through all items in the ItemsControl + $sync.ItemsControl.Items | ForEach-Object { + $categoryContainer = $_ + + # Check if this is a category container (StackPanel with children) + if ($categoryContainer -is [System.Windows.Controls.StackPanel] -and $categoryContainer.Children.Count -ge 2) { + # Get the WrapPanel (second child) + $wrapPanel = $categoryContainer.Children[1] + $wrapPanel.Visibility = $targetVisibility + + # Update the label to show the correct state + $categoryLabel = $categoryContainer.Children[0] + if ($categoryLabel.Content -like "$sourcePrefix*") { + $escapedSourcePrefix = [regex]::Escape($sourcePrefix) + $categoryLabel.Content = $categoryLabel.Content -replace "^$escapedSourcePrefix ", "$targetPrefix " + } + } + } + } + catch { + Write-Error "Error toggling categories: $_" + } +} diff --git a/functions/public/Invoke-WPFTweakPS7.ps1 b/functions/public/Invoke-WPFTweakPS7.ps1 deleted file mode 100644 index 6b1959c276..0000000000 --- a/functions/public/Invoke-WPFTweakPS7.ps1 +++ /dev/null @@ -1,53 +0,0 @@ -function Invoke-WPFTweakPS7{ - <# - .SYNOPSIS - This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary - .PARAMETER action - PS7: Configures Powershell 7 to be the default Terminal - PS5: Configures Powershell 5 to be the default Terminal - #> - param ( - [ValidateSet("PS7", "PS5")] - [string]$action - ) - - switch ($action) { - "PS7"{ - if (Test-Path -Path "$env:ProgramFiles\PowerShell\7") { - Write-Host "Powershell 7 is already installed." - } else { - Write-Host "Installing Powershell 7..." - Install-WinUtilProgramWinget -Action Install -Programs @("Microsoft.PowerShell") - } - $targetTerminalName = "PowerShell" - } - "PS5"{ - $targetTerminalName = "Windows PowerShell" - } - } - # Check if the Windows Terminal is installed and return if not (Prerequisite for the following code) - if (-not (Get-Command "wt" -ErrorAction SilentlyContinue)) { - Write-Host "Windows Terminal not installed. Skipping Terminal preference" - return - } - # Check if the Windows Terminal settings.json file exists and return if not (Prereqisite for the following code) - $settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" - if (-not (Test-Path -Path $settingsPath)) { - Write-Host "Windows Terminal Settings file not found at $settingsPath" - return - } - - Write-Host "Settings file found." - $settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json - $ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName } - if ($ps7Profile) { - $settingsContent.defaultProfile = $ps7Profile.guid - $updatedSettings = $settingsContent | ConvertTo-Json -Depth 100 - Set-Content -Path $settingsPath -Value $updatedSettings - Write-Host "Default profile updated to " -NoNewline - Write-Host "$targetTerminalName " -ForegroundColor White -NoNewline - Write-Host "using the name attribute." - } else { - Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute." - } -} diff --git a/functions/public/Invoke-WPFUIElements.ps1 b/functions/public/Invoke-WPFUIElements.ps1 index 7b55b84367..df85084bf9 100644 --- a/functions/public/Invoke-WPFUIElements.ps1 +++ b/functions/public/Invoke-WPFUIElements.ps1 @@ -11,26 +11,26 @@ function Invoke-WPFUIElements { .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. + Future me/contributor: If possible, please wrap this into a runspace to make it load all panels at the same time. #> param( - [Parameter(Mandatory, position=0)] + [Parameter(Mandatory, Position = 0)] [PSCustomObject]$configVariable, - [Parameter(Mandatory, position=1)] + [Parameter(Mandatory, Position = 1)] [string]$targetGridName, - [Parameter(Mandatory, position=2)] + [Parameter(Mandatory, Position = 2)] [int]$columncount ) - $window = $sync["Form"] + $window = $sync.form - $theme = $sync.Form.Resources $borderstyle = $window.FindResource("BorderStyle") $HoverTextBlockStyle = $window.FindResource("HoverTextBlockStyle") $ColorfulToggleSwitchStyle = $window.FindResource("ColorfulToggleSwitchStyle") + $ToggleButtonStyle = $window.FindResource("ToggleButtonStyle") if (!$borderstyle -or !$HoverTextBlockStyle -or !$ColorfulToggleSwitchStyle) { throw "Failed to retrieve Styles using 'FindResource' from main window element." @@ -59,6 +59,8 @@ function Invoke-WPFUIElements { $configHashtable[$_] = $configVariable.$_ } + $radioButtonGroups = @{} + $organizedData = @{} # Iterate through JSON data and organize by panel and category foreach ($entry in $configHashtable.Keys) { @@ -66,19 +68,17 @@ function Invoke-WPFUIElements { # 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 + Name = $entry + Category = $entryInfo.Category + Content = $entryInfo.Content + Panel = if ($entryInfo.Panel) { $entryInfo.Panel } else { "0" } + Link = $entryInfo.link Description = $entryInfo.description - Type = $entryInfo.type - ComboItems = $entryInfo.ComboItems - Checked = $entryInfo.Checked + Type = $entryInfo.type + ComboItems = $entryInfo.ComboItems + Checked = $entryInfo.Checked ButtonWidth = $entryInfo.ButtonWidth + GroupName = $entryInfo.GroupName # Added for RadioButton groupings } if (-not $organizedData.ContainsKey($entryObject.Panel)) { @@ -92,15 +92,11 @@ function Invoke-WPFUIElements { # 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) - } - } + # Initialize panel count + $panelcount = 0 + # Iterate through 'organizedData' by panel, category, and application $count = 0 foreach ($panelKey in ($organizedData.Keys | Sort-Object)) { @@ -111,84 +107,62 @@ function Invoke-WPFUIElements { $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" - $border.Child = $stackPanel - $panelcount++ + # Use a DockPanel to contain the content + $dockPanelContainer = New-Object Windows.Controls.DockPanel + $border.Child = $dockPanelContainer - # Add Windows Version label if this is the updates panel - if ($targetGridName -eq "updatespanel") { - $windowsVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName - $versionLabel = New-Object Windows.Controls.Label - $versionLabel.Content = "Windows Version: $windowsVersion" - $versionLabel.FontSize = $theme.FontSize - $versionLabel.HorizontalAlignment = "Left" - $stackPanel.Children.Add($versionLabel) | Out-Null - } + # Create an ItemsControl for application content + $itemsControl = New-Object Windows.Controls.ItemsControl + $itemsControl.HorizontalAlignment = 'Stretch' + $itemsControl.VerticalAlignment = 'Stretch' + + # Set the ItemsPanel to a VirtualizingStackPanel + $itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate + $factory = New-Object Windows.FrameworkElementFactory ([Windows.Controls.VirtualizingStackPanel]) + $itemsPanelTemplate.VisualTree = $factory + $itemsControl.ItemsPanel = $itemsPanelTemplate + + # Set virtualization properties + $itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::IsVirtualizingProperty, $true) + $itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::VirtualizationModeProperty, [Windows.Controls.VirtualizationMode]::Recycling) + # Add the ItemsControl directly to the DockPanel + [Windows.Controls.DockPanel]::SetDock($itemsControl, [Windows.Controls.Dock]::Bottom) + $dockPanelContainer.Children.Add($itemsControl) | Out-Null + $panelcount++ + + # Now proceed with adding category labels and entries to $itemsControl 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" - [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" - $border.Child = $stackPanel - $panelcount++ - } - } $label = New-Object Windows.Controls.Label $label.Content = $category -replace ".*__", "" - $label.FontSize = $theme.HeadingFontSize - $label.FontFamily = $theme.HeaderFontFamily - $stackPanel.Children.Add($label) | Out-Null - + $label.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "HeaderFontSize") + $label.SetResourceReference([Windows.Controls.Control]::FontFamilyProperty, "HeaderFontFamily") + $label.UseLayoutRounding = $true + $itemsControl.Items.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 + # Sort entries by type (checkboxes first, then buttons, then comboboxes) and then alphabetically by Content + $entries = $organizedData[$panelKey][$category] | Sort-Object @{Expression = { + switch ($_.Type) { + 'Button' { 1 } + 'Combobox' { 2 } + default { 0 } + } + }}, Content 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" - [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" - $border.Child = $stackPanel - $panelcount++ - } - } - + # Create the UI elements based on the entry type switch ($entryInfo.Type) { "Toggle" { $dockPanel = New-Object Windows.Controls.DockPanel + [System.Windows.Automation.AutomationProperties]::SetName($dockPanel, $entryInfo.Content) $checkBox = New-Object Windows.Controls.CheckBox $checkBox.Name = $entryInfo.Name $checkBox.HorizontalAlignment = "Right" + $checkBox.UseLayoutRounding = $true + [System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content) $dockPanel.Children.Add($checkBox) | Out-Null $checkBox.Style = $ColorfulToggleSwitchStyle @@ -196,90 +170,125 @@ function Invoke-WPFUIElements { $label.Content = $entryInfo.Content $label.ToolTip = $entryInfo.Description $label.HorizontalAlignment = "Left" - $label.FontSize = $theme.FontSize + $label.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "FontSize") $label.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") + $label.UseLayoutRounding = $true $dockPanel.Children.Add($label) | Out-Null - $stackPanel.Children.Add($dockPanel) | Out-Null + $itemsControl.Items.Add($dockPanel) | Out-Null $sync[$entryInfo.Name] = $checkBox - - $sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name) - - $sync[$entryInfo.Name].Add_Checked({ - [System.Object]$Sender = $args[0] - Invoke-WinUtilTweaks $sender.name - }) - - $sync[$entryInfo.Name].Add_Unchecked({ - [System.Object]$Sender = $args[0] - Invoke-WinUtiltweaks $sender.name -undo $true - }) + if ($entryInfo.Name -eq "WPFToggleFOSSHighlight") { + if ($entryInfo.Checked -eq $true) { + $sync[$entryInfo.Name].IsChecked = $true + } + + $sync[$entryInfo.Name].Add_Checked({ + Invoke-WPFButton -Button "WPFToggleFOSSHighlight" + }) + $sync[$entryInfo.Name].Add_Unchecked({ + Invoke-WPFButton -Button "WPFToggleFOSSHighlight" + }) + } else { + $sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name) + + $sync[$entryInfo.Name].Add_Checked({ + [System.Object]$Sender = $args[0] + Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name + # Skip applying tweaks while an import is restoring toggle states + if (-not $sync.ImportInProgress) { + Invoke-WinUtilTweaks $Sender.name + } + }) + + $sync[$entryInfo.Name].Add_Unchecked({ + [System.Object]$Sender = $args[0] + Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $Sender.name + # Skip undoing tweaks while an import is restoring toggle states + if (-not $sync.ImportInProgress) { + Invoke-WinUtiltweaks $Sender.name -undo $true + } + }) + } } "ToggleButton" { - $toggleButton = New-Object Windows.Controls.ToggleButton + $toggleButton = New-Object Windows.Controls.Primitives.ToggleButton $toggleButton.Name = $entryInfo.Name - $toggleButton.Name = "WPFTab" + ($stackPanel.Children.Count + 1) + "BT" + $toggleButton.Content = $entryInfo.Content[1] + $toggleButton.ToolTip = $entryInfo.Description $toggleButton.HorizontalAlignment = "Left" - $toggleButton.Height = $theme.TabButtonHeight - $toggleButton.Width = $theme.TabButtonWidth - $toggleButton.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "ButtonInstallBackgroundColor") - $toggleButton.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor") - $toggleButton.FontWeight = [Windows.FontWeights]::Bold - - $textBlock = New-Object Windows.Controls.TextBlock - $textBlock.FontSize = $theme.TabButtonFontSize - $textBlock.Background = [Windows.Media.Brushes]::Transparent - $textBlock.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "ButtonInstallForegroundColor") - - $underline = New-Object Windows.Documents.Underline - $underline.Inlines.Add($entryInfo.name -replace "(.).*", "`$1") + $toggleButton.Style = $ToggleButtonStyle + [System.Windows.Automation.AutomationProperties]::SetName($toggleButton, $entryInfo.Content[0]) - $run = New-Object Windows.Documents.Run - $run.Text = $entryInfo.name -replace "^.", "" + $toggleButton.Tag = @{ + contentOn = if ($entryInfo.Content.Count -ge 1) { $entryInfo.Content[0] } else { "" } + contentOff = if ($entryInfo.Content.Count -ge 2) { $entryInfo.Content[1] } else { $contentOn } + } - $textBlock.Inlines.Add($underline) - $textBlock.Inlines.Add($run) + $itemsControl.Items.Add($toggleButton) | Out-Null - $toggleButton.Content = $textBlock + $sync[$entryInfo.Name] = $toggleButton - $stackPanel.Children.Add($toggleButton) | Out-Null + $sync[$entryInfo.Name].Add_Checked({ + $this.Content = $this.Tag.contentOn + }) - $sync[$entryInfo.Name] = $toggleButton + $sync[$entryInfo.Name].Add_Unchecked({ + $this.Content = $this.Tag.contentOff + }) } "Combobox" { $horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel.Orientation = "Horizontal" $horizontalStackPanel.Margin = "0,5,0,0" + [System.Windows.Automation.AutomationProperties]::SetName($horizontalStackPanel, $entryInfo.Content) $label = New-Object Windows.Controls.Label $label.Content = $entryInfo.Content $label.HorizontalAlignment = "Left" $label.VerticalAlignment = "Center" - $label.FontSize = $theme.ButtonFontSize + $label.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize") + $label.UseLayoutRounding = $true $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.SetResourceReference([Windows.Controls.Control]::HeightProperty, "ButtonHeight") + $comboBox.SetResourceReference([Windows.Controls.Control]::WidthProperty, "ButtonWidth") $comboBox.HorizontalAlignment = "Left" $comboBox.VerticalAlignment = "Center" - $comboBox.Margin = $theme.ButtonMargin + $comboBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "ButtonMargin") + $comboBox.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize") + $comboBox.UseLayoutRounding = $true + [System.Windows.Automation.AutomationProperties]::SetName($comboBox, $entryInfo.Content) foreach ($comboitem in ($entryInfo.ComboItems -split " ")) { $comboBoxItem = New-Object Windows.Controls.ComboBoxItem $comboBoxItem.Content = $comboitem - $comboBoxItem.FontSize = $theme.ButtonFontSize + $comboBoxItem.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize") + $comboBoxItem.UseLayoutRounding = $true $comboBox.Items.Add($comboBoxItem) | Out-Null } $horizontalStackPanel.Children.Add($comboBox) | Out-Null - $stackPanel.Children.Add($horizontalStackPanel) | Out-Null + $itemsControl.Items.Add($horizontalStackPanel) | Out-Null $comboBox.SelectedIndex = 0 + # Set initial text + if ($comboBox.Items.Count -gt 0) { + $comboBox.Text = $comboBox.Items[0].Content + } + + # Add SelectionChanged event handler to update the text property + $comboBox.Add_SelectionChanged({ + $selectedItem = $this.SelectedItem + if ($selectedItem) { + $this.Text = $selectedItem.Content + } + }) + $sync[$entryInfo.Name] = $comboBox } @@ -288,26 +297,68 @@ function Invoke-WPFUIElements { $button.Name = $entryInfo.Name $button.Content = $entryInfo.Content $button.HorizontalAlignment = "Left" - $button.Margin = $theme.ButtonMargin - $button.FontSize = $theme.ButtonFontSize + $button.SetResourceReference([Windows.Controls.Control]::MarginProperty, "ButtonMargin") + $button.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize") if ($entryInfo.ButtonWidth) { - $button.Width = $entryInfo.ButtonWidth + $baseWidth = [int]$entryInfo.ButtonWidth + $button.Width = [math]::Max($baseWidth, 350) } - $stackPanel.Children.Add($button) | Out-Null + [System.Windows.Automation.AutomationProperties]::SetName($button, $entryInfo.Content) + $itemsControl.Items.Add($button) | Out-Null $sync[$entryInfo.Name] = $button } + "RadioButton" { + # Check if a container for this GroupName already exists + if (-not $radioButtonGroups.ContainsKey($entryInfo.GroupName)) { + # Create a StackPanel for this group + $groupStackPanel = New-Object Windows.Controls.StackPanel + $groupStackPanel.Orientation = "Vertical" + [System.Windows.Automation.AutomationProperties]::SetName($groupStackPanel, $entryInfo.GroupName) + + # Add the group container to the ItemsControl + $itemsControl.Items.Add($groupStackPanel) | Out-Null + } + else { + # Retrieve the existing group container + $groupStackPanel = $radioButtonGroups[$entryInfo.GroupName] + } + + # Create the RadioButton + $radioButton = New-Object Windows.Controls.RadioButton + $radioButton.Name = $entryInfo.Name + $radioButton.GroupName = $entryInfo.GroupName + $radioButton.Content = $entryInfo.Content + $radioButton.HorizontalAlignment = "Left" + $radioButton.SetResourceReference([Windows.Controls.Control]::MarginProperty, "CheckBoxMargin") + $radioButton.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "ButtonFontSize") + $radioButton.ToolTip = $entryInfo.Description + $radioButton.UseLayoutRounding = $true + [System.Windows.Automation.AutomationProperties]::SetName($radioButton, $entryInfo.Content) + + if ($entryInfo.Checked -eq $true) { + $radioButton.IsChecked = $true + } + + # Add the RadioButton to the group container + $groupStackPanel.Children.Add($radioButton) | Out-Null + $sync[$entryInfo.Name] = $radioButton + } + default { $horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel.Orientation = "Horizontal" + [System.Windows.Automation.AutomationProperties]::SetName($horizontalStackPanel, $entryInfo.Content) $checkBox = New-Object Windows.Controls.CheckBox $checkBox.Name = $entryInfo.Name $checkBox.Content = $entryInfo.Content - $checkBox.FontSize = $theme.FontSize + $checkBox.SetResourceReference([Windows.Controls.Control]::FontSizeProperty, "FontSize") $checkBox.ToolTip = $entryInfo.Description - $checkBox.Margin = $theme.CheckBoxMargin + $checkBox.SetResourceReference([Windows.Controls.Control]::MarginProperty, "CheckBoxMargin") + $checkBox.UseLayoutRounding = $true + [System.Windows.Automation.AutomationProperties]::SetName($checkBox, $entryInfo.Content) if ($entryInfo.Checked -eq $true) { $checkBox.IsChecked = $entryInfo.Checked } @@ -319,14 +370,25 @@ function Invoke-WPFUIElements { $textBlock.Text = "(?)" $textBlock.ToolTip = $entryInfo.Link $textBlock.Style = $HoverTextBlockStyle + $textBlock.UseLayoutRounding = $true $horizontalStackPanel.Children.Add($textBlock) | Out-Null $sync[$textBlock.Name] = $textBlock } - $stackPanel.Children.Add($horizontalStackPanel) | Out-Null + $itemsControl.Items.Add($horizontalStackPanel) | Out-Null $sync[$entryInfo.Name] = $checkBox + + $sync[$entryInfo.Name].Add_Checked({ + [System.Object]$Sender = $args[0] + Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name + }) + + $sync[$entryInfo.Name].Add_Unchecked({ + [System.Object]$Sender = $args[0] + Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkbox $Sender.name + }) } } } diff --git a/functions/public/Invoke-WPFUIThread.ps1 b/functions/public/Invoke-WPFUIThread.ps1 new file mode 100644 index 0000000000..d5c1a46586 --- /dev/null +++ b/functions/public/Invoke-WPFUIThread.ps1 @@ -0,0 +1,21 @@ +function Invoke-WPFUIThread { + <# + + .SYNOPSIS + Creates and runs a task on Winutil's WPF Forms thread. + + .PARAMETER ScriptBlock + The scriptblock to invoke in the thread + #> + + [CmdletBinding()] + Param ( + $ScriptBlock + ) + + if ($PARAM_NOUI) { + return; + } + + $sync.form.Dispatcher.Invoke([action]$ScriptBlock) +} diff --git a/functions/public/Invoke-WPFUltimatePerformance.ps1 b/functions/public/Invoke-WPFUltimatePerformance.ps1 index 8fe24c9522..2d7cc5a438 100644 --- a/functions/public/Invoke-WPFUltimatePerformance.ps1 +++ b/functions/public/Invoke-WPFUltimatePerformance.ps1 @@ -1,75 +1,35 @@ -Function Invoke-WPFUltimatePerformance { - <# - - .SYNOPSIS - Enables or disables the Ultimate Performance power scheme based on its GUID. - - .PARAMETER State - Specifies whether to "Enable" or "Disable" the Ultimate Performance power scheme. - - #> - param($State) - - try { - # GUID of the Ultimate Performance power plan - $ultimateGUID = "e9a42b02-d5df-448d-aa00-03f14749eb61" - - if ($State -eq "Enable") { - # Duplicate the Ultimate Performance power plan using its GUID - $duplicateOutput = powercfg /duplicatescheme $ultimateGUID - - $guid = $null - $nameFromFile = "ChrisTitus - Ultimate Power Plan" - $description = "Ultimate Power Plan, added via WinUtils" - - # Extract the new GUID from the duplicateOutput - foreach ($line in $duplicateOutput) { - if ($line -match "\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b") { - $guid = $matches[0] # $matches[0] will contain the first match, which is the GUID - Write-Output "GUID: $guid has been extracted and stored in the variable." - break +function Invoke-WPFUltimatePerformance { + param( + [switch]$Do + ) + + if ($Do) { + if (-not (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan")) { + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + powercfg /restoredefaultschemes + if (-not (powercfg /list | Select-String "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c")) { + Write-Host "Failed to restore High Performance plan. Default plans do not include high performance. If you are on a laptop, do NOT use High Performance or Ultimate Performance plans." -ForegroundColor Red + return } } - - if (-not $guid) { - Write-Output "No GUID found in the duplicateOutput. Check the output format." - exit 1 - } - - # Change the name of the power plan and set its description - $changeNameOutput = powercfg /changename $guid "$nameFromFile" "$description" - Write-Output "The power plan name and description have been changed. Output:" - Write-Output $changeNameOutput - - # Set the duplicated Ultimate Performance plan as active - $setActiveOutput = powercfg /setactive $guid - Write-Output "The power plan has been set as active. Output:" - Write-Output $setActiveOutput - - Write-Host "> Ultimate Performance plan installed and set as active." - - } elseif ($State -eq "Disable") { - # Check if the Ultimate Performance plan is installed by GUID - $installedPlan = (powercfg -list | Select-String -Pattern "ChrisTitus - Ultimate Power Plan").Line.Split()[3] - - if ($installedPlan) { - # Extract the GUID of the installed Ultimate Performance plan - $ultimatePlanGUID = $installedPlan.Line.Split()[3] - - # Set a different power plan as active before deleting the Ultimate Performance plan - $balancedPlanGUID = 381b4222-f694-41f0-9685-ff5bb260df2e - powercfg -setactive $balancedPlanGUID - - # Delete the Ultimate Performance plan by GUID - powercfg -delete $ultimatePlanGUID - - Write-Host "Ultimate Performance plan has been uninstalled." - Write-Host "> Balanced plan is now active." - } else { - Write-Host "Ultimate Performance plan is not installed." - } + $guid = ((powercfg /duplicatescheme 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c) -split '\s+')[3] + powercfg /changename $guid "ChrisTitus - Ultimate Power Plan" + powercfg /setacvalueindex $guid SUB_PROCESSOR IDLEDISABLE 1 + powercfg /setacvalueindex $guid 54533251-82be-4824-96c1-47b60b740d00 4d2b0152-7d5c-498b-88e2-34345392a2c5 1 + powercfg /setacvalueindex $guid SUB_PROCESSOR PROCTHROTTLEMIN 100 + powercfg /setactive $guid + Write-Host "ChrisTitus - Ultimate Power Plan plan installed and activated." -ForegroundColor Green + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is already installed." -ForegroundColor Red + return + } + } else { + if (powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan") { + powercfg /setactive SCHEME_BALANCED + powercfg /delete ((powercfg /list | Select-String "ChrisTitus - Ultimate Power Plan").ToString().Split()[3]) + Write-Host "ChrisTitus - Ultimate Power Plan plan was removed." -ForegroundColor Red + } else { + Write-Host "ChrisTitus - Ultimate Power Plan plan is not installed." -ForegroundColor Yellow } - } catch { - Write-Error "Error occurred: $_" } } diff --git a/functions/public/Invoke-WPFUnInstall.ps1 b/functions/public/Invoke-WPFUnInstall.ps1 index 7180ecf20e..1110faeacb 100644 --- a/functions/public/Invoke-WPFUnInstall.ps1 +++ b/functions/public/Invoke-WPFUnInstall.ps1 @@ -1,9 +1,12 @@ function Invoke-WPFUnInstall { + param( + [Parameter(Mandatory=$false)] + [PSObject[]]$PackagesToUninstall = $($sync.selectedApps | Foreach-Object { $sync.configs.applicationsHashtable.$_ }) + ) <# .SYNOPSIS Uninstalls the selected programs - #> if($sync.ProcessRunning) { @@ -12,9 +15,7 @@ function Invoke-WPFUnInstall { return } - $PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"] - - if ($PackagesToInstall.Count -eq 0) { + if ($PackagesToUninstall.Count -eq 0) { $WarningMsg = "Please select the program(s) to uninstall" [System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) return @@ -22,68 +23,43 @@ function Invoke-WPFUnInstall { $ButtonType = [System.Windows.MessageBoxButton]::YesNo $MessageboxTitle = "Are you sure?" - $Messageboxbody = ("This will uninstall the following applications: `n $($PackagesToInstall | Format-Table | Out-String)") + $Messageboxbody = ("This will uninstall the following applications: `n $($PackagesToUninstall | Select-Object Name, Description| Out-String)") $MessageIcon = [System.Windows.MessageBoxImage]::Information $confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) if($confirm -eq "No") {return} - $ChocoPreference = $($sync.WPFpreferChocolatey.IsChecked) - Invoke-WPFRunspace -ArgumentList @(("PackagesToInstall", $PackagesToInstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock { - param($PackagesToInstall, $ChocoPreference, $DebugPreference) - if ($PackagesToInstall.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) - } - $packagesWinget, $packagesChoco = { - $packagesWinget = [System.Collections.ArrayList]::new() - $packagesChoco = [System.Collections.ArrayList]::new() + $ManagerPreference = $sync.preferences.packagemanager - foreach ($package in $PackagesToInstall) { - if ($ChocoPreference) { - if ($package.choco -eq "na") { - $packagesWinget.add($package.winget) - Write-Host "Queueing $($package.winget) for Winget uninstall" - } else { - $null = $packagesChoco.add($package.choco) - Write-Host "Queueing $($package.choco) for Chocolatey uninstall" - } - } - else { - if ($package.winget -eq "na") { - $packagesChoco.add($package.choco) - Write-Host "Queueing $($package.choco) for Chocolatey uninstall" - } else { - $null = $packagesWinget.add($($package.winget)) - Write-Host "Queueing $($package.winget) for Winget uninstall" - } - } - } - return $packagesWinget, $packagesChoco - }.Invoke($PackagesToInstall) + Invoke-WPFRunspace -ParameterList @(("PackagesToUninstall", $PackagesToUninstall),("ManagerPreference", $ManagerPreference)) -ScriptBlock { + param($PackagesToUninstall, $ManagerPreference) + + $packagesSorted = Get-WinUtilSelectedPackages -PackageList $PackagesToUninstall -Preference $ManagerPreference + $packagesWinget = $packagesSorted[[PackageManagers]::Winget] + $packagesChoco = $packagesSorted[[PackageManagers]::Choco] try { $sync.ProcessRunning = $true + Show-WPFInstallAppBusy -text "Uninstalling apps..." - # Install all selected programs in new window + # Uninstall all selected programs in new window if($packagesWinget.Count -gt 0) { Install-WinUtilProgramWinget -Action Uninstall -Programs $packagesWinget } if($packagesChoco.Count -gt 0) { Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco } - + Hide-WPFInstallAppBusy Write-Host "===========================================" Write-Host "-- Uninstalls have finished ---" Write-Host "===========================================" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } } catch { Write-Host "===========================================" Write-Host "Error: $_" Write-Host "===========================================" - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Error" -overlay "warning" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Error" -overlay "warning" } } $sync.ProcessRunning = $False diff --git a/functions/public/Invoke-WPFUpdatesdefault.ps1 b/functions/public/Invoke-WPFUpdatesdefault.ps1 index 0b8403c651..afb7609fdc 100644 --- a/functions/public/Invoke-WPFUpdatesdefault.ps1 +++ b/functions/public/Invoke-WPFUpdatesdefault.ps1 @@ -5,61 +5,52 @@ function Invoke-WPFUpdatesdefault { Resets Windows Update settings to default #> - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 0 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 3 - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1 + $ErrorActionPreference = 'SilentlyContinue' + + Write-Host "Removing Windows Update policy settings..." -ForegroundColor Green + + Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Recurse -Force + Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Recurse -Force + Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Recurse -Force + Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Recurse -Force + Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Recurse -Force + Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Recurse -Force + + Write-Host "Reenabling Windows Update Services..." -ForegroundColor Green - $services = @( - "BITS" - "wuauserv" - ) + Write-Host "Restored BITS to Manual" + Set-Service -Name BITS -StartupType Manual - foreach ($service in $services) { - # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist + Write-Host "Restored wuauserv to Manual" + Set-Service -Name wuauserv -StartupType Manual - Write-Host "Setting $service StartupType to Automatic" - Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic + Write-Host "Restored UsoSvc to Automatic" + Start-Service -Name UsoSvc + Set-Service -Name UsoSvc -StartupType Automatic + + Write-Host "Restored WaaSMedicSvc to Manual" + Set-Service -Name WaaSMedicSvc -StartupType Manual + + Write-Host "Enabling update related scheduled tasks..." -ForegroundColor Green + + $Tasks = + '\Microsoft\Windows\InstallService\*', + '\Microsoft\Windows\UpdateOrchestrator\*', + '\Microsoft\Windows\UpdateAssistant\*', + '\Microsoft\Windows\WaaSMedic\*', + '\Microsoft\Windows\WindowsUpdate\*', + '\Microsoft\WindowsUpdate\*' + + foreach ($Task in $Tasks) { + Get-ScheduledTask -TaskPath $Task | Enable-ScheduledTask -ErrorAction SilentlyContinue } - Write-Host "Enabling driver offering through Windows Update..." - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue - Write-Host "Enabling Windows Update automatic restart..." - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue - Write-Host "Enabled driver offering through Windows Update" - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue - Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -ErrorAction SilentlyContinue - Write-Host "===================================================" - Write-Host "--- Windows Update Settings Reset to Default ---" - Write-Host "===================================================" - Start-Process -FilePath "secedit" -ArgumentList "/configure /cfg $env:windir\inf\defltbase.inf /db defltbase.sdb /verbose" -Wait - Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicyUsers" -Wait - Start-Process -FilePath "cmd.exe" -ArgumentList "/c RD /S /Q $env:WinDir\System32\GroupPolicy" -Wait - Start-Process -FilePath "gpupdate" -ArgumentList "/force" -Wait - Remove-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKCU:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKCU:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\Microsoft\WindowsSelfHost" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Write-Host "Windows Local Policies Reset to Default" + secedit /configure /cfg "$Env:SystemRoot\inf\defltbase.inf" /db defltbase.sdb + + Write-Host "===================================================" -ForegroundColor Green + Write-Host "--- Windows Update Settings Reset to Default ---" -ForegroundColor Green + Write-Host "===================================================" -ForegroundColor Green - Write-Host "===================================================" - Write-Host "--- Windows Local Policies Reset to Default ---" - Write-Host "===================================================" + Write-Host "Note: You must restart your system in order for all changes to take effect." -ForegroundColor Yellow } diff --git a/functions/public/Invoke-WPFUpdatesdisable.ps1 b/functions/public/Invoke-WPFUpdatesdisable.ps1 index d3f2881563..37c412fd72 100644 --- a/functions/public/Invoke-WPFUpdatesdisable.ps1 +++ b/functions/public/Invoke-WPFUpdatesdisable.ps1 @@ -8,28 +8,47 @@ function Invoke-WPFUpdatesdisable { Disabling Windows Update is not recommended. This is only for advanced users who know what they are doing. #> - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null - } + $ErrorActionPreference = 'SilentlyContinue' + + Write-Host "Configuring registry settings..." -ForegroundColor Yellow + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 1 - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null - } + + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0 - $services = @( - "BITS" - "wuauserv" - ) + Write-Host "Disabled BITS Service" + Set-Service -Name BITS -StartupType Disabled + + Write-Host "Disabled wuauserv Service" + Set-Service -Name wuauserv -StartupType Disabled - foreach ($service in $services) { - # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist + Write-Host "Disabled UsoSvc Service" + Stop-Service -Name UsoSvc -Force + Set-Service -Name UsoSvc -StartupType Disabled - Write-Host "Setting $service StartupType to Disabled" - Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled + Remove-Item "C:\Windows\SoftwareDistribution\*" -Recurse -Force + Write-Host "Cleared SoftwareDistribution folder" + + Write-Host "Disabling update related scheduled tasks..." -ForegroundColor Yellow + + $Tasks = + '\Microsoft\Windows\InstallService\*', + '\Microsoft\Windows\UpdateOrchestrator\*', + '\Microsoft\Windows\UpdateAssistant\*', + '\Microsoft\Windows\WaaSMedic\*', + '\Microsoft\Windows\WindowsUpdate\*', + '\Microsoft\WindowsUpdate\*' + + foreach ($Task in $Tasks) { + Get-ScheduledTask -TaskPath $Task | Disable-ScheduledTask -ErrorAction SilentlyContinue } - Write-Host "=================================" - Write-Host "--- Updates ARE DISABLED ---" - Write-Host "=================================" + + Write-Host "=================================" -ForegroundColor Green + Write-Host "--- Updates Are Disabled ---" -ForegroundColor Green + Write-Host "=================================" -ForegroundColor Green + + Write-Host "Note: You must restart your system in order for all changes to take effect." -ForegroundColor Yellow } diff --git a/functions/public/Invoke-WPFUpdatessecurity.ps1 b/functions/public/Invoke-WPFUpdatessecurity.ps1 index ed7fe937cd..6306189583 100644 --- a/functions/public/Invoke-WPFUpdatessecurity.ps1 +++ b/functions/public/Invoke-WPFUpdatessecurity.ps1 @@ -12,42 +12,36 @@ function Invoke-WPFUpdatessecurity { 5. Defers quality updates for 4 days #> + Write-Host "Disabling driver offering through Windows Update..." - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value 1 - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value 1 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value 1 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value 0 - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value 1 - Write-Host "Disabling Windows Update automatic restart..." - If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { - New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Type DWord -Value 1 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -Type DWord -Value 0 - Write-Host "Disabled driver offering through Windows Update" - If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings")) { - New-Item -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Force | Out-Null - } - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 20 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 365 - Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -Type DWord -Value 4 - - $ButtonType = [System.Windows.MessageBoxButton]::OK - $MessageboxTitle = "Set Security Updates" - $Messageboxbody = ("Recommended Update settings loaded") - $MessageIcon = [System.Windows.MessageBoxImage]::Information - - [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) - Write-Host "=================================" - Write-Host "-- Updates Set to Recommended ---" - Write-Host "=================================" + + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value 1 + + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Force + + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value 0 + + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value 1 + + Write-Host "Setting cumulative updates back by 1 year and security updates by 4 days" + + New-Item -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Force + + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -Type DWord -Value 20 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -Type DWord -Value 365 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -Type DWord -Value 4 + + Write-Host "Disabling Windows Update automatic restart..." + + New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Type DWord -Value 1 + Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -Type DWord -Value 0 + + Write-Host "=================================" + Write-Host "-- Updates Set to Recommended ---" + Write-Host "=================================" } diff --git a/functions/public/Invoke-WPFtweaksbutton.ps1 b/functions/public/Invoke-WPFtweaksbutton.ps1 index d0a5319086..192ca28411 100644 --- a/functions/public/Invoke-WPFtweaksbutton.ps1 +++ b/functions/public/Invoke-WPFtweaksbutton.ps1 @@ -12,11 +12,15 @@ function Invoke-WPFtweaksbutton { return } - $Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"] + $Tweaks = $sync.selectedTweaks + $dnsProvider = $sync["WPFchangedns"].text + $restorePointTweak = "WPFTweaksRestorePoint" + $restorePointSelected = $Tweaks -contains $restorePointTweak + $tweaksToRun = @($Tweaks | Where-Object { $_ -ne $restorePointTweak }) + $totalSteps = [Math]::Max($Tweaks.Count, 1) + $completedSteps = 0 - Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text - - if ($tweaks.count -eq 0 -and $sync["WPFchangedns"].text -eq "Default") { + if ($tweaks.count -eq 0 -and $dnsProvider -eq "Default") { $msg = "Please check the tweaks you wish to perform." [System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning) return @@ -24,39 +28,59 @@ function Invoke-WPFtweaksbutton { Write-Debug "Number of tweaks to process: $($Tweaks.Count)" - # The leading "," in the ParameterList is nessecary because we only provide one argument and powershell cannot be convinced that we want a nested loop with only one argument otherwise - $tweaksHandle = Invoke-WPFRunspace -ParameterList @(,("tweaks",$tweaks)) -DebugPreference $DebugPreference -ScriptBlock { - param( - $tweaks, - $DebugPreference - ) + if ($restorePointSelected) { + $sync.ProcessRunning = $true + + if ($Tweaks.Count -eq 1) { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" } + } else { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" } + } + + Set-WinUtilProgressBar -Label "Creating restore point" -Percent 0 + Invoke-WinUtilTweaks $restorePointTweak + $completedSteps = 1 + + if ($tweaksToRun.Count -eq 0 -and $dnsProvider -eq "Default") { + Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100 + $sync.ProcessRunning = $false + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } + Write-Host "=================================" + Write-Host "-- Tweaks are Finished ---" + Write-Host "=================================" + return + } + } + + # The leading "," in the ParameterList is necessary because we only provide one argument and powershell cannot be convinced that we want a nested loop with only one argument otherwise + $handle = Invoke-WPFRunspace -ParameterList @(("tweaks", $tweaksToRun), ("dnsProvider", $dnsProvider), ("completedSteps", $completedSteps), ("totalSteps", $totalSteps)) -ScriptBlock { + param($tweaks, $dnsProvider, $completedSteps, $totalSteps) Write-Debug "Inside Number of tweaks to process: $($Tweaks.Count)" $sync.ProcessRunning = $true - if ($Tweaks.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) - } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) + if ($completedSteps -eq 0) { + if ($Tweaks.count -eq 1) { + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" } + } else { + Invoke-WPFUIThread -ScriptBlock{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" } + } } - # Execute other selected tweaks - for ($i = 0; $i -lt $Tweaks.Count; $i++) { - Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($i / $tweaks.Count * 100) + Set-WinUtilDNS -DNSProvider $dnsProvider + + for ($i = 0; $i -lt $tweaks.Count; $i++) { + Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($completedSteps / $totalSteps * 100) Invoke-WinUtilTweaks $tweaks[$i] - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$Tweaks.Count) }) + $completedSteps++ + $progress = $completedSteps / $totalSteps + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value $progress } } Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100 $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } Write-Host "=================================" Write-Host "-- Tweaks are Finished ---" Write-Host "=================================" - - # $ButtonType = [System.Windows.MessageBoxButton]::OK - # $MessageboxTitle = "Tweaks are Finished " - # $Messageboxbody = ("Done") - # $MessageIcon = [System.Windows.MessageBoxImage]::Information - # [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) } } diff --git a/functions/public/Invoke-WPFundoall.ps1 b/functions/public/Invoke-WPFundoall.ps1 index cb3ce7ba23..6bde6d1304 100644 --- a/functions/public/Invoke-WPFundoall.ps1 +++ b/functions/public/Invoke-WPFundoall.ps1 @@ -12,7 +12,7 @@ function Invoke-WPFundoall { return } - $tweaks = (Get-WinUtilCheckBoxes)["WPFtweaks"] + $tweaks = $sync.selectedTweaks if ($tweaks.count -eq 0) { $msg = "Please check the tweaks you wish to undo." @@ -20,26 +20,26 @@ function Invoke-WPFundoall { return } - Invoke-WPFRunspace -ArgumentList $tweaks -DebugPreference $DebugPreference -ScriptBlock { - param($tweaks, $DebugPreference) + Invoke-WPFRunspace -ArgumentList $tweaks -ScriptBlock { + param($tweaks) $sync.ProcessRunning = $true if ($tweaks.count -eq 1) { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" } } else { - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" } } for ($i = 0; $i -lt $tweaks.Count; $i++) { Set-WinUtilProgressBar -Label "Undoing $($tweaks[$i])" -Percent ($i / $tweaks.Count * 100) Invoke-WinUtiltweaks $tweaks[$i] -undo $true - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$tweaks.Count) }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -value ($i/$tweaks.Count) } } Set-WinUtilProgressBar -Label "Undo Tweaks Finished" -Percent 100 $sync.ProcessRunning = $false - $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" }) + Invoke-WPFUIThread -ScriptBlock { Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" } Write-Host "==================================" Write-Host "--- Undo Tweaks are Finished ---" Write-Host "==================================" diff --git a/functions/public/Invoke-WinUtilAutoRun.ps1 b/functions/public/Invoke-WinUtilAutoRun.ps1 new file mode 100644 index 0000000000..022dae2263 --- /dev/null +++ b/functions/public/Invoke-WinUtilAutoRun.ps1 @@ -0,0 +1,48 @@ +function Invoke-WinUtilAutoRun { + <# + + .SYNOPSIS + Runs Install, Tweaks, and Features with optional UI invocation. + #> + + function BusyWait { + Start-Sleep -Seconds 5 + while ($sync.ProcessRunning) { + Start-Sleep -Seconds 5 + } + } + + BusyWait + + Write-Host "Applying tweaks..." + Invoke-WPFtweaksbutton + BusyWait + + Write-Host "Applying toggles..." + $handle = Invoke-WPFRunspace -ScriptBlock { + $Toggles = $sync.selectedToggles + Write-Debug "Inside Number of toggles to process: $($Toggles.Count)" + + $sync.ProcessRunning = $true + + for ($i = 0; $i -lt $Tweaks.Count; $i++) { + Invoke-WinUtilTweaks $Toggles[$i] + } + + $sync.ProcessRunning = $false + Write-Host "=================================" + Write-Host "-- Toggles are Finished ---" + Write-Host "=================================" + } + BusyWait + + Write-Host "Applying features..." + Invoke-WPFFeatureInstall + BusyWait + + Write-Host "Installing applications..." + Invoke-WPFInstall + BusyWait + + Write-Host "Done." +} diff --git a/functions/public/Invoke-WinUtilRemoveEdge.ps1 b/functions/public/Invoke-WinUtilRemoveEdge.ps1 new file mode 100644 index 0000000000..def31d7fc7 --- /dev/null +++ b/functions/public/Invoke-WinUtilRemoveEdge.ps1 @@ -0,0 +1,8 @@ +function Invoke-WinUtilRemoveEdge { + $Path = Get-ChildItem -Path "$Env:ProgramFiles (x86)\Microsoft\Edge\Application\*\Installer\setup.exe" | Select-Object -First 1 + + New-Item -Path "$Env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe" -Force + Start-Process -FilePath $Path -ArgumentList '--uninstall --system-level --force-uninstall --delete-profile' -Wait + + Write-Host "Microsoft Edge was removed" -ForegroundColor Green +} diff --git a/functions/public/Show-CTTLogo.ps1 b/functions/public/Show-CTTLogo.ps1 new file mode 100644 index 0000000000..dea16fff20 --- /dev/null +++ b/functions/public/Show-CTTLogo.ps1 @@ -0,0 +1,38 @@ +Function Show-CTTLogo { + <# + .SYNOPSIS + Displays the CTT logo in ASCII art. + .DESCRIPTION + This function displays the CTT logo in ASCII art format. + .PARAMETER None + No parameters are required for this function. + .EXAMPLE + Show-CTTLogo + Prints the CTT logo in ASCII art format to the console. + #> + + $asciiArt = @" + CCCCCCCCCCCCCTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT + CCC::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T +CC:::::::::::::::CT:::::::::::::::::::::TT:::::::::::::::::::::T +C:::::CCCCCCCC::::CT:::::TT:::::::TT:::::TT:::::TT:::::::TT:::::T +C:::::C CCCCCCTTTTTT T:::::T TTTTTTTTTTTT T:::::T TTTTTT +C:::::C T:::::T T:::::T +C:::::C T:::::T T:::::T +C:::::C T:::::T T:::::T +C:::::C T:::::T T:::::T +C:::::C T:::::T T:::::T +C:::::C T:::::T T:::::T +C:::::C CCCCCC T:::::T T:::::T +C:::::CCCCCCCC::::C TT:::::::TT TT:::::::TT +CC:::::::::::::::C T:::::::::T T:::::::::T +CCC::::::::::::C T:::::::::T T:::::::::T + CCCCCCCCCCCCC TTTTTTTTTTT TTTTTTTTTTT + +====Chris Titus Tech===== +=====Windows Toolbox===== +"@ + + Write-Host $asciiArt +} + diff --git a/overrides/main.html b/overrides/main.html index c8d5a4138f..60fb8ea733 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -3,7 +3,6 @@ {% 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. <strong>Announcement:</strong> We are currently reworking the docs to use Hugo rather then mkdocs. </div> {% endblock %} diff --git a/releases/oscdimg.exe b/releases/oscdimg.exe deleted file mode 100644 index 3270677f84..0000000000 Binary files a/releases/oscdimg.exe and /dev/null differ diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 785f55e746..fecee8ebca 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -1,16 +1,31 @@ +# Create enums +Add-Type @" +public enum PackageManagers +{ + Winget, + Choco +} +"@ + # SPDX-License-Identifier: MIT # Set the maximum number of threads for the RunspacePool to the number of threads on the machine $maxthreads = [int]$env:NUMBER_OF_PROCESSORS # Create a new session state for parsing variables into our runspace $hashVars = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'sync',$sync,$Null +$debugVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'DebugPreference',$DebugPreference,$Null +$uiVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'PARAM_NOUI',$PARAM_NOUI,$Null +$offlineVar = New-object System.Management.Automation.Runspaces.SessionStateVariableEntry -ArgumentList 'PARAM_OFFLINE',$PARAM_OFFLINE,$Null $InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionState]::CreateDefault() # Add the variable to the session state $InitialSessionState.Variables.Add($hashVars) +$InitialSessionState.Variables.Add($debugVar) +$InitialSessionState.Variables.Add($uiVar) +$InitialSessionState.Variables.Add($offlineVar) # Get every private function and add them to the session state -$functions = Get-ChildItem function:\ | Where-Object { $_.Name -imatch 'winutil|Microwin|WPF' } +$functions = Get-ChildItem function:\ | Where-Object { $_.Name -imatch 'winutil|WPF' } foreach ($function in $functions) { $functionDefinition = Get-Content function:\$($function.name) $functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition @@ -46,6 +61,41 @@ class GenericException : Exception { GenericException($Message) : base($Message) {} } +# Load the configuration files + +$sync.configs.applicationsHashtable = @{} +$sync.configs.applications.PSObject.Properties | ForEach-Object { + $sync.configs.applicationsHashtable[$_.Name] = $_.Value +} + +Set-Preferences + +if ($PARAM_NOUI) { + Show-CTTLogo + if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) { + Write-Host "Running config file tasks..." + Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG + if ($PARAM_RUN) { + Invoke-WinUtilAutoRun + } + else { + Write-Host "Did you forget to add '--Run'?"; + } + $sync.runspace.Dispose() + $sync.runspace.Close() + [System.GC]::Collect() + Stop-Transcript + exit 1 + } + else { + Write-Host "Cannot automatically run without a config file provided." + $sync.runspace.Dispose() + $sync.runspace.Close() + [System.GC]::Collect() + Stop-Transcript + exit 1 + } +} $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window' @@ -106,12 +156,19 @@ $sync.Form.Add_Loaded({ }) }) -Invoke-WinutilThemeChange -init $true -# Load the configuration files -#Invoke-WPFUIElements -configVariable $sync.configs.nav -targetGridName "WPFMainGrid" -Invoke-WPFUIElements -configVariable $sync.configs.applications -targetGridName "appspanel" -columncount 5 +Invoke-WinutilThemeChange -theme $sync.preferences.theme + + +# Now call the function with the final merged config +Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName "appscategory" -columncount 1 +Initialize-WPFUI -targetGridName "appscategory" + +Initialize-WPFUI -targetGridName "appspanel" + Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2 + Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2 + # Future implementation: Add Windows Version to updates panel #Invoke-WPFUIElements -configVariable $sync.configs.updates -targetGridName "updatespanel" -columncount 1 @@ -121,12 +178,19 @@ Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "feat $xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)} -#Persist the Chocolatey preference across winutil restarts -$ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini" -$sync.WPFpreferChocolatey.Add_Checked({New-Item -Path $ChocoPreferencePath -Force }) -$sync.WPFpreferChocolatey.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force}) -if (Test-Path $ChocoPreferencePath) { - $sync.WPFpreferChocolatey.IsChecked = $true +#Persist Package Manager preference across winutil restarts +$sync.ChocoRadioButton.Add_Checked({ + $sync.preferences.packagemanager = [PackageManagers]::Choco + Set-Preferences -save +}) +$sync.WingetRadioButton.Add_Checked({ + $sync.preferences.packagemanager = [PackageManagers]::Winget + Set-Preferences -save +}) + +switch ($sync.preferences.packagemanager) { + "Choco" {$sync.ChocoRadioButton.IsChecked = $true; break} + "Winget" {$sync.WingetRadioButton.IsChecked = $true; break} } $sync.keys | ForEach-Object { @@ -165,14 +229,13 @@ $sync.keys | ForEach-Object { # Load computer information in the background Invoke-WPFRunspace -ScriptBlock { try { - $oldProgressPreference = $ProgressPreference $ProgressPreference = "SilentlyContinue" $sync.ConfigLoaded = $False $sync.ComputerInfo = Get-ComputerInfo $sync.ConfigLoaded = $True } finally{ - $ProgressPreference = "Continue" + $ProgressPreference = $oldProgressPreference } } | Out-Null @@ -182,7 +245,7 @@ Invoke-WPFRunspace -ScriptBlock { #=========================================================================== # Print the logo -Invoke-WPFFormVariables +Show-CTTLogo # Progress bar in taskbaritem > Set-WinUtilProgressbar $sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo @@ -201,65 +264,52 @@ $sync["Form"].Add_Closing({ $sync.SearchBarClearButton.Add_Click({ $sync.SearchBar.Text = "" $sync.SearchBarClearButton.Visibility = "Collapsed" + + # Focus the search bar after clearing the text + $sync.SearchBar.Focus() + $sync.SearchBar.SelectAll() }) # add some shortcuts for people that don't like clicking $commonKeyEvents = { + # Prevent shortcuts from executing if a process is already running if ($sync.ProcessRunning -eq $true) { return } - if ($_.Key -eq "Escape") { - $sync.SearchBar.SelectAll() - $sync.SearchBar.Text = "" - $sync.SearchBarClearButton.Visibility = "Collapsed" - return - } - - # don't ask, I know what I'm doing, just go... - if (($_.Key -eq "Q" -and $_.KeyboardDevice.Modifiers -eq "Ctrl")) { - $this.Close() + # Handle key presses of single keys + switch ($_.Key) { + "Escape" { $sync.SearchBar.Text = "" } } + # Handle Alt key combinations for navigation if ($_.KeyboardDevice.Modifiers -eq "Alt") { - if ($_.SystemKey -eq "I") { - Invoke-WPFButton "WPFTab1BT" - } - if ($_.SystemKey -eq "T") { - Invoke-WPFButton "WPFTab2BT" - } - if ($_.SystemKey -eq "C") { - Invoke-WPFButton "WPFTab3BT" - } - if ($_.SystemKey -eq "U") { - Invoke-WPFButton "WPFTab4BT" - } - if ($_.SystemKey -eq "M") { - Invoke-WPFButton "WPFTab5BT" - } - if ($_.SystemKey -eq "P") { - Write-Host "Your Windows Product Key: $((Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey)" + $keyEventArgs = $_ + switch ($_.SystemKey) { + "I" { Invoke-WPFButton "WPFTab1BT"; $keyEventArgs.Handled = $true } # Navigate to Install tab and suppress Windows Warning Sound + "T" { Invoke-WPFButton "WPFTab2BT"; $keyEventArgs.Handled = $true } # Navigate to Tweaks tab + "C" { Invoke-WPFButton "WPFTab3BT"; $keyEventArgs.Handled = $true } # Navigate to Config tab + "U" { Invoke-WPFButton "WPFTab4BT"; $keyEventArgs.Handled = $true } # Navigate to Updates tab + "W" { Invoke-WPFButton "WPFTab5BT"; $keyEventArgs.Handled = $true } # Navigate to Win11ISO tab } } - # shortcut for the filter box - if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") { - if ($sync.SearchBar.Text -eq "Ctrl-F to filter") { - $sync.SearchBar.SelectAll() - $sync.SearchBar.Text = "" + # Handle Ctrl key combinations for specific actions + if ($_.KeyboardDevice.Modifiers -eq "Ctrl") { + switch ($_.Key) { + "F" { $sync.SearchBar.Focus() } # Focus on the search bar + "Q" { $this.Close() } # Close the application } - $sync.SearchBar.Focus() } } - $sync["Form"].Add_PreViewKeyDown($commonKeyEvents) $sync["Form"].Add_MouseLeftButtonDown({ - Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme") + Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling") $sync["Form"].DragMove() }) $sync["Form"].Add_MouseDoubleClick({ - if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or - $_.OriginalSource -is [System.Windows.Controls.StackPanel]) { + if ($_.OriginalSource.Name -eq "NavDockPanel" -or + $_.OriginalSource.Name -eq "GridBesideNavDockPanel") { if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal) { $sync["Form"].WindowState = [Windows.WindowState]::Maximized } @@ -271,59 +321,10 @@ $sync["Form"].Add_MouseDoubleClick({ $sync["Form"].Add_Deactivated({ Write-Debug "WinUtil lost focus" - Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme") + Invoke-WPFPopup -Action "Hide" -Popups @("Settings", "Theme", "FontScaling") }) $sync["Form"].Add_ContentRendered({ - - try { - [void][Window] - } catch { -Add-Type @" - using System; - using System.Runtime.InteropServices; - public class Window { - [DllImport("user32.dll")] - public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect); - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool MoveWindow(IntPtr handle, int x, int y, int width, int height, bool redraw); - - [DllImport("user32.dll")] - public static extern int GetSystemMetrics(int nIndex); - }; - public struct RECT { - public int Left; // x position of upper-left corner - public int Top; // y position of upper-left corner - public int Right; // x position of lower-right corner - public int Bottom; // y position of lower-right corner - } -"@ - } - - foreach ($proc in (Get-Process).where{ $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" }) { - # Check if the process's MainWindowHandle is valid - if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) { - Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)" - $windowHandle = $proc.MainWindowHandle - } else { - Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)" - - } - } - - $rect = New-Object RECT - [Window]::GetWindowRect($windowHandle, [ref]$rect) - $width = $rect.Right - $rect.Left - $height = $rect.Bottom - $rect.Top - - Write-Debug "UpperLeft:$($rect.Left),$($rect.Top) LowerBottom:$($rect.Right),$($rect.Bottom). Width:$($width) Height:$($height)" - # Load the Windows Forms assembly Add-Type -AssemblyName System.Windows.Forms $primaryScreen = [System.Windows.Forms.Screen]::PrimaryScreen @@ -338,9 +339,12 @@ Add-Type @" Write-Debug "Primary Monitor Height: $screenHeight pixels" # Compare with the primary monitor size - if ($width -gt $screenWidth -or $height -gt $screenHeight) { + if ($sync.Form.ActualWidth -gt $screenWidth -or $sync.Form.ActualHeight -gt $screenHeight) { Write-Debug "The specified width and/or height is greater than the primary monitor size." - [void][Window]::MoveWindow($windowHandle, 0, 0, $screenWidth, $screenHeight, $True) + $sync.Form.Left = 0 + $sync.Form.Top = 0 + $sync.Form.Width = $screenWidth + $sync.Form.Height = $screenHeight } else { Write-Debug "The specified width and height are within the primary monitor size limits." } @@ -348,139 +352,80 @@ Add-Type @" Write-Debug "Unable to retrieve information about the primary monitor." } - Invoke-WPFTab "WPFTab1BT" - $sync["Form"].Focus() - - # maybe this is not the best place to load and execute config file? - # maybe community can help? - if ($PARAM_CONFIG) { - Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG - if ($PARAM_RUN) { - while ($sync.ProcessRunning) { - Start-Sleep -Seconds 5 - } - Start-Sleep -Seconds 5 + if ($PARAM_OFFLINE) { + # Show offline banner + $sync.WPFOfflineBanner.Visibility = [System.Windows.Visibility]::Visible - Write-Host "Applying tweaks..." - Invoke-WPFtweaksbutton - while ($sync.ProcessRunning) { - Start-Sleep -Seconds 5 - } - Start-Sleep -Seconds 5 + # Disable the install tab + $sync.WPFTab1BT.IsEnabled = $false + $sync.WPFTab1BT.Opacity = 0.5 + $sync.WPFTab1BT.ToolTip = "Internet connection required for installing applications" - Write-Host "Installing features..." - Invoke-WPFFeatureInstall - while ($sync.ProcessRunning) { - Start-Sleep -Seconds 5 - } + # Disable install-related buttons + $sync.WPFInstall.IsEnabled = $false + $sync.WPFUninstall.IsEnabled = $false + $sync.WPFInstallUpgrade.IsEnabled = $false + $sync.WPFGetInstalled.IsEnabled = $false - Start-Sleep -Seconds 5 - Write-Host "Installing applications..." - while ($sync.ProcessRunning) { - Start-Sleep -Seconds 1 - } - Invoke-WPFInstall - Start-Sleep -Seconds 5 + # Show offline indicator + Write-Host "Offline mode detected - Install tab disabled" -ForegroundColor Yellow - Write-Host "Done." - } + # Optionally switch to a different tab if install tab was going to be default + Invoke-WPFTab "WPFTab2BT" # Switch to Tweaks tab instead + } + else { + # Online - ensure install tab is enabled + $sync.WPFTab1BT.IsEnabled = $true + $sync.WPFTab1BT.Opacity = 1.0 + $sync.WPFTab1BT.ToolTip = $null + Invoke-WPFTab "WPFTab1BT" # Default to install tab } -}) + $sync["Form"].Focus() -# Add event handlers for the RadioButtons -$sync["ISOdownloader"].add_Checked({ - $sync["ISORelease"].Visibility = [System.Windows.Visibility]::Visible - $sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible -}) + if ($PARAM_CONFIG -and -not [string]::IsNullOrWhiteSpace($PARAM_CONFIG)) { + Write-Host "Running config file tasks..." + Invoke-WPFImpex -type "import" -Config $PARAM_CONFIG + if ($PARAM_RUN) { + Invoke-WinUtilAutoRun + } + } -$sync["ISOmanual"].add_Checked({ - $sync["ISORelease"].Visibility = [System.Windows.Visibility]::Collapsed - $sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed }) -$sync["ISORelease"].Items.Add("24H2") | Out-Null -$sync["ISORelease"].SelectedItem = "24H2" - -$sync["ISOLanguage"].Items.Add("System Language ($(Microwin-GetLangFromCulture -langName $((Get-Culture).Name)))") | Out-Null -if ($currentCulture -ne "English International") { - $sync["ISOLanguage"].Items.Add("English International") | Out-Null -} -if ($currentCulture -ne "English") { - $sync["ISOLanguage"].Items.Add("English") | Out-Null -} -if ($sync["ISOLanguage"].Items.Count -eq 1) { - $sync["ISOLanguage"].IsEnabled = $false -} -$sync["ISOLanguage"].SelectedIndex = 0 - - -# Load Checkboxes and Labels outside of the Filter function only once on startup for performance reasons -$filter = Get-WinUtilVariables -Type CheckBox -$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter } +# The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period +# This prevents the ui from stuttering when the user types quickly as it dosnt need to update the ui for every keystroke -$filter = Get-WinUtilVariables -Type Label -$labels = @{} -($sync.GetEnumerator()).where{$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value} - -$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category +$searchBarTimer = New-Object System.Windows.Threading.DispatcherTimer +$searchBarTimer.Interval = [TimeSpan]::FromMilliseconds(300) +$searchBarTimer.IsEnabled = $false +$searchBarTimer.add_Tick({ + $searchBarTimer.Stop() + switch ($sync.currentTab) { + "Install" { + Find-AppsByNameOrDescription -SearchString $sync.SearchBar.Text + } + "Tweaks" { + Find-TweaksByNameOrDescription -SearchString $sync.SearchBar.Text + } + } +}) $sync["SearchBar"].Add_TextChanged({ if ($sync.SearchBar.Text -ne "") { $sync.SearchBarClearButton.Visibility = "Visible" } else { $sync.SearchBarClearButton.Visibility = "Collapsed" } - - $activeApplications = @() - - $textToSearch = $sync.SearchBar.Text.ToLower() - - foreach ($CheckBox in $CheckBoxes) { - # Skip if the checkbox is null, it doesn't have content or it is the prefer Choco checkbox - if ($CheckBox -eq $null -or $CheckBox.Value -eq $null -or $CheckBox.Value.Content -eq $null -or $CheckBox.Name -eq "WPFpreferChocolatey") { - continue - } - - $checkBoxName = $CheckBox.Key - $textBlockName = $checkBoxName + "Link" - - # Retrieve the corresponding text block based on the generated name - $textBlock = $sync[$textBlockName] - - if ($CheckBox.Value.Content.ToString().ToLower().Contains($textToSearch)) { - $CheckBox.Value.Visibility = "Visible" - $activeApplications += $sync.configs.applications.$checkboxName - # Set the corresponding text block visibility - if ($textBlock -ne $null -and $textBlock -is [System.Windows.Controls.TextBlock]) { - $textBlock.Visibility = "Visible" - } - } else { - $CheckBox.Value.Visibility = "Collapsed" - # Set the corresponding text block visibility - if ($textBlock -ne $null -and $textBlock -is [System.Windows.Controls.TextBlock]) { - $textBlock.Visibility = "Collapsed" - } - } - } - - $activeCategories = $activeApplications | Select-Object -ExpandProperty category -Unique - - foreach ($category in $activeCategories) { - $sync[$category].Visibility = "Visible" - } - if ($activeCategories) { - $inactiveCategories = Compare-Object -ReferenceObject $allCategories -DifferenceObject $activeCategories -PassThru - } else { - $inactiveCategories = $allCategories - } - foreach ($category in $inactiveCategories) { - $sync[$category].Visibility = "Collapsed" + if ($searchBarTimer.IsEnabled) { + $searchBarTimer.Stop() } + $searchBarTimer.Start() }) $sync["Form"].Add_Loaded({ param($e) + $sync.Form.MinWidth = "1000" $sync["Form"].MaxWidth = [Double]::PositiveInfinity $sync["Form"].MaxHeight = [Double]::PositiveInfinity }) @@ -488,17 +433,9 @@ $sync["Form"].Add_Loaded({ $NavLogoPanel = $sync["Form"].FindName("NavLogoPanel") $NavLogoPanel.Children.Add((Invoke-WinUtilAssets -Type "logo" -Size 25)) | Out-Null -# Initialize the hashtable -$winutildir = @{} - -# Set the path for the winutil directory -$winutildir["path"] = "$env:LOCALAPPDATA\winutil\" -[System.IO.Directory]::CreateDirectory($winutildir["path"]) | Out-Null - -$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico" -if (Test-Path $winutildir["logo.ico"]) { - $sync["logorender"] = $winutildir["logo.ico"] +if (Test-Path "$winutildir\logo.ico") { + $sync["logorender"] = "$winutildir\logo.ico" } else { $sync["logorender"] = (Invoke-WinUtilAssets -Type "Logo" -Size 90 -Render) } @@ -513,59 +450,56 @@ $sync["Form"].Add_Activated({ $sync["ThemeButton"].Add_Click({ Write-Debug "ThemeButton clicked" - Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle" } - $_.Handled = $false + Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle"; "FontScaling" = "Hide" } }) $sync["AutoThemeMenuItem"].Add_Click({ Write-Debug "About clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WinutilThemeChange -theme "Auto" - $_.Handled = $false }) $sync["DarkThemeMenuItem"].Add_Click({ Write-Debug "Dark Theme clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WinutilThemeChange -theme "Dark" - $_.Handled = $false }) $sync["LightThemeMenuItem"].Add_Click({ Write-Debug "Light Theme clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WinutilThemeChange -theme "Light" - $_.Handled = $false }) - $sync["SettingsButton"].Add_Click({ Write-Debug "SettingsButton clicked" - Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide" } - $_.Handled = $false + Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide"; "FontScaling" = "Hide" } }) $sync["ImportMenuItem"].Add_Click({ Write-Debug "Import clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Settings") Invoke-WPFImpex -type "import" - $_.Handled = $false }) $sync["ExportMenuItem"].Add_Click({ Write-Debug "Export clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Settings") Invoke-WPFImpex -type "export" - $_.Handled = $false }) $sync["AboutMenuItem"].Add_Click({ Write-Debug "About clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Settings") $authorInfo = @" -Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a> -Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a> -MicroWin : <a href="https://github.com/KonTy">@KonTy</a>, <a href="https://github.com/CodingWonders">@CodingWonders</a> +Author : <a href="https://github.com/ChrisTitusTech">@ChrisTitusTech</a> +UI : <a href="https://github.com/MyDrift-user">@MyDrift-user</a>, <a href="https://github.com/Marterich">@Marterich</a> +Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>, <a href="https://github.com/Marterich">@Marterich</a> GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a> Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a> "@ Show-CustomDialog -Title "About" -Message $authorInfo }) +$sync["DocumentationMenuItem"].Add_Click({ + Write-Debug "Documentation clicked" + Invoke-WPFPopup -Action "Hide" -Popups @("Settings") + Start-Process "https://winutil.christitus.com/" +}) $sync["SponsorMenuItem"].Add_Click({ Write-Debug "Sponsors clicked" Invoke-WPFPopup -Action "Hide" -Popups @("Settings") @@ -585,5 +519,85 @@ $sync["SponsorMenuItem"].Add_Click({ Show-CustomDialog -Title "Sponsors" -Message $authorInfo -EnableScroll $true }) +# Font Scaling Event Handlers +$sync["FontScalingButton"].Add_Click({ + Write-Debug "FontScalingButton clicked" + Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Hide"; "FontScaling" = "Toggle" } +}) + +$sync["FontScalingSlider"].Add_ValueChanged({ + param($slider) + $percentage = [math]::Round($slider.Value * 100) + $sync.FontScalingValue.Text = "$percentage%" +}) + +$sync["FontScalingResetButton"].Add_Click({ + Write-Debug "FontScalingResetButton clicked" + $sync.FontScalingSlider.Value = 1.0 + $sync.FontScalingValue.Text = "100%" +}) + +$sync["FontScalingApplyButton"].Add_Click({ + Write-Debug "FontScalingApplyButton clicked" + $scaleFactor = $sync.FontScalingSlider.Value + Invoke-WinUtilFontScaling -ScaleFactor $scaleFactor + Invoke-WPFPopup -Action "Hide" -Popups @("FontScaling") +}) + +# ── Win11ISO Tab button handlers ────────────────────────────────────────────── + +$sync["WPFTab5BT"].Add_Click({ + $sync["Form"].Dispatcher.BeginInvoke([System.Windows.Threading.DispatcherPriority]::Background, [action]{ Invoke-WinUtilISOCheckExistingWork }) | Out-Null +}) + +$sync["WPFWin11ISOBrowseButton"].Add_Click({ + Write-Debug "WPFWin11ISOBrowseButton clicked" + Invoke-WinUtilISOBrowse +}) + +$sync["WPFWin11ISODownloadLink"].Add_Click({ + Write-Debug "WPFWin11ISODownloadLink clicked" + Start-Process "https://www.microsoft.com/software-download/windows11" +}) + +$sync["WPFWin11ISOMountButton"].Add_Click({ + Write-Debug "WPFWin11ISOMountButton clicked" + Invoke-WinUtilISOMountAndVerify +}) + +$sync["WPFWin11ISOModifyButton"].Add_Click({ + Write-Debug "WPFWin11ISOModifyButton clicked" + Invoke-WinUtilISOModify +}) + +$sync["WPFWin11ISOChooseISOButton"].Add_Click({ + Write-Debug "WPFWin11ISOChooseISOButton clicked" + $sync["WPFWin11ISOOptionUSB"].Visibility = "Collapsed" + Invoke-WinUtilISOExport +}) + +$sync["WPFWin11ISOChooseUSBButton"].Add_Click({ + Write-Debug "WPFWin11ISOChooseUSBButton clicked" + $sync["WPFWin11ISOOptionUSB"].Visibility = "Visible" + Invoke-WinUtilISORefreshUSBDrives +}) + +$sync["WPFWin11ISORefreshUSBButton"].Add_Click({ + Write-Debug "WPFWin11ISORefreshUSBButton clicked" + Invoke-WinUtilISORefreshUSBDrives +}) + +$sync["WPFWin11ISOWriteUSBButton"].Add_Click({ + Write-Debug "WPFWin11ISOWriteUSBButton clicked" + Invoke-WinUtilISOWriteUSB +}) + +$sync["WPFWin11ISOCleanResetButton"].Add_Click({ + Write-Debug "WPFWin11ISOCleanResetButton clicked" + Invoke-WinUtilISOCleanAndReset +}) + +# ────────────────────────────────────────────────────────────────────────────── + $sync["Form"].ShowDialog() | out-null Stop-Transcript diff --git a/scripts/start.ps1 b/scripts/start.ps1 index c289709c49..44766a2223 100644 --- a/scripts/start.ps1 +++ b/scripts/start.ps1 @@ -7,16 +7,12 @@ #> param ( - [switch]$Debug, [string]$Config, - [switch]$Run + [switch]$Run, + [switch]$Noui, + [switch]$Offline ) -# Set DebugPreference based on the -Debug switch -if ($Debug) { - $DebugPreference = "Continue" -} - if ($Config) { $PARAM_CONFIG = $Config } @@ -24,20 +20,19 @@ if ($Config) { $PARAM_RUN = $false # Handle the -Run switch if ($Run) { - Write-Host "Running config file tasks..." $PARAM_RUN = $true } -# Load DLLs -Add-Type -AssemblyName PresentationFramework -Add-Type -AssemblyName System.Windows.Forms +$PARAM_NOUI = $false +if ($Noui) { + $PARAM_NOUI = $true +} + +$PARAM_OFFLINE = $false +if ($Offline) { + $PARAM_OFFLINE = $true +} -# Variable to sync between runspaces -$sync = [Hashtable]::Synchronized(@{}) -$sync.PSScriptRoot = $PSScriptRoot -$sync.version = "#{replaceme}" -$sync.configs = @{} -$sync.ProcessRunning = $false 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." @@ -46,31 +41,61 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]: $PSBoundParameters.GetEnumerator() | ForEach-Object { $argList += if ($_.Value -is [switch] -and $_.Value) { "-$($_.Key)" + } elseif ($_.Value -is [array]) { + "-$($_.Key) $($_.Value -join ',')" } elseif ($_.Value) { - "-$($_.Key) `"$($_.Value)`"" + "-$($_.Key) '$($_.Value)'" } } - $script = if ($MyInvocation.MyCommand.Path) { - "& { & '$($MyInvocation.MyCommand.Path)' $argList }" + $script = if ($PSCommandPath) { + "& { & `'$($PSCommandPath)`' $($argList -join ' ') }" } else { - "iex '& { $(irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1) } $argList'" + "&([ScriptBlock]::Create((irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1))) $($argList -join ' ')" } - $powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" } - $processCmd = if (Get-Command wt.exe -ErrorAction SilentlyContinue) { "wt.exe" } else { $powershellcmd } + $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 + if ($processCmd -eq "wt.exe") { + Start-Process $processCmd -ArgumentList "$powershellCmd -ExecutionPolicy Bypass -NoProfile -Command `"$script`"" -Verb RunAs + } else { + Start-Process $processCmd -ArgumentList "-ExecutionPolicy Bypass -NoProfile -Command `"$script`"" -Verb RunAs + } break } +# Load DLLs +Add-Type -AssemblyName PresentationFramework +Add-Type -AssemblyName System.Windows.Forms + +# Variable to sync between runspaces +$sync = [Hashtable]::Synchronized(@{}) +$sync.PSScriptRoot = $PSScriptRoot +$sync.version = "#{replaceme}" +$sync.configs = @{} +$sync.Buttons = [System.Collections.Generic.List[PSObject]]::new() +$sync.preferences = @{} +$sync.ProcessRunning = $false +$sync.selectedApps = [System.Collections.Generic.List[string]]::new() +$sync.selectedTweaks = [System.Collections.Generic.List[string]]::new() +$sync.selectedToggles = [System.Collections.Generic.List[string]]::new() +$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new() +$sync.currentTab = "Install" +$sync.selectedAppsStackPanel +$sync.selectedAppsPopup + $dateTime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" -$logdir = "$env:localappdata\winutil\logs" -[System.IO.Directory]::CreateDirectory("$logdir") | Out-Null +# Set the path for the winutil directory +$winutildir = "$env:LocalAppData\winutil" +New-Item $winutildir -ItemType Directory -Force | Out-Null + +$logdir = "$winutildir\logs" +New-Item $logdir -ItemType Directory -Force | Out-Null Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-Null # Set PowerShell window title -$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" +$Host.UI.RawUI.WindowTitle = "WinUtil (Admin)" clear-host diff --git a/sign.bat b/sign.bat new file mode 100644 index 0000000000..134f1a3508 --- /dev/null +++ b/sign.bat @@ -0,0 +1 @@ +signtool.exe sign /td sha256 /tr http://timestamp.digicert.com /fd sha256 /n "CT Tech Group LLC" .\winutil.ps1 diff --git a/tools/Invoke-Preprocessing.ps1 b/tools/Invoke-Preprocessing.ps1 index 0569bc3565..0afa1a1b0d 100644 --- a/tools/Invoke-Preprocessing.ps1 +++ b/tools/Invoke-Preprocessing.ps1 @@ -3,15 +3,9 @@ function Invoke-Preprocessing { .SYNOPSIS A function that does Code Formatting using RegEx, useful when trying to force specific coding standard(s) to a project. - .PARAMETER ThrowExceptionOnEmptyFilesList - A switch which'll throw an exception upon not finding any files inside the provided 'WorkingDir'. - - .PARAMETER SkipExcludedFilesValidation - A switch to stop file path validation on 'ExcludedFiles' list. - .PARAMETER ExcludedFiles A list of file paths which're *relative to* 'WorkingDir' Folder, every item in the list can be pointing to File (doesn't end with '\') or Directory (ends with '\') or None-Existing File/Directory. - By default, it checks if everyitem exists, and throws an exception if one or more are not found (None-Existing), if you want to skip this validation, please consider providing the '-SkipExcludedFilesValidation' switch to skip this check. + By default, it checks if everyitem exists, and throws an exception if one or more are not found (None-Existing). .PARAMETER WorkingDir The folder to search inside recursively for files which're going to be Preprocessed (Code Formatted), unless they're found in 'ExcludedFiles' List. @@ -29,47 +23,35 @@ function Invoke-Preprocessing { .EXAMPLE Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" - Calls 'Invoke-Preprocessing' function using Named Paramters, with 'WorkingDir' (Mandatory Parameter) which's used as the base folder when searching for files recursively (using 'Get-ChildItem'), other two paramters are, in order from right to left, the Optional 'ExcludeFiles', which can be a path to a file, folder, or pattern-matched (like '*.png'), and the 'ProgressStatusMessage', which's used in Progress Bar. + Calls 'Invoke-Preprocessing' function using Named Parameters, with 'WorkingDir' (Mandatory Parameter) which's used as the base folder when searching for files recursively (using 'Get-ChildItem'), other two parameters are, in order from right to left, the Optional 'ExcludeFiles', which can be a path to a file, folder, or pattern-matched (like '*.png'), and the 'ProgressStatusMessage', which's used in Progress Bar. .EXAMPLE Invoke-Preprocessing -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" -ProgressActivity "Re-Formatting Code" Same as Example No. 1, but uses 'ProgressActivity' which's used in Progress Bar. - .EXAMPLE - Invoke-Preprocessing -ThrowExceptionOnEmptyFilesList -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" - - Same as Example No. 1, but uses '-ThrowExceptionOnEmptyFilesList', which's an optional parameter that'll make 'Invoke-Preprocessing' throw an exception when no files are found in 'WorkingDir' (not including the ExcludedFiles, of course), useful when you want to double check your parameters & you're sure there's files to process in the 'WorkingDir'. - .EXAMPLE Invoke-Preprocessing -Skip -WorkingDir "DRIVE:\Path\To\Folder\" -ExcludedFiles @('file.txt', '.\.git\', '*.png') -ProgressStatusMessage "Doing Preprocessing" - Same as Example No. 1, but uses '-SkipExcludedFilesValidation', which'll skip the validation step for 'ExcludedFiles' list. This can be useful when 'ExcludedFiles' list is generated from another function, or from unreliable source (you can't guarantee every item in list is a valid path), but you want to silently continue through the function. #> param ( - [Parameter(position=0)] - [switch]$SkipExcludedFilesValidation, - - [Parameter(position=1)] - [switch]$ThrowExceptionOnEmptyFilesList, - - [Parameter(Mandatory, position=2)] + [Parameter(Mandatory, position=1)] [ValidateScript({[System.IO.Path]::IsPathRooted($_)})] [string]$WorkingDir, - [Parameter(position=3)] + [Parameter(position=2)] [string[]]$ExcludedFiles, - [Parameter(Mandatory, position=4)] + [Parameter(Mandatory, position=3)] [string]$ProgressStatusMessage, - [Parameter(position=5)] + [Parameter(position=4)] [string]$ProgressActivity = "Preprocessing" ) if (-NOT (Test-Path -PathType Container -Path "$WorkingDir")) { - throw "[Invoke-Preprocessing] Invalid Paramter Value for 'WorkingDir', passed value: '$WorkingDir'. Either the path is a File or Non-Existing/Invlid, please double check your code." + throw "[Invoke-Preprocessing] Invalid Parameter Value for 'WorkingDir', passed value: '$WorkingDir'. Either the path is a File or Non-Existing/Invlid, please double check your code." } $InternalExcludedFiles = [System.Collections.Generic.List[string]]::new($ExcludedFiles.Count) @@ -77,11 +59,14 @@ function Invoke-Preprocessing { $InternalExcludedFiles.Add($excludedFile) | Out-Null } - # Validate the ExcludedItems List before continuing on, - # that's if there's a list in the first place, and '-SkipInternalExcludedFilesValidation' was not provided. + # Validate the ExcludedItems List before continuing on if ($ExcludedFiles.Count -gt 0) { ForEach ($excludedFile in $ExcludedFiles) { $filePath = "$(($WorkingDir -replace ('\\$', '')) + '\' + ($excludedFile -replace ('\.\\', '')))" + # Only attempt to create the directory if the excludedFile ends with '\' + if ($excludedFile -match '\\$' -and -not (Test-Path "$filePath")) { + New-Item -Path "$filePath" -ItemType Directory -Force | Out-Null + } $files = Get-ChildItem -Recurse -Path "$filePath" -File -Force if ($files.Count -gt 0) { ForEach ($file in $files) { @@ -90,9 +75,6 @@ function Invoke-Preprocessing { } else { $failedFilesList += "'$filePath', " } } $failedFilesList = $failedFilesList -replace (',\s*$', '') - if ((-not $failedFilesList -eq "") -and (-not $SkipExcludedFilesValidation)) { - throw "[Invoke-Preprocessing] One or more File Paths and/or File Patterns were not found, you can use '-SkipExcludedFilesValidation' switch to skip this check, the failed to validate are: $failedFilesList" - } } # Get Files List @@ -111,16 +93,47 @@ function Invoke-Preprocessing { if ($index -ge 0) { $files.RemoveAt($index) } } - $numOfFiles = $files.Count + # Define a path to store the file hashes + $hashFilePath = Join-Path -Path $WorkingDir -ChildPath ".preprocessor_hashes.json" - if ($numOfFiles -eq 0) { - if ($ThrowExceptionOnEmptyFilesList) { - throw "[Invoke-Preprocessing] Found 0 Files to Preprocess inside 'WorkingDir' Directory and '-ThrowExceptionOnEmptyFilesList' Switch is provided, value of 'WorkingDir': '$WorkingDir'." - } else { - return # Do an early return, there's nothing else to do + # Load existing hashes if the file exists + $existingHashes = @{} + if (Test-Path -Path $hashFilePath) { + # intentionally dosn't use ConvertFrom-Json -AsHashtable as it isn't supported on old powershell versions + $file_content = Get-Content -Path $hashFilePath | ConvertFrom-Json + foreach ($property in $file_content.PSObject.Properties) { + $existingHashes[$property.Name] = $property.Value } } + $newHashes = @{} + $changedFiles = @() + $hashingAlgorithm = "MD5" + foreach ($file in $files){ + # Calculate the hash of the file + $hash = Get-FileHash -Path $file -Algorithm $hashingAlgorithm | Select-Object -ExpandProperty Hash + $newHashes[$file] = $hash + + # Check if the hash already exists in the existing hashes + if (($existingHashes.ContainsKey($file) -and $existingHashes[$file] -eq $hash)) { + # Skip processing this file as it hasn't changed + continue; + } + else { + # If the hash doesn't exist or has changed, add it to the changed files list + $changedFiles += $file + } + } + + $files = $changedFiles + $numOfFiles = $files.Count + Write-Debug "[Invoke-Preprocessing] Files Changed: $numOfFiles" + + if ($numOfFiles -eq 0){ + Write-Debug "[Invoke-Preprocessing] Found 0 Files to Preprocess inside 'WorkingDir' Directory : '$WorkingDir'." + return + } + for ($i = 0; $i -lt $numOfFiles; $i++) { $fullFileName = $files[$i] @@ -139,9 +152,13 @@ function Invoke-Preprocessing { -replace ('\}\s*Catch\s*(?<exceptions>\[.*?\])\s*\{', '} catch ${exceptions} {') ` -replace ('(?<parameter_type>\[[^$0-9]+\])\s*(?<str_after_type>\$.*?)', '${parameter_type}${str_after_type}') ` | Set-Content "$fullFileName" + $newHashes[$fullFileName] = Get-FileHash -Path $fullFileName -Algorithm $hashingAlgorithm | Select-Object -ExpandProperty Hash Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished $i out of $numOfFiles" -PercentComplete (($i/$numOfFiles)*100) } Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished Task Successfully" -Completed + + # Save the new hashes to the file + $newHashes | ConvertTo-Json -Depth 10 | Set-Content -Path $hashFilePath } diff --git a/tools/autounattend.xml b/tools/autounattend.xml new file mode 100644 index 0000000000..7a7c01e4b8 --- /dev/null +++ b/tools/autounattend.xml @@ -0,0 +1,497 @@ +<?xml version="1.0" encoding="utf-8"?> +<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> + <!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Interactive&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&ComputerNameMode=Random&CompactOsMode=Default&TimeZoneMode=Implicit&PartitionMode=Interactive&DiskAssertionMode=Skip&WindowsEditionMode=Interactive&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=InteractiveLocal&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&ClassicContextMenu=true&LaunchToThisPC=true&ShowEndTask=true&TaskbarSearch=Hide&TaskbarIconsMode=Empty&DisableWidgets=true&LeftTaskbar=true&HideTaskViewButton=true&StartTilesMode=Default&StartPinsMode=Empty&EnableLongPaths=true&HideEdgeFre=true&DisableEdgeStartupBoost=true&DeleteWindowsOld=true&EffectsMode=Default&DeleteEdgeDesktopIcon=true&DesktopIconsMode=Default&StartFoldersMode=Default&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Configure&CapsLockInitial=Off&CapsLockBehavior=Toggle&NumLockInitial=On&NumLockBehavior=Toggle&ScrollLockInitial=Off&ScrollLockBehavior=Toggle&StickyKeysMode=Disabled&ColorMode=Custom&SystemColorTheme=Dark&AppsColorTheme=Dark&AccentColor=%230078d4&WallpaperMode=Default&LockScreenMode=Default&WdacMode=Skip&AppLockerMode=Skip--> + <settings pass="offlineServicing"></settings> + <settings pass="windowsPE"> + <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <UserData> + <AcceptEula>true</AcceptEula> + </UserData> + <UseConfigurationSet>false</UseConfigurationSet> + <RunSynchronous> + <RunSynchronousCommand wcm:action="add"> + <Order>1</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>2</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>3</Order> + <Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path> + </RunSynchronousCommand> + </RunSynchronous> + </component> + </settings> + <settings pass="generalize"></settings> + <settings pass="specialize"> + <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <RunSynchronous> + <RunSynchronousCommand wcm:action="add"> + <Order>1</Order> + <Path>powershell.exe -WindowStyle "Normal" -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>2</Order> + <Path>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\Specialize.ps1"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>3</Order> + <Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>4</Order> + <Path>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\DefaultUser.ps1"</Path> + </RunSynchronousCommand> + <RunSynchronousCommand wcm:action="add"> + <Order>5</Order> + <Path>reg.exe unload "HKU\DefaultUser"</Path> + </RunSynchronousCommand> + </RunSynchronous> + </component> + </settings> + <settings pass="auditSystem"></settings> + <settings pass="auditUser"></settings> + <settings pass="oobeSystem"> + <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> + <OOBE> + <ProtectYourPC>3</ProtectYourPC> + <HideEULAPage>true</HideEULAPage> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <HideOnlineAccountScreens>true</HideOnlineAccountScreens> + </OOBE> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <Order>1</Order> + <CommandLine>powershell.exe -WindowStyle "Normal" -ExecutionPolicy "Unrestricted" -NoProfile -File "C:\Windows\Setup\Scripts\FirstLogon.ps1"</CommandLine> + </SynchronousCommand> + </FirstLogonCommands> + </component> + </settings> + <Extensions xmlns="https://schneegans.de/windows/unattend-generator/"> + <ExtractScript> +param( + [xml]$Document +); + +foreach( $file in $Document.unattend.Extensions.File ) { + $path = [System.Environment]::ExpandEnvironmentVariables( $file.GetAttribute( 'path' ) ); + mkdir -Path( $path | Split-Path -Parent ) -ErrorAction 'SilentlyContinue'; + $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) { + { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; } + { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); } + default { [System.Text.Encoding]::Default; } + }; + $bytes = $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ); + [System.IO.File]::WriteAllBytes( $path, $bytes ); +} + </ExtractScript> + <File path="C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml"> +&lt;LayoutModificationTemplate xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" Version="1"&gt; + &lt;CustomTaskbarLayoutCollection PinListPlacement="Replace"&gt; + &lt;defaultlayout:TaskbarLayout&gt; + &lt;taskbar:TaskbarPinList&gt; + &lt;taskbar:DesktopApp DesktopApplicationLinkPath="#leaveempty" /&gt; + &lt;/taskbar:TaskbarPinList&gt; + &lt;/defaultlayout:TaskbarLayout&gt; + &lt;/CustomTaskbarLayoutCollection&gt; +&lt;/LayoutModificationTemplate&gt; + </File> + <File path="C:\Windows\Setup\Scripts\UnlockStartLayout.vbs"> +HKU = &amp;H80000003 +Set reg = GetObject("winmgmts://./root/default:StdRegProv") +Set fso = CreateObject("Scripting.FileSystemObject") + +If reg.EnumKey(HKU, "", sids) = 0 Then + If Not IsNull(sids) Then + For Each sid In sids + key = sid + "\Software\Policies\Microsoft\Windows\Explorer" + name = "LockedStartLayout" + If reg.GetDWORDValue(HKU, key, name, existing) = 0 Then + reg.SetDWORDValue HKU, key, name, 0 + End If + Next + End If +End If + </File> + <File path="C:\Windows\Setup\Scripts\UnlockStartLayout.xml"> +&lt;Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"&gt; + &lt;Triggers&gt; + &lt;EventTrigger&gt; + &lt;Enabled&gt;true&lt;/Enabled&gt; + &lt;Subscription&gt;&amp;lt;QueryList&amp;gt;&amp;lt;Query Id="0" Path="Application"&amp;gt;&amp;lt;Select Path="Application"&amp;gt;*[System[Provider[@Name='UnattendGenerator'] and EventID=1]]&amp;lt;/Select&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/QueryList&amp;gt;&lt;/Subscription&gt; + &lt;/EventTrigger&gt; + &lt;/Triggers&gt; + &lt;Principals&gt; + &lt;Principal id="Author"&gt; + &lt;UserId&gt;S-1-5-18&lt;/UserId&gt; + &lt;RunLevel&gt;LeastPrivilege&lt;/RunLevel&gt; + &lt;/Principal&gt; + &lt;/Principals&gt; + &lt;Settings&gt; + &lt;MultipleInstancesPolicy&gt;IgnoreNew&lt;/MultipleInstancesPolicy&gt; + &lt;DisallowStartIfOnBatteries&gt;false&lt;/DisallowStartIfOnBatteries&gt; + &lt;StopIfGoingOnBatteries&gt;false&lt;/StopIfGoingOnBatteries&gt; + &lt;AllowHardTerminate&gt;true&lt;/AllowHardTerminate&gt; + &lt;StartWhenAvailable&gt;false&lt;/StartWhenAvailable&gt; + &lt;RunOnlyIfNetworkAvailable&gt;false&lt;/RunOnlyIfNetworkAvailable&gt; + &lt;IdleSettings&gt; + &lt;StopOnIdleEnd&gt;true&lt;/StopOnIdleEnd&gt; + &lt;RestartOnIdle&gt;false&lt;/RestartOnIdle&gt; + &lt;/IdleSettings&gt; + &lt;AllowStartOnDemand&gt;true&lt;/AllowStartOnDemand&gt; + &lt;Enabled&gt;true&lt;/Enabled&gt; + &lt;Hidden&gt;false&lt;/Hidden&gt; + &lt;RunOnlyIfIdle&gt;false&lt;/RunOnlyIfIdle&gt; + &lt;WakeToRun&gt;false&lt;/WakeToRun&gt; + &lt;ExecutionTimeLimit&gt;PT72H&lt;/ExecutionTimeLimit&gt; + &lt;Priority&gt;7&lt;/Priority&gt; + &lt;/Settings&gt; + &lt;Actions Context="Author"&gt; + &lt;Exec&gt; + &lt;Command&gt;C:\Windows\System32\wscript.exe&lt;/Command&gt; + &lt;Arguments&gt;C:\Windows\Setup\Scripts\UnlockStartLayout.vbs&lt;/Arguments&gt; + &lt;/Exec&gt; + &lt;/Actions&gt; +&lt;/Task&gt; + </File> + <File path="C:\Windows\Setup\Scripts\SetStartPins.ps1"> +$json = '{"pinnedList":[]}'; +if( [System.Environment]::OSVersion.Version.Build -lt 20000 ) { + return; +} +$key = 'Registry::HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start'; +New-Item -Path $key -ItemType 'Directory' -ErrorAction 'SilentlyContinue'; +Set-ItemProperty -LiteralPath $key -Name 'ConfigureStartPins' -Value $json -Type 'String'; + </File> + <File path="C:\Windows\Setup\Scripts\SetColorTheme.ps1"> +$lightThemeSystem = 0; +$lightThemeApps = 0; +$accentColorOnStart = 0; +$enableTransparency = 0; +$htmlAccentColor = '#0078D4'; +&amp; { + $params = @{ + LiteralPath = 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize'; + Force = $true; + Type = 'DWord'; + }; + Set-ItemProperty @params -Name 'SystemUsesLightTheme' -Value $lightThemeSystem; + Set-ItemProperty @params -Name 'AppsUseLightTheme' -Value $lightThemeApps; + Set-ItemProperty @params -Name 'ColorPrevalence' -Value $accentColorOnStart; + Set-ItemProperty @params -Name 'EnableTransparency' -Value $enableTransparency; +}; +&amp; { + Add-Type -AssemblyName 'System.Drawing'; + $accentColor = [System.Drawing.ColorTranslator]::FromHtml( $htmlAccentColor ); + + function ConvertTo-DWord { + param( + [System.Drawing.Color] + $Color + ); + + [byte[]]$bytes = @( + $Color.R; + $Color.G; + $Color.B; + $Color.A; + ); + return [System.BitConverter]::ToUInt32( $bytes, 0); + } + + $startColor = [System.Drawing.Color]::FromArgb( 0xD2, $accentColor ); + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent' -Name 'StartColorMenu' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent' -Name 'AccentColorMenu' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\DWM' -Name 'AccentColor' -Value( ConvertTo-DWord -Color $accentColor ) -Type 'DWord' -Force; + $params = @{ + LiteralPath = 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Accent'; + Name = 'AccentPalette'; + }; + $palette = Get-ItemPropertyValue @params; + $index = 20; + $palette[ $index++ ] = $accentColor.R; + $palette[ $index++ ] = $accentColor.G; + $palette[ $index++ ] = $accentColor.B; + $palette[ $index++ ] = $accentColor.A; + Set-ItemProperty @params -Value $palette -Type 'Binary' -Force; +}; + </File> + <File path="C:\Windows\Setup\Scripts\Specialize.ps1"> +$scripts = @( + { + reg.exe add "HKLM\SYSTEM\Setup\MoSetup" /v AllowUpgradesWithUnsupportedTPMOrCPU /t REG_DWORD /d 1 /f; + }; + { + net.exe accounts /maxpwage:UNLIMITED; + }; + { + reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v "DisableCloudOptimizedContent" /t REG_DWORD /d 1 /f; + [System.Diagnostics.EventLog]::CreateEventSource( 'UnattendGenerator', 'Application' ); + }; + { + Register-ScheduledTask -TaskName 'UnlockStartLayout' -Xml $( Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UnlockStartLayout.xml' -Raw ); + }; + { + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f + }; + { + Remove-Item -LiteralPath 'C:\Users\Public\Desktop\Microsoft Edge.lnk' -ErrorAction 'SilentlyContinue' -Verbose; + }; + { + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKLM\Software\Policies\Microsoft\Edge" /v HideFirstRunExperience /t REG_DWORD /d 1 /f; + }; + { + reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v BackgroundModeEnabled /t REG_DWORD /d 0 /f; + reg.exe add "HKLM\Software\Policies\Microsoft\Edge\Recommended" /v StartupBoostEnabled /t REG_DWORD /d 0 /f; + }; + { + &amp; 'C:\Windows\Setup\Scripts\SetStartPins.ps1'; + }; + { + reg.exe add "HKU\.DEFAULT\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f; + }; + { + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /t REG_DWORD /d 1 /f; + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWindowsUpdateAccess /t REG_DWORD /d 1 /f; + }; +); + +&amp; { + [float]$complete = 0; + [float]$increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Id 0 -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\Specialize.log"; + </File> + <File path="C:\Windows\Setup\Scripts\UserOnce.ps1"> +$scripts = @( + { + [System.Diagnostics.EventLog]::WriteEntry( 'UnattendGenerator', "User '$env:USERNAME' has requested to unlock the Start menu layout.", [System.Diagnostics.EventLogEntryType]::Information, 1 ); + }; + { + Remove-Item -Path "${env:USERPROFILE}\Desktop\*.lnk" -Force -ErrorAction 'SilentlyContinue'; + Remove-Item -Path "$env:HOMEDRIVE\Users\Default\Desktop\*.lnk" -Force -ErrorAction 'SilentlyContinue'; + }; + { + $taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"; + if( Test-Path $taskbarPath ) { + Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force; + } + Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband' -Name 'FavoritesRemovedChanges' -Force -ErrorAction 'SilentlyContinue'; + Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband' -Name 'FavoritesChanges' -Force -ErrorAction 'SilentlyContinue'; + Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband' -Name 'Favorites' -Force -ErrorAction 'SilentlyContinue'; + }; + { + reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f; + }; + { + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -Type 'DWord' -Value 1; + }; + { + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Search' -Name 'SearchboxTaskbarMode' -Type 'DWord' -Value 0; + }; + { + &amp; 'C:\Windows\Setup\Scripts\SetColorTheme.ps1'; + }; + { + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested" /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested" /v Enabled /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /v Enabled /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /v Enabled /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /v Enabled /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v AllAppsViewMode /t REG_DWORD /d 2 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_AccountNotifications /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowAllPinsList /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowFrequentList /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowRecentList /t REG_DWORD /d 0 /f; + reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackDocs /t REG_DWORD /d 0 /f; + }; + { + Restart-Computer -Force; + }; +); + +&amp; { + [float]$complete = 0; + [float]$increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Id 0 -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "$env:TEMP\UserOnce.log"; + </File> + <File path="C:\Windows\Setup\Scripts\DefaultUser.ps1"> +$scripts = @( + { + reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v "StartLayoutFile" /t REG_SZ /d "C:\Windows\Setup\Scripts\TaskbarLayoutModification.xml" /f; + reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\Explorer" /v "LockedStartLayout" /t REG_DWORD /d 1 /f; + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v TaskbarAl /t REG_DWORD /d 0 /f; + }; + { + foreach( $root in 'Registry::HKU\.DEFAULT', 'Registry::HKU\DefaultUser' ) { + Set-ItemProperty -LiteralPath "$root\Control Panel\Keyboard" -Name 'InitialKeyboardIndicators' -Type 'String' -Value 2 -Force; + } + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\TaskbarDeveloperSettings" /v TaskbarEndTask /t REG_DWORD /d 1 /f; + }; + { + reg.exe add "HKU\DefaultUser\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 10 /f; + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\DWM" /v ColorPrevalence /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -WindowStyle \""Normal\"" -ExecutionPolicy \""Unrestricted\"" -NoProfile -File \""C:\Windows\Setup\Scripts\UserOnce.ps1\""" /f; + }; +); + +&amp; { + [float]$complete = 0; + [float]$increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Id 0 -Activity 'Running scripts to modify the default user&#x2019;&#x2019;s registry hive. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\DefaultUser.log"; + </File> + <File path="C:\Windows\Setup\Scripts\FirstLogon.ps1"> +$scripts = @( + { + Remove-Item -LiteralPath @( + 'C:\Windows\Panther\unattend.xml'; + 'C:\Windows\Panther\unattend-original.xml'; + 'C:\Windows\Setup\Scripts\Wifi.xml'; + 'C:\Windows.old'; + ) -Recurse -Force -ErrorAction 'SilentlyContinue'; + }; + { + reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoUpdate /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v AUOptions /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v UseWUServer /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DisableWindowsUpdateAccess /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f; + reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f; + reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v DODownloadMode /f; + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\BITS" /v Start /t REG_DWORD /d 3 /f; + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\wuauserv" /v Start /t REG_DWORD /d 3 /f; + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\UsoSvc" /v Start /t REG_DWORD /d 2 /f; + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" /v Start /t REG_DWORD /d 3 /f; + }; + { + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" /f; + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /f; + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /f; + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" /v IsEducationEnvironment /t REG_DWORD /d 1 /f; + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v HideRecommendedSection /t REG_DWORD /d 1 /f; + reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v HideRecommendedSection /t REG_DWORD /d 1 /f; + }; + { + $recallFeature = Get-WindowsOptionalFeature -Online -ErrorAction SilentlyContinue | Where-Object { $_.State -eq 'Enabled' -and $_.FeatureName -like 'Recall' }; + if( $recallFeature ) { + Disable-WindowsOptionalFeature -Online -FeatureName 'Recall' -Remove -ErrorAction SilentlyContinue; + } + }; + { + $viveDir = Join-Path $env:TEMP 'ViVeTool'; + $viveZip = Join-Path $env:TEMP 'ViVeTool.zip'; + Invoke-WebRequest 'https://github.com/thebookisclosed/ViVe/releases/download/v0.3.4/ViVeTool-v0.3.4-IntelAmd.zip' -OutFile $viveZip; + Expand-Archive -Path $viveZip -DestinationPath $viveDir -Force; + Remove-Item -Path $viveZip -Force; + Start-Process -FilePath (Join-Path $viveDir 'ViVeTool.exe') -ArgumentList '/disable /id:47205210' -Wait -NoNewWindow; + Remove-Item -Path $viveDir -Recurse -Force; + }; + { + if( (Get-BitLockerVolume -MountPoint $Env:SystemDrive).ProtectionStatus -eq 'On' ) { + Disable-BitLocker -MountPoint $Env:SystemDrive; + } + }; + { + if( (bcdedit | Select-String 'path').Count -eq 2 ) { + bcdedit /set `{bootmgr`} timeout 0; + } + }; +); + +&amp; { + [float]$complete = 0; + [float]$increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Id 0 -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 | Out-String -Width 1KB -Stream &gt;&gt; "C:\Windows\Setup\Scripts\FirstLogon.log"; + </File> + </Extensions> +</unattend> diff --git a/tools/devdocs-generator.md b/tools/devdocs-generator.md new file mode 100644 index 0000000000..41d56d3be7 --- /dev/null +++ b/tools/devdocs-generator.md @@ -0,0 +1,105 @@ +--- +title: "Dev Docs Generator" +description: "How the devdocs-generator.ps1 script works" +--- + +# Dev Docs Generator + +The `devdocs-generator.ps1` script automatically generates Hugo-compatible markdown files for the development documentation. It pulls content directly from the JSON config files and PowerShell function files so the docs never go out of sync. + +## When Does it Run? + +- Automatically triggered by the `docs.yaml` GitHub Actions workflow, which generates the `.md` files, commits them back to the repo, and then triggers Hugo to build the site +- Automatically runs during the pre-release workflow, committing the updated `"link"` properties back to the JSON config files +- Watches `docs/**`, `config/tweaks.json`, `config/feature.json`, and `functions/**` for changes +- Supports manual runs via `workflow_dispatch` + +## What Does It Do? + +### 1. Loads the Data + +- Reads `config/tweaks.json` and `config/feature.json` +- Reads all `.ps1` function files from `functions/public/` and `functions/private/` +- Parses `Invoke-WPFButton.ps1` to build a mapping of button names to their function names + +### 2. Updates Links in JSON + +- Adds or updates a `"link"` property on every entry in both JSON config files +- Each link points to that entry's documentation page on the Hugo site +- The updated links are automatically committed back to the JSON config files as part of the pre-release workflow + +### 3. Cleans Up Old Docs + +- Deletes all `.md` files (except `_index.md`) from `docs/content/dev/tweaks/` and `docs/content/dev/features/` +- This prevents duplicate or orphaned files from previous runs + +### 4. Generates Tweak Documentation + +For each entry in `tweaks.json` that belongs to a documented category: + +- **Button type** entries get the mapped PowerShell function file embedded +- **All other types** get the raw JSON snippet embedded with correct line numbers from the source file +- Entries with **registry changes** get a Registry Changes section added +- Entries with **services** get the `Set-WinUtilService.ps1` function appended + +### 5. Generates Feature Documentation + +For each entry in `feature.json` that belongs to a documented category: + +- **Fixes and Legacy Windows Panels** get the mapped PowerShell function file embedded +- **Features** get the raw JSON snippet embedded with correct line numbers + +### 6. Output Format + +- Every `.md` file gets Hugo frontmatter with `title` and `description` +- Code blocks use Hugo syntax with filename labels and line numbers +- Files are organized into category subdirectories matching the JSON `category` field + +## Documented Categories + +The script generates docs for entries in these categories: + +- Essential Tweaks +- z--Advanced-Tweaks---CAUTION +- Customize Preferences +- Performance Plans +- Features +- Fixes +- Legacy Windows Panels + +## File Structure + +``` +docs/content/dev/ + tweaks/ + Essential-Tweaks/ + z--Advanced-Tweaks---CAUTION/ + Customize-Preferences/ + Performance-Plans/ + features/ + Features/ + Fixes/ + Legacy-Windows-Panels/ +``` + +## How File Names Are Derived + +The script strips common prefixes from the JSON key names using the pattern `WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?`. For example: + +| JSON Key | Generated File | +| ------------------- | -------------- | +| `WPFTweaksHiber` | `Hiber.md` | +| `WPFTweaksDeBloat` | `DeBloat.md` | +| `WPFFeatureshyperv` | `hyperv.md` | +| `WPFPanelDISM` | `DISM.md` | + +## Key Points + +- The JSON config files are the single source of truth +- Manual edits to generated `.md` files will be overwritten on the next run +- The script does not modify `_index.md` or `architecture.md` + — do not delete `_index.md` or `architecture.md`, as they will need to be recreated manually. +- Category directories are created automatically if they don't exist +- The `"link"` property added to JSON entries is excluded from the displayed code blocks +- The `docs` workflow generates the `.md` files and commits them back to the repo before Hugo builds the site +- The `pre-release` workflow generates the `"link"` properties and commits them back to the repo diff --git a/tools/devdocs-generator.ps1 b/tools/devdocs-generator.ps1 index 792f6581af..2853b36e16 100644 --- a/tools/devdocs-generator.ps1 +++ b/tools/devdocs-generator.ps1 @@ -1,644 +1,343 @@ <# .DESCRIPTION - This script generates markdown files for the development documentation based on the existing JSON files. - Create table of content and archive any files in the dev folder not modified by this script. - This script is not meant to be used manually, it is called by the github action workflow. + Generates Hugo markdown docs from config/tweaks.json and config/feature.json. + Run by the GitHub Actions docs workflow before Hugo build. #> -function Process-MultilineStrings { - param ( - [Parameter(Mandatory, position=0)] - [string]$str - ) - - $lines = $str.Split("`r`n") - $count = $lines.Count - - # Loop through every line, expect last line in the string - # We'll add it after the for loop - for ($i = 0; $i -lt ($count - 1); $i++) { - $line = $lines[$i] - $processedStr += $line -replace ('^\s*\\\\', '') - # Add the previously removed NewLine character by 'Split' Method - $processedStr += "`r`n" - } - - # Add last line *without* a NewLine character. - $processedStr += $lines[$($count - 1)] -replace ('^\s*\\\\', '') - - return $processedStr -} - function Update-Progress { param ( [Parameter(Mandatory, position=0)] [string]$StatusMessage, - [Parameter(Mandatory, position=1)] [ValidateRange(0,100)] - [int]$Percent, - - [Parameter(position=2)] - [string]$Activity = "Compiling" + [int]$Percent ) - - Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent + Write-Progress -Activity "Generating Dev Docs" -Status $StatusMessage -PercentComplete $Percent } -function Load-Functions { +function Get-RawJsonBlock { + # Returns the raw JSON text and 1-based start line for an item, excluding the "link" property. param ( - [Parameter(Mandatory, position=0)] - [string]$dir + [Parameter(Mandatory)] + [string]$ItemName, + [Parameter(Mandatory)] + [AllowEmptyString()] + [string[]]$JsonLines ) - Get-ChildItem -Path $dir -Filter *.ps1 | ForEach-Object { - $functionName = $_.BaseName - $functionContent = Get-Content -Path $_.FullName -Raw - $functions[$functionName] = $functionContent - } -} - -function Get-CalledFunctions { - param ( - [Parameter(Mandatory, position=0)] - $scriptContent, - - [Parameter(Mandatory, position=1)] - [hashtable]$functionList, - - [Parameter(Mandatory, position=2)] - [ref]$processedFunctions - ) + $escapedName = [regex]::Escape($ItemName) + $startIndex = -1 + $startIndent = "" - $calledFunctions = @() - foreach ($functionName in $functionList.Keys) { - if ($scriptContent -match "\b$functionName\b" -and -not $processedFunctions.Value.Contains($functionName)) { - $calledFunctions += $functionName - $processedFunctions.Value.Add($functionName) - if ($functionList[$functionName]) { - $nestedFunctions = Get-CalledFunctions -scriptContent $functionList[$functionName] -functionList $functionList -processedFunctions $processedFunctions - $calledFunctions += $nestedFunctions - } + for ($i = 0; $i -lt $JsonLines.Count; $i++) { + if ($JsonLines[$i] -match "^(\s*)`"$escapedName`"\s*:\s*\{") { + $startIndex = $i + $startIndent = $matches[1] + break } } - return $calledFunctions -} -function Get-AdditionalFunctionsFromToggle { - param ( - [Parameter(Mandatory, position=0)] - [string]$buttonName - ) + if ($startIndex -eq -1) { + Write-Warning "Could not find '$ItemName' in JSON" + return $null + } - $invokeWpfToggleContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFToggle.ps1" -Raw - $lines = $invokeWpfToggleContent -split "`r`n" - foreach ($line in $lines) { - if ($line -match "`"$buttonName`" \{Invoke-(WinUtil[a-zA-Z]+)") { - return $matches[1] + $escapedIndent = [regex]::Escape($startIndent) + $endIndex = -1 + for ($i = ($startIndex + 1); $i -lt $JsonLines.Count; $i++) { + if ($JsonLines[$i] -match "^$escapedIndent\}") { + $endIndex = $i + break } } -} -function Get-AdditionalFunctionsFromButton { - param ( - [Parameter(Mandatory, position=0)] - [string]$buttonName - ) + if ($endIndex -eq -1) { + Write-Warning "Could not find closing brace for '$ItemName'" + return $null + } - $invokeWpfButtonContent = Get-Content -Path "$publicFunctionsDir/Invoke-WPFButton.ps1" -Raw - $lines = $invokeWpfButtonContent -split "`r`n" - foreach ($line in $lines) { - if ($line -match "`"$buttonName`" \{Invoke-(WPF[a-zA-Z]+)") { - return $matches[1] + # Strip trailing "link" property and blank lines before returning + $lastContentIndex = $endIndex - 1 + while ($lastContentIndex -gt $startIndex) { + $trimmed = $JsonLines[$lastContentIndex].Trim() + if ($trimmed -eq "" -or $trimmed -match '^"link"') { + $lastContentIndex-- + } else { + break } } + + return @{ + LineNumber = $startIndex + 1 + RawText = ($JsonLines[$startIndex..$lastContentIndex] -join "`r`n") + } } -function Add-LinkAttribute { +function Get-ButtonFunctionMapping { + # Parses Invoke-WPFButton.ps1 and returns a hashtable of button name -> function name. param ( [Parameter(Mandatory)] - [PSCustomObject]$jsonObject + [string]$ButtonFilePath ) - $totalProperties = ($jsonObject.PSObject.Properties | Measure-Object).Count - $progressIncrement = 50 / $totalProperties - $currentProgress = 50 - - foreach ($property in $jsonObject.PSObject.Properties) { - if ($property.Value -is [PSCustomObject]) { - Add-LinkAttribute -jsonObject $property.Value - } elseif ($property.Value -is [System.Collections.ArrayList]) { - foreach ($item in $property.Value) { - if ($item -is [PSCustomObject]) { - Add-LinkAttribute -jsonObject $item - } - } + $mapping = @{} + foreach ($line in (Get-Content -Path $ButtonFilePath)) { + if ($line -match '^\s*"(\w+)"\s*\{(Invoke-\w+)') { + $mapping[$matches[1]] = $matches[2] } - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Adding documentation links" -Percent $roundedProgress - } - if ($jsonObject -ne $global:rootObject) { - $jsonObject | Add-Member -NotePropertyName "link" -NotePropertyValue "" -Force } + return $mapping } -function Generate-MarkdownFiles { +function Add-LinkAttributeToJson { + # Updates only the "link" property for each entry in a JSON config file. + # Reads via ConvertFrom-Json for metadata, then edits lines directly to avoid reformatting. param ( - [Parameter(Mandatory, position=0)] - [PSCustomObject]$data, - - [Parameter(Mandatory, position=1)] - [string]$outputDir, - - [Parameter(Mandatory, position=2)] - [string]$jsonFilePath, - - [Parameter(Mandatory, position=3)] - [string]$lastModified, - - [Parameter(Mandatory, position=4)] - [string]$type, - - [Parameter(position=5)] - [int]$initialProgress + [Parameter(Mandatory)] + [string]$JsonFilePath, + [Parameter(Mandatory)] + [string]$UrlPrefix, + [Parameter(Mandatory)] + [string]$ItemNameToCut ) - # TODO: Make the function reference generation better by making a Graph, so it highlights - # Which function "depends" on which, and makes it clearer on a high-level for the reader - # to understand the general structure. - - $totalItems = ($data.PSObject.Properties | Measure-Object).Count - $progressIncrement = 10 / $totalItems - $currentProgress = [int]$initialProgress - - $tocEntries = @() - $processedFiles = @() - foreach ($itemName in $data.PSObject.Properties.Name) { - # Create Category Directory if needed. - $itemDetails = $data.$itemName - $category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-' - $categoryDir = "$outputDir/$category" - if (-Not (Test-Path -Path $categoryDir)) { - New-Item -ItemType Directory -Path $categoryDir | Out-Null - } + $jsonData = Get-Content -Path $JsonFilePath -Raw | ConvertFrom-Json + $lines = [System.Collections.Generic.List[string]](Get-Content -Path $JsonFilePath) - # Create empty files with correct path - $fullItemName = $itemName - $displayName = $itemName -replace $itemnametocut, '' - $filename = "$categoryDir/$displayName.md" - $relativePath = "$outputDir/$category/$displayName.md" -replace '^docs/', '' - if (-Not (Test-Path -Path $filename)) { - Set-Content -Path $filename -Value "" -Encoding utf8 - } - - # Add the entry to 'tocEntries' so we can generate Table Of Content easily - # And add the Full FileName of entry - $tocEntries += @{ - Category = $category - Path = $relativePath - Name = $itemDetails.Content - Type = $type + foreach ($item in $jsonData.PSObject.Properties) { + $itemName = $item.Name + $category = $item.Value.category -replace '[^a-zA-Z0-9]', '-' + $displayName = $itemName -replace $ItemNameToCut, '' + $newLink = "$UrlPrefix/$($category.ToLower())/$($displayName.ToLower())" + $escapedName = [regex]::Escape($itemName) + + # Find item start line + $startIdx = -1 + for ($i = 0; $i -lt $lines.Count; $i++) { + if ($lines[$i] -match "^\s*`"$escapedName`"\s*:\s*\{") { + $startIdx = $i + break + } } - $processedFiles += (Get-Item $filename).FullName - - $header = "# $([string]$itemDetails.Content)" + "`r`n" - $lastUpdatedNotice = "Last Updated: $lastModified" + "`r`n" - $autoupdatenotice = Process-MultilineStrings @" - \\!!! 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 = Process-MultilineStrings @" - \\## Description - \\ - \\$([string]$itemDetails.Description) -"@ - - $jsonContent = ($itemDetails | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r") - $codeBlock = Process-MultilineStrings @" - \\<details> - \\<summary>Preview Code</summary> - \\ - \\``````json - \\$jsonContent - \\`````` - \\ - \\</details> -"@ - - # Clear the variable before continuing, will cause problems otherwise - $FeaturesDocs = "" - if ($itemDetails.feature) { - $FeaturesDocs += Process-MultilineStrings @" - \\## Features - \\ - \\ - \\Optional Windows Features are additional functionalities or components in the Windows operating system that users can choose to enable or disable based on their specific needs and preferences. - \\ - \\ - \\You can find information about Optional Windows Features on [Microsoft's Website for Optional Features](https://learn.microsoft.com/en-us/windows/client-management/client-tools/add-remove-hide-features?pivots=windows-11). - \\ - \\ -"@ - if (($itemDetails.feature).Count -gt 1) { - $FeaturesDocs += "### Features to install" + "`r`n" - } else { - $FeaturesDocs += "### Feature to install" + "`r`n" + if ($startIdx -eq -1) { continue } + + # Derive indentation: propIndent is one level deeper than the item start. + # Used to target only top-level properties and skip nested object braces. + $null = $lines[$startIdx] -match '^(\s*)' + $propIndent = $matches[1] + ' ' + $propIndentLen = $propIndent.Length + $escapedPropIndent = [regex]::Escape($propIndent) + + # Scan forward: update existing "link" or find the closing brace to insert one. + # Closing brace is matched by indent <= propIndentLen to handle inconsistent formatting. + $linkUpdated = $false + $closeBraceIdx = -1 + for ($j = $startIdx + 1; $j -lt $lines.Count; $j++) { + if ($lines[$j] -match "^$escapedPropIndent`"link`"\s*:") { + $lines[$j] = $lines[$j] -replace '"link"\s*:\s*"[^"]*"', "`"link`": `"$newLink`"" + $linkUpdated = $true + break } - foreach ($feature in $itemDetails.feature) { - $FeaturesDocs += "- $($feature)" + "`r`n" + if ($lines[$j] -match '^\s*\}') { + $null = $lines[$j] -match '^(\s*)' + if ($matches[1].Length -le $propIndentLen) { + $closeBraceIdx = $j + break + } } } - # Clear the variable before continuing, will cause problems otherwise - $InvokeScript = "" - if ($itemDetails.InvokeScript) { - $InvokeScriptContent = $itemDetails.InvokeScript | Out-String - $InvokeScript = Process-MultilineStrings @" - \\## Invoke Script - \\ - \\``````powershell - \\$InvokeScriptContent - \\`````` -"@ - } + if (-not $linkUpdated -and $closeBraceIdx -ne -1) { + # Insert "link" before the closing brace + $prevPropIdx = $closeBraceIdx - 1 + while ($prevPropIdx -gt $startIdx -and $lines[$prevPropIdx].Trim() -eq '') { $prevPropIdx-- } - # Clear the variable before continuing, will cause problems otherwise - $UndoScript = "" - if ($itemDetails.UndoScript) { - $UndoScriptContent = $itemDetails.UndoScript | Out-String - $UndoScript = Process-MultilineStrings @" - \\## Undo Script - \\ - \\``````powershell - \\$UndoScriptContent - \\`````` -"@ + if ($lines[$prevPropIdx] -notmatch ',\s*$') { + $lines[$prevPropIdx] = $lines[$prevPropIdx].TrimEnd() + ',' + } + $lines.Insert($closeBraceIdx, "$propIndent`"link`": `"$newLink`"") } + } - # Clear the variable before continuing, will cause problems otherwise - $ToggleScript = "" - if ($itemDetails.ToggleScript) { - $ToggleScriptContent = $itemDetails.ToggleScript | Out-String - $ToggleScript = Process-MultilineStrings @" - \\## Toggle Script - \\ - \\``````powershell - \\$ToggleScriptContent - \\`````` -"@ - } + Set-Content -Path $JsonFilePath -Value $lines -Encoding utf8 +} - # Clear the variable before continuing, will cause problems otherwise - $ButtonScript = "" - if ($itemDetails.ButtonScript) { - $ButtonScriptContent = $itemDetails.ButtonScript | Out-String - $ButtonScript = Process-MultilineStrings @" - \\## Button Script - \\ - \\``````powershell - \\$ButtonScriptContent - \\`````` -"@ - } +# ============================================================================== +# Main +# ============================================================================== + +$scriptDir = if ($PSScriptRoot) { $PSScriptRoot } else { (Get-Location).Path } +$repoRoot = Resolve-Path "$scriptDir/.." + +$tweaksJsonPath = "$repoRoot/config/tweaks.json" +$featuresJsonPath = "$repoRoot/config/feature.json" +$tweaksOutputDir = "$repoRoot/docs/content/dev/tweaks" +$featuresOutputDir = "$repoRoot/docs/content/dev/features" +$publicFunctionsDir = "$repoRoot/functions/public" +$privateFunctionsDir = "$repoRoot/functions/private" + +$itemnametocut = 'WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?' +$baseUrl = "https://winutil.christitus.com" + +# Categories with generated docs +$documentedCategories = @( + "Essential Tweaks", + "z__Advanced Tweaks - CAUTION", + "Customize Preferences", + "Performance Plans", + "Features", + "Fixes", + "Legacy Windows Panels", + "Powershell Profile Powershell 7+ Only", + "Remote Access" +) + +# Categories where Button entries embed a PS function instead of raw JSON +$functionEmbedCategories = @( + "Fixes", + "Powershell Profile Powershell 7+ Only", + "Remote Access" +) - # Clear the variable before continuing, will cause problems otherwise - $FunctionDetails = "" - $processedFunctions = New-Object 'System.Collections.Generic.HashSet[System.String]' - $allScripts = @($itemDetails.InvokeScript, $itemDetails.UndoScript, $itemDetails.ToggleScript, $itemDetails.ButtonScript) - foreach ($script in $allScripts) { - if ($script) { - $calledFunctions = Get-CalledFunctions -scriptContent $script -functionList $functions -processedFunctions ([ref]$processedFunctions) - foreach ($functionName in $calledFunctions) { - if ($functions.ContainsKey($functionName)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $functionName - \\ - \\``````powershell - \\$($functions[$functionName]) - \\`````` - \\ -"@ - } - } - } - } +Update-Progress "Loading JSON files" 10 +$tweaks = Get-Content -Path $tweaksJsonPath -Raw | ConvertFrom-Json +$features = Get-Content -Path $featuresJsonPath -Raw | ConvertFrom-Json - $additionalFunctionToggle = Get-AdditionalFunctionsFromToggle -buttonName $fullItemName - if ($additionalFunctionToggle) { - $additionalFunctionNameToggle = "Invoke-$additionalFunctionToggle" - if ($functions.ContainsKey($additionalFunctionNameToggle) -and -not $processedFunctions.Contains($additionalFunctionNameToggle)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $additionalFunctionNameToggle - \\ - \\``````powershell - \\$($functions[$additionalFunctionNameToggle]) - \\`````` - \\ -"@ - $processedFunctions.Add($additionalFunctionNameToggle) - } - } +Update-Progress "Loading function files" 20 +$functionFiles = @{} +Get-ChildItem -Path $publicFunctionsDir -Filter *.ps1 | ForEach-Object { + $functionFiles[$_.BaseName] = @{ Content = (Get-Content -Path $_.FullName -Raw).TrimEnd(); RelativePath = "functions/public/$($_.Name)" } +} +Get-ChildItem -Path $privateFunctionsDir -Filter *.ps1 | ForEach-Object { + $functionFiles[$_.BaseName] = @{ Content = (Get-Content -Path $_.FullName -Raw).TrimEnd(); RelativePath = "functions/private/$($_.Name)" } +} - $additionalFunctionButton = Get-AdditionalFunctionsFromButton -buttonName $fullItemName - if ($additionalFunctionButton) { - $additionalFunctionNameButton = "Invoke-$additionalFunctionButton" - if ($functions.ContainsKey($additionalFunctionNameButton) -and -not $processedFunctions.Contains($additionalFunctionNameButton)) { - $FunctionDetails += Process-MultilineStrings @" - \\## Function: $additionalFunctionNameButton - \\ - \\``````powershell - \\$($functions[$additionalFunctionNameButton]) - \\`````` - \\ -"@ - $processedFunctions.Add($additionalFunctionNameButton) - } - } +Update-Progress "Building button-to-function mapping" 30 +$buttonFunctionMap = Get-ButtonFunctionMapping -ButtonFilePath "$publicFunctionsDir/Invoke-WPFButton.ps1" - # Clear the variable before continuing, will cause problems otherwise - $registryDocs = "" - if ($itemDetails.registry) { - $registryDocs += Process-MultilineStrings @" - \\## 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). - \\ - \\ -"@ - foreach ($regEntry in $itemDetails.registry) { - $registryDocs += Process-MultilineStrings @" - \\### Registry Key: $($regEntry.Name) - \\ - \\**Type:** $($regEntry.Type) - \\ - \\**Original Value:** $($regEntry.OriginalValue) - \\ - \\**New Value:** $($regEntry.Value) - \\ - \\ -"@ - } - } +Update-Progress "Updating documentation links in JSON" 40 +Add-LinkAttributeToJson -JsonFilePath $tweaksJsonPath -UrlPrefix "$baseUrl/dev/tweaks" -ItemNameToCut $itemnametocut +Add-LinkAttributeToJson -JsonFilePath $featuresJsonPath -UrlPrefix "$baseUrl/dev/features" -ItemNameToCut $itemnametocut - # Clear the variable before continuing, will cause problems otherwise - $serviceDocs = "" - if ($itemDetails.service) { - $serviceDocs = Process-MultilineStrings @" - \\## Service Changes - \\ - \\Windows services are background processes for system functions or applications. Setting some to manual optimizes performance by starting them only when needed. - \\ - \\You can find information about services on [Wikipedia](https://www.wikiwand.com/en/Windows_service) and [Microsoft's Website](https://learn.microsoft.com/en-us/dotnet/framework/windows-services/introduction-to-windows-service-applications). - \\ - \\ -"@ - foreach ($service in $itemDetails.service) { - $serviceDocs += Process-MultilineStrings @" - \\### Service Name: $($service.Name) - \\ - \\**Startup Type:** $($service.StartupType) - \\ - \\**Original Type:** $($service.OriginalType) - \\ - \\ -"@ - } - } +# Reload lines after link update so line numbers in docs are accurate +$tweaksLines = Get-Content -Path $tweaksJsonPath +$featuresLines = Get-Content -Path $featuresJsonPath - # Clear the variable before continuing, will cause problems otherwise - $scheduledTaskDocs = "" - if ($itemDetails.ScheduledTask) { - $scheduledTaskDocs = Process-MultilineStrings @" - \\## Scheduled Task Changes - \\ - \\Windows scheduled tasks are used to run scripts or programs at specific times or events. Disabling unnecessary tasks can improve system performance and reduce unwanted background activity. - \\ - \\ - \\You can find information about scheduled tasks on [Wikipedia](https://www.wikiwand.com/en/Windows_Task_Scheduler) and [Microsoft's Website](https://learn.microsoft.com/en-us/windows/desktop/taskschd/about-the-task-scheduler). - \\ - \\ -"@ - foreach ($task in $itemDetails.ScheduledTask) { - $scheduledTaskDocs += Process-MultilineStrings @" - \\### Task Name: $($task.Name) - \\ - \\**State:** $($task.State) - \\ - \\**Original State:** $($task.OriginalState) - \\ - \\ -"@ - } - } +# ============================================================================== +# Clean up old generated .md files (preserve _index.md) +# ============================================================================== - $jsonLink = "[View the JSON file](https://github.com/ChrisTitusTech/winutil/tree/main/$jsonFilePath)" - $customContentStartTag = "<!-- BEGIN CUSTOM CONTENT -->" - $customContentEndTag = "<!-- END CUSTOM CONTENT -->" - $secondCustomContentStartTag = "<!-- BEGIN SECOND CUSTOM CONTENT -->" - $secondCustomContentEndTag = "<!-- END SECOND CUSTOM CONTENT -->" - - if (Test-Path -Path "$filename") { - $existingContent = Get-Content -Path "$filename" -Raw - $customContentPattern = "(?s)$customContentStartTag(.*?)$customContentEndTag" - $secondCustomContentPattern = "(?s)$secondCustomContentStartTag(.*?)$secondCustomContentEndTag" - if ($existingContent -match $customContentPattern) { - $customContent = $matches[1].Trim() - } - if ($existingContent -match $secondCustomContentPattern) { - $secondCustomContent = $matches[1].Trim() - } - } +Update-Progress "Cleaning up old generated docs" 45 +foreach ($dir in @($tweaksOutputDir, $featuresOutputDir)) { + Get-ChildItem -Path $dir -Recurse -Filter *.md | Where-Object { + $_.Name -ne "_index.md" + } | Remove-Item -Force +} - $fileContent = Process-MultilineStrings @" - \\$header - \\$lastUpdatedNotice - \\ - \\$autoupdatenotice - \\$( if ($itemDetails.Description) { $description } ) - \\ - \\$customContentStartTag - \\$customContent - \\$customContentEndTag - \\ - \\$codeBlock - \\ - \\$( - if ($FeaturesDocs) { $FeaturesDocs + "`r`n" } - if ($itemDetails.InvokeScript) { $InvokeScript + "`r`n" } - if ($itemDetails.UndoScript) { $UndoScript + "`r`n" } - if ($itemDetails.ToggleScript) { $ToggleScript + "`r`n" } - if ($itemDetails.ButtonScript) { $ButtonScript + "`r`n" } - if ($FunctionDetails) { $FunctionDetails + "`r`n" } - if ($itemDetails.registry) { $registryDocs + "`r`n" } - if ($itemDetails.service) { $serviceDocs + "`r`n" } - if ($itemDetails.ScheduledTask) { $scheduledTaskDocs + "`r`n" } - ) - \\$secondCustomContentStartTag - \\$secondCustomContent - \\$secondCustomContentEndTag - \\ - \\ - \\$jsonLink -"@ - - Set-Content -Path "$filename" -Value "$fileContent" -Encoding utf8 - - # TODO: For whatever reason, some headers have a space before them, - # so as a temporary fix.. we'll remove these it so mkdocs can render properly - (Get-Content -Raw -Path "$filename").Replace(' ##', '##') | Set-Content "$filename" - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Generating content for documentation" -Percent $roundedProgress - } +# ============================================================================== +# Generate Tweak Documentation +# ============================================================================== - return [PSCustomObject]@{ - TocEntries = $tocEntries - ProcessedFiles = $processedFiles - } -} +Update-Progress "Generating tweak documentation" 50 -function Generate-TypeSectionContent { - param ( - [array]$entries - ) +$tweakNames = $tweaks.PSObject.Properties.Name +$totalTweaks = $tweakNames.Count +$tweakCount = 0 - $totalEntries = $entries.Count - $progressIncrement = 10 / $totalEntries - $currentProgress = 90 +foreach ($itemName in $tweakNames) { + $item = $tweaks.$itemName + $tweakCount++ - $sectionContent = "" - $categories = @{} - foreach ($entry in $entries) { - if (-Not $categories.ContainsKey($entry.Category)) { - $categories[$entry.Category] = @() - } - $categories[$entry.Category] += $entry + if ($item.category -notin $documentedCategories) { continue } - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Generating table of contents" -Percent $roundedProgress - } - foreach ($category in $categories.Keys) { - $sectionContent += "### $category`r`n`r`n" - foreach ($entry in $categories[$category]) { - $sectionContent += "- [$($entry.Name)]($($entry.Path))`r`n" - } - } - return $sectionContent -} + $category = $item.category -replace '[^a-zA-Z0-9]', '-' + $displayName = $itemName -replace $itemnametocut, '' + $categoryDir = "$tweaksOutputDir/$category" + $filename = "$categoryDir/$displayName.md" -function Add-LinkAttributeToJson { - param ( - [string]$jsonFilePath, - [string]$outputDir - ) + if (-Not (Test-Path -Path $categoryDir)) { New-Item -ItemType Directory -Path $categoryDir | Out-Null } - $jsonText = Get-Content -Path $jsonFilePath -Raw - $jsonData = $jsonText | ConvertFrom-Json + $title = $item.Content -replace '"', '\"' + $content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n`r`n" - $totalItems = ($jsonData.PSObject.Properties | Measure-Object).Count - $progressIncrement = 20 / $totalItems - $currentProgress = 70 + if ($item.Type -eq "Button") { + $funcName = $buttonFunctionMap[$itemName] + if ($funcName -and $functionFiles.ContainsKey($funcName)) { + $func = $functionFiles[$funcName] + $content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n" + $content += $func.Content + "`r`n" + $content += "```````r`n" + } + } else { + $jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $tweaksLines + if ($jsonBlock) { + $content += "``````json {filename=`"config/tweaks.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n" + $content += $jsonBlock.RawText + "`r`n" + $content += "```````r`n" + } - foreach ($item in $jsonData.PSObject.Properties) { - $itemName = $item.Name - $itemDetails = $item.Value - $category = $itemDetails.category -replace '[^a-zA-Z0-9]', '-' - $displayName = $itemName -replace "$itemnametocut", '' - $relativePath = "$outputDir/$category/$displayName" -replace '^docs/', '' - $docLink = "https://christitustech.github.io/winutil/$relativePath" - $jsonData.$itemName.link = $docLink - - $currentProgress += $progressIncrement - $roundedProgress = [math]::Round($currentProgress) - Update-Progress -StatusMessage "Adding documentation links to JSON" -Percent $roundedProgress + if ($item.registry) { + $content += "`r`n## Registry Changes`r`n`r`n" + $content += "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.`r`n`r`n" + $content += "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).`r`n" + } } - $jsonText = ($jsonData | ConvertTo-Json -Depth 10).replace('\n',"`n").replace('\r', "`r") - Set-Content -Path $jsonFilePath -Value ($jsonText) -Encoding utf8 -} + Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline -Update-Progress "Loading JSON files" 10 -$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json -$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json - -Update-Progress "Getting last modified dates of the JSON files" 20 -$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd") -$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd") - -$tweaksOutputDir = "../docs/dev/tweaks" -$featuresOutputDir = "../docs/dev/features" -$privateFunctionsDir = "../functions/private" -$publicFunctionsDir = "../functions/public" -$functions = @{} -$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?" - -Update-Progress "Creating Directories" 30 -if (-Not (Test-Path -Path $tweaksOutputDir)) { - New-Item -ItemType Directory -Path $tweaksOutputDir | Out-Null -} -if (-Not (Test-Path -Path $featuresOutputDir)) { - New-Item -ItemType Directory -Path $featuresOutputDir | Out-Null + $percent = [Math]::Min(70, 50 + [int](($tweakCount / $totalTweaks) * 20)) + Update-Progress "Generating tweak documentation ($tweakCount/$totalTweaks)" $percent } -Update-Progress "Loading existing Functions" 40 -Load-Functions -dir $privateFunctionsDir -Load-Functions -dir $publicFunctionsDir +# ============================================================================== +# Generate Feature Documentation +# ============================================================================== -Update-Progress "Adding documentation links to JSON files" 50 +Update-Progress "Generating feature documentation" 70 -# Define the JSON file paths -$jsonPaths = @("../config/feature.json", "../config/tweaks.json") +$featureNames = $features.PSObject.Properties.Name +$totalFeatures = $featureNames.Count +$featureCount = 0 -# Loop through each JSON file path -foreach ($jsonPath in $jsonPaths) { - # Load the JSON content - $json = Get-Content -Raw -Path $jsonPath | ConvertFrom-Json +foreach ($itemName in $featureNames) { + $item = $features.$itemName + $featureCount++ - # Set the global root object to the current json object - $global:rootObject = $json + if ($item.category -notin $documentedCategories) { continue } + if ($itemName -eq "WPFFeatureInstall") { continue } - # Add the "link" attribute to the JSON - Add-LinkAttribute -jsonObject $json + $category = $item.category -replace '[^a-zA-Z0-9]', '-' + $displayName = $itemName -replace $itemnametocut, '' + $categoryDir = "$featuresOutputDir/$category" + $filename = "$categoryDir/$displayName.md" - # Convert back to JSON with the original formatting - $jsonString = ($json | ConvertTo-Json -Depth 100).replace('\n',"`n").replace('\r', "`r") + if (-Not (Test-Path -Path $categoryDir)) { New-Item -ItemType Directory -Path $categoryDir | Out-Null } - # Save the JSON back to the file - Set-Content -Path $jsonPath -Value $jsonString -} + $title = $item.Content -replace '"', '\"' + $content = "---`r`ntitle: `"$title`"`r`ndescription: `"`"`r`n---`r`n`r`n" -Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks" -Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features" - -Update-Progress "Generating content for documentation" 60 -$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60 -$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70 - -Update-Progress "Generating table of contents" 80 -$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries -$tweakEntries = ($allTocEntries).where{ $_.Type -eq 'tweak' } | Sort-Object Category, Name -$featureEntries = ($allTocEntries).where{ $_.Type -eq 'feature' } | Sort-Object Category, Name - -$indexContent += Process-MultilineStrings @" - \\# Table of Contents - \\ - \\ - \\## Tweaks - \\ - \\ -"@ -$indexContent += $(Generate-TypeSectionContent $tweakEntries) + "`r`n" -$indexContent += Process-MultilineStrings @" - \\## Features - \\ - \\ -"@ -$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n" -Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8 + if ($item.category -in $functionEmbedCategories) { + $funcName = if ($item.function) { $item.function } else { $buttonFunctionMap[$itemName] } + if ($funcName -and $functionFiles.ContainsKey($funcName)) { + $func = $functionFiles[$funcName] + $content += "``````powershell {filename=`"$($func.RelativePath)`",linenos=inline,linenostart=1}`r`n" + $content += $func.Content + "`r`n" + $content += "```````r`n" + } + } else { + $jsonBlock = Get-RawJsonBlock -ItemName $itemName -JsonLines $featuresLines + if ($jsonBlock) { + $content += "``````json {filename=`"config/feature.json`",linenos=inline,linenostart=$($jsonBlock.LineNumber)}`r`n" + $content += $jsonBlock.RawText + "`r`n" + $content += "```````r`n" + } + } + + Set-Content -Path $filename -Value $content -Encoding utf8 -NoNewline + + $percent = [Math]::Min(90, 70 + [int](($featureCount / $totalFeatures) * 20)) + Update-Progress "Generating feature documentation ($featureCount/$totalFeatures)" $percent +} Update-Progress "Process Completed" 100 +Write-Host "Documentation generation complete." diff --git a/windev.ps1 b/windev.ps1 index 6b627e08ed..6c74c59259 100644 --- a/windev.ps1 +++ b/windev.ps1 @@ -1,55 +1,13 @@ <# .SYNOPSIS This Script is used as a target for the https://christitus.com/windev alias. - It queries the latest winget release (no matter if Pre-Release, Draft or Full Release) and invokes It .DESCRIPTION - This Script provides a simple way to always start the bleeding edge release even if it's not yet a full release. - This function should be run with administrative privileges. - Because this way of recursively invoking scripts via Invoke-Expression it might very well happen that AV Programs flag this because it's a common way of mulitstage exploits to run + This Script provides a simple way to start the bleeding edge release of winutil. .EXAMPLE irm https://christitus.com/windev | iex OR Run in Admin Powershell > ./windev.ps1 #> -# Function to fetch the latest release tag from the GitHub API -function Get-LatestRelease { - try { - $releases = Invoke-RestMethod -Uri 'https://api.github.com/repos/ChrisTitusTech/winutil/releases' - $latestRelease = $releases | Where-Object {$_.prerelease -eq $true} | Select-Object -First 1 - return $latestRelease.tag_name - } catch { - Write-Host "Error fetching release data: $_" -ForegroundColor Red - return $latestRelease.tag_name - } -} - -# Function to redirect to the latest pre-release version -function RedirectToLatestPreRelease { - $latestRelease = Get-LatestRelease - if ($latestRelease) { - $url = "https://github.com/ChrisTitusTech/winutil/releases/download/$latestRelease/winutil.ps1" - } else { - Write-Host 'No pre-release version found. This is most likely because the latest release is a full release and no newer pre-release exists.' -ForegroundColor Yellow - Write-Host "Using latest Full Release" - $url = "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1" - } - - $script = Invoke-RestMethod $url - # Elevate Shell if necessary - 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." - - $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 $(Invoke-Expression $script)" -Verb RunAs - } - else{ - Invoke-Expression $script - } -} - -# Call the redirect function - -RedirectToLatestPreRelease +$latestTag = (Invoke-RestMethod "https://api.github.com/repos/ChrisTitusTech/winutil/tags")[0].name +Invoke-RestMethod "https://github.com/ChrisTitusTech/winutil/releases/download/$latestTag/winutil.ps1" | Invoke-Expression diff --git a/xaml/inputXML.xaml b/xaml/inputXML.xaml index 39610760b0..8148adfda7 100644 --- a/xaml/inputXML.xaml +++ b/xaml/inputXML.xaml @@ -10,21 +10,36 @@ WindowStyle="None" Width="Auto" Height="Auto" - MaxWidth="1380" - MaxHeight="800" - Title="Chris Titus Tech's Windows Utility"> + MinWidth="800" + MinHeight="600" + Title="WinUtil"> <WindowChrome.WindowChrome> <WindowChrome CaptionHeight="0" CornerRadius="10"/> </WindowChrome.WindowChrome> <Window.Resources> <Style TargetType="ToolTip"> - <Setter Property="Background" Value="{DynamicResource MainBackgroundColor}"/> + <Setter Property="Background" Value="{DynamicResource ToolTipBackgroundColor}"/> <Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/> - <Setter Property="BorderBrush" Value="{DynamicResource ButtonBackgroundSelectedColor}"/> + <Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/> + <Setter Property="MaxWidth" Value="{DynamicResource ToolTipWidth}"/> <Setter Property="BorderThickness" Value="1"/> - <Setter Property="Padding" Value="5"/> + <Setter Property="Padding" Value="2"/> <Setter Property="FontSize" Value="{DynamicResource FontSize}"/> <Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/> + <!-- This ContentTemplate ensures that the content of the ToolTip wraps text properly for better readability --> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate> + <ContentPresenter Content="{TemplateBinding Content}"> + <ContentPresenter.Resources> + <Style TargetType="TextBlock"> + <Setter Property="TextWrapping" Value="Wrap"/> + </Style> + </ContentPresenter.Resources> + </ContentPresenter> + </DataTemplate> + </Setter.Value> + </Setter> </Style> <Style TargetType="{x:Type MenuItem}"> @@ -67,7 +82,110 @@ </Trigger> </Style.Triggers> </Style> + <Style x:Key="AppEntryBorderStyle" TargetType="Border"> + <Setter Property="BorderBrush" Value="Gray"/> + <Setter Property="BorderThickness" Value="{DynamicResource AppEntryBorderThickness}"/> + <Setter Property="CornerRadius" Value="2"/> + <Setter Property="Padding" Value="{DynamicResource AppEntryMargin}"/> + <Setter Property="Width" Value="{DynamicResource AppEntryWidth}"/> + <Setter Property="VerticalAlignment" Value="Top"/> + <Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/> + <Setter Property="Cursor" Value="Hand"/> + <Setter Property="Background" Value="{DynamicResource AppInstallUnselectedColor}"/> + </Style> + <Style x:Key="AppEntryCheckboxStyle" TargetType="CheckBox"> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="HorizontalAlignment" Value="Left"/> + <Setter Property="VerticalAlignment" Value="Center"/> + <Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="CheckBox"> + <StackPanel Orientation="Horizontal"> + <Grid Width="16" Height="16" Margin="0,0,8,0"> + <Border x:Name="CheckBoxBorder" + BorderBrush="{DynamicResource MainForegroundColor}" + Background="{DynamicResource ButtonBackgroundColor}" + BorderThickness="1" + Width="12" + Height="12" + CornerRadius="2"/> + <Path x:Name="CheckMark" + Stroke="{DynamicResource ToggleButtonOnColor}" + StrokeThickness="2" + Data="M 2 8 L 6 12 L 14 4" + Visibility="Collapsed"/> + </Grid> + <ContentPresenter Content="{TemplateBinding Content}" + VerticalAlignment="Center" + HorizontalAlignment="Left"/> + </StackPanel> + <ControlTemplate.Triggers> + <Trigger Property="IsChecked" Value="True"> + <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="AppEntryNameStyle" TargetType="TextBlock"> + <Setter Property="FontSize" Value="{DynamicResource AppEntryFontSize}"/> + <Setter Property="FontWeight" Value="Bold"/> + <Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}"/> + <Setter Property="VerticalAlignment" Value="Center"/> + <Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/> + <Setter Property="Background" Value="Transparent"/> + </Style> + <Style x:Key="AppEntryButtonStyle" TargetType="Button"> + <Setter Property="Width" Value="{DynamicResource IconButtonSize}"/> + <Setter Property="Height" Value="{DynamicResource IconButtonSize}"/> + <Setter Property="Margin" Value="{DynamicResource AppEntryMargin}"/> + <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/> + <Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/> + <Setter Property="HorizontalAlignment" Value="Center"/> + <Setter Property="VerticalAlignment" Value="Center"/> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate> + <TextBlock Text="{Binding}" + FontFamily="Segoe MDL2 Assets" + FontSize="{DynamicResource IconFontSize}" + Background="Transparent"/> + </DataTemplate> + </Setter.Value> + </Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="Button"> + <Grid> + <Border x:Name="BackgroundBorder" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{DynamicResource ButtonBorderThickness}" + CornerRadius="{DynamicResource ButtonCornerRadius}"> + <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> + </Border> + </Grid> + <ControlTemplate.Triggers> + <Trigger Property="IsPressed" Value="True"> + <Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/> + </Trigger> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Cursor" Value="Hand"/> + <Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/> + </Trigger> + <Trigger Property="IsEnabled" Value="False"> + <Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/> + <Setter Property="Foreground" Value="DimGray"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + + </Style> <Style TargetType="Button" x:Key="HoverButtonStyle"> <Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" /> <Setter Property="FontWeight" Value="Normal" /> @@ -155,22 +273,43 @@ <Style TargetType="ComboBox"> <Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundColor}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxBackgroundColor}" /> + <Setter Property="MinWidth" Value="{DynamicResource ButtonWidth}" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ComboBox"> <Grid> - <ToggleButton x:Name="ToggleButton" - Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding Background}" - BorderThickness="0" - IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" - ClickMode="Press"> - <TextBlock Text="{TemplateBinding SelectionBoxItem}" - Foreground="{TemplateBinding Foreground}" - Background="Transparent" - HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2" - /> - </ToggleButton> + <Border x:Name="OuterBorder" + BorderBrush="{DynamicResource BorderColor}" + BorderThickness="1" + CornerRadius="{DynamicResource ButtonCornerRadius}" + Background="{TemplateBinding Background}"> + <ToggleButton x:Name="ToggleButton" + Background="Transparent" + BorderThickness="0" + IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" + ClickMode="Press"> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <TextBlock Grid.Column="0" + Text="{TemplateBinding SelectionBoxItem}" + Foreground="{TemplateBinding Foreground}" + Background="Transparent" + HorizontalAlignment="Left" VerticalAlignment="Center" + Margin="6,3,2,3"/> + <Path Grid.Column="1" + Data="M 0,0 L 8,0 L 4,5 Z" + Fill="{TemplateBinding Foreground}" + Width="8" Height="5" + VerticalAlignment="Center" + HorizontalAlignment="Center" + Stretch="Uniform" + Margin="4,0,6,0"/> + </Grid> + </ToggleButton> + </Border> <Popup x:Name="Popup" IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" @@ -179,11 +318,11 @@ PopupAnimation="Slide"> <Border x:Name="DropDownBorder" Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding Foreground}" + BorderBrush="{DynamicResource BorderColor}" BorderThickness="1" CornerRadius="4"> <ScrollViewer> - <ItemsPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2"/> + <ItemsPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,2"/> </ScrollViewer> </Border> </Popup> @@ -298,6 +437,103 @@ </Setter.Value> </Setter> </Style> + + <Style x:Key="ToggleButtonStyle" TargetType="ToggleButton"> + <Setter Property="Margin" Value="{DynamicResource ButtonMargin}"/> + <Setter Property="Foreground" Value="{DynamicResource ButtonForegroundColor}"/> + <Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}"/> + <Setter Property="Height" Value="{DynamicResource ButtonHeight}"/> + <Setter Property="Width" Value="{DynamicResource ButtonWidth}"/> + <Setter Property="FontSize" Value="{DynamicResource ButtonFontSize}"/> + <Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="ToggleButton"> + <Grid> + <Border x:Name="BackgroundBorder" + Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{DynamicResource ButtonBorderThickness}" + CornerRadius="{DynamicResource ButtonCornerRadius}"> + <Grid> + <!-- Toggle Dot Background --> + <Ellipse Width="8" Height="16" + Fill="{DynamicResource ToggleButtonOnColor}" + HorizontalAlignment="Right" + VerticalAlignment="Top" + Margin="0,3,5,0" /> + + <!-- Toggle Dot with hover grow effect --> + <Ellipse x:Name="ToggleDot" + Width="8" Height="8" + Fill="{DynamicResource ButtonForegroundColor}" + HorizontalAlignment="Right" + VerticalAlignment="Top" + Margin="0,3,5,0" + RenderTransformOrigin="0.5,0.5"> + <Ellipse.RenderTransform> + <ScaleTransform ScaleX="1" ScaleY="1"/> + </Ellipse.RenderTransform> + </Ellipse> + + <!-- Content Presenter --> + <ContentPresenter HorizontalAlignment="Center" + VerticalAlignment="Center" + Margin="10,2,10,2"/> + </Grid> + </Border> + </Grid> + + <!-- Triggers for ToggleButton states --> + <ControlTemplate.Triggers> + <!-- Hover effect --> + <Trigger Property="IsMouseOver" Value="True"> + <Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundMouseoverColor}"/> + <Trigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <!-- Animation to grow the dot when hovered --> + <DoubleAnimation Storyboard.TargetName="ToggleDot" + Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" + To="1.2" Duration="0:0:0.1"/> + <DoubleAnimation Storyboard.TargetName="ToggleDot" + Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" + To="1.2" Duration="0:0:0.1"/> + </Storyboard> + </BeginStoryboard> + </Trigger.EnterActions> + <Trigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <!-- Animation to shrink the dot back to original size when not hovered --> + <DoubleAnimation Storyboard.TargetName="ToggleDot" + Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" + To="1.0" Duration="0:0:0.1"/> + <DoubleAnimation Storyboard.TargetName="ToggleDot" + Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" + To="1.0" Duration="0:0:0.1"/> + </Storyboard> + </BeginStoryboard> + </Trigger.ExitActions> + </Trigger> + + <!-- IsChecked state --> + <Trigger Property="IsChecked" Value="True"> + <Setter TargetName="ToggleDot" Property="VerticalAlignment" Value="Bottom"/> + <Setter TargetName="ToggleDot" Property="Margin" Value="0,0,5,3"/> + </Trigger> + + <!-- IsEnabled state --> + <Trigger Property="IsEnabled" Value="False"> + <Setter TargetName="BackgroundBorder" Property="Background" Value="{DynamicResource ButtonBackgroundSelectedColor}"/> + <Setter Property="Foreground" Value="DimGray"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + <Style x:Key="SearchBarClearButtonStyle" TargetType="Button"> <Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/> <Setter Property="FontSize" Value="{DynamicResource SearchBarClearButtonFontSize}"/> @@ -338,13 +574,20 @@ BorderThickness="1" Width="{DynamicResource CheckBoxBulletDecoratorSize *0.85}" Height="{DynamicResource CheckBoxBulletDecoratorSize *0.85}" - Margin="2" + Margin="1" SnapsToDevicePixels="True"/> - <Path x:Name="CheckMark" - Stroke="{DynamicResource ToggleButtonOnColor}" - StrokeThickness="2" - Data="M 0 5 L 5 10 L 12 0" - Visibility="Collapsed"/> + <Viewbox x:Name="CheckMarkContainer" + Width="{DynamicResource CheckBoxBulletDecoratorSize}" + Height="{DynamicResource CheckBoxBulletDecoratorSize}" + HorizontalAlignment="Center" + VerticalAlignment="Center" + Visibility="Collapsed"> + <Path x:Name="CheckMark" + Stroke="{DynamicResource ToggleButtonOnColor}" + StrokeThickness="1.5" + Data="M 0 5 L 5 10 L 12 0" + Stretch="Uniform"/> + </Viewbox> </Grid> </BulletDecorator.Bullet> <ContentPresenter Margin="4,0,0,0" @@ -355,7 +598,7 @@ </Grid> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> - <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/> + <Setter TargetName="CheckMarkContainer" Property="Visibility" Value="Visible"/> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <!--Setter TargetName="Border" Property="Background" Value="{DynamicResource ButtonBackgroundPressedColor}"/--> @@ -375,22 +618,24 @@ <Setter.Value> <ControlTemplate TargetType="RadioButton"> <StackPanel Orientation="Horizontal" Margin="{DynamicResource CheckBoxMargin}"> - <Grid Width="14" Height="14"> - <Ellipse x:Name="OuterCircle" - Stroke="{DynamicResource ToggleButtonOffColor}" - Fill="{DynamicResource ButtonBackgroundColor}" - StrokeThickness="1" - Width="14" - Height="14" - SnapsToDevicePixels="True"/> - <Ellipse x:Name="InnerCircle" - Fill="{DynamicResource ToggleButtonOnColor}" - Width="8" - Height="8" - Visibility="Collapsed" - HorizontalAlignment="Center" - VerticalAlignment="Center"/> - </Grid> + <Viewbox Width="{DynamicResource CheckBoxBulletDecoratorSize}" Height="{DynamicResource CheckBoxBulletDecoratorSize}"> + <Grid Width="14" Height="14"> + <Ellipse x:Name="OuterCircle" + Stroke="{DynamicResource ToggleButtonOffColor}" + Fill="{DynamicResource ButtonBackgroundColor}" + StrokeThickness="1" + Width="14" + Height="14" + SnapsToDevicePixels="True"/> + <Ellipse x:Name="InnerCircle" + Fill="{DynamicResource ToggleButtonOnColor}" + Width="8" + Height="8" + Visibility="Collapsed" + HorizontalAlignment="Center" + VerticalAlignment="Center"/> + </Grid> + </Viewbox> <ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/> @@ -607,6 +852,7 @@ <Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> + <Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/> <Setter Property="ContextMenu"> <Setter.Value> <ContextMenu> @@ -661,6 +907,7 @@ <Setter Property="HorizontalAlignment" Value="Stretch"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> + <Setter Property="CaretBrush" Value="{DynamicResource MainForegroundColor}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="PasswordBox"> @@ -696,150 +943,122 @@ </Window.Resources> <Grid Background="{DynamicResource MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch"> <Grid.RowDefinitions> - <RowDefinition Height="{DynamicResource TabRowHeightInPixels}"/> - <RowDefinition Height=".9*"/> + <RowDefinition Height="Auto"/> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> - <DockPanel HorizontalAlignment="Stretch" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto"> - <StackPanel Name="NavLogoPanel" Orientation="Horizontal" HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Margin="10,0,20,0"> + <!-- Offline banner --> + <Border Name="WPFOfflineBanner" Grid.Row="0" Background="#8B0000" Visibility="Collapsed" Padding="6,4"> + <TextBlock Text="&#x26A0; Offline Mode - No Internet Connection" Foreground="White" FontWeight="Bold" + HorizontalAlignment="Center" FontSize="13" Background="Transparent"/> + </Border> + <Grid Grid.Row="1" Background="{DynamicResource MainBackgroundColor}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto"/> <!-- Navigation buttons --> + <ColumnDefinition Width="*"/> <!-- Search bar and buttons --> + </Grid.ColumnDefinitions> + + <!-- Navigation Buttons Panel --> + <StackPanel Name="NavDockPanel" Orientation="Horizontal" Grid.Column="0" Margin="5,5,10,5"> + <StackPanel Name="NavLogoPanel" Orientation="Horizontal" HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Margin="10,0,20,0"> + </StackPanel> + <ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" + Background="{DynamicResource ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT"> + <ToggleButton.Content> + <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonInstallForegroundColor}" > + <Underline>I</Underline>nstall + </TextBlock> + </ToggleButton.Content> + </ToggleButton> + <ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" + Background="{DynamicResource ButtonTweaksBackgroundColor}" Foreground="{DynamicResource ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT"> + <ToggleButton.Content> + <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonTweaksForegroundColor}"> + <Underline>T</Underline>weaks + </TextBlock> + </ToggleButton.Content> + </ToggleButton> + <ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" + Background="{DynamicResource ButtonConfigBackgroundColor}" Foreground="{DynamicResource ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT"> + <ToggleButton.Content> + <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonConfigForegroundColor}"> + <Underline>C</Underline>onfig + </TextBlock> + </ToggleButton.Content> + </ToggleButton> + <ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" + Background="{DynamicResource ButtonUpdatesBackgroundColor}" Foreground="{DynamicResource ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT"> + <ToggleButton.Content> + <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonUpdatesForegroundColor}"> + <Underline>U</Underline>pdates + </TextBlock> + </ToggleButton.Content> + </ToggleButton> + <ToggleButton Margin="0,0,5,0" Height="{DynamicResource TabButtonHeight}" Width="Auto" MinWidth="{DynamicResource TabButtonWidth}" + Background="{DynamicResource ButtonWin11ISOBackgroundColor}" Foreground="{DynamicResource ButtonWin11ISOForegroundColor}" FontWeight="Bold" Name="WPFTab5BT"> + <ToggleButton.Content> + <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonWin11ISOForegroundColor}"> + <Underline>W</Underline>in11 Creator + </TextBlock> + </ToggleButton.Content> + </ToggleButton> </StackPanel> - <ToggleButton Margin="0,0,5,0" HorizontalAlignment="Left" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" - Background="{DynamicResource ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT"> - <ToggleButton.Content> - <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonInstallForegroundColor}" > - <Underline>I</Underline>nstall - </TextBlock> - </ToggleButton.Content> - </ToggleButton> - <ToggleButton Margin="0,0,5,0" HorizontalAlignment="Left" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" - Background="{DynamicResource ButtonTweaksBackgroundColor}" Foreground="{DynamicResource ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT"> - <ToggleButton.Content> - <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonTweaksForegroundColor}"> - <Underline>T</Underline>weaks - </TextBlock> - </ToggleButton.Content> - </ToggleButton> - <ToggleButton Margin="0,0,5,0" HorizontalAlignment="Left" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" - Background="{DynamicResource ButtonConfigBackgroundColor}" Foreground="{DynamicResource ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT"> - <ToggleButton.Content> - <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonConfigForegroundColor}"> - <Underline>C</Underline>onfig - </TextBlock> - </ToggleButton.Content> - </ToggleButton> - <ToggleButton Margin="0,0,5,0" HorizontalAlignment="Left" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" - Background="{DynamicResource ButtonUpdatesBackgroundColor}" Foreground="{DynamicResource ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT"> - <ToggleButton.Content> - <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonUpdatesForegroundColor}"> - <Underline>U</Underline>pdates - </TextBlock> - </ToggleButton.Content> - </ToggleButton> - <ToggleButton Margin="0,0,5,0" HorizontalAlignment="Left" Height="{DynamicResource TabButtonHeight}" Width="{DynamicResource TabButtonWidth}" - Background="{DynamicResource ButtonUpdatesBackgroundColor}" Foreground="{DynamicResource ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab5BT"> - <ToggleButton.Content> - <TextBlock FontSize="{DynamicResource TabButtonFontSize}" Background="Transparent" Foreground="{DynamicResource ButtonUpdatesForegroundColor}"> - <Underline>M</Underline>icroWin - </TextBlock> - </ToggleButton.Content> - </ToggleButton> - <Grid Background="{DynamicResource MainBackgroundColor}" ShowGridLines="False" Width="Auto" Height="Auto" HorizontalAlignment="Stretch"> + + <!-- Search Bar and Action Buttons --> + <Grid Name="GridBesideNavDockPanel" Grid.Column="1" Background="{DynamicResource MainBackgroundColor}" ShowGridLines="False" Height="Auto"> <Grid.ColumnDefinitions> - <ColumnDefinition Width="*"/> <!-- Main content area --> - <ColumnDefinition Width="Auto"/><!-- Space for options button --> - <ColumnDefinition Width="Auto"/><!-- Space for close button --> - <ColumnDefinition Width="Auto"/> - <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="2*"/> <!-- Search bar area - priority space --> + <ColumnDefinition Width="Auto"/><!-- Buttons area --> </Grid.ColumnDefinitions> - <!-- - TODO: - Make this SearchBar TextBox Position itself and still - house the Magnifying Glass Character in place, - even if that Magnifying Icon changed its Size, - it should be positioned relative to the SearchBar. - Consider using a Math Solver, will help in making - development of these things much easier - --> - <TextBox - Grid.Column="0" - Width="{DynamicResource SearchBarWidth}" - Height="{DynamicResource SearchBarHeight}" - FontSize="{DynamicResource SearchBarTextBoxFontSize}" - VerticalAlignment="Center" HorizontalAlignment="Left" - BorderThickness="1" - Name="SearchBar" - Foreground="{DynamicResource MainForegroundColor}" Background="{DynamicResource 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"> - </TextBox> - <TextBlock - Grid.Column="0" - VerticalAlignment="Center" HorizontalAlignment="Left" - FontFamily="Segoe MDL2 Assets" - Foreground="{DynamicResource ButtonBackgroundSelectedColor}" - FontSize="{DynamicResource IconFontSize}" - Margin="180,0,0,0">&#xE721; - </TextBlock> - <!-- - TODO: - Make this ClearButton Positioning react to - SearchBar Width Value changing, so it'll look correct. - Consider using a Math Solver, will help in making - development of these things much easier - --> + <Border Grid.Column="0" Margin="5,0,0,0" Width="{DynamicResource SearchBarWidth}" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Left"> + <Grid> + <TextBox + Width="{DynamicResource SearchBarWidth}" + Height="{DynamicResource SearchBarHeight}" + FontSize="{DynamicResource SearchBarTextBoxFontSize}" + VerticalAlignment="Center" HorizontalAlignment="Left" + BorderThickness="1" + Name="SearchBar" + Foreground="{DynamicResource MainForegroundColor}" Background="{DynamicResource MainBackgroundColor}" + Padding="3,3,30,0" + ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter"> + </TextBox> + <TextBlock + VerticalAlignment="Center" HorizontalAlignment="Right" + FontFamily="Segoe MDL2 Assets" + Foreground="{DynamicResource ButtonBackgroundSelectedColor}" + FontSize="{DynamicResource IconFontSize}" + Margin="0,0,8,0" Width="Auto" Height="Auto">&#xE721; + </TextBlock> + </Grid> + </Border> <Button Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Name="SearchBarClearButton" Style="{StaticResource SearchBarClearButtonStyle}" - Margin="210,0,0,0" Visibility="Collapsed"> + Margin="213,0,0,0" Visibility="Collapsed"> </Button> - <ProgressBar - Grid.Column="1" - Minimum="0" - Maximum="100" - Width="250" - Height="{DynamicResource SearchBarHeight}" - Foreground="{DynamicResource ProgressBarForegroundColor}" Background="{DynamicResource ProgressBarBackgroundColor}" BorderBrush="{DynamicResource ProgressBarForegroundColor}" - Visibility="Collapsed" - VerticalAlignment="Center" HorizontalAlignment="Left" - Margin="2,0,0,0" BorderThickness="1" Padding="6,2,2,2" - Name="ProgressBar"> - </ProgressBar> - <Label - Grid.Column="1" - Width="250" - Height="{DynamicResource SearchBarHeight}" - VerticalAlignment="Center" HorizontalAlignment="Left" - FontSize="{DynamicResource SearchBarTextBoxFontSize}" - Background="Transparent" - Visibility="Collapsed" - Margin="2,0,0,0" BorderThickness="0" Padding="6,2,2,2" - Name="ProgressBarLabel"> - <TextBlock - TextTrimming="CharacterEllipsis" - Background="Transparent" - Foreground="{DynamicResource ProgressBarTextColor}"> - </TextBlock> - </Label> - <Button Name="ThemeButton" - Style="{StaticResource HoverButtonStyle}" - Grid.Column="2" BorderBrush="Transparent" + <!-- Buttons Container --> + <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5,5,5,5"> + <Button Name="ThemeButton" + Style="{StaticResource HoverButtonStyle}" + BorderBrush="Transparent" Background="{DynamicResource MainBackgroundColor}" Foreground="{DynamicResource MainForegroundColor}" FontSize="{DynamicResource SettingsIconFontSize}" Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}" HorizontalAlignment="Right" VerticalAlignment="Top" - Margin="0,5,5,0" + Margin="0,0,2,0" FontFamily="Segoe MDL2 Assets" Content="N/A" ToolTip="Change the Winutil UI Theme" /> - <Popup Grid.Column="2" Name="ThemePopup" + <Popup Name="ThemePopup" IsOpen="False" PlacementTarget="{Binding ElementName=ThemeButton}" Placement="Bottom" HorizontalAlignment="Right" VerticalAlignment="Top"> @@ -864,19 +1083,86 @@ </Border> </Popup> + <Button Name="FontScalingButton" + Style="{StaticResource HoverButtonStyle}" + BorderBrush="Transparent" + Background="{DynamicResource MainBackgroundColor}" + Foreground="{DynamicResource MainForegroundColor}" + FontSize="{DynamicResource SettingsIconFontSize}" + Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}" + HorizontalAlignment="Right" VerticalAlignment="Top" + Margin="0,0,2,0" + FontFamily="Segoe MDL2 Assets" + Content="&#xE8D3;" + ToolTip="Adjust Font Scaling for Accessibility" + /> + <Popup Name="FontScalingPopup" + IsOpen="False" + PlacementTarget="{Binding ElementName=FontScalingButton}" Placement="Bottom" + HorizontalAlignment="Right" VerticalAlignment="Top"> + <Border Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0"> + <StackPanel Background="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="200"> + <TextBlock Text="Font Scaling" + FontSize="{DynamicResource ButtonFontSize}" + Foreground="{DynamicResource MainForegroundColor}" + HorizontalAlignment="Center" + Margin="10,5,10,5" + FontWeight="Bold"/> + <Separator Margin="5,0,5,5"/> + <StackPanel Orientation="Horizontal" Margin="10,5,10,10"> + <TextBlock Text="Small" + FontSize="{DynamicResource ButtonFontSize}" + Foreground="{DynamicResource MainForegroundColor}" + VerticalAlignment="Center" + Margin="0,0,10,0"/> + <Slider Name="FontScalingSlider" + Minimum="0.75" Maximum="2.0" + Value="1.0" + TickFrequency="0.25" + TickPlacement="BottomRight" + IsSnapToTickEnabled="True" + Width="120" + VerticalAlignment="Center"/> + <TextBlock Text="Large" + FontSize="{DynamicResource ButtonFontSize}" + Foreground="{DynamicResource MainForegroundColor}" + VerticalAlignment="Center" + Margin="10,0,0,0"/> + </StackPanel> + <TextBlock Name="FontScalingValue" + Text="100%" + FontSize="{DynamicResource ButtonFontSize}" + Foreground="{DynamicResource MainForegroundColor}" + HorizontalAlignment="Center" + Margin="10,0,10,5"/> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10,0,10,10"> + <Button Name="FontScalingResetButton" + Content="Reset" + Style="{StaticResource HoverButtonStyle}" + Width="60" Height="25" + Margin="5,0,5,0"/> + <Button Name="FontScalingApplyButton" + Content="Apply" + Style="{StaticResource HoverButtonStyle}" + Width="60" Height="25" + Margin="5,0,5,0"/> + </StackPanel> + </StackPanel> + </Border> + </Popup> - <Button Name="SettingsButton" - Style="{StaticResource HoverButtonStyle}" - Grid.Column="3" BorderBrush="Transparent" + <Button Name="SettingsButton" + Style="{StaticResource HoverButtonStyle}" + BorderBrush="Transparent" Background="{DynamicResource MainBackgroundColor}" Foreground="{DynamicResource MainForegroundColor}" FontSize="{DynamicResource SettingsIconFontSize}" Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}" HorizontalAlignment="Right" VerticalAlignment="Top" - Margin="5,5,5,0" + Margin="0,0,2,0" FontFamily="Segoe MDL2 Assets" Content="&#xE713;"/> - <Popup Grid.Column="3" Name="SettingsPopup" + <Popup Name="SettingsPopup" IsOpen="False" PlacementTarget="{Binding ElementName=SettingsButton}" Placement="Bottom" HorizontalAlignment="Right" VerticalAlignment="Top"> @@ -894,52 +1180,41 @@ </MenuItem> <Separator/> <MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{DynamicResource MainForegroundColor}"/> + <MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Documentation" Name="DocumentationMenuItem" Foreground="{DynamicResource MainForegroundColor}"/> <MenuItem FontSize="{DynamicResource ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{DynamicResource MainForegroundColor}"/> </StackPanel> </Border> </Popup> - <Button - Grid.Column="4" - Content="&#xD7;" BorderThickness="0" + <Button + Content="&#xD7;" BorderThickness="0" BorderBrush="Transparent" Background="{DynamicResource MainBackgroundColor}" Width="{DynamicResource IconButtonSize}" Height="{DynamicResource IconButtonSize}" HorizontalAlignment="Right" VerticalAlignment="Top" - Margin="0,5,5,0" + Margin="0,0,0,0" FontFamily="{DynamicResource FontFamily}" Foreground="{DynamicResource MainForegroundColor}" FontSize="{DynamicResource CloseIconFontSize}" Name="WPFCloseButton" /> + </StackPanel> </Grid> + </Grid> - </DockPanel> - - <TabControl Name="WPFTabNav" Background="Transparent" Width="Auto" Height="Auto" BorderBrush="Transparent" BorderThickness="0" Grid.Row="1" Grid.Column="0" Padding="-1"> + <TabControl Name="WPFTabNav" Background="Transparent" Width="Auto" Height="Auto" BorderBrush="Transparent" BorderThickness="0" Grid.Row="2" Grid.Column="0" Padding="-1"> <TabItem Header="Install" Visibility="Collapsed" Name="WPFTab1"> <Grid Background="Transparent" > - <Grid.RowDefinitions> - <RowDefinition Height="45px"/> - <RowDefinition Height="0.95*"/> - </Grid.RowDefinitions> - <StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="{DynamicResource TabContentMargin}"> - <Button Name="WPFInstall" Content=" Install/Upgrade Selected" Margin="2" /> - <Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/> - <Button Name="WPFUninstall" Content=" Uninstall Selected" Margin="2"/> - <Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/> - <Button Name="WPFClearInstallSelection" Content=" Clear Selection" Margin="2"/> - <CheckBox Name="WPFpreferChocolatey" VerticalAlignment="Center" VerticalContentAlignment="Center"> - <TextBlock Text="Prefer Chocolatey" ToolTip="Prefers Chocolatey as Download Engine instead of Winget" VerticalAlignment="Center" /> - </CheckBox> - </StackPanel> + <Grid Grid.Row="0" Grid.Column="0" Margin="{DynamicResource TabContentMargin}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> - <ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Margin="{DynamicResource TabContentMargin}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" - BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> - <Grid Name="appspanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> + <Grid Name="appscategory" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> </Grid> - </ScrollViewer> - - <Rectangle Grid.Row="1" Grid.Column="0" Width="22" Height="22" Fill="{DynamicResource MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/> + <Grid Name="appspanel" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> + </Grid> + </Grid> </Grid> </TabItem> <TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2"> @@ -950,20 +1225,22 @@ <RowDefinition Height="Auto" /> </Grid.RowDefinitions> - <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="0" Margin="{DynamicResource TabContentMargin}"> + <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Grid.Row="0" Margin="{DynamicResource TabContentMargin}"> <Grid Background="Transparent"> <Grid.RowDefinitions> - <RowDefinition Height="45px"/> + <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> - <StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5"> + <StackPanel Background="{DynamicResource MainBackgroundColor}" Orientation="Vertical" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5"> <Label Content="Recommended Selections:" FontSize="{DynamicResource FontSize}" VerticalAlignment="Center" Margin="2"/> - <Button Name="WPFstandard" Content=" Standard " Margin="2"/> - <Button Name="WPFminimal" Content=" Minimal " Margin="2"/> - <Button Name="WPFClearTweaksSelection" Content=" Clear " Margin="2"/> - <Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,2,0,0"> + <Button Name="WPFstandard" Content=" Standard " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + <Button Name="WPFminimal" Content=" Minimal " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + <Button Name="WPFClearTweaksSelection" Content=" Clear " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + <Button Name="WPFGetInstalledTweaks" Content=" Get Installed Tweaks " Margin="2" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + </StackPanel> </StackPanel> <Grid Name="tweakspanel" Grid.Row="1"> @@ -981,22 +1258,22 @@ </Grid> </ScrollViewer> <Border Grid.Row="1" Background="{DynamicResource MainBackgroundColor}" BorderBrush="{DynamicResource 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> + <WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0"> + <Button Name="WPFTweaksbutton" Content="Run Tweaks" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + <Button Name="WPFUndoall" Content="Undo Selected Tweaks" Margin="5" Width="{DynamicResource ButtonWidth}" Height="{DynamicResource ButtonHeight}"/> + </WrapPanel> </Border> </Grid> </TabItem> <TabItem Header="Config" Visibility="Collapsed" Name="WPFTab3"> - <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}"> + <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}"> <Grid Name="featurespanel" Grid.Row="1" Background="Transparent"> </Grid> </ScrollViewer> </TabItem> <TabItem Header="Updates" Visibility="Collapsed" Name="WPFTab4"> - <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}"> - <Grid Background="Transparent"> + <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="{DynamicResource TabContentMargin}"> + <Grid Background="Transparent" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ScrollViewer}}"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <!-- Row for the 3 columns --> <RowDefinition Height="Auto"/> <!-- Row for Windows Version --> @@ -1013,7 +1290,7 @@ <!-- Default Settings --> <Border Grid.Column="0" Style="{StaticResource BorderStyle}"> <StackPanel> - <Button Name="WPFFixesUpdate" + <Button Name="WPFUpdatesdefault" FontSize="{DynamicResource ConfigTabButtonFontSize}" Content="Default Settings" Margin="10,5" @@ -1045,9 +1322,11 @@ Foreground="{DynamicResource MainForegroundColor}"> <Run FontWeight="Bold">Balanced Security Configuration</Run> <LineBreak/> - - Feature updates delayed by 2 years + - Feature updates delayed by 365 days <LineBreak/> - Security updates installed after 4 days + <LineBreak/> + - Prevents Windows Update from installing drivers <LineBreak/><LineBreak/> <Run FontWeight="SemiBold">Feature Updates:</Run> New features and potential bugs <LineBreak/> @@ -1090,213 +1369,315 @@ </Grid> </ScrollViewer> </TabItem> - <TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5"> - <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="{DynamicResource TabContentMargin}"> - <Grid Width="Auto" Height="Auto"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="*"/> - <ColumnDefinition Width="3*"/> - </Grid.ColumnDefinitions> + <TabItem Header="Win11ISO" Visibility="Collapsed" Name="WPFTab5"> + <Grid Name="Win11ISOPanel" Margin="{DynamicResource TabContentMargin}" Background="Transparent"> <Grid.RowDefinitions> - <RowDefinition Height="*" /> + <RowDefinition Height="Auto"/> <!-- Steps 1-4 --> + <RowDefinition Height="*"/> <!-- Log / Status --> </Grid.RowDefinitions> - <Border Grid.Row="0" Grid.Column="0" - Style="{StaticResource BorderStyle}" - VerticalAlignment="Stretch" - HorizontalAlignment="Stretch"> - <StackPanel Name="MicrowinMain" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0"> - <StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1"> - <CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="True" Margin="{DynamicResource MicrowinCheckBoxMargin}" /> - <TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}"> - Choose a Windows ISO file that you've downloaded <LineBreak/> - Check the status in the console - </TextBlock> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{DynamicResource ComboBoxForegroundColor}" ToolTip="Scratch directories act as a custom destination for image files"><Bold>Scratch directory settings (optional)</Bold></TextBlock> - <CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="{DynamicResource MicrowinCheckBoxMargin}" - ToolTip="Check this to use the path of the ISO file you specify as a scratch directory" /> - <Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="*" /> <!-- Takes the remaining space --> - <ColumnDefinition Width="30" /> <!-- Fixed width for Button --> - </Grid.ColumnDefinitions> - <TextBox Name="MicrowinScratchDirBox" Background="Transparent" BorderBrush="{DynamicResource MainForegroundColor}" - Text="Scratch" - Margin="2" - IsReadOnly="False" - ToolTip="Specify an alternate path for the scratch directory" - Grid.Column="0" - VerticalAlignment="Center" - Foreground="{DynamicResource LabelboxForegroundColor}"> - </TextBox> - <Button Name="MicrowinScratchDirBT" - Width="Auto" - Height="Auto" - Grid.Column="1" - Margin="2" - Padding="1" VerticalAlignment="Center"> - <Button.Content> - ... - </Button.Content> - </Button> + + <!-- Steps 1-4 --> + <StackPanel Grid.Row="0"> + + <!-- ─── STEP 1 : Select Windows 11 ISO ─────────────── --> + <Grid Name="WPFWin11ISOSelectSection" Margin="5" HorizontalAlignment="Left" MinWidth="{DynamicResource ButtonWidth}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + + <!-- Left: File Selector --> + <StackPanel Grid.Column="0" Margin="5,5,15,5"> + <TextBlock FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" Margin="0,0,0,8"> + Step 1 - Select Windows 11 ISO + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,6"> + Browse to your locally saved Windows 11 ISO file. Only official ISOs + downloaded from Microsoft are supported. + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,12" FontStyle="Italic"> + <Run FontWeight="Bold">NOTE:</Run> This is only meant for Fresh and New Windows installs. + </TextBlock> + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <TextBox Grid.Column="0" + Name="WPFWin11ISOPath" + IsReadOnly="True" + VerticalAlignment="Center" + Padding="6,4" + Margin="0,0,6,0" + Text="No ISO selected..." + Foreground="{DynamicResource MainForegroundColor}" + Background="{DynamicResource MainBackgroundColor}"/> + <Button Grid.Column="1" + Name="WPFWin11ISOBrowseButton" + Content="Browse" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + </Grid> + <TextBlock Name="WPFWin11ISOFileInfo" + FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + Margin="0,8,0,0" + TextWrapping="Wrap" + Visibility="Collapsed"/> + </StackPanel> + + <!-- Right: Download guidance --> + <Border Grid.Column="1" + Background="{DynamicResource MainBackgroundColor}" + BorderBrush="{DynamicResource BorderColor}" + BorderThickness="1" CornerRadius="5" + Margin="5" Padding="15"> + <StackPanel> + <TextBlock FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="OrangeRed" Margin="0,0,0,10"> + !!WARNING!! You must use an official Microsoft ISO + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,8"> + Download the Windows 11 ISO directly from Microsoft.com. + Third-party, pre-modified, or unofficial images are not supported + and may produce broken results. + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,6"> + On the Microsoft download page, choose: + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="12,0,0,12"> + - Edition : Windows 11 + <LineBreak/>- Language : your preferred language + <LineBreak/>- Architecture : 64-bit (x64) + </TextBlock> + <Button Name="WPFWin11ISODownloadLink" + Content="Open Microsoft Download Page" + HorizontalAlignment="Left" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + </StackPanel> + </Border> </Grid> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <TextBox Name="MicrowinFinalIsoLocation" Background="Transparent" BorderBrush="{DynamicResource MainForegroundColor}" - Text="ISO location will be printed here" - Margin="2" - IsReadOnly="True" - TextWrapping="Wrap" - Foreground="{DynamicResource LabelboxForegroundColor}" - /> - <RadioButton x:Name="ISOmanual" Content="Select your own ISO" GroupName="Options" Margin="0,10,0,0" IsChecked="True"/> - <RadioButton x:Name="ISOdownloader" Content="Get newest ISO automatically" GroupName="Options" Margin="0,5,0,5"/> - <ComboBox x:Name="ISORelease" Visibility="Collapsed"/> - <ComboBox x:Name="ISOLanguage" Visibility="Collapsed"/> - <Button Name="WPFGetIso" Margin="2" Padding="15"> - <Button.Content> - <TextBlock Background="Transparent" Foreground="{DynamicResource ButtonForegroundColor}"> - Get Windows <Underline>I</Underline>SO + + <!-- ─── STEP 2 : Mount & Verify ISO ──────────────────── --> + <Grid Name="WPFWin11ISOMountSection" + Margin="5" + Visibility="Collapsed" + HorizontalAlignment="Left" MinWidth="{DynamicResource ButtonWidth}"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="Auto"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + + <StackPanel Grid.Column="0" Margin="0,0,20,0" VerticalAlignment="Top"> + <TextBlock FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" Margin="0,0,0,8"> + Step 2 - Mount &amp; Verify ISO </TextBlock> - </Button.Content> - </Button> - </StackPanel> - <!-- Visibility="Hidden" --> - <StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Hidden"> - <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock> - <ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" /> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="{DynamicResource 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="{DynamicResource MainForegroundColor}" - Margin="6" - Text="" - IsReadOnly="False" - TextWrapping="Wrap" - Foreground="{DynamicResource LabelboxForegroundColor}" - 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="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/> - <CheckBox Name="MicrowinCopyVirtIO" Content="Include VirtIO drivers" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="Copy VirtIO Guest Tools drivers to your ISO file. Check this only if you want to use it on QEMU/Proxmox VE"/> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock> - <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock> - <TextBox Name="MicrowinUserName" Background="Transparent" BorderThickness="1" BorderBrush="{DynamicResource MainForegroundColor}" - Margin="6" - Text="" - IsReadOnly="False" - TextWrapping="Wrap" - Foreground="{DynamicResource LabelboxForegroundColor}" - MaxLength="20" - /> - <TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password (characters will not be shown for your security):</TextBlock> - <PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{DynamicResource MainForegroundColor}" - Margin="6" - PasswordChar="*" - Foreground="{DynamicResource LabelboxForegroundColor}" - /> - <Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> - <Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/> - </StackPanel> - <StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed"> - <TextBlock Name="MicrowinIsoDrive" VerticalAlignment="Center" Margin="1" Padding="1" TextWrapping="WrapWithOverflow" Foreground="{DynamicResource ComboBoxForegroundColor}"/> - <TextBlock Name="MicrowinIsoLocation" VerticalAlignment="Center" Margin="1" Padding="1" TextWrapping="WrapWithOverflow" Foreground="{DynamicResource ComboBoxForegroundColor}"/> - <TextBlock Name="MicrowinMountDir" VerticalAlignment="Center" Margin="1" Padding="1" TextWrapping="WrapWithOverflow" Foreground="{DynamicResource ComboBoxForegroundColor}"/> - <TextBlock Name="MicrowinScratchDir" VerticalAlignment="Center" Margin="1" Padding="1" TextWrapping="WrapWithOverflow" Foreground="{DynamicResource ComboBoxForegroundColor}"/> - </StackPanel> - </StackPanel> - </Border> - <Border - Style="{StaticResource BorderStyle}" - VerticalAlignment="Stretch" - HorizontalAlignment="Stretch" - Grid.Row="0" Grid.Column="1"> - <StackPanel HorizontalAlignment="Left" Background="{DynamicResource MainBackgroundColor}" SnapsToDevicePixels="True" Visibility="Visible"> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,12" MaxWidth="320"> + Mount the ISO and confirm it contains a valid Windows 11 + install.wim before any modifications are made. + </TextBlock> + <Button Name="WPFWin11ISOMountButton" + Content="Mount &amp; Verify ISO" + HorizontalAlignment="Left" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + <CheckBox Name="WPFWin11ISOInjectDrivers" + Content="Inject current system drivers" + FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + IsChecked="False" + Margin="0,8,0,0" + ToolTip="Exports all drivers from this machine and injects them into install.wim and boot.wim. Recommended for systems with unsupported NVMe or network controllers."/> + </StackPanel> - <Grid Name = "BusyMessage" Visibility="Collapsed"> - <TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" /> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets" - FontSize="{DynamicResource IconFontSize}" Margin="16,0,0,0">&#xE701;</TextBlock> + <!-- Verification results panel --> + <Border Grid.Column="1" + Name="WPFWin11ISOVerifyResultPanel" + Background="{DynamicResource MainBackgroundColor}" + BorderBrush="{DynamicResource BorderColor}" + BorderThickness="1" CornerRadius="5" + Padding="12" Margin="0,0,0,0" + Visibility="Collapsed"> + <StackPanel> + <TextBlock Name="WPFWin11ISOMountDriveLetter" + FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + Margin="0,0,0,4"/> + <TextBlock Name="WPFWin11ISOArchLabel" + FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + Margin="0,0,0,4"/> + <TextBlock FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" + Margin="0,6,0,4"> + Select Edition: + </TextBlock> + <ComboBox Name="WPFWin11ISOEditionComboBox" + FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + Background="{DynamicResource MainBackgroundColor}" + HorizontalAlignment="Left" + Margin="0,0,0,0"/> + </StackPanel> + </Border> </Grid> - <TextBlock x:Name = "asciiTextBlock" - xml:space ="preserve" - HorizontalAlignment = "Center" - Margin = "0" - VerticalAlignment = "Top" - Height = "Auto" - Width = "Auto" - FontSize = "{DynamicResource MicroWinLogoSize}" - FontFamily = "Courier New" - > - /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ - / \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \ -/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | -\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| - </TextBlock> + <!-- ─── STEP 3 : Modify install.wim ───────────────────── --> + <StackPanel Name="WPFWin11ISOModifySection" + Margin="5" + Visibility="Collapsed" + HorizontalAlignment="Left" MinWidth="{DynamicResource ButtonWidth}"> + <TextBlock FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" Margin="0,0,0,8"> + Step 3 - Modify install.wim + </TextBlock> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,12"> + The ISO contents will be extracted to a temporary working directory, + install.wim will be modified (components removed, tweaks applied), + and the result will be repackaged. This process may take several minutes + depending on your hardware. + </TextBlock> + <Button Name="WPFWin11ISOModifyButton" + Content="Run Windows ISO Modification and Creator" + HorizontalAlignment="Left" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + </StackPanel> + + <!-- ─── STEP 4 : Output Options ───────────────────────── --> + <StackPanel Name="WPFWin11ISOOutputSection" + Margin="5" + Visibility="Collapsed" + HorizontalAlignment="Left" MinWidth="{DynamicResource ButtonWidth}"> + <!-- Header row: title + Clean & Reset button --> + <Grid Margin="0,0,0,12"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <TextBlock Grid.Column="0" FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" + VerticalAlignment="Center"> + Step 4 - Output: What would you like to do with the modified image? + </TextBlock> + <Button Grid.Column="1" + Name="WPFWin11ISOCleanResetButton" + Content="Clean &amp; Reset" + Foreground="OrangeRed" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}" + ToolTip="Delete the temporary working directory and reset the interface back to Step 1" + Margin="12,0,0,0"/> + </Grid> - <TextBlock Margin="15,15,15,0" - Padding="8,8,8,0" - VerticalAlignment="Center" - TextWrapping="WrapWithOverflow" - Height = "Auto" - Width = "Auto" - Foreground="{DynamicResource ComboBoxForegroundColor}"> - <Bold>MicroWin features:</Bold><LineBreak/> - - Remove Telemetry and Tracking <LineBreak/> - - Fast Install using either the "User" local account or the account of your choosing <LineBreak/> - - No internet requirement for install <LineBreak/> - - Apps debloat <LineBreak/> - <LineBreak/> - <LineBreak/> + <!-- ── Choice prompt buttons ── --> + <Grid Margin="0,0,0,12"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="16"/> + <ColumnDefinition Width="*"/> + </Grid.ColumnDefinitions> + <Button Grid.Column="0" + Name="WPFWin11ISOChooseISOButton" + Content="Save as an ISO File" + HorizontalAlignment="Stretch" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + <Button Grid.Column="2" + Name="WPFWin11ISOChooseUSBButton" + Content="Write Directly to a USB Drive (ERASES DRIVE)" + Foreground="OrangeRed" + HorizontalAlignment="Stretch" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}"/> + </Grid> - <Bold>INSTRUCTIONS</Bold> <LineBreak/> - - Download a Windows 11 ISO through the following options: <LineBreak/> - <TextBlock Margin="15,0,0,0" Text="- Select your own ISO: Manually download the latest Windows 11 image from " Foreground="{DynamicResource ComboBoxForegroundColor}"/> - <TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Microsoft</TextBlock>. <LineBreak/> - <TextBlock Margin="15,0,0,0" Text="- Get newest ISO automatically: Choose Windows 11 Edition and preferred language." Foreground="{DynamicResource ComboBoxForegroundColor}"/> <LineBreak/> - May take several minutes to process the ISO depending on your machine and connection <LineBreak/> - - Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/> - - Launch WinUtil and MicroWin <LineBreak/> - - Click on the "Select Windows ISO" button and wait for WinUtil to process the image <LineBreak/> - It will be processed and unpacked which may take some time <LineBreak/> - - Once complete, choose which Windows flavor you want to base your image on <LineBreak/> - - Click the "Start Process" button <LineBreak/> - The process of creating the Windows image may take some time, please check the console and wait for it to say "Done" <LineBreak/> - - Once complete, the target ISO file will be in the directory you have specified <LineBreak/> - - Copy this image to your Ventoy USB Stick, boot to this image, gg - <LineBreak/> - If you are injecting drivers ensure you put all your inf, sys, and dll files for each driver into a separate directory <LineBreak/><LineBreak/> - <Bold>Installing VirtIO drivers</Bold><LineBreak/> - If you plan on using your ISO on QEMU/Proxmox VE, you can bundle VirtIO drivers with your ISO to automatically install drivers. Simply tick the "Include VirtIO drivers" checkbox before starting the process. Then, follow these instructions:<LineBreak/><LineBreak/> - <TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="1. Proceed with Setup until you reach the disk selection screen, in which you won't see any drives" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/> - <TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="2. Click &quot;Load Driver&quot; and click Browse" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/> - <TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="3. In the folder selection dialog, point to this path: &quot;D:\VirtIO\vioscsi\w11\amd64&quot; (replace amd64 with ARM64 if you are using Windows on ARM, and &quot;D:&quot; with the drive letter of the ISO)" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/> - <TextBlock TextWrapping="WrapWithOverflow" Margin="15,0,0,0" Text="4. Select all drivers that will appear in the list box and click OK" Foreground="{DynamicResource ComboBoxForegroundColor}"/><LineBreak/> - </TextBlock> - <TextBlock Margin="15,0,15,15" - Padding = "1" - TextWrapping="WrapWithOverflow" - Height = "Auto" - Width = "Auto" - VerticalAlignment = "Top" - Foreground = "{DynamicResource ComboBoxForegroundColor}" - xml:space = "preserve" - > -<Bold>Driver structure example:</Bold> - C:\drivers\ - |-- Driver1\ - | |-- Driver1.inf - | |-- Driver1.sys - |-- Driver2\ - | |-- Driver2.inf - | |-- Driver2.sys - |-- OtherFiles... - </TextBlock> + <!-- ── USB write sub-panel (revealed on USB choice) ── --> + <Border Name="WPFWin11ISOOptionUSB" + Style="{StaticResource BorderStyle}" + Visibility="Collapsed" + Margin="0,8,0,0"> + <StackPanel> + <TextBlock FontSize="{DynamicResource FontSize}" + Foreground="{DynamicResource MainForegroundColor}" + TextWrapping="Wrap" Margin="0,0,0,8"> + <Run FontWeight="Bold" Foreground="OrangeRed">!! All data on the selected USB drive will be permanently erased !!</Run> + <LineBreak/> + Select a removable USB drive below, then click Erase &amp; Write. + </TextBlock> + <!-- USB drive selector row --> + <Grid Margin="0,0,0,8"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <ComboBox Grid.Column="0" + Name="WPFWin11ISOUSBDriveComboBox" + Foreground="{DynamicResource MainForegroundColor}" + Background="{DynamicResource MainBackgroundColor}" + VerticalAlignment="Center" + Margin="0,0,6,0"/> + <Button Grid.Column="1" + Name="WPFWin11ISORefreshUSBButton" + Content="Refresh" + Width="Auto" Padding="8,0" + Height="{DynamicResource ButtonHeight}"/> + </Grid> + <Button Name="WPFWin11ISOWriteUSBButton" + Content="Erase &amp; Write to USB" + Foreground="OrangeRed" + HorizontalAlignment="Stretch" + Width="Auto" Padding="12,0" + Height="{DynamicResource ButtonHeight}" + Margin="0,0,0,10"/> + </StackPanel> + </Border> </StackPanel> - </Border> + + </StackPanel> + + <!-- Status Log (fills remaining height) --> + <Grid Grid.Row="1" Margin="5"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> + <TextBlock Grid.Row="0" + FontSize="{DynamicResource FontSize}" FontWeight="Bold" + Foreground="{DynamicResource MainForegroundColor}" + Margin="0,0,0,4"> + Status Log + </TextBlock> + <TextBox Grid.Row="1" + Name="WPFWin11ISOStatusLog" + IsReadOnly="True" + TextWrapping="Wrap" + VerticalScrollBarVisibility="Visible" + VerticalAlignment="Stretch" + Padding="6" + Background="{DynamicResource MainBackgroundColor}" + Foreground="{DynamicResource MainForegroundColor}" + BorderBrush="{DynamicResource BorderColor}" + BorderThickness="1" + Text="Ready. Please select a Windows 11 ISO to begin."/> </Grid> - </ScrollViewer> + + </Grid> </TabItem> </TabControl> </Grid>