mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-07 00:10:10 +00:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcc5481477 | ||
|
|
ac116d7083 | ||
|
|
68ab69a19c | ||
|
|
29efb989bd | ||
|
|
99eb70d81b | ||
|
|
9013753d88 | ||
|
|
8ad96a9b6e | ||
|
|
8ed3a31424 | ||
|
|
424d4030c1 | ||
|
|
f88c9be70d | ||
|
|
bc4cd84127 | ||
|
|
54b4bcdda1 | ||
|
|
c5c23d8d18 | ||
|
|
28e84af33d | ||
|
|
832af914e9 | ||
|
|
6d9ed9026d | ||
|
|
9e877afe0e | ||
|
|
0c0ced381a | ||
|
|
8ebd127857 | ||
|
|
25a392877f | ||
|
|
ef2c91b616 | ||
|
|
b52ead87f4 | ||
|
|
2dcfc2b109 |
59
.github/CODEOWNERS
vendored
59
.github/CODEOWNERS
vendored
@@ -1,59 +1,2 @@
|
|||||||
# This is a comment.
|
# Chris rules EVERYTHING (including paths listed below)
|
||||||
# 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
|
* @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
|
|
||||||
4
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -10,7 +10,7 @@ body:
|
|||||||
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
|
Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently.
|
||||||
|
|
||||||
## ⚠️ **IMPORTANT**
|
## ⚠️ **IMPORTANT**
|
||||||
- 🛠️ **Supported environments only:** We only support Windows 11. Custom ISOs that are not made using Microwin are not supported.
|
- 🛠️ **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).
|
- 💡 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: checkboxes
|
- type: checkboxes
|
||||||
@@ -28,7 +28,7 @@ body:
|
|||||||
id: affected_part
|
id: affected_part
|
||||||
attributes:
|
attributes:
|
||||||
label: 📜 What part of Winutil are you having issues with?
|
label: 📜 What part of Winutil are you having issues with?
|
||||||
placeholder: "e.g., Microwin, Tweaks, etc."
|
placeholder: "e.g., Tweaks, etc."
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -4,11 +4,11 @@
|
|||||||
- [ ] New feature
|
- [ ] New feature
|
||||||
- [ ] Bug fix
|
- [ ] Bug fix
|
||||||
- [ ] Documentation update
|
- [ ] Documentation update
|
||||||
- [ ] Refactoring
|
|
||||||
- [ ] Hotfix
|
- [ ] Hotfix
|
||||||
- [ ] Security patch
|
|
||||||
- [ ] UI/UX improvement
|
- [ ] UI/UX improvement
|
||||||
|
|
||||||
|
<!-- This automatically adds labels to your PR based on the selections above. -->
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
<!--[Provide a detailed explanation of the changes you have made. Include the reasons behind these changes and any relevant context. Link any related issues.]-->
|
<!--[Provide a detailed explanation of the changes you have made. Include the reasons behind these changes and any relevant context. Link any related issues.]-->
|
||||||
|
|
||||||
@@ -18,7 +18,5 @@
|
|||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
- [ ] My code adheres to the coding and style guidelines of the project.
|
- [ ] My code adheres to the coding and style guidelines of the project.
|
||||||
- [ ] I have performed a self-review of my own code.
|
|
||||||
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
||||||
- [ ] I have made corresponding changes to the documentation.
|
- [ ] I have made corresponding changes to the documentation.
|
||||||
- [ ] My changes generate no errors/warnings/merge conflicts.
|
|
||||||
|
|||||||
12
.github/release-drafter.yml
vendored
12
.github/release-drafter.yml
vendored
@@ -4,15 +4,16 @@ categories:
|
|||||||
labels:
|
labels:
|
||||||
- 'feature'
|
- 'feature'
|
||||||
- 'enhancement'
|
- 'enhancement'
|
||||||
|
- 'new feature'
|
||||||
- title: '🐛 Bug Fixes'
|
- title: '🐛 Bug Fixes'
|
||||||
labels:
|
labels:
|
||||||
- 'fix'
|
- 'hotfix'
|
||||||
- 'bugfix'
|
- 'bugfix'
|
||||||
- 'bug'
|
- 'bug'
|
||||||
- title: '📚 Documentation'
|
- title: '📚 Documentation'
|
||||||
label: 'documentation'
|
label: 'documentation'
|
||||||
- title: '🔒 Security'
|
- title: '🎨 UI/UX Improvements'
|
||||||
label: 'security'
|
label: 'ui update'
|
||||||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
||||||
template: |
|
template: |
|
||||||
## Changes
|
## Changes
|
||||||
@@ -31,7 +32,7 @@ autolabeler:
|
|||||||
- '/fix\/.+/'
|
- '/fix\/.+/'
|
||||||
title:
|
title:
|
||||||
- '/fix/i'
|
- '/fix/i'
|
||||||
- label: 'enhancement'
|
- label: 'new feature'
|
||||||
branch:
|
branch:
|
||||||
- '/feature\/.+/'
|
- '/feature\/.+/'
|
||||||
body:
|
body:
|
||||||
@@ -40,9 +41,6 @@ autolabeler:
|
|||||||
files:
|
files:
|
||||||
- '**/*.md'
|
- '**/*.md'
|
||||||
- 'docs/**/*'
|
- 'docs/**/*'
|
||||||
- label: 'security'
|
|
||||||
branch:
|
|
||||||
- '/security\/.+/'
|
|
||||||
replacers:
|
replacers:
|
||||||
- search: /"/g
|
- search: /"/g
|
||||||
replace: ''
|
replace: ''
|
||||||
|
|||||||
2
.github/workflows/close-old-issues.yaml
vendored
2
.github/workflows/close-old-issues.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
contents: none
|
contents: none
|
||||||
steps:
|
steps:
|
||||||
- name: Close inactive issues
|
- name: Close inactive issues
|
||||||
uses: actions/stale@v8
|
uses: actions/stale@v10
|
||||||
with:
|
with:
|
||||||
# A list of labels to reference when looking through issues,
|
# A list of labels to reference when looking through issues,
|
||||||
# and only when one (or even more) of these labels are found..
|
# and only when one (or even more) of these labels are found..
|
||||||
|
|||||||
7
.github/workflows/docs.yaml
vendored
7
.github/workflows/docs.yaml
vendored
@@ -7,7 +7,7 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**' # ONLY triggers if files in the 'docs' folder are changed
|
- "docs/**" # ONLY triggers if files in the 'docs' folder are changed
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -34,7 +34,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HUGO_VERSION: 0.145.0
|
HUGO_VERSION: 0.147.7
|
||||||
HUGO_ENVIRONMENT: production
|
HUGO_ENVIRONMENT: production
|
||||||
TZ: America/Chicago
|
TZ: America/Chicago
|
||||||
steps:
|
steps:
|
||||||
@@ -59,8 +59,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{ runner.temp }}/hugo_cache
|
${{ runner.temp }}/hugo_cache
|
||||||
key: hugo-${{ github.run_id }}
|
key: hugo-${{ github.run_id }}
|
||||||
restore-keys:
|
restore-keys: hugo-
|
||||||
hugo-
|
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
run: |
|
run: |
|
||||||
hugo \
|
hugo \
|
||||||
|
|||||||
2
.github/workflows/issue-slash-commands.yaml
vendored
2
.github/workflows/issue-slash-commands.yaml
vendored
@@ -67,7 +67,7 @@ jobs:
|
|||||||
id: check_user
|
id: check_user
|
||||||
if: env.command == 'true'
|
if: env.command == 'true'
|
||||||
run: |
|
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
|
if [[ " ${ALLOWED_USERS[@]} " =~ " ${{ github.event.comment.user.login }} " ]]; then
|
||||||
echo "user=true" >> $GITHUB_ENV
|
echo "user=true" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
|
|||||||
45
.github/workflows/label-pr.yaml
vendored
Normal file
45
.github/workflows/label-pr.yaml
vendored
Normal file
@@ -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@v7
|
||||||
|
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
|
||||||
|
});
|
||||||
|
}
|
||||||
2
.github/workflows/pre-release.yaml
vendored
2
.github/workflows/pre-release.yaml
vendored
@@ -56,7 +56,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
config-name: release-drafter.yml
|
config-name: release-drafter.yml
|
||||||
version: ${{ env.VERSION }} # Pass the version variable
|
version: ${{ env.VERSION }}
|
||||||
|
|
||||||
- name: Create and Upload Release
|
- name: Create and Upload Release
|
||||||
id: create_release
|
id: create_release
|
||||||
|
|||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -45,7 +45,6 @@ Microsoft.PowerShell.ConsoleHost.dll
|
|||||||
|
|
||||||
# General
|
# General
|
||||||
.DS_Store
|
.DS_Store
|
||||||
microwin.log
|
|
||||||
True
|
True
|
||||||
test.ps1
|
test.ps1
|
||||||
winutil.ps1
|
winutil.ps1
|
||||||
@@ -56,3 +55,8 @@ winutil.ps1
|
|||||||
binary/
|
binary/
|
||||||
|
|
||||||
.preprocessor_hashes.json
|
.preprocessor_hashes.json
|
||||||
|
|
||||||
|
# Hugo Files
|
||||||
|
docs/public/
|
||||||
|
docs/.hugo_build.lock
|
||||||
|
docs/resources/
|
||||||
|
|||||||
12
Compile.ps1
12
Compile.ps1
@@ -36,15 +36,6 @@ function Update-Progress {
|
|||||||
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
|
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
|
Update-Progress "Pre-req: Running Preprocessor..." 0
|
||||||
|
|
||||||
# Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script
|
# Dot source the 'Invoke-Preprocessing' Function from 'tools/Invoke-Preprocessing.ps1' Script
|
||||||
@@ -76,9 +67,6 @@ Invoke-Preprocessing -WorkingDir "$workingdir" -ExcludedFiles $excludedFiles -Pr
|
|||||||
Update-Progress "Pre-req: Allocating Memory" 0
|
Update-Progress "Pre-req: Allocating Memory" 0
|
||||||
$script_content = [System.Collections.Generic.List[string]]::new()
|
$script_content = [System.Collections.Generic.List[string]]::new()
|
||||||
|
|
||||||
Update-Progress "Adding: Header" 5
|
|
||||||
$script_content.Add($header)
|
|
||||||
|
|
||||||
Update-Progress "Adding: Version" 10
|
Update-Progress "Adding: Version" 10
|
||||||
$script_content.Add($(Get-Content "scripts\start.ps1").replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
$script_content.Add($(Get-Content "scripts\start.ps1").replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
||||||
|
|
||||||
|
|||||||
@@ -552,6 +552,14 @@
|
|||||||
"link": "https://espanso.org/",
|
"link": "https://espanso.org/",
|
||||||
"winget": "Espanso.Espanso"
|
"winget": "Espanso.Espanso"
|
||||||
},
|
},
|
||||||
|
"ffmpeg": {
|
||||||
|
"category": "Utilities",
|
||||||
|
"choco": "na",
|
||||||
|
"content": "eibol.FFmpegBatchAVConverter",
|
||||||
|
"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"
|
||||||
|
},
|
||||||
"falkon": {
|
"falkon": {
|
||||||
"category": "Browsers",
|
"category": "Browsers",
|
||||||
"choco": "falkon",
|
"choco": "falkon",
|
||||||
@@ -912,6 +920,14 @@
|
|||||||
"link": "https://www.cpuid.com/softwares/hwmonitor.html",
|
"link": "https://www.cpuid.com/softwares/hwmonitor.html",
|
||||||
"winget": "CPUID.HWMonitor"
|
"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"
|
||||||
|
},
|
||||||
"imageglass": {
|
"imageglass": {
|
||||||
"category": "Multimedia Tools",
|
"category": "Multimedia Tools",
|
||||||
"choco": "imageglass",
|
"choco": "imageglass",
|
||||||
|
|||||||
@@ -38,25 +38,39 @@
|
|||||||
"Order": "2",
|
"Order": "2",
|
||||||
"Description": "Use Chocolatey for package management"
|
"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": {
|
"WPFClearInstallSelection": {
|
||||||
"Content": "Clear Selection",
|
"Content": "Clear Selection",
|
||||||
"Category": "__Selection",
|
"Category": "__Selection",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"Order": "1",
|
"Order": "3",
|
||||||
"Description": "Clear the selection of applications"
|
"Description": "Clear the selection of applications"
|
||||||
},
|
},
|
||||||
"WPFGetInstalled": {
|
"WPFGetInstalled": {
|
||||||
"Content": "Get Installed",
|
"Content": "Get Installed",
|
||||||
"Category": "__Selection",
|
"Category": "__Selection",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"Order": "2",
|
"Order": "4",
|
||||||
"Description": "Show installed applications"
|
"Description": "Show installed applications"
|
||||||
},
|
},
|
||||||
"WPFselectedAppsButton": {
|
"WPFselectedAppsButton": {
|
||||||
"Content": "Selected Apps: 0",
|
"Content": "Selected Apps: 0",
|
||||||
"Category": "__Selection",
|
"Category": "__Selection",
|
||||||
"Type": "Button",
|
"Type": "Button",
|
||||||
"Order": "3",
|
"Order": "5",
|
||||||
"Description": "Show the selected applications"
|
"Description": "Show the selected applications"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,442 +0,0 @@
|
|||||||
<?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=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&GeoLocation=244&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&BypassNetworkCheck=true&ComputerNameMode=Random&TimeZoneMode=Implicit&PartitionMode=Interactive&WindowsEditionMode=Unattended&WindowsEdition=pro&UserAccountMode=Unattended&AccountName0=User&AccountPassword0=&AccountGroup0=Administrators&AccountName1=&AccountName2=&AccountName3=&AccountName4=&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&DisableWidgets=true&ClassicContextMenu=true&DisableFastStartup=true&EnableLongPaths=true&DisableAppSuggestions=true&PreventDeviceEncryption=true&WifiMode=Skip&ExpressSettings=DisableAll&Remove3DViewer=true&RemoveBingSearch=true&RemoveCamera=true&RemoveClipchamp=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGetHelp=true&RemoveInternetExplorer=true&RemoveMailCalendar=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveZuneVideo=true&RemoveNews=true&RemoveNotepad=true&RemoveOffice365=true&RemoveOneDrive=true&RemoveOneNote=true&RemoveOpenSSHClient=true&RemoveOutlook=true&RemovePaint3D=true&RemovePeople=true&RemovePowerAutomate=true&RemoveQuickAssist=true&RemoveSkype=true&RemoveSolitaire=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveTeams=true&RemoveGetStarted=true&RemoveToDo=true&RemoveVoiceRecorder=true&RemoveWeather=true&RemoveWindowsMediaPlayer=true&RemoveZuneMusic=true&RemoveWordPad=true&WdacMode=Skip-->
|
|
||||||
<settings pass="offlineServicing"></settings>
|
|
||||||
<settings pass="windowsPE">
|
|
||||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<SetupUILanguage>
|
|
||||||
<UILanguage>en-US</UILanguage>
|
|
||||||
</SetupUILanguage>
|
|
||||||
<InputLocale>0409:00000409</InputLocale>
|
|
||||||
<SystemLocale>en-US</SystemLocale>
|
|
||||||
<UILanguage>en-US</UILanguage>
|
|
||||||
<UserLocale>en-US</UserLocale>
|
|
||||||
</component>
|
|
||||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<UserData>
|
|
||||||
<ProductKey>
|
|
||||||
<Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key>
|
|
||||||
</ProductKey>
|
|
||||||
<AcceptEula>true</AcceptEula>
|
|
||||||
</UserData>
|
|
||||||
<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>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>
|
|
||||||
<settings pass="auditSystem"></settings>
|
|
||||||
<settings pass="auditUser"></settings>
|
|
||||||
<settings pass="oobeSystem">
|
|
||||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<InputLocale>0409:00000409</InputLocale>
|
|
||||||
<SystemLocale>en-US</SystemLocale>
|
|
||||||
<UILanguage>en-US</UILanguage>
|
|
||||||
<UserLocale>en-US</UserLocale>
|
|
||||||
</component>
|
|
||||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
|
||||||
<UserAccounts>
|
|
||||||
<LocalAccounts>
|
|
||||||
<LocalAccount wcm:action="add">
|
|
||||||
<Name>User</Name>
|
|
||||||
<Group>Administrators</Group>
|
|
||||||
<Password>
|
|
||||||
<Value></Value>
|
|
||||||
<PlainText>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';
|
|
||||||
& {
|
|
||||||
$installed = & $getCommand;
|
|
||||||
foreach( $selector in $selectors ) {
|
|
||||||
$result = [ordered] @{
|
|
||||||
Selector = $selector;
|
|
||||||
};
|
|
||||||
$found = $installed | Where-Object -FilterScript $filterCommand;
|
|
||||||
if( $found ) {
|
|
||||||
$result.Output = $found | & $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;
|
|
||||||
}
|
|
||||||
} *>&1 >> $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';
|
|
||||||
& {
|
|
||||||
$installed = & $getCommand;
|
|
||||||
foreach( $selector in $selectors ) {
|
|
||||||
$result = [ordered] @{
|
|
||||||
Selector = $selector;
|
|
||||||
};
|
|
||||||
$found = $installed | Where-Object -FilterScript $filterCommand;
|
|
||||||
if( $found ) {
|
|
||||||
$result.Output = $found | & $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;
|
|
||||||
}
|
|
||||||
} *>&1 >> $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>
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"shared":{
|
"shared":{
|
||||||
"AppEntryWidth": "130",
|
"AppEntryWidth": "200",
|
||||||
"AppEntryFontSize": "11",
|
"AppEntryFontSize": "11",
|
||||||
"AppEntryMargin": "1,1,1,1",
|
"AppEntryMargin": "1,0,1,0",
|
||||||
"AppEntryBorderThickness": "0",
|
"AppEntryBorderThickness": "0",
|
||||||
"CustomDialogFontSize": "12",
|
"CustomDialogFontSize": "12",
|
||||||
"CustomDialogFontSizeHeader": "14",
|
"CustomDialogFontSizeHeader": "14",
|
||||||
@@ -25,8 +25,6 @@
|
|||||||
"IconButtonSize": "35",
|
"IconButtonSize": "35",
|
||||||
"SettingsIconFontSize": "18",
|
"SettingsIconFontSize": "18",
|
||||||
"CloseIconFontSize": "18",
|
"CloseIconFontSize": "18",
|
||||||
"MicroWinLogoSize": "10",
|
|
||||||
"MicrowinCheckBoxMargin": "-10,5,0,0",
|
|
||||||
"GroupBorderBackgroundColor": "#232629",
|
"GroupBorderBackgroundColor": "#232629",
|
||||||
"ButtonFontSize": "12",
|
"ButtonFontSize": "12",
|
||||||
"ButtonFontFamily": "Arial",
|
"ButtonFontFamily": "Arial",
|
||||||
@@ -60,7 +58,6 @@
|
|||||||
"ScrollBarHoverColor": "#5A5D62",
|
"ScrollBarHoverColor": "#5A5D62",
|
||||||
"ScrollBarDraggingColor": "#6A6D72",
|
"ScrollBarDraggingColor": "#6A6D72",
|
||||||
|
|
||||||
"MicrowinBusyColor": "#2e77ff",
|
|
||||||
"ProgressBarForegroundColor": "#2e77ff",
|
"ProgressBarForegroundColor": "#2e77ff",
|
||||||
"ProgressBarBackgroundColor": "Transparent",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
"ProgressBarTextColor": "#232629",
|
"ProgressBarTextColor": "#232629",
|
||||||
@@ -91,7 +88,7 @@
|
|||||||
"AppInstallOverlayBackgroundColor":"#2E3135",
|
"AppInstallOverlayBackgroundColor":"#2E3135",
|
||||||
"ComboBoxForegroundColor": "#F7F7F7",
|
"ComboBoxForegroundColor": "#F7F7F7",
|
||||||
"ComboBoxBackgroundColor": "#1E3747",
|
"ComboBoxBackgroundColor": "#1E3747",
|
||||||
"LabelboxForegroundColor": "#0567ff",
|
"LabelboxForegroundColor": "#5bdcff",
|
||||||
"MainForegroundColor": "#F7F7F7",
|
"MainForegroundColor": "#F7F7F7",
|
||||||
"MainBackgroundColor": "#232629",
|
"MainBackgroundColor": "#232629",
|
||||||
"LabelBackgroundColor": "#232629",
|
"LabelBackgroundColor": "#232629",
|
||||||
@@ -101,7 +98,6 @@
|
|||||||
"ScrollBarHoverColor": "#3B4252",
|
"ScrollBarHoverColor": "#3B4252",
|
||||||
"ScrollBarDraggingColor": "#5E81AC",
|
"ScrollBarDraggingColor": "#5E81AC",
|
||||||
|
|
||||||
"MicrowinBusyColor": "#2e77ff",
|
|
||||||
"ProgressBarForegroundColor": "#222222",
|
"ProgressBarForegroundColor": "#222222",
|
||||||
"ProgressBarBackgroundColor": "Transparent",
|
"ProgressBarBackgroundColor": "Transparent",
|
||||||
"ProgressBarTextColor": "#232629",
|
"ProgressBarTextColor": "#232629",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"OriginalValue": "<RemoveEntry>"
|
"OriginalValue": "<RemoveEntry>"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/ah"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/activity"
|
||||||
},
|
},
|
||||||
"WPFTweaksHiber": {
|
"WPFTweaksHiber": {
|
||||||
"Content": "Disable Hibernation",
|
"Content": "Disable Hibernation",
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"powercfg.exe /hibernate on"
|
"powercfg.exe /hibernate on"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hiber"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/hibernation"
|
||||||
},
|
},
|
||||||
"WPFTweaksLaptopHibernation": {
|
"WPFTweaksLaptopHibernation": {
|
||||||
"Content": "Set Hibernation as default (good for laptops)",
|
"Content": "Set Hibernation as default (good for laptops)",
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
"OriginalValue": "1"
|
"OriginalValue": "1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/loc"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/location"
|
||||||
},
|
},
|
||||||
"WPFTweaksServices": {
|
"WPFTweaksServices": {
|
||||||
"Content": "Set Services to Manual",
|
"Content": "Set Services to Manual",
|
||||||
@@ -1140,6 +1140,13 @@
|
|||||||
"Type": "DWord",
|
"Type": "DWord",
|
||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "<RemoveEntry>"
|
"OriginalValue": "<RemoveEntry>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\BraveSoftware\\Brave",
|
||||||
|
"Name": "BraveStatsPingEnabled",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "<RemoveEntry>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1164,6 +1171,13 @@
|
|||||||
"Value": "0",
|
"Value": "0",
|
||||||
"OriginalValue": "<RemoveEntry>"
|
"OriginalValue": "<RemoveEntry>"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
|
"Name": "ofefcgjbeghpigppfmkologfjadafddi",
|
||||||
|
"Type": "String",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "<RemoveEntry>"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Edge",
|
||||||
"Name": "ShowRecommendationsEnabled",
|
"Name": "ShowRecommendationsEnabled",
|
||||||
@@ -1589,7 +1603,7 @@
|
|||||||
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory
|
Set-ItemProperty -Path \"HKLM:\\SYSTEM\\CurrentControlSet\\Control\" -Name SvcHostSplitThresholdInKB -Value $Memory
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/tele"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/telemetry"
|
||||||
},
|
},
|
||||||
"WPFTweaksRemoveEdge": {
|
"WPFTweaksRemoveEdge": {
|
||||||
"Content": "Remove Microsoft Edge",
|
"Content": "Remove Microsoft Edge",
|
||||||
@@ -1675,7 +1689,7 @@
|
|||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\" -Name LaunchTo -Value 0
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehomegallery"
|
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removehome"
|
||||||
},
|
},
|
||||||
"WPFTweaksRemoveGallery": {
|
"WPFTweaksRemoveGallery": {
|
||||||
"Content": "Remove Gallery from explorer",
|
"Content": "Remove Gallery from explorer",
|
||||||
@@ -1693,7 +1707,7 @@
|
|||||||
New-Item \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\NameSpace\\{e88865ea-0e1c-4e20-9aa6-edcd0212c87c}\"
|
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/removehomegallery"
|
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/removegallery"
|
||||||
},
|
},
|
||||||
"WPFTweaksDisplay": {
|
"WPFTweaksDisplay": {
|
||||||
"Content": "Set Display for Performance",
|
"Content": "Set Display for Performance",
|
||||||
@@ -2140,7 +2154,7 @@
|
|||||||
|
|
||||||
Copy-Item $hosts \"$hosts.bak\"
|
Copy-Item $hosts \"$hosts.bak\"
|
||||||
Invoke-WebRequest $hostsUrl -OutFile $hosts
|
Invoke-WebRequest $hostsUrl -OutFile $hosts
|
||||||
ipconfig flushdns
|
ipconfig /flushdns
|
||||||
|
|
||||||
Write-Host \"Added Adobe url block list from host file\"
|
Write-Host \"Added Adobe url block list from host file\"
|
||||||
"
|
"
|
||||||
@@ -2152,7 +2166,7 @@
|
|||||||
|
|
||||||
Copy-Item $backup $hosts
|
Copy-Item $backup $hosts
|
||||||
Remove-Item $backup
|
Remove-Item $backup
|
||||||
ipconfig flushdns
|
ipconfig /flushdns
|
||||||
|
|
||||||
Write-Host \"Removed Adobe url block list from host file\"
|
Write-Host \"Removed Adobe url block list from host file\"
|
||||||
"
|
"
|
||||||
@@ -2213,7 +2227,7 @@
|
|||||||
"WPFTweaksDVR": {
|
"WPFTweaksDVR": {
|
||||||
"Content": "Disable GameDVR",
|
"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.",
|
"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",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a005_",
|
"Order": "a005_",
|
||||||
"registry": [
|
"registry": [
|
||||||
@@ -2253,7 +2267,7 @@
|
|||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/dvr"
|
"link": "https://winutil.christitus.com/dev/tweaks/essential-tweaks/gamedvr"
|
||||||
},
|
},
|
||||||
"WPFTweaksIPv46": {
|
"WPFTweaksIPv46": {
|
||||||
"Content": "Prefer IPv4 over IPv6",
|
"Content": "Prefer IPv4 over IPv6",
|
||||||
@@ -2316,7 +2330,7 @@
|
|||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6"
|
"Enable-NetAdapterBinding -Name * -ComponentID ms_tcpip6"
|
||||||
],
|
],
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disableipsix"
|
"link": "https://winutil.christitus.com/dev/tweaks/z--advanced-tweaks---caution/disableipv6"
|
||||||
},
|
},
|
||||||
"WPFTweaksDisableBGapps": {
|
"WPFTweaksDisableBGapps": {
|
||||||
"Content": "Disable Background Apps",
|
"Content": "Disable Background Apps",
|
||||||
@@ -2523,83 +2537,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFToggleSnapWindow": {
|
|
||||||
"Content": "Snap Window",
|
|
||||||
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
|
||||||
"category": "Customize Preferences",
|
|
||||||
"panel": "2",
|
|
||||||
"Order": "a106_",
|
|
||||||
"Type": "Toggle",
|
|
||||||
"registry": [
|
|
||||||
{
|
|
||||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
|
||||||
"Name": "WindowArrangementActive",
|
|
||||||
"Value": "1",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"DefaultState": "true",
|
|
||||||
"Type": "String"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/snapwindow"
|
|
||||||
},
|
|
||||||
"WPFToggleSnapFlyout": {
|
|
||||||
"Content": "Snap Assist Flyout",
|
|
||||||
"Description": "If disabled then Snap preview is disabled when maximize button is hovered.",
|
|
||||||
"category": "Customize Preferences",
|
|
||||||
"panel": "2",
|
|
||||||
"Order": "a107_",
|
|
||||||
"Type": "Toggle",
|
|
||||||
"registry": [
|
|
||||||
{
|
|
||||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
|
||||||
"Name": "EnableSnapAssistFlyout",
|
|
||||||
"Value": "1",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"DefaultState": "true",
|
|
||||||
"Type": "DWord"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"InvokeScript": [
|
|
||||||
"
|
|
||||||
Invoke-WinUtilExplorerUpdate -action \"restart\"
|
|
||||||
"
|
|
||||||
],
|
|
||||||
"UndoScript": [
|
|
||||||
"
|
|
||||||
Invoke-WinUtilExplorerUpdate -action \"restart\"
|
|
||||||
"
|
|
||||||
],
|
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/snapflyout"
|
|
||||||
},
|
|
||||||
"WPFToggleSnapSuggestion": {
|
|
||||||
"Content": "Snap Assist Suggestion",
|
|
||||||
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
|
||||||
"category": "Customize Preferences",
|
|
||||||
"panel": "2",
|
|
||||||
"Order": "a108_",
|
|
||||||
"Type": "Toggle",
|
|
||||||
"registry": [
|
|
||||||
{
|
|
||||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
|
||||||
"Name": "SnapAssist",
|
|
||||||
"Value": "1",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"DefaultState": "true",
|
|
||||||
"Type": "DWord"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"InvokeScript": [
|
|
||||||
"
|
|
||||||
Invoke-WinUtilExplorerUpdate -action \"restart\"
|
|
||||||
"
|
|
||||||
],
|
|
||||||
"UndoScript": [
|
|
||||||
"
|
|
||||||
Invoke-WinUtilExplorerUpdate -action \"restart\"
|
|
||||||
"
|
|
||||||
],
|
|
||||||
"link": "https://winutil.christitus.com/dev/tweaks/customize-preferences/snapsuggestion"
|
|
||||||
},
|
|
||||||
"WPFToggleMouseAcceleration": {
|
"WPFToggleMouseAcceleration": {
|
||||||
"Content": "Mouse Acceleration",
|
"Content": "Mouse Acceleration",
|
||||||
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 124 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 109 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 164 KiB |
@@ -4,6 +4,7 @@ toc: true
|
|||||||
---
|
---
|
||||||
|
|
||||||
### Download not working
|
### 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:
|
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -22,13 +23,13 @@ If it still isn't working and you live in India, it might be due to India blocki
|
|||||||
If you are still having issues, try using a **VPN**, or changing your **DNS provider** to one of following two providers:
|
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 |
|
| Provider | Primary DNS | Secondary DNS |
|
||||||
|:------------:|:------------:|:-------------:|
|
| :--------: | :---------: | :-----------: |
|
||||||
| Cloudflare | `1.1.1.1` | `1.0.0.1` |
|
| Cloudflare | `1.1.1.1` | `1.0.0.1` |
|
||||||
| Google | `8.8.8.8` | `8.8.4.4` |
|
| Google | `8.8.8.8` | `8.8.4.4` |
|
||||||
|
|
||||||
|
|
||||||
### Script blocked by Execution Policy
|
### 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.
|
|
||||||
|
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:
|
2. In the PowerShell window, type this to allow unsigned code to execute and run the installation script:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -39,95 +40,65 @@ If you are still having issues, try using a **VPN**, or changing your **DNS prov
|
|||||||
## Runtime Issues
|
## Runtime Issues
|
||||||
|
|
||||||
### WinGet configuration
|
### 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.
|
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 Issues
|
||||||
|
|
||||||
### Windows takes longer to shut down
|
### Windows takes longer to shut down
|
||||||
|
|
||||||
This could be for a number of reasons:
|
This could be for a number of reasons:
|
||||||
|
|
||||||
- Turn on fast startup: Press `Windows key`+`R`, then type:
|
- Turn on fast startup: Press `Windows key`+`R`, then type:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
control /name Microsoft.PowerOptions /page pageGlobalSettings
|
control /name Microsoft.PowerOptions /page pageGlobalSettings
|
||||||
```
|
```
|
||||||
- If that doesn't work, disable Hibernation:
|
|
||||||
- Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
|
If that doesn't work, disable Hibernation:
|
||||||
- In the PowerShell window, type:
|
|
||||||
|
- Press `Windows Key`+`X` and select _PowerShell (Admin)_ in Windows 10, or `Windows Terminal (Admin)` in Windows 11. then type:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
powercfg /H off
|
powercfg /H off
|
||||||
```
|
```
|
||||||
|
|
||||||
Related issue: [#69](https://github.com/ChrisTitusTech/Winutil/issues/69)
|
Related issue: [#69](https://github.com/ChrisTitusTech/Winutil/issues/69)
|
||||||
|
|
||||||
### Windows Search does not work
|
### 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)
|
|
||||||
|
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
|
### Xbox Game Bar Activation Broken
|
||||||
|
|
||||||
Set the Xbox Accessory Management Service to Automatic:
|
Set the Xbox Accessory Management Service to Automatic:
|
||||||
|
|
||||||
```
|
```powershell
|
||||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||||
```
|
```
|
||||||
|
|
||||||
Related issue: [#198](https://github.com/ChrisTitusTech/Winutil/issues/198)
|
Related issue: [#198](https://github.com/ChrisTitusTech/Winutil/issues/198)
|
||||||
|
|
||||||
### Windows 11: Quick Settings no longer works
|
### Windows 11: Quick Settings no longer works
|
||||||
Launch the Script and click *Enable Action Center*.
|
|
||||||
|
Launch the Script and click _Enable Action Center_.
|
||||||
|
|
||||||
### Explorer (file browser) no longer launches
|
### Explorer (file browser) no longer launches
|
||||||
- Press `Windows key`+`R` then type:
|
|
||||||
|
- Press `Windows key`+`R` then type:
|
||||||
|
|
||||||
```bat
|
```bat
|
||||||
control /name Microsoft.FolderOptions
|
control /name Microsoft.FolderOptions
|
||||||
```
|
```
|
||||||
- Change the *Open File Explorer to* option to *This PC*.
|
|
||||||
|
- Change the _Open File Explorer to_ option to _This PC_.
|
||||||
|
|
||||||
### Battery drains too fast
|
### 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.
|
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:**
|
1. **Check Battery Health:**
|
||||||
- Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
|
- 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:
|
- Run the following command to generate a battery report:
|
||||||
```powershell
|
```powershell
|
||||||
powercfg /batteryreport /output "C:\battery_report.html"
|
powercfg /batteryreport /output "C:\battery_report.html"
|
||||||
@@ -135,13 +106,13 @@ If you're using a laptop or tablet and find your battery drains too fast, please
|
|||||||
- 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.
|
- 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:**
|
2. **Review Power Settings:**
|
||||||
- Open the Settings app, and go to *System* > *Power & sleep*.
|
- Open the Settings app, and go to _System_ > _Power & sleep_.
|
||||||
- Adjust power plan settings based on your preferences and usage patterns.
|
- Adjust power plan settings based on your preferences and usage patterns.
|
||||||
- Click on *Additional power settings* to access advanced power settings that may help.
|
- Click on _Additional power settings_ to access advanced power settings that may help.
|
||||||
|
|
||||||
3. **Identify Power-Hungry Apps:**
|
3. **Identify Power-Hungry Apps:**
|
||||||
- Right-click on the taskbar and select *Task Manager*.
|
- Right-click on the taskbar and select _Task Manager_.
|
||||||
- Navigate to the *Processes* tab to identify applications with high CPU or memory usage.
|
- 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.
|
- Consider reconfiguring, closing, disabling, or uninstalling applications that use a lot of resources.
|
||||||
|
|
||||||
4. **Update Drivers:**
|
4. **Update Drivers:**
|
||||||
@@ -149,27 +120,27 @@ If you're using a laptop or tablet and find your battery drains too fast, please
|
|||||||
- Ensure graphics, chipset, and other essential drivers are up to date.
|
- Ensure graphics, chipset, and other essential drivers are up to date.
|
||||||
|
|
||||||
5. **Check for Windows Updates:**
|
5. **Check for Windows Updates:**
|
||||||
- Open the Settings app, and go to *Update & Security* > *Windows Update*.
|
- Open the Settings app, and go to _Update & Security_ > _Windows Update_.
|
||||||
- Check for and install any available updates for your operating system.
|
- Check for and install any available updates for your operating system.
|
||||||
|
|
||||||
6. **Reduce Screen Brightness:**
|
6. **Reduce Screen Brightness:**
|
||||||
- Open the Settings app, and go to *System* > *Display*.
|
- Open the Settings app, and go to _System_ > _Display_.
|
||||||
- Adjust screen brightness based on your preferences and lighting conditions.
|
- Adjust screen brightness based on your preferences and lighting conditions.
|
||||||
|
|
||||||
7. **Enable Battery Saver:**
|
7. **Enable Battery Saver:**
|
||||||
- Open the Settings app, and go to *System* > *Battery*.
|
- Open the Settings app, and go to _System_ > _Battery_.
|
||||||
- Turn on *Battery saver* to limit background activity and conserve power.
|
- Turn on _Battery saver_ to limit background activity and conserve power.
|
||||||
|
|
||||||
8. **Check Power Usage in Settings:**
|
8. **Check Power Usage in Settings:**
|
||||||
- Open the Settings app, and go to *System* > *Battery* > *Battery usage by app*.
|
- 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.
|
- Review the list of apps and their power usage. Disable or uninstall any you don't need.
|
||||||
|
|
||||||
9. **Check Background Apps:**
|
9. **Check Background Apps:**
|
||||||
- Open the Settings app, and go to *Privacy* > *Background apps*.
|
- Open the Settings app, and go to _Privacy_ > _Background apps_.
|
||||||
- Disable or uninstall unnecessary apps running in the background.
|
- Disable or uninstall unnecessary apps running in the background.
|
||||||
|
|
||||||
10. **Use `powercfg` for Analysis:**
|
10. **Use `powercfg` for Analysis:**
|
||||||
- Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
|
- 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:
|
- Run the following command to analyze energy usage and generate a report:
|
||||||
```powershell
|
```powershell
|
||||||
powercfg /energy /output "C:\energy_report.html"
|
powercfg /energy /output "C:\energy_report.html"
|
||||||
@@ -178,35 +149,36 @@ If you're using a laptop or tablet and find your battery drains too fast, please
|
|||||||
|
|
||||||
11. **Review Event Logs:**
|
11. **Review Event Logs:**
|
||||||
- Open Event Viewer by searching for it in the Start menu.
|
- Open Event Viewer by searching for it in the Start menu.
|
||||||
- Navigate to *Windows Logs* > *System*.
|
- 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.
|
- 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:**
|
12. **Check Wake-up Sources:**
|
||||||
- Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
|
- 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 /requests` to identify processes preventing sleep.
|
||||||
- Use the command `powercfg /waketimers` to view active wake timers.
|
- 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.
|
- 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:**
|
13. **Advanced Identification of Power-Hungry Apps:**
|
||||||
- Open Resource Monitor from the Start menu.
|
- Open Resource Monitor from the Start menu.
|
||||||
- Navigate to the *CPU*, *Memory*, *Network*, and other tabs to identify processes with high resource usage.
|
- 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.
|
- Consider reconfiguring, closing, disabling, or uninstalling applications that use a lot of resources.
|
||||||
|
|
||||||
14. **Disable Activity History:**
|
14. **Disable Activity History:**
|
||||||
- Open the Settings app, and go to *Privacy* > *Activity history*.
|
- Open the Settings app, and go to _Privacy_ > _Activity history_.
|
||||||
- Turn off *Let Windows collect my activities from this PC*.
|
- Turn off _Let Windows collect my activities from this PC_.
|
||||||
|
|
||||||
15. **Prevent Network Adapters From Waking PC:**
|
15. **Prevent Network Adapters From Waking PC:**
|
||||||
- Open Device Manager by searching for it in the Start menu.
|
- Open Device Manager by searching for it in the Start menu.
|
||||||
- Locate your network adapter, right-click, and go to *Properties*.
|
- 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.
|
- Under the _Power Management_ tab, uncheck the option that allows the device to wake the computer.
|
||||||
|
|
||||||
16. **Review Installed Applications:**
|
16. **Review Installed Applications:**
|
||||||
- Manually review installed applications by searching for *Add or remove programs* in the Start menu.
|
- 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.
|
- Check settings/preferences of individual applications for power-related options.
|
||||||
- Uninstall unnecessary or problematic software.
|
- Uninstall unnecessary or problematic software.
|
||||||
|
|
||||||
These troubleshooting steps are generic, but should help in most situations. You should have these key takeaways:
|
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.
|
- 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.
|
- 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.
|
- 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.
|
||||||
|
|||||||
@@ -14,95 +14,30 @@ weight: 3
|
|||||||
|
|
||||||
### Essential Tweaks
|
### Essential Tweaks
|
||||||
|
|
||||||
- [Create Restore Point](tweaks/essential-tweaks/restorepoint/)
|
{{< autolinks section="dev/tweaks/essential-tweaks" >}}
|
||||||
- [Debloat Edge](tweaks/essential-tweaks/edgedebloat/)
|
|
||||||
- [Delete Temporary Files](tweaks/essential-tweaks/deletetempfiles/)
|
|
||||||
- [Disable Activity History](tweaks/essential-tweaks/activity/)
|
|
||||||
- [Disable ConsumerFeatures](tweaks/essential-tweaks/consumerfeatures/)
|
|
||||||
- [Disable GameDVR](tweaks/essential-tweaks/gamedvr/)
|
|
||||||
- [Disable Hibernation](tweaks/essential-tweaks/hibernation/)
|
|
||||||
- [Disable Location Tracking](tweaks/essential-tweaks/location/)
|
|
||||||
- [Disable Powershell 7 Telemetry](tweaks/essential-tweaks/powershell7tele/)
|
|
||||||
- [Disable Storage Sense](tweaks/essential-tweaks/storage/)
|
|
||||||
- [Disable Telemetry](tweaks/essential-tweaks/telemetry/)
|
|
||||||
- [Enable End Task With Right Click](tweaks/essential-tweaks/endtaskontaskbar/)
|
|
||||||
- [Prefer IPv4 over IPv6](tweaks/essential-tweaks/ipv46/)
|
|
||||||
- [Run Disk Cleanup](tweaks/essential-tweaks/diskcleanup/)
|
|
||||||
- [Set Hibernation as default (good for laptops)](tweaks/essential-tweaks/laptophibernation/)
|
|
||||||
- [Set Services to Manual](tweaks/essential-tweaks/services/)
|
|
||||||
|
|
||||||
### Advanced Tweaks (CAUTION)
|
### Advanced Tweaks (CAUTION)
|
||||||
|
|
||||||
- [Adobe Network Block](tweaks/z--advanced-tweaks---caution/blockadobenet/)
|
{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}}
|
||||||
- [Disable Background Apps](tweaks/z--advanced-tweaks---caution/disablebgapps/)
|
|
||||||
- [Disable Fullscreen Optimizations](tweaks/z--advanced-tweaks---caution/disablefso/)
|
|
||||||
- [Disable IPv6](tweaks/z--advanced-tweaks---caution/disableipsix/)
|
|
||||||
- [Disable Microsoft Copilot](tweaks/z--advanced-tweaks---caution/removecopilot/)
|
|
||||||
- [Disable Notification Tray/Calendar](tweaks/z--advanced-tweaks---caution/disablenotifications/)
|
|
||||||
- [Disable Teredo](tweaks/z--advanced-tweaks---caution/teredo/)
|
|
||||||
- [DNS](tweaks/z--advanced-tweaks---caution/changedns/)
|
|
||||||
- [Remove ALL MS Store Apps - NOT RECOMMENDED](tweaks/z--advanced-tweaks---caution/debloat/)
|
|
||||||
- [Remove Home and Gallery from explorer](tweaks/z--advanced-tweaks---caution/removehomegallery/)
|
|
||||||
- [Make Edge Uninstallable](tweaks/z--advanced-tweaks---caution/edgeuninstall/)
|
|
||||||
- [Run OO Shutup 10](tweaks/z--advanced-tweaks---caution/oosubutton/)
|
|
||||||
- [Remove OneDrive](tweaks/z--advanced-tweaks---caution//removeonedrive)
|
|
||||||
- [Set Classic Right-Click Menu ](tweaks/z--advanced-tweaks---caution/rightclickmenu/)
|
|
||||||
- [Set Display for Performance](tweaks/z--advanced-tweaks---caution/display/)
|
|
||||||
- [Set Time to UTC (Dual Boot)](tweaks/z--advanced-tweaks---caution/utc/)
|
|
||||||
|
|
||||||
### Customize Preferences
|
### Customize Preferences
|
||||||
|
|
||||||
- [Bing Search in Start Menu](tweaks/customize-preferences/bingsearch/)
|
{{< autolinks section="dev/tweaks/customize-preferences" >}}
|
||||||
- [Center Taskbar Items](tweaks/customize-preferences/taskbaralignment/)
|
|
||||||
- [Dark Theme for Windows](tweaks/customize-preferences/darkmode/)
|
|
||||||
- [Detailed BSoD](tweaks/customize-preferences/detailedbsod/)
|
|
||||||
- [Mouse Acceleration](tweaks/customize-preferences/mouseacceleration/)
|
|
||||||
- [NumLock on Startup](tweaks/customize-preferences/numlock/)
|
|
||||||
- [Search Button in Taskbar](tweaks/customize-preferences/taskbarsearch/)
|
|
||||||
- [Show File Extensions](tweaks/customize-preferences/showext/)
|
|
||||||
- [Show Hidden Files](tweaks/customize-preferences/hiddenfiles/)
|
|
||||||
- [Snap Assist Flyout](tweaks/customize-preferences/snapflyout/)
|
|
||||||
- [Snap Assist Suggestion](tweaks/customize-preferences/snapsuggestion/)
|
|
||||||
- [Snap Window](tweaks/customize-preferences/snapwindow/)
|
|
||||||
- [Sticky Keys](tweaks/customize-preferences/stickykeys/)
|
|
||||||
- [Task View Button in Taskbar](tweaks/customize-preferences/taskview/)
|
|
||||||
- [Verbose Messages During Logon](tweaks/customize-preferences/verboselogon/)
|
|
||||||
- [Widgets Button in Taskbar](tweaks/customize-preferences/taskbarwidgets/)
|
|
||||||
|
|
||||||
### Performance Plans
|
### Performance Plans
|
||||||
|
|
||||||
- [Add and Remove Ultimate Performance Profile](tweaks/performance-plans/profile/)
|
{{< autolinks section="dev/tweaks/performance-plans" >}}
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
- [Remove Adobe Creative Cloud](features/fixes/RunAdobeCCCleanerTool/)
|
{{< autolinks section="dev/features/fixes" >}}
|
||||||
- [Reset Network](features/fixes/network/)
|
|
||||||
- [Reset Windows Update](features/fixes/update/)
|
|
||||||
- [Set Up Autologin](features/fixes/autologin/)
|
|
||||||
- [System Corruption Scan](features/fixes/corruptionscan/)
|
|
||||||
- [WinGet Reinstall](features/fixes/winget/)
|
|
||||||
|
|
||||||
### Legacy Windows Panels
|
### Legacy Windows Panels
|
||||||
|
|
||||||
- [Control Panel](features/legacy-windows-panels/control/)
|
{{< autolinks section="dev/features/legacy-windows-panels" >}}
|
||||||
- [Network Connections](features/legacy-windows-panels/network/)
|
|
||||||
- [Power Panel](features/legacy-windows-panels/power/)
|
|
||||||
- [Printer Settings](features/legacy-windows-panels/printer/)
|
|
||||||
- [Region](features/legacy-windows-panels/region/)
|
|
||||||
- [Sound Settings](features/legacy-windows-panels/sound/)
|
|
||||||
- [System Properties](features/legacy-windows-panels/system/)
|
|
||||||
- [User Accounts](features/legacy-windows-panels/user/)
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- [All .Net Framework (2,3,4)](features/features/dotnet/)
|
{{< autolinks section="dev/features/features" >}}
|
||||||
- [Disable Legacy F8 Boot Recovery](features/features/disablelegacyrecovery/)
|
|
||||||
- [Enable Legacy F8 Boot Recovery](features/features/enablelegacyrecovery/)
|
|
||||||
- [Enable Daily Registry Backup Task 12.30am](features/features/regbackup/)
|
|
||||||
- [HyperV Virtualization](features/features/hyperv/)
|
|
||||||
- [Legacy Media (WMP, DirectPlay)](features/features/legacymedia/)
|
|
||||||
- [NFS - Network File System](features/features/nfs/)
|
|
||||||
- [Windows Sandbox](features/features/sandbox/)
|
|
||||||
- [Windows Subsystem for Linux](features/features/wsl/)
|
|
||||||
|
|||||||
@@ -55,9 +55,6 @@ winutil/
|
|||||||
│ ├── public/ # User-facing functions
|
│ ├── public/ # User-facing functions
|
||||||
│ │ ├── Initialize-WPFUI.ps1
|
│ │ ├── Initialize-WPFUI.ps1
|
||||||
│ │ └── ...
|
│ │ └── ...
|
||||||
│ └── microwin/ # MicroWin specific functions
|
|
||||||
│ ├── Invoke-Microwin.ps1
|
|
||||||
│ └── ...
|
|
||||||
├── config/ # JSON configuration files
|
├── config/ # JSON configuration files
|
||||||
│ ├── applications.json # Application definitions
|
│ ├── applications.json # Application definitions
|
||||||
│ ├── tweaks.json # Tweak definitions
|
│ ├── tweaks.json # Tweak definitions
|
||||||
@@ -126,7 +123,6 @@ winutil/
|
|||||||
**Purpose**: WPF GUI layout and design.
|
**Purpose**: WPF GUI layout and design.
|
||||||
|
|
||||||
**Structure**:
|
**Structure**:
|
||||||
- TabControl for main tabs (Install, Tweaks, Config, MicroWin)
|
|
||||||
- Buttons with event handlers
|
- Buttons with event handlers
|
||||||
- TextBoxes for input
|
- TextBoxes for input
|
||||||
- CheckBoxes for options
|
- CheckBoxes for options
|
||||||
@@ -320,22 +316,6 @@ if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
|
|||||||
choco install $app.choco -y
|
choco install $app.choco -y
|
||||||
```
|
```
|
||||||
|
|
||||||
## MicroWin Architecture
|
|
||||||
|
|
||||||
MicroWin operates in phases:
|
|
||||||
|
|
||||||
1. **Mount ISO**: Extract Windows image
|
|
||||||
2. **Modify Image**: Remove components, apply tweaks
|
|
||||||
3. **Inject Drivers**: Add custom drivers (optional)
|
|
||||||
4. **Create Unattend**: Generate automated install configuration
|
|
||||||
5. **Rebuild ISO**: Package modified image into new ISO
|
|
||||||
|
|
||||||
**Key Files**:
|
|
||||||
- `Invoke-Microwin.ps1`: Main orchestration
|
|
||||||
- `Microwin-RemovePackages.ps1`: Remove Windows packages
|
|
||||||
- `Microwin-RemoveFeatures.ps1`: Disable features
|
|
||||||
- `Microwin-NewUnattend.ps1`: Create unattend.xml
|
|
||||||
|
|
||||||
## Error Handling
|
## Error Handling
|
||||||
|
|
||||||
Winutil uses PowerShell error handling:
|
Winutil uses PowerShell error handling:
|
||||||
@@ -489,7 +469,6 @@ Outputs `winutil.ps1` in the root directory.
|
|||||||
**Optional (auto-installed)**:
|
**Optional (auto-installed)**:
|
||||||
- WinGet (Windows Package Manager)
|
- WinGet (Windows Package Manager)
|
||||||
- Chocolatey
|
- Chocolatey
|
||||||
- oscdimg.exe (for MicroWin)
|
|
||||||
|
|
||||||
## Performance Considerations
|
## Performance Considerations
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
### Features
|
---
|
||||||
|
weight: 1
|
||||||
|
title: "Features"
|
||||||
|
---
|
||||||
|
|
||||||
- [All .Net Framework (2,3,4)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/dotnet.md)
|
{{< autolinks section="dev/features/features" >}}
|
||||||
- [Disable Legacy F8 Boot Recovery](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/DisableLegacyRecovery.md)
|
|
||||||
- [Enable Legacy F8 Boot Recovery](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/EnableLegacyRecovery.md)
|
|
||||||
- [Enable Daily Registry Backup Task 12.30am](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/RegBackup.md)
|
|
||||||
- [HyperV Virtualization](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/hyperv.md)
|
|
||||||
- [Legacy Media (WMP, DirectPlay)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/legacymedia.md)
|
|
||||||
- [NFS - Network File System](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/nfs.md)
|
|
||||||
- [Windows Sandbox](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/Sandbox.md)
|
|
||||||
- [Windows Subsystem for Linux](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/wsl.md)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Set Up Autologin
|
# Set Up Autologin
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFPanelAutologin {
|
function Invoke-WPFPanelAutologin {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# System Corruption Scan
|
# System Corruption Scan
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFSystemRepair {
|
function Invoke-WPFSystemRepair {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Reset Network
|
# Reset Network
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFFixesNetwork {
|
function Invoke-WPFFixesNetwork {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Remove Adobe Creative Cloud
|
# Remove Adobe Creative Cloud
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFRunAdobeCCCleanerTool {
|
function Invoke-WPFRunAdobeCCCleanerTool {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Reset Windows Update
|
# Reset Windows Update
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFFixesUpdate {
|
function Invoke-WPFFixesUpdate {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# WinGet Reinstall
|
# WinGet Reinstall
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFFixesWinget {
|
function Invoke-WPFFixesWinget {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
### Fixes
|
---
|
||||||
|
weight: 2
|
||||||
|
title: "Fixes"
|
||||||
|
---
|
||||||
|
|
||||||
- [Remove Adobe Creative Cloud](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md)
|
{{< autolinks section="dev/features/fixes" >}}
|
||||||
- [Reset Network](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Network.md)
|
|
||||||
- [Reset Windows Update](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Update.md)
|
|
||||||
- [Set Up Autologin](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Autologin.md)
|
|
||||||
- [System Corruption Scan](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/CorruptionScan.md)
|
|
||||||
- [WinGet Reinstall](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Winget.md)
|
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
### Legacy Windows Panels
|
---
|
||||||
|
weight: 3
|
||||||
|
title: "Legacy Windows Panels"
|
||||||
|
---
|
||||||
|
|
||||||
- [Control Panel](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/control.md)
|
{{< autolinks section="dev/features/legacy-windows-panels" >}}
|
||||||
- [Network Connections](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/network.md)
|
|
||||||
- [Power Panel](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/power.md)
|
|
||||||
- [Printer Settings](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/printer.md)
|
|
||||||
- [Region](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/region.md)
|
|
||||||
- [Sound Settings](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/sound.md)
|
|
||||||
- [System Properties](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/system.md)
|
|
||||||
- [User Accounts](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/user.md)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Control Panel
|
# Control Panel
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Network Connections
|
# Network Connections
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Power Panel
|
# Power Panel
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Printer Settings
|
# Printer Settings
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Region
|
# Region
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Sound Settings
|
# Sound Settings
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# System Properties
|
# System Properties
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# User Accounts
|
# User Accounts
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFControlPanel {
|
function Invoke-WPFControlPanel {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,16 @@
|
|||||||
|
---
|
||||||
|
weight: 1
|
||||||
|
title: "Features"
|
||||||
|
---
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
- [Remove Adobe Creative Cloud](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/RunAdobeCCCleanerTool.md)
|
{{< autolinks section="dev/features/fixes" >}}
|
||||||
- [Reset Network](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Network.md)
|
|
||||||
- [Reset Windows Update](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Update.md)
|
|
||||||
- [Set Up Autologin](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Autologin.md)
|
|
||||||
- [System Corruption Scan](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/CorruptionScan.md)
|
|
||||||
- [WinGet Reinstall](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Fixes/Winget.md)
|
|
||||||
|
|
||||||
### Legacy Windows Panels
|
### Legacy Windows Panels
|
||||||
|
|
||||||
- [Control Panel](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/control.md/control.md)
|
{{< autolinks section="dev/features/legacy-windows-panels" >}}
|
||||||
- [Network Connections](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/network.md)
|
|
||||||
- [Power Panel](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/power.md)
|
|
||||||
- [Printer Settings](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/printer.md)
|
|
||||||
- [Region](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/region.md)
|
|
||||||
- [Sound Settings](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/sound.md)
|
|
||||||
- [System Properties](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/system.md)
|
|
||||||
- [User Accounts](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Legacy-Windows-Panels/user.md)
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- [All .Net Framework (2,3,4)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/dotnet.md)
|
{{< autolinks section="dev/features/features" >}}
|
||||||
- [Disable Legacy F8 Boot Recovery](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/DisableLegacyRecovery.md)
|
|
||||||
- [Enable Legacy F8 Boot Recovery](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/EnableLegacyRecovery.md)
|
|
||||||
- [Enable Daily Registry Backup Task 12.30am](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/RegBackup.md)
|
|
||||||
- [HyperV Virtualization](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/hyperv.md)
|
|
||||||
- [Legacy Media (WMP, DirectPlay)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/legacymedia.md)
|
|
||||||
- [NFS - Network File System](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/nfs.md)
|
|
||||||
- [Windows Sandbox](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/Sandbox.md)
|
|
||||||
- [Windows Subsystem for Linux](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/features/Features/wsl.md)
|
|
||||||
|
|||||||
@@ -1,18 +1,8 @@
|
|||||||
|
---
|
||||||
|
weight: 3
|
||||||
|
title: "Customize Preferences"
|
||||||
|
---
|
||||||
|
|
||||||
### Customize Preferences
|
### Customize Preferences
|
||||||
|
|
||||||
- [Bing Search in Start Menu](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md)
|
{{< autolinks section="dev/tweaks/customize-preferences" >}}
|
||||||
- [Center Taskbar Items](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md)
|
|
||||||
- [Dark Theme for Windows](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md)
|
|
||||||
- [Detailed BSoD](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md)
|
|
||||||
- [Mouse Acceleration](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md)
|
|
||||||
- [NumLock on Startup](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/NumLock.md)
|
|
||||||
- [Search Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md)
|
|
||||||
- [Show File Extensions](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md)
|
|
||||||
- [Show Hidden Files](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md)
|
|
||||||
- [Snap Assist Flyout](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapFlyout.md)
|
|
||||||
- [Snap Assist Suggestion](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md)
|
|
||||||
- [Snap Window](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapWindow.md)
|
|
||||||
- [Sticky Keys](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md)
|
|
||||||
- [Task View Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskView.md)
|
|
||||||
- [Verbose Messages During Logon](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md)
|
|
||||||
- [Widgets Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarWidgets.md)
|
|
||||||
|
|||||||
@@ -960,3 +960,46 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
|
#Function
|
||||||
|
```powershell
|
||||||
|
Function Set-WinUtilService {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Changes the startup type of the given service
|
||||||
|
|
||||||
|
.PARAMETER Name
|
||||||
|
The name of the service to modify
|
||||||
|
|
||||||
|
.PARAMETER StartupType
|
||||||
|
The startup type to set the service to
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
Set-WinUtilService -Name "HomeGroupListener" -StartupType "Manual"
|
||||||
|
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
$Name,
|
||||||
|
$StartupType
|
||||||
|
)
|
||||||
|
try {
|
||||||
|
Write-Host "Setting Service $Name to $StartupType"
|
||||||
|
|
||||||
|
# Check if the service exists
|
||||||
|
$service = Get-Service -Name $Name -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"
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $_.Exception.Message
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,18 +1,8 @@
|
|||||||
|
---
|
||||||
|
weight: 1
|
||||||
|
title: "Essential Tweaks"
|
||||||
|
---
|
||||||
|
|
||||||
### Essential Tweaks
|
### Essential Tweaks
|
||||||
|
|
||||||
- [Create Restore Point](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md)
|
{{< autolinks section="dev/tweaks/essential-tweaks" >}}
|
||||||
- [Debloat Edge](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/EdgeDebloat.md)
|
|
||||||
- [Delete Temporary Files](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md)
|
|
||||||
- [Disable Activity History](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Activity.md)
|
|
||||||
- [Disable ConsumerFeatures](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md)
|
|
||||||
- [Disable GameDVR](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md)
|
|
||||||
- [Disable Hibernation](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Hibernation.md)
|
|
||||||
- [Disable Location Tracking](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Location.md)
|
|
||||||
- [Disable Powershell 7 Telemetry](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md)
|
|
||||||
- [Disable Storage Sense](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Storage.md)
|
|
||||||
- [Disable Telemetry](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md)
|
|
||||||
- [Enable End Task With Right Click](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md)
|
|
||||||
- [Prefer IPv4 over IPv6](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/IPv46.md)
|
|
||||||
- [Run Disk Cleanup](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md)
|
|
||||||
- [Set Hibernation as default (good for laptops)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/LaptopHibernation.md)
|
|
||||||
- [Set Services to Manual](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Services.md)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Remove Ultimate Performance Profile
|
# Remove Ultimate Performance Profile
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
Function Invoke-WPFUltimatePerformance {
|
Function Invoke-WPFUltimatePerformance {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
---
|
||||||
|
weight: 4
|
||||||
|
title: "Performance Plans"
|
||||||
|
---
|
||||||
|
|
||||||
### Performance Plans
|
### Performance Plans
|
||||||
|
|
||||||
- [Add and Remove Ultimate Performance Profile](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Performance-Plans/Profile.md)
|
{{< autolinks section="dev/tweaks/performance-plans" >}}
|
||||||
|
|||||||
@@ -1,58 +1,20 @@
|
|||||||
|
---
|
||||||
|
weight: 2
|
||||||
|
title: "Tweaks"
|
||||||
|
---
|
||||||
|
|
||||||
### Essential Tweaks
|
### Essential Tweaks
|
||||||
|
|
||||||
- [Create Restore Point](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/RestorePoint.md)
|
{{< autolinks section="dev/tweaks/essential-tweaks" >}}
|
||||||
- [Debloat Edge](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/EdgeDebloat.md)
|
|
||||||
- [Delete Temporary Files](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DeleteTempFiles.md)
|
|
||||||
- [Disable Activity History](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Activity.md)
|
|
||||||
- [Disable ConsumerFeatures](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/ConsumerFeatures.md)
|
|
||||||
- [Disable GameDVR](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/GameDVR.md)
|
|
||||||
- [Disable Hibernation](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Hibernation.md)
|
|
||||||
- [Disable Location Tracking](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Location.md)
|
|
||||||
- [Disable Powershell 7 Telemetry](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Powershell7Tele.md)
|
|
||||||
- [Disable Storage Sense](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Storage.md)
|
|
||||||
- [Disable Telemetry](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Telemetry.md)
|
|
||||||
- [Enable End Task With Right Click](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/EndTaskOnTaskbar.md)
|
|
||||||
- [Prefer IPv4 over IPv6](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/IPv46.md)
|
|
||||||
- [Run Disk Cleanup](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/DiskCleanup.md)
|
|
||||||
- [Set Hibernation as default (good for laptops)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/LaptopHibernation.md)
|
|
||||||
- [Set Services to Manual](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Essential-Tweaks/Services.md)
|
|
||||||
|
|
||||||
### Advanced Tweaks (CAUTION)
|
### Advanced Tweaks (CAUTION)
|
||||||
|
|
||||||
- [Adobe Network Block](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md)
|
{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}}
|
||||||
- [Disable Background Apps](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md)
|
|
||||||
- [Disable Fullscreen Optimizations](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md)
|
|
||||||
- [Disable IPv6](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md)
|
|
||||||
- [Disable Notification Tray/Calendar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md)
|
|
||||||
- [Disable Teredo](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md)
|
|
||||||
- [Remove ALL MS Store Apps - NOT RECOMMENDED](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md)
|
|
||||||
- [Remove Gallery from explorer](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md)
|
|
||||||
- [Remove Home from explorer](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md)
|
|
||||||
- [Run OO Shutup 10](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md)
|
|
||||||
- [Remove OneDrive](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md)
|
|
||||||
- [Set Classic Right-Click Menu](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md)
|
|
||||||
- [Set Display for Performance](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md)
|
|
||||||
- [Set Time to UTC (Dual Boot)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md)
|
|
||||||
|
|
||||||
### Customize Preferences
|
### Customize Preferences
|
||||||
|
|
||||||
- [Bing Search in Start Menu](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/BingSearch.md)
|
{{< autolinks section="dev/tweaks/customize-preferences" >}}
|
||||||
- [Center Taskbar Items](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarAlignment.md)
|
|
||||||
- [Dark Theme for Windows](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/DarkMode.md)
|
|
||||||
- [Detailed BSoD](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/DetailedBSoD.md)
|
|
||||||
- [Mouse Acceleration](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/MouseAcceleration.md)
|
|
||||||
- [NumLock on Startup](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/NumLock.md)
|
|
||||||
- [Search Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarSearch.md)
|
|
||||||
- [Show File Extensions](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/ShowExt.md)
|
|
||||||
- [Show Hidden Files](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/HiddenFiles.md)
|
|
||||||
- [Snap Assist Flyout](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapFlyout.md)
|
|
||||||
- [Snap Assist Suggestion](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapSuggestion.md)
|
|
||||||
- [Snap Window](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/SnapWindow.md)
|
|
||||||
- [Sticky Keys](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/StickyKeys.md)
|
|
||||||
- [Task View Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskView.md)
|
|
||||||
- [Verbose Messages During Logon](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/VerboseLogon.md)
|
|
||||||
- [Widgets Button in Taskbar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Customize-Preferences/TaskbarWidgets.md)
|
|
||||||
|
|
||||||
### Performance Plans
|
### Performance Plans
|
||||||
|
|
||||||
- [Add and Remove Ultimate Performance Profile](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/Performance-Plans/Profile.md)
|
{{< autolinks section="dev/tweaks/performance-plans" >}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Run OO Shutup 10
|
# Run OO Shutup 10
|
||||||
|
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WPFOOSU {
|
function Invoke-WPFOOSU {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
],
|
],
|
||||||
```
|
```
|
||||||
# Function
|
# Function
|
||||||
```json
|
```powershell
|
||||||
function Invoke-WinUtilRemoveEdge {
|
function Invoke-WinUtilRemoveEdge {
|
||||||
Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..."
|
Write-Host "Unlocking The Offical Edge Uninstaller And Removing Microsoft Edge..."
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,8 @@
|
|||||||
|
---
|
||||||
|
weight: 2
|
||||||
|
title: "Advanced Tweaks (CAUTION)"
|
||||||
|
---
|
||||||
|
|
||||||
### Advanced Tweaks (CAUTION)
|
### Advanced Tweaks (CAUTION)
|
||||||
|
|
||||||
- [Adobe Network Block](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/BlockAdobeNet.md)
|
{{< autolinks section="dev/tweaks/z--advanced-tweaks---caution" >}}
|
||||||
- [Disable Background Apps](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableBGapps.md)
|
|
||||||
- [Disable Fullscreen Optimizations](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableFSO.md)
|
|
||||||
- [Disable IPv6](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableIPv6.md)
|
|
||||||
- [Disable Notification Tray/Calendar](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DisableNotifications.md)
|
|
||||||
- [Disable Teredo](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Teredo.md)
|
|
||||||
- [Remove ALL MS Store Apps - NOT RECOMMENDED](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/DeBloat.md)
|
|
||||||
- [Remove Gallery from explorer](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveGallery.md)
|
|
||||||
- [Remove Home from explorer](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveHome.md)
|
|
||||||
- [Make Edge Uninstallable](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/EdgeUninstall.md)
|
|
||||||
- [Run OO Shutup 10](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/OOSUbutton.md)
|
|
||||||
- [Remove OneDrive](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RemoveOneDrive.md)
|
|
||||||
- [Set Classic Right-Click Menu](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/RightClickMenu.md)
|
|
||||||
- [Set Display for Performance](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/Display.md)
|
|
||||||
- [Set Time to UTC (Dual Boot)](https://github.com/ChrisTitusTech/winutil/blob/main/docs/content/dev/tweaks/z--Advanced-Tweaks---CAUTION/UTC.md)
|
|
||||||
|
|||||||
@@ -128,25 +128,6 @@ Winutil focuses on installation. To uninstall:
|
|||||||
### Will installed apps auto-update?
|
### 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.
|
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.
|
||||||
|
|
||||||
## MicroWin
|
|
||||||
|
|
||||||
### What is MicroWin?
|
|
||||||
MicroWin is a feature that creates custom Windows installation ISOs with bloatware removed, optimizations applied, and unnecessary components stripped out before installation.
|
|
||||||
|
|
||||||
### Is MicroWin legal?
|
|
||||||
Modifying Windows ISOs is a gray area legally. Use MicroWin for personal/educational purposes. You still need a valid Windows license to use the resulting installation.
|
|
||||||
|
|
||||||
### Can I install Windows updates on MicroWin?
|
|
||||||
Yes, Windows Update works normally on MicroWin installations. Some removed components may be restored by updates.
|
|
||||||
|
|
||||||
### How much smaller is a MicroWin ISO?
|
|
||||||
Depends on what you remove. Typically:
|
|
||||||
- Standard Windows 11: ~5.5 GB ISO, ~20-25 GB installed
|
|
||||||
- MicroWin (aggressive): ~3.5 GB ISO, ~10-15 GB installed
|
|
||||||
|
|
||||||
### Will all software work on MicroWin?
|
|
||||||
Most desktop applications work fine. Microsoft Store apps won't work if you removed the Store. Some features may be missing if you removed their dependencies.
|
|
||||||
|
|
||||||
## Updates & Maintenance
|
## Updates & Maintenance
|
||||||
|
|
||||||
### Should I disable Windows Updates?
|
### Should I disable Windows Updates?
|
||||||
@@ -277,11 +258,6 @@ Winutil itself uses ~50-100MB while running. Once closed, it's removed from memo
|
|||||||
- Check if antivirus is blocking changes
|
- Check if antivirus is blocking changes
|
||||||
- Verify you have ownership of files/registry keys
|
- Verify you have ownership of files/registry keys
|
||||||
|
|
||||||
### "File not found" errors during MicroWin
|
|
||||||
- Verify source ISO isn't corrupted
|
|
||||||
- Ensure sufficient disk space (20GB+)
|
|
||||||
- Check ISO is an official Windows ISO
|
|
||||||
|
|
||||||
### WinGet configuration prompt won't go away
|
### WinGet configuration prompt won't go away
|
||||||
Type `Y` and press Enter in the PowerShell window. This only happens on first use and configures WinGet for your system.
|
Type `Y` and press Enter in the PowerShell window. This only happens on first use and configures WinGet for your system.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ Winutil (Chris Titus Tech's Windows Utility) is a comprehensive PowerShell-based
|
|||||||
- **Apply Tweaks**: Optimize Windows for performance, privacy, and usability
|
- **Apply Tweaks**: Optimize Windows for performance, privacy, and usability
|
||||||
- **Fix Issues**: Troubleshoot common Windows problems with one-click fixes
|
- **Fix Issues**: Troubleshoot common Windows problems with one-click fixes
|
||||||
- **Manage Updates**: Control how and when Windows updates install
|
- **Manage Updates**: Control how and when Windows updates install
|
||||||
- **Create MicroWin**: Build custom, lightweight Windows installation ISOs
|
|
||||||
- **Access Tools**: Quick access to Windows panels and utilities
|
- **Access Tools**: Quick access to Windows panels and utilities
|
||||||
|
|
||||||
## Who Should Use Winutil?
|
## Who Should Use Winutil?
|
||||||
@@ -60,12 +59,6 @@ Quick fixes for common Windows problems:
|
|||||||
|
|
||||||
**[Read the Features Guide →](features/)**
|
**[Read the Features Guide →](features/)**
|
||||||
|
|
||||||
### 🪟 MicroWin
|
|
||||||
|
|
||||||
Create custom Windows installation ISOs with bloatware removed, optimizations pre-applied, and unnecessary components stripped out.
|
|
||||||
|
|
||||||
**[Read the MicroWin Guide →](microwin/)**
|
|
||||||
|
|
||||||
### 🔄 Update Management
|
### 🔄 Update Management
|
||||||
|
|
||||||
Take control of Windows Updates with options to:
|
Take control of Windows Updates with options to:
|
||||||
@@ -94,7 +87,6 @@ Automate Winutil configurations for:
|
|||||||
| Install applications quickly | [Application Store](store/) |
|
| Install applications quickly | [Application Store](store/) |
|
||||||
| Speed up my computer | [Tweaks Guide](tweaks/) |
|
| Speed up my computer | [Tweaks Guide](tweaks/) |
|
||||||
| Fix Windows Update problems | [Features - Fixes](features/) |
|
| Fix Windows Update problems | [Features - Fixes](features/) |
|
||||||
| Create a lightweight Windows ISO | [MicroWin](microwin/) |
|
|
||||||
| Automate setup for multiple PCs | [Automation](automation/) |
|
| Automate setup for multiple PCs | [Automation](automation/) |
|
||||||
| Understand what tweaks do | [Tweaks Guide](tweaks/) |
|
| Understand what tweaks do | [Tweaks Guide](tweaks/) |
|
||||||
|
|
||||||
@@ -154,7 +146,6 @@ This User Guide covers everything you need to know:
|
|||||||
2. **[Application Store](store/)** - Installing software, using presets
|
2. **[Application Store](store/)** - Installing software, using presets
|
||||||
3. **[Tweaks](tweaks/)** - System optimizations and customizations
|
3. **[Tweaks](tweaks/)** - System optimizations and customizations
|
||||||
4. **[Features & Fixes](features/)** - Troubleshooting tools and utilities
|
4. **[Features & Fixes](features/)** - Troubleshooting tools and utilities
|
||||||
5. **[MicroWin](microwin/)** - Creating custom Windows ISOs
|
|
||||||
6. **[Updates](updates/)** - Managing Windows Update behavior
|
6. **[Updates](updates/)** - Managing Windows Update behavior
|
||||||
7. **[Automation](automation/)** - Scripting and batch deployments
|
7. **[Automation](automation/)** - Scripting and batch deployments
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Winutil is a powerful Windows utility that helps you optimize, customize, and ma
|
|||||||
|
|
||||||
Before running Winutil, ensure your system meets these requirements:
|
Before running Winutil, ensure your system meets these requirements:
|
||||||
|
|
||||||
- **Operating System**: Windows 10 (version 1809 or later) or Windows 11
|
- **Operating System**: Windows 10 (Latest Version) or Windows 11
|
||||||
- **PowerShell**: Version 5.1 or later (included by default in Windows 10/11)
|
- **PowerShell**: Version 5.1 or later (included by default in Windows 10/11)
|
||||||
- **Administrator Access**: Required for system-level changes
|
- **Administrator Access**: Required for system-level changes
|
||||||
- **Internet Connection**: Required for downloading applications and updates
|
- **Internet Connection**: Required for downloading applications and updates
|
||||||
@@ -26,17 +26,20 @@ Winutil doesn't require traditional installation. It runs directly from PowerShe
|
|||||||
There are several ways to open PowerShell with admin rights:
|
There are several ways to open PowerShell with admin rights:
|
||||||
|
|
||||||
**Method 1: Start Menu (Recommended)**
|
**Method 1: Start Menu (Recommended)**
|
||||||
|
|
||||||
1. Right-click on the Windows Start button
|
1. Right-click on the Windows Start button
|
||||||
2. Select "Windows PowerShell (Admin)" on Windows 10
|
2. Select "Windows PowerShell (Admin)" on Windows 10
|
||||||
3. Or select "Terminal (Admin)" on Windows 11
|
3. Or select "Terminal (Admin)" on Windows 11
|
||||||
|
|
||||||
**Method 2: Search Method**
|
**Method 2: Search Method**
|
||||||
|
|
||||||
1. Press the `Windows` key
|
1. Press the `Windows` key
|
||||||
2. Type "PowerShell" or "Terminal"
|
2. Type "PowerShell" or "Terminal"
|
||||||
3. Press `Ctrl + Shift + Enter` to launch as administrator
|
3. Press `Ctrl + Shift + Enter` to launch as administrator
|
||||||
4. Or right-click and select "Run as administrator"
|
4. Or right-click and select "Run as administrator"
|
||||||
|
|
||||||
**Method 3: Run Dialog**
|
**Method 3: Run Dialog**
|
||||||
|
|
||||||
1. Press `Windows + R`
|
1. Press `Windows + R`
|
||||||
2. Type `powershell`
|
2. Type `powershell`
|
||||||
3. Press `Ctrl + Shift + Enter`
|
3. Press `Ctrl + Shift + Enter`
|
||||||
@@ -46,11 +49,13 @@ There are several ways to open PowerShell with admin rights:
|
|||||||
Once PowerShell is open with administrator privileges, run one of these commands:
|
Once PowerShell is open with administrator privileges, run one of these commands:
|
||||||
|
|
||||||
**Stable Release (Recommended for most users)**
|
**Stable Release (Recommended for most users)**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm "https://christitus.com/win" | iex
|
irm "https://christitus.com/win" | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
**Development Branch (For testing latest features)**
|
**Development Branch (For testing latest features)**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm "https://christitus.com/windev" | iex
|
irm "https://christitus.com/windev" | iex
|
||||||
```
|
```
|
||||||
@@ -61,6 +66,7 @@ irm "https://christitus.com/windev" | iex
|
|||||||
### Step 3: Wait for Winutil to Load
|
### Step 3: Wait for Winutil to Load
|
||||||
|
|
||||||
The first time you run Winutil, it may take a few moments to:
|
The first time you run Winutil, it may take a few moments to:
|
||||||
|
|
||||||
- Download the latest version
|
- Download the latest version
|
||||||
- Initialize the interface
|
- Initialize the interface
|
||||||
- Load all features and settings
|
- Load all features and settings
|
||||||
@@ -80,11 +86,11 @@ On your first run, you may be prompted to configure WinGet (Windows Package Mana
|
|||||||
Winutil opens with a clean, tabbed interface:
|
Winutil opens with a clean, tabbed interface:
|
||||||
|
|
||||||
**Main Tabs**:
|
**Main Tabs**:
|
||||||
|
|
||||||
- **Install**: Browse and install applications
|
- **Install**: Browse and install applications
|
||||||
- **Tweaks**: Apply system optimizations and customizations
|
- **Tweaks**: Apply system optimizations and customizations
|
||||||
- **Config**: Access system tools and utilities
|
- **Config**: Access system tools and utilities
|
||||||
- **Updates**: Manage Windows updates
|
- **Updates**: Manage Windows updates
|
||||||
- **MicroWin**: Create custom, lightweight Windows ISOs
|
|
||||||
|
|
||||||
## Your First Actions
|
## Your First Actions
|
||||||
|
|
||||||
@@ -121,12 +127,14 @@ For a better Windows experience without risks:
|
|||||||
### Installing Applications
|
### Installing Applications
|
||||||
|
|
||||||
**Single Application**:
|
**Single Application**:
|
||||||
|
|
||||||
1. Open **Install** tab
|
1. Open **Install** tab
|
||||||
2. Search for the application name
|
2. Search for the application name
|
||||||
3. Check the box next to it
|
3. Check the box next to it
|
||||||
4. Click "Install Selected"
|
4. Click "Install Selected"
|
||||||
|
|
||||||
**Multiple Applications**:
|
**Multiple Applications**:
|
||||||
|
|
||||||
1. Check multiple application boxes
|
1. Check multiple application boxes
|
||||||
2. All checked apps will install in sequence
|
2. All checked apps will install in sequence
|
||||||
3. Progress is shown in the bottom panel
|
3. Progress is shown in the bottom panel
|
||||||
@@ -134,16 +142,19 @@ For a better Windows experience without risks:
|
|||||||
### Applying Tweaks
|
### Applying Tweaks
|
||||||
|
|
||||||
**Essential Tweaks** (Safe for all users):
|
**Essential Tweaks** (Safe for all users):
|
||||||
|
|
||||||
1. Go to **Tweaks** tab
|
1. Go to **Tweaks** tab
|
||||||
2. Select from Essential Tweaks section
|
2. Select from Essential Tweaks section
|
||||||
3. Click "Run Tweaks"
|
3. Click "Run Tweaks"
|
||||||
|
|
||||||
**Advanced Tweaks** (Use with caution):
|
**Advanced Tweaks** (Use with caution):
|
||||||
|
|
||||||
1. Only modify if you understand the implications
|
1. Only modify if you understand the implications
|
||||||
2. Always create a restore point first
|
2. Always create a restore point first
|
||||||
3. Review documentation for each tweak
|
3. Review documentation for each tweak
|
||||||
|
|
||||||
**Undoing Tweaks**:
|
**Undoing Tweaks**:
|
||||||
|
|
||||||
1. Select the same tweaks you applied
|
1. Select the same tweaks you applied
|
||||||
2. Click "Undo Selected Tweaks"
|
2. Click "Undo Selected Tweaks"
|
||||||
3. System will revert to previous state
|
3. System will revert to previous state
|
||||||
@@ -183,6 +194,7 @@ Winutil offers several preset configurations:
|
|||||||
## Safety Tips
|
## Safety Tips
|
||||||
|
|
||||||
✅ **DO**:
|
✅ **DO**:
|
||||||
|
|
||||||
- Create restore points before major changes
|
- Create restore points before major changes
|
||||||
- Read tweak descriptions before applying
|
- Read tweak descriptions before applying
|
||||||
- Start with Essential Tweaks
|
- Start with Essential Tweaks
|
||||||
@@ -190,6 +202,7 @@ Winutil offers several preset configurations:
|
|||||||
- Back up important data
|
- Back up important data
|
||||||
|
|
||||||
❌ **DON'T**:
|
❌ **DON'T**:
|
||||||
|
|
||||||
- Apply all tweaks at once without understanding them
|
- Apply all tweaks at once without understanding them
|
||||||
- Skip creating restore points
|
- Skip creating restore points
|
||||||
- Use Advanced Tweaks without research
|
- Use Advanced Tweaks without research
|
||||||
@@ -203,11 +216,13 @@ Winutil offers several preset configurations:
|
|||||||
**If the download fails**:
|
**If the download fails**:
|
||||||
|
|
||||||
1. Try the direct GitHub link:
|
1. Try the direct GitHub link:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm https://github.com/ChrisTitusTech/Winutil/releases/latest/download/Winutil.ps1 | iex
|
irm https://github.com/ChrisTitusTech/Winutil/releases/latest/download/Winutil.ps1 | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Force TLS 1.2 (for older Windows versions):
|
2. Force TLS 1.2 (for older Windows versions):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
irm "https://christitus.com/win" | iex
|
irm "https://christitus.com/win" | iex
|
||||||
@@ -245,7 +260,6 @@ Now that you're set up, explore these guides:
|
|||||||
|
|
||||||
- [Application Installation Guide](../store/) - Learn about installing software
|
- [Application Installation Guide](../store/) - Learn about installing software
|
||||||
- [Tweaks Guide](../tweaks/) - Understand system optimizations
|
- [Tweaks Guide](../tweaks/) - Understand system optimizations
|
||||||
- [MicroWin Guide](../microwin/) - Create custom Windows ISOs
|
|
||||||
- [FAQ](../../faq/) - Common questions and answers
|
- [FAQ](../../faq/) - Common questions and answers
|
||||||
|
|
||||||
## Getting Help
|
## Getting Help
|
||||||
@@ -261,7 +275,7 @@ If you need assistance:
|
|||||||
## Quick Reference Card
|
## Quick Reference Card
|
||||||
|
|
||||||
| Task | Location | Action |
|
| Task | Location | Action |
|
||||||
|------|----------|--------|
|
| -------------------- | ----------- | ------------------------------------ |
|
||||||
| Install Apps | Install Tab | Check boxes → Install Selected |
|
| Install Apps | Install Tab | Check boxes → Install Selected |
|
||||||
| Apply Tweaks | Tweaks Tab | Select tweaks → Run Tweaks |
|
| Apply Tweaks | Tweaks Tab | Select tweaks → Run Tweaks |
|
||||||
| Undo Tweaks | Tweaks Tab | Select tweaks → Undo Selected Tweaks |
|
| Undo Tweaks | Tweaks Tab | Select tweaks → Undo Selected Tweaks |
|
||||||
|
|||||||
@@ -1,159 +0,0 @@
|
|||||||
---
|
|
||||||
title: Microwin
|
|
||||||
weight: 6
|
|
||||||
---
|
|
||||||
|
|
||||||
MicroWin is our in-house solution for customized and debloated Windows images. With MicroWin, you can create images that have minimal bloat and no interruptions. This has an upside: you can get more done and use Windows the way **you** want.
|
|
||||||
|
|
||||||
Due to MicroWin using standard Windows system administration tools, such as DISM (Deployment Image Servicing and Management), advanced Windows users (system administrators and tech enthusiasts) can continue making changes so that they can have their own set of customizations with their ISO files.
|
|
||||||
|
|
||||||
If you're excited to try this out, let's go through how to use it. You'll be done in a short time!
|
|
||||||
|
|
||||||
## Basic usage
|
|
||||||
|
|
||||||
To start with MicroWin, go to its tab. You will see the following:
|
|
||||||
|
|
||||||
{{< image src="images/microwin/microwin-screen" >}}
|
|
||||||
|
|
||||||
From this screen, you'll have to do one of the following:
|
|
||||||
|
|
||||||
- **Select the ISO file:** if you have already downloaded a Windows ISO file, select it and click OK
|
|
||||||
- **Get an ISO file automatically:** if you don't have an ISO file ready, and don't want to waste time going to the download page, you can grab the latest versions of Windows easily. Select your preferred version and the language of the ISO file, and its destination, and you will have an ISO file in no time.
|
|
||||||
|
|
||||||
{{< image src="images/microwin/microwin-downloader" >}}
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
When downloading your ISO file, network conditions (such as speed and location) can affect the time you have to wait for the download to complete and the availability of such download.
|
|
||||||
|
|
||||||
### Compatibility
|
|
||||||
|
|
||||||
You may be wondering if your Windows image is compatible with the MicroWin process. Because of this, we present to you a compatibility list:
|
|
||||||
|
|
||||||
| Version | Compatible? |
|
|
||||||
|:--|:--|
|
|
||||||
| Windows 7 | ❌ Not supported |
|
|
||||||
| Windows 8 | ❌ Not supported |
|
|
||||||
| Windows 8.1 | ❌ Not supported |
|
|
||||||
| Windows 10 | ℹ️ Only the latest versions are supported, and you will not get the full experience |
|
|
||||||
| Windows 11 | 👍 Supported (21H2-24H2) |
|
|
||||||
|
|
||||||
After getting information about your ISO file, you will see the following screen:
|
|
||||||
|
|
||||||
{{< image src="images/microwin/microwin-screen-full" >}}
|
|
||||||
|
|
||||||
### Requirements
|
|
||||||
|
|
||||||
To successfully use MicroWin with your Windows image, you need the following:
|
|
||||||
|
|
||||||
- **The latest versions of Windows 10, or Windows 11**
|
|
||||||
- **Enough space**. We recommend having, at least, double the size of your ISO file. However, you may need more if you want to inject drivers
|
|
||||||
|
|
||||||
## Options
|
|
||||||
|
|
||||||
### Choosing your index
|
|
||||||
|
|
||||||
By default, MicroWin will target the Pro edition of Windows. The Pro edition is a good baseline for IT administrators **and** end-users, due to the inclusion of Group Policy, the ability to join domains, and more things that you can't find with the Home edition. For more information, check out [this comparison chart](https://en.wikipedia.org/wiki/Windows_10_editions#Comparison_chart).
|
|
||||||
|
|
||||||
Obviously, you should pick the edition of Windows for which you have a license. To change the edition to process, select the drop-down menu under "Choose Windows SKU" and select your edition.
|
|
||||||
|
|
||||||
{{< image src="images/microwin/microwin-skuselect" >}}
|
|
||||||
|
|
||||||
### Injecting drivers
|
|
||||||
|
|
||||||
If you want to use MicroWin on a real system, you may want to include the drivers for it, to avoid setting them up after OS installation. That's where the options to inject drivers come in handy.
|
|
||||||
|
|
||||||
- **Injecting drivers:** if you want to install MicroWin on another system, simply check this option. Prepare a folder with the drivers of your system and specify it in the UI. To learn more about how to export the drivers, read the section "Exporting drivers"
|
|
||||||
- **Importing drivers:** if you want to install MicroWin on **your** system, you can apply the drivers of your system to the image by importing them. Combine that with the former option, and you can have your driver files stored permanently on your preferred location
|
|
||||||
- **Injecting VirtIO drivers:** if you plan on using the target Windows image with QEMU/Proxmox VE, or any UI that uses it (like `virt-manager` on Linux), you can automatically download the VirtIO driver ISO and put its contents into your ISO file
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
Injecting VirtIO drivers is only supported on v25.01.11 and later
|
|
||||||
|
|
||||||
Of course, you can continue without setting up drivers. Simply leave the options blank and continue with the process.
|
|
||||||
|
|
||||||
#### How do I export drivers?
|
|
||||||
|
|
||||||
To export the drivers, you can do the following on many utilities:
|
|
||||||
|
|
||||||
##### DISM
|
|
||||||
|
|
||||||
To export the drivers using DISM (via the command-line), do the following:
|
|
||||||
|
|
||||||
1. Launch the command-line interpreter you want (`cmd`, PowerShell...) **as an administrator**
|
|
||||||
2. Go to where you want to place the drivers with `cd`, and create a directory called "drivers" (`md drivers`)
|
|
||||||
3. Run the following command: `dism /online /export-driver /destination="<path-to-folder>"`
|
|
||||||
4. Wait for the drivers to be exported
|
|
||||||
|
|
||||||
##### Driver Store Explorer (RAPR)
|
|
||||||
|
|
||||||
To export the drivers using [Driver Store Explorer (RAPR)](https://github.com/lostindark/DriverStoreExplorer/), do the following:
|
|
||||||
|
|
||||||
1. Go to "File > Export All Drivers"
|
|
||||||
|
|
||||||
{{< image src="images/microwin/rapr_menu" >}}
|
|
||||||
|
|
||||||
2. Choose the folder to export all the drivers to and click OK
|
|
||||||
|
|
||||||
{{< image src="images/microwin/rapr_folderpicker" >}}
|
|
||||||
|
|
||||||
##### DISM++
|
|
||||||
|
|
||||||
To export the drivers using [DISM++](https://github.com/Chuyu-Team/Dism-Multi-language), do the following:
|
|
||||||
|
|
||||||
1. Select your active installation if you haven't (it's the first item)
|
|
||||||
2. Go to "Drivers", select "All" and select "Export"
|
|
||||||
|
|
||||||
{{< image src="images/microwin/dism++_drivercontrol" >}}
|
|
||||||
|
|
||||||
3. Choose the folder to export all the drivers to and click OK
|
|
||||||
|
|
||||||
{{< image src="images/microwin/dism++_driverexport" >}}
|
|
||||||
|
|
||||||
##### DISMTools
|
|
||||||
|
|
||||||
To export the drivers using [DISMTools](https://github.com/CodingWonders/DISMTools), do the following:
|
|
||||||
|
|
||||||
1. Select "Manage online installation" in the home screen and accept the warning
|
|
||||||
|
|
||||||
{{< image src="images/microwin/dt_activeinst" >}}
|
|
||||||
|
|
||||||
2. Go to "Commands > Drivers > Export driver packages..."
|
|
||||||
|
|
||||||
{{< image src="images/microwin/dt_exportdrvs" >}}
|
|
||||||
|
|
||||||
3. Choose the path to export the drivers to ("Export target") and click OK
|
|
||||||
|
|
||||||
{{< image src="images/microwin/dt_exporttarget" >}}
|
|
||||||
|
|
||||||
##### Other UIs
|
|
||||||
|
|
||||||
To export the drivers using another UI, read its documentation.
|
|
||||||
|
|
||||||
#### Using VirtIO drivers
|
|
||||||
|
|
||||||
After the drivers from the Ventoy ISO are copied, do the following if you can't see any drives on your QEMU VM:
|
|
||||||
|
|
||||||
1. In the disk selection screen, select "Load driver"
|
|
||||||
2. Click "Browse" and select `D:\VirtIO\vioscsi\w11\amd64` (replace `amd64` with `ARM64` if you want to use Windows on ARM)
|
|
||||||
3. Select all drivers in the list and click OK
|
|
||||||
|
|
||||||
You should be able to see your disks now.
|
|
||||||
|
|
||||||
### Copying to Ventoy
|
|
||||||
|
|
||||||
If you have a Ventoy drive, you can copy your ISO file to it quickly and easily. This is done after it has been created. To do this, simply check "Copy to Ventoy".
|
|
||||||
|
|
||||||
You can learn more about Ventoy drives [here](https://www.ventoy.net/en/index.html).
|
|
||||||
|
|
||||||
### Setting up a custom user
|
|
||||||
|
|
||||||
If you want to set up a custom user, effectively creating a completely unattended installation, you can set up a user name and password:
|
|
||||||
|
|
||||||
{{< image src="images/microwin/microwin-customuser" >}}
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
To set up a custom user, you need to specify its name, which cannot surpass 20 characters. Otherwise, a user named "User" will be created. However, you don't need to set up a password. If you leave the password box blank, you can take advantage of auto-logons, but **do what you think it's best for your use case**.
|
|
||||||
|
|
||||||
After configuring all your desired settings, click "Start the process" and specify the location of your ISO file.
|
|
||||||
|
|
||||||
Now, you have to wait for the magic to happen. This can take between 5-10 minutes, but it depends on the performance of your computer.
|
|
||||||
@@ -77,7 +77,7 @@ dateFormat = "January 2, 2006"
|
|||||||
[params.footer]
|
[params.footer]
|
||||||
enable = true
|
enable = true
|
||||||
displayCopyright = true
|
displayCopyright = true
|
||||||
displayPoweredBy = true
|
displayPoweredBy = false
|
||||||
width = "normal"
|
width = "normal"
|
||||||
|
|
||||||
[params.highlight.copy]
|
[params.highlight.copy]
|
||||||
|
|||||||
24
docs/i18n/en.yaml
Normal file
24
docs/i18n/en.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
copyright: "© Chris Titus Tech. 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"
|
||||||
19
docs/layouts/shortcodes/autolinks.html
Normal file
19
docs/layouts/shortcodes/autolinks.html
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{{- $section := .Get "section" | lower -}}
|
||||||
|
{{- $pages := slice -}}
|
||||||
|
{{- range .Site.RegularPages -}}
|
||||||
|
{{- if in .RelPermalink $section -}}
|
||||||
|
{{- $pageTitle := .Title -}}
|
||||||
|
{{- if eq $pageTitle "" -}}
|
||||||
|
{{- $pageTitle = .File.BaseFileName | humanize | title -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if findRE "^# .+" .RawContent -}}
|
||||||
|
{{- $pageTitle = replaceRE "(?s)^# (.+?)\\n.*" "$1" .RawContent -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $pages = $pages | append (dict "title" $pageTitle "url" .RelPermalink) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
<ul>
|
||||||
|
{{- range sort $pages "title" "asc" }}
|
||||||
|
<li><a href="{{ .url }}">{{ .title }}</a></li>
|
||||||
|
{{- end }}
|
||||||
|
</ul>
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,624 +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 "") {
|
|
||||||
$msg = "No file name for the target image was specified"
|
|
||||||
Write-Host $msg
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Busy..." -interactive $false
|
|
||||||
|
|
||||||
Write-Host "Target ISO location: $($SaveDialog.FileName)"
|
|
||||||
|
|
||||||
$index = $sync.MicrowinWindowsFlavors.SelectedValue.Split(":")[0].Trim()
|
|
||||||
Write-Host "Index chosen: '$index' from $($sync.MicrowinWindowsFlavors.SelectedValue)"
|
|
||||||
|
|
||||||
$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..."
|
|
||||||
try {
|
|
||||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.esd" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install.wim" -CompressionType "Max"
|
|
||||||
} catch {
|
|
||||||
# Usually the case if it can't find unattend.dll on the host system. Guys, fix your corrupt messes that are your installations!
|
|
||||||
dism /english /export-image /sourceimagefile="$mountDir\sources\install.esd" /sourceindex=$index /destinationimagefile="$mountDir\sources\install.wim" /compress: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 $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$imgVersion = (Get-WindowsImage -ImagePath "$mountDir\sources\install.wim" -Index $index).Version
|
|
||||||
# Windows Setup is the second index in the boot image.
|
|
||||||
$bootVersion = (Get-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2).Version
|
|
||||||
Write-Host "The Windows Image Build Version is: $imgVersion"
|
|
||||||
Write-Host "The WinPE boot image Build Version is: $bootVersion"
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
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) {
|
|
||||||
$msg = "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
|
|
||||||
Write-Error $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
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 {
|
|
||||||
$msg = "Could not mount image. Exiting..."
|
|
||||||
Write-Host $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Disabling WPBT Execution"
|
|
||||||
reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM"
|
|
||||||
reg add "HKLM\zSYSTEM\ControlSet001\Control\Session Manager" /v DisableWpbtExecution /t REG_DWORD /d 1 /f
|
|
||||||
reg unload HKLM\zSYSTEM
|
|
||||||
|
|
||||||
Write-Host "Skipping first logon animation..."
|
|
||||||
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
|
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f
|
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /ve /t REG_SZ /d "Stop First Logon Animation Process"
|
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /v StubPath /t REG_EXPAND_SZ /d '\"%WINDIR%\System32\cmd.exe\" /C \"taskkill /f /im firstlogonanim.exe\"'
|
|
||||||
reg unload HKLM\zSOFTWARE
|
|
||||||
|
|
||||||
# We have to prepare the target system to accept the diagnostics script
|
|
||||||
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
|
|
||||||
reg add "HKLM\zSOFTWARE\WinUtil" /f
|
|
||||||
reg add "HKLM\zSOFTWARE\WinUtil" /f /v "ToolboxVersion" /t REG_SZ /d "$($sync.version)"
|
|
||||||
reg add "HKLM\zSOFTWARE\WinUtil" /f /v "MicroWinBuildDate" /t REG_SZ /d "$((Get-Date).ToString('yyMMdd-HHmm'))"
|
|
||||||
|
|
||||||
# REAL software developers set execution policies to unrestricted but, because we're targeting
|
|
||||||
# mainstream population, we have to lower the level of "riskiness" -- set remotesigned; at least that
|
|
||||||
# lets us run PWSH scripts that WE create. Execution policies don't really make sense anyway if common sense
|
|
||||||
# is lacking.
|
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" /v "ExecutionPolicy" /t REG_SZ /d "RemoteSigned" /f
|
|
||||||
|
|
||||||
reg unload HKLM\zSOFTWARE
|
|
||||||
|
|
||||||
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
|
|
||||||
# ----- UPDATE UPDATE UPDATE: they fixed this in 10.0.26100.7019. DO NOT DO THIS OTHERWISE IT BREAKS EXPLORER AGAIN BECAUSE THE CHEEKY LITTLE
|
|
||||||
# ----- PoS CHANGED APPRUNTIME.CBS TO APPRUNTIME.CBS.1.6. Thing is, we don't need to patch this in those builds because it no longer breaks
|
|
||||||
# ----- when you don't patch.
|
|
||||||
if (((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,1))) -eq $true) -and ((Microwin-TestCompatibleImage $imgVersion $([System.Version]::new(10,0,26100,7019))) -eq $false)) {
|
|
||||||
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 {
|
|
||||||
# Fall back to what we used to do: delayed disablement
|
|
||||||
Enable-WindowsOptionalFeature -Path "$scratchDir" -FeatureName "Recall"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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.MicrowinAutoConfigBox.Text -ne "") -and (Test-Path "$($sync.MicrowinAutoConfigBox.Text)"))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Write-Host "A configuration file has been specified. Copying to WIM file..."
|
|
||||||
Copy-Item "$($sync.MicrowinAutoConfigBox.Text)" "$($scratchDir)\winutil-config.json"
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
Write-Host "The config file could not be copied. Continuing without it..."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create unattended answer file with user information - Check condition to learn more about this functionality
|
|
||||||
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
|
|
||||||
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 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\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 "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: $_"
|
|
||||||
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 "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 "Showing file extensions..."
|
|
||||||
reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /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
|
|
||||||
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Feeds" /v "EnableFeeds" /t REG_DWORD /d 0 /f
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Error "An unexpected error occurred: $_"
|
|
||||||
} finally {
|
|
||||||
Write-Host "Unmounting Registry..."
|
|
||||||
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."
|
|
||||||
$committed = $false
|
|
||||||
$unmounted = $false
|
|
||||||
|
|
||||||
Write-Host "Saving image..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
Save-WindowsImage -Path "$scratchDir"
|
|
||||||
$committed = $true
|
|
||||||
} catch {
|
|
||||||
do {
|
|
||||||
# we'll prevent stuff inside this loop from throwing exceptions and breaking from the loop.
|
|
||||||
try {
|
|
||||||
Save-WindowsImage -Path "$scratchDir"
|
|
||||||
$committed = $true
|
|
||||||
} catch {
|
|
||||||
Write-Host "Commit operation unsuccessful. Trying again after 3 seconds..."
|
|
||||||
Start-Sleep -Seconds 3
|
|
||||||
}
|
|
||||||
} until ($committed)
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Unmounting image..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
# because we've already saved the changes earlier, we can safely discard
|
|
||||||
Dismount-WindowsImage -Discard -Path "$scratchDir"
|
|
||||||
$unmounted = $true
|
|
||||||
} catch {
|
|
||||||
do {
|
|
||||||
# we'll prevent stuff inside this loop from throwing exceptions and breaking from the loop.
|
|
||||||
try {
|
|
||||||
Dismount-WindowsImage -Discard -Path "$scratchDir"
|
|
||||||
$unmounted = $true
|
|
||||||
} catch {
|
|
||||||
Write-Host "Unmount operation unsuccessful. Trying again after 3 seconds..."
|
|
||||||
Start-Sleep -Seconds 3
|
|
||||||
}
|
|
||||||
} until ($unmounted)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
Write-Host "Exporting image into $mountDir\sources\install2.wim"
|
|
||||||
try {
|
|
||||||
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install2.wim" -CompressionType "Max"
|
|
||||||
} catch {
|
|
||||||
# Usually the case if it can't find unattend.dll on the host system. Guys, fix your corrupt messes that are your installations!
|
|
||||||
dism /english /export-image /sourceimagefile="$mountDir\sources\install.wim" /sourceindex=$index /destinationimagefile="$mountDir\sources\install2.wim" /compress: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")) {
|
|
||||||
$msg = "Something went wrong. Please report this bug to the devs."
|
|
||||||
Write-Error "$($msg) '$($mountDir)\sources\install.wim' doesn't exist"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
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\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
|
|
||||||
|
|
||||||
# Force old Setup on 24H2+ WinPE images due to personal preference; it's simply faster and
|
|
||||||
# more reliable than MoSetup. I simply can't stand that new setup system.
|
|
||||||
if ((Microwin-TestCompatibleImage $bootVersion $([System.Version]::new(10,0,26040,0))) -and (Test-Path -Path "$scratchDir\sources\setup.exe" -PathType Leaf)) {
|
|
||||||
reg add "HKLM\zSYSTEM\Setup" /f /v "CmdLine" /t REG_SZ /d "\sources\setup.exe"
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Error "An unexpected error occurred: $_"
|
|
||||||
} finally {
|
|
||||||
Write-Host "Unmounting Registry..."
|
|
||||||
reg unload HKLM\zDEFAULT
|
|
||||||
reg unload HKLM\zNTUSER
|
|
||||||
reg unload HKLM\zSOFTWARE
|
|
||||||
reg unload HKLM\zSYSTEM
|
|
||||||
|
|
||||||
$committed = $false
|
|
||||||
$unmounted = $false
|
|
||||||
|
|
||||||
Write-Host "Saving image..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
Save-WindowsImage -Path "$scratchDir"
|
|
||||||
$committed = $true
|
|
||||||
} catch {
|
|
||||||
do {
|
|
||||||
# we'll prevent stuff inside this loop from throwing exceptions and breaking from the loop.
|
|
||||||
try {
|
|
||||||
Save-WindowsImage -Path "$scratchDir"
|
|
||||||
$committed = $true
|
|
||||||
} catch {
|
|
||||||
Write-Host "Commit operation unsuccessful. Trying again after 3 seconds..."
|
|
||||||
Start-Sleep -Seconds 3
|
|
||||||
}
|
|
||||||
} until ($committed)
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Unmounting image..."
|
|
||||||
|
|
||||||
try {
|
|
||||||
# because we've already saved the changes earlier, we can safely discard
|
|
||||||
Dismount-WindowsImage -Discard -Path "$scratchDir"
|
|
||||||
$unmounted = $true
|
|
||||||
} catch {
|
|
||||||
do {
|
|
||||||
# we'll prevent stuff inside this loop from throwing exceptions and breaking from the loop.
|
|
||||||
try {
|
|
||||||
Dismount-WindowsImage -Discard -Path "$scratchDir"
|
|
||||||
$unmounted = $true
|
|
||||||
} catch {
|
|
||||||
Write-Host "Unmount operation unsuccessful. Trying again after 3 seconds..."
|
|
||||||
Start-Sleep -Seconds 3
|
|
||||||
}
|
|
||||||
} until ($unmounted)
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Creating ISO image"
|
|
||||||
|
|
||||||
$peToolsPath = ""
|
|
||||||
|
|
||||||
$adkKitsRoot = Microwin-GetKitsRoot -wow64environment $false
|
|
||||||
$adkKitsRoot_WOW64Environ = Microwin-GetKitsRoot -wow64environment $true
|
|
||||||
|
|
||||||
$expectedADKPath = "$($adkKitsRoot)Assessment and Deployment Kit"
|
|
||||||
$expectedADKPath_WOW64Environ = "$($adkKitsRoot_WOW64Environ)Assessment and Deployment Kit"
|
|
||||||
|
|
||||||
# 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 -Path "$oscdimgPath" -PathType Leaf
|
|
||||||
if ((-not ($oscdImgFound)) -and ((Microwin-TestKitsRootPaths -adkKitsRootPath "$expectedADKPath" -adkKitsRootPath_WOW64Environ "$expectedADKPath_WOW64Environ") -eq $true)) {
|
|
||||||
if ($expectedADKPath -ne "Assessment and Deployment Kit") { $peToolsPath = $expectedADKPath }
|
|
||||||
if (($peToolsPath -eq "") -and ($expectedADKPath_WOW64Environ -ne "Assessment and Deployment Kit")) { $peToolsPath = $expectedADKPath_WOW64Environ }
|
|
||||||
|
|
||||||
Write-Host "Using $peToolsPath as the Preinstallation Environment tools path..."
|
|
||||||
# Paths change depending on platform
|
|
||||||
if ([Environment]::Is64BitOperatingSystem) {
|
|
||||||
$oscdimgPath = "$peToolsPath\Deployment Tools\amd64\Oscdimg\oscdimg.exe"
|
|
||||||
} else {
|
|
||||||
$oscdimgPath = "$peToolsPath\Deployment Tools\x86\Oscdimg\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)"
|
|
||||||
|
|
||||||
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"
|
|
||||||
Invoke-MicrowinBusyInfo -action "done" -message "Finished!"
|
|
||||||
[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)"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $exitCode.Message
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
[System.Windows.MessageBox]::Show("MicroWin failed to make the ISO.", "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
|
||||||
} catch {
|
|
||||||
# Could not get error description from Windows APIs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Toggle-MicrowinPanel 1
|
|
||||||
|
|
||||||
$sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)"
|
|
||||||
# Allow the machine to sleep again (optional)
|
|
||||||
[PowerManagement]::SetThreadExecutionState(0)
|
|
||||||
$sync.ProcessRunning = $false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
function Invoke-MicrowinBusyInfo {
|
|
||||||
<#
|
|
||||||
.DESCRIPTION
|
|
||||||
Function to display the busy info for the Microwin process
|
|
||||||
#>
|
|
||||||
[CmdletBinding(DefaultParameterSetName='done')]
|
|
||||||
param(
|
|
||||||
[Parameter(ParameterSetName='wip', Mandatory, Position = 0)]
|
|
||||||
[Parameter(ParameterSetName='warning', Mandatory, Position = 0)]
|
|
||||||
[Parameter(ParameterSetName='done', Mandatory, Position = 0)]
|
|
||||||
[Parameter(ParameterSetName='hide', Mandatory, Position = 0)]
|
|
||||||
[ValidateSet('wip', 'warning', 'done', 'hide')]
|
|
||||||
[string]$action,
|
|
||||||
|
|
||||||
[Parameter(ParameterSetName='wip', Mandatory, Position = 1)]
|
|
||||||
[Parameter(ParameterSetName='warning', Mandatory, Position = 1)]
|
|
||||||
[Parameter(ParameterSetName='done', Mandatory, Position = 1)]
|
|
||||||
[string]$message,
|
|
||||||
|
|
||||||
[Parameter(ParameterSetName='wip', Position = 2)] [bool]$interactive = $false
|
|
||||||
)
|
|
||||||
|
|
||||||
switch ($action) {
|
|
||||||
"wip" {
|
|
||||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
|
||||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
|
||||||
$finalMessage = ""
|
|
||||||
if ($interactive -eq $false) {
|
|
||||||
$finalMessage += "Please wait. "
|
|
||||||
}
|
|
||||||
$finalMessage += $message
|
|
||||||
$sync.BusyText.Text = $finalMessage
|
|
||||||
$sync.BusyIcon.Foreground="#FFA500"
|
|
||||||
$sync.BusyText.Foreground="#FFA500"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
"warning" {
|
|
||||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
|
||||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
|
||||||
$sync.BusyText.Text=$message
|
|
||||||
$sync.BusyText.Foreground="#FF0000"
|
|
||||||
$sync.BusyIcon.Foreground="#FF0000"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
"done" {
|
|
||||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
|
||||||
$sync.MicrowinBusyIndicator.Visibility="Visible"
|
|
||||||
$sync.BusyText.Text=$message
|
|
||||||
$sync.BusyText.Foreground="#00FF00"
|
|
||||||
$sync.BusyIcon.Foreground="#00FF00"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
"hide" {
|
|
||||||
$sync.form.Dispatcher.BeginInvoke([action]{
|
|
||||||
$sync.MicrowinBusyIndicator.Visibility="Hidden"
|
|
||||||
$sync.BusyText.Foreground=$sync.Form.Resources.MicrowinBusyColor
|
|
||||||
$sync.BusyIcon.Foreground=$sync.Form.Resources.MicrowinBusyColor
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Force the UI to process pending messages
|
|
||||||
[System.Windows.Forms.Application]::DoEvents()
|
|
||||||
Start-Sleep -Milliseconds 50
|
|
||||||
}
|
|
||||||
@@ -1,332 +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-Debug "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
|
|
||||||
}
|
|
||||||
|
|
||||||
# Provide immediate feedback to user
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Initializing MicroWin process..." -interactive $false
|
|
||||||
|
|
||||||
Write-Host " _ __ __ _ "
|
|
||||||
Write-Host " /\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __ "
|
|
||||||
Write-Host " / \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \ "
|
|
||||||
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
|
|
||||||
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
|
||||||
|
|
||||||
if ($sync["ISOmanual"].IsChecked) {
|
|
||||||
# Open file dialog to let user choose the ISO file
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Please select an ISO file..." -interactive $true
|
|
||||||
[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"
|
|
||||||
Invoke-MicrowinBusyInfo -action "hide" -message " "
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
} elseif ($sync["ISOdownloader"].IsChecked) {
|
|
||||||
# Create folder browsers for user-specified locations
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Please select download location..." -interactive $true
|
|
||||||
[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)
|
|
||||||
{
|
|
||||||
Invoke-MicrowinBusyInfo -action "hide" -message " "
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Preparing to download ISO..." -interactive $false
|
|
||||||
|
|
||||||
# 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-MicrowinBusyInfo -action "wip" -message "Downloading Fido script..." -interactive $false
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Downloading Windows ISO... (This may take a long time)" -interactive $false
|
|
||||||
& $fidopath -Win 'Windows 11' -Rel Latest -Arch "x64" -Lang $lang
|
|
||||||
if (-not $?)
|
|
||||||
{
|
|
||||||
Write-Host "Could not download the ISO file. Look at the output of the console for more information."
|
|
||||||
Write-Host "If you get an error about scripts is disabled on this system please close WinUtil and run - 'Set-ExecutionPolicy -ExecutionPolicy Unrestricted' and select 'A' and retry using MicroWin again."
|
|
||||||
$msg = "The ISO file could not be downloaded"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
[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
|
|
||||||
{
|
|
||||||
$msg = "Unable to move the ISO file to the location you specified. The downloaded ISO is in the `"$env:TEMP`" folder"
|
|
||||||
Write-Host $msg
|
|
||||||
Write-Host "Error information: $($_.Exception.Message)" -ForegroundColor Yellow
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "File path $($filePath)"
|
|
||||||
if (-not (Test-Path -Path "$filePath" -PathType Leaf)) {
|
|
||||||
$msg = "File you've chosen doesn't exist"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Set-WinUtilTaskbaritem -state "Indeterminate" -overlay "logo"
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Checking system requirements..." -interactive $false
|
|
||||||
|
|
||||||
$adkKitsRoot = Microwin-GetKitsRoot -wow64environment $false
|
|
||||||
$adkKitsRoot_WOW64Environ = Microwin-GetKitsRoot -wow64environment $true
|
|
||||||
|
|
||||||
$expectedADKPath = "$($adkKitsRoot)Assessment and Deployment Kit"
|
|
||||||
$expectedADKPath_WOW64Environ = "$($adkKitsRoot_WOW64Environ)Assessment and Deployment Kit"
|
|
||||||
|
|
||||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
|
||||||
$oscdImgFound = [bool] (Microwin-TestKitsRootPaths -adkKitsRootPath "$expectedADKPath" -adkKitsRootPath_WOW64Environ "$expectedADKPath_WOW64Environ") -or (Test-Path $oscdimgPath -PathType Leaf)
|
|
||||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
|
||||||
|
|
||||||
if (-not ($oscdImgFound)) {
|
|
||||||
# First we try to grab it from github, if not, run the ADK installer.
|
|
||||||
if ((Microwin-GetOscdimg -oscdimgPath $oscdimgPath) -eq $true) {
|
|
||||||
Write-Host "OSCDIMG download succeeded."
|
|
||||||
} else {
|
|
||||||
Write-Host "OSCDIMG could not be downloaded from GitHub. Downloading deployment tools..."
|
|
||||||
if (-not (Microwin-GetAdkDeploymentTools)) {
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message "Neither OSCDIMG nor ADK could be downloaded."
|
|
||||||
Write-Host "Neither OSCDIMG nor ADK could be downloaded."
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
$msg = "ADK/OSCDIMG is installed, now restart this process."
|
|
||||||
Invoke-MicrowinBusyInfo -action "done" -message $msg # We set it to done because it immediately returns from this function
|
|
||||||
[System.Windows.MessageBox]::Show($msg)
|
|
||||||
Remove-Item -Path "$env:TEMP\adksetup.exe" -Force -ErrorAction SilentlyContinue
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} elseif (Microwin-TestKitsRootPaths -adkKitsRootPath "$expectedADKPath" -adkKitsRootPath_WOW64Environ "$expectedADKPath_WOW64Environ") {
|
|
||||||
# We have to guess where oscdimg is. We'll check both values...
|
|
||||||
$peToolsPath = ""
|
|
||||||
|
|
||||||
if ($expectedADKPath -ne "Assessment and Deployment Kit") { $peToolsPath = $expectedADKPath }
|
|
||||||
if (($peToolsPath -eq "") -and ($expectedADKPath_WOW64Environ -ne "Assessment and Deployment Kit")) { $peToolsPath = $expectedADKPath_WOW64Environ }
|
|
||||||
|
|
||||||
Write-Host "Using $peToolsPath as the Preinstallation Environment tools path..."
|
|
||||||
# Paths change depending on platform
|
|
||||||
if ([Environment]::Is64BitOperatingSystem) {
|
|
||||||
$oscdimgPath = "$peToolsPath\Deployment Tools\amd64\Oscdimg\oscdimg.exe"
|
|
||||||
} else {
|
|
||||||
$oscdimgPath = "$peToolsPath\Deployment Tools\x86\Oscdimg\oscdimg.exe"
|
|
||||||
}
|
|
||||||
|
|
||||||
# If it's a non-existent file, we won't continue.
|
|
||||||
if (-not (Test-Path -Path "$oscdimgPath" -PathType Leaf)) {
|
|
||||||
$oscdimgFound = $false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$oscdImgFound = [bool] (Microwin-TestKitsRootPaths -adkKitsRootPath "$expectedADKPath" -adkKitsRootPath_WOW64Environ "$expectedADKPath_WOW64Environ") -or (Test-Path $oscdimgPath -PathType Leaf)
|
|
||||||
|
|
||||||
if (-not ($oscdimgFound)) {
|
|
||||||
[System.Windows.MessageBox]::Show("oscdimg.exe is not found on the system. Cannot continue.")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Checking disk space..." -interactive $false
|
|
||||||
|
|
||||||
# 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
|
|
||||||
$msg = "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
|
|
||||||
Write-Host $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
Write-Host "You have enough space for this operation."
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Mounting ISO file..." -interactive $false
|
|
||||||
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
|
|
||||||
$msg = "Failed to mount the image. Error: $($_.Exception.Message)"
|
|
||||||
Write-Error $msg
|
|
||||||
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://winutil.christitus.com/knownissues/" -ForegroundColor Red
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
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
|
|
||||||
|
|
||||||
# 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."
|
|
||||||
$mountDir = Join-Path $env:TEMP $randomMicrowin
|
|
||||||
$scratchDir = Join-Path $env:TEMP $randomMicrowinScratch
|
|
||||||
|
|
||||||
$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)
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Creating directories..." -interactive $false
|
|
||||||
New-Item -ItemType Directory -Force -Path "$($mountDir)" | Out-Null
|
|
||||||
New-Item -ItemType Directory -Force -Path "$($scratchDir)" | Out-Null
|
|
||||||
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Copying Windows files... (This may take several minutes)" -interactive $false
|
|
||||||
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
|
|
||||||
# Force UI update during long operation
|
|
||||||
[System.Windows.Forms.Application]::DoEvents()
|
|
||||||
}
|
|
||||||
Write-Host "Copy complete! Total Time: $($totalTime.Minutes) minutes, $($totalTime.Seconds) seconds"
|
|
||||||
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Processing Windows image..." -interactive $false
|
|
||||||
$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."
|
|
||||||
Write-Host "$($msg) Only use 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/"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message $msg
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
[System.Windows.MessageBox]::Show($msg, "Winutil", [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Error)
|
|
||||||
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")
|
|
||||||
}
|
|
||||||
[System.Windows.Forms.Application]::DoEvents()
|
|
||||||
|
|
||||||
$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."
|
|
||||||
Invoke-MicrowinBusyInfo -action "wip" -message "Finding suitable Pro edition..." -interactive $false
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
# Allow UI updates during this loop
|
|
||||||
[System.Windows.Forms.Application]::DoEvents()
|
|
||||||
}
|
|
||||||
|
|
||||||
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
|
|
||||||
Write-Host "Selected value '$($sync.MicrowinWindowsFlavors.SelectedValue)'....."
|
|
||||||
|
|
||||||
Toggle-MicrowinPanel 2
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Host "Dismounting bad image..."
|
|
||||||
Get-Volume $driveLetter | Get-DiskImage | Dismount-DiskImage
|
|
||||||
Remove-Item -Recurse -Force "$($scratchDir)"
|
|
||||||
Remove-Item -Recurse -Force "$($mountDir)"
|
|
||||||
Invoke-MicrowinBusyInfo -action "warning" -message "Failed to read and unpack ISO"
|
|
||||||
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Done reading and unpacking ISO"
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "*********************************"
|
|
||||||
Write-Host "Check the UI for further steps!!!"
|
|
||||||
|
|
||||||
Invoke-MicrowinBusyInfo -action "done" -message "Done! Proceed with customization."
|
|
||||||
$sync.ProcessRunning = $false
|
|
||||||
Set-WinUtilTaskbaritem -state "None" -overlay "checkmark"
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
function Microwin-GetAdkDeploymentTools {
|
|
||||||
<#
|
|
||||||
.DESCRIPTION
|
|
||||||
This function will download the deployment tools from Microsoft
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Microwin-GetAdkDeploymentTools
|
|
||||||
#>
|
|
||||||
|
|
||||||
# ADK 10.1.28000.1 download link is the same; no need to guess it
|
|
||||||
$adkDownloadLink = "https://download.microsoft.com/download/615540bc-be0b-433a-b91b-1f2b0642bb24/adk/adksetup.exe"
|
|
||||||
$adkVersion = "10.1.28000.1"
|
|
||||||
Write-Host "Downloading ADK version $adkVersion ..."
|
|
||||||
Invoke-WebRequest -UseBasicParsing -Uri "$adkDownloadLink" -OutFile "$env:TEMP\adksetup.exe"
|
|
||||||
|
|
||||||
if ((-not ($?)) -or (-not (Test-Path -Path "$env:TEMP\adksetup.exe" -PathType Leaf))) {
|
|
||||||
Write-Host "ADK could not be downloaded."
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Installing ADK version $adkVersion -- This may take a few minutes..."
|
|
||||||
Start-Process -FilePath "$env:TEMP\adksetup.exe" -ArgumentList "/features OptionId.DeploymentTools /q /ceip off" -Wait
|
|
||||||
|
|
||||||
return $?
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
function Microwin-GetKitsRoot {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Gets the kits root path for the Windows Assessment and Deployment Kit (ADK)
|
|
||||||
.PARAMETER wow64environment
|
|
||||||
Determines whether to search in a WOW64 compatibility environment (HKLM\SOFTWARE\WOW6432Node)
|
|
||||||
.OUTPUTS
|
|
||||||
The path to the kits root
|
|
||||||
#>
|
|
||||||
|
|
||||||
param (
|
|
||||||
[Parameter(Mandatory = $true, Position = 0)] [bool]$wow64environment
|
|
||||||
)
|
|
||||||
|
|
||||||
$adk10KitsRoot = ""
|
|
||||||
|
|
||||||
# if we set the wow64 bit on and we're on a 32-bit system, then we prematurely return the value
|
|
||||||
if (($wow64environment -eq $true) -and (-not [Environment]::Is64BitOperatingSystem)) {
|
|
||||||
return $adk10KitsRoot
|
|
||||||
}
|
|
||||||
|
|
||||||
$regPath = ""
|
|
||||||
if ($wow64environment) {
|
|
||||||
$regPath = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots"
|
|
||||||
} else {
|
|
||||||
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots"
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((Test-Path "$regPath") -eq $false) {
|
|
||||||
return $adk10KitsRoot
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$adk10KitsRoot = Get-ItemPropertyValue -Path $regPath -Name "KitsRoot10" -ErrorAction Stop
|
|
||||||
} catch {
|
|
||||||
Write-Debug "Could not find ADK."
|
|
||||||
}
|
|
||||||
|
|
||||||
return $adk10KitsRoot
|
|
||||||
}
|
|
||||||
@@ -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" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +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
|
|
||||||
if (-not (Test-Path "$oscdimgPath" -PathType Leaf)) {
|
|
||||||
Write-Host "OSCDIMG could not be downloaded."
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
$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."
|
|
||||||
return $true
|
|
||||||
} else {
|
|
||||||
Write-Host "Hashes do not match. File may be corrupted or tampered with."
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
function Microwin-NewCheckInstall {
|
|
||||||
|
|
||||||
# using here string to embed 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
|
|
||||||
}
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
function Microwin-NewFirstRun {
|
|
||||||
|
|
||||||
# using here string to embed 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
|
|
||||||
if (Test-Path "$taskbarPath") {
|
|
||||||
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 { $_.State -eq 'Enabled' -and $_.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
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested" /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.Suggested" /v Enabled /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.StartupApp" /v Enabled /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Microsoft.SkyDrive.Desktop" /v Enabled /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /v Enabled /t REG_DWORD /d 0 /f
|
|
||||||
|
|
||||||
# This will set List view in Start menu on Win11 25H2. This will not do anything in 24H2 and older
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v AllAppsViewMode /t REG_DWORD /d 2 /f
|
|
||||||
|
|
||||||
# This will disable the Recommendations in 25H2. This is much simpler than the method used in 24H2 that requires the Education Environment policy
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f
|
|
||||||
|
|
||||||
# Other Start Menu settings
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_AccountNotifications /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowAllPinsList /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowFrequentList /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowRecentList /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackDocs /t REG_DWORD /d 0 /f
|
|
||||||
|
|
||||||
# Color Modes -- requires sending messages to apply to everything
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d 0 /f
|
|
||||||
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d 0 /f
|
|
||||||
|
|
||||||
# Send the WM_SETTINGCHANGE message to all windows
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
"@
|
|
||||||
|
|
||||||
$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))
|
|
||||||
|
|
||||||
Clear-Host
|
|
||||||
Write-Host "The taskbar will take around a minute to show up, but you can start using your computer now. Try pressing the Windows key to open the Start menu, or Windows + E to launch File Explorer."
|
|
||||||
Start-Sleep -Seconds 10
|
|
||||||
|
|
||||||
if (Test-Path -Path "$env:HOMEDRIVE\winutil-config.json")
|
|
||||||
{
|
|
||||||
Write-Host "Configuration file detected. Applying..."
|
|
||||||
iex "& { $(irm christitus.com/win) } -Config `"$env:HOMEDRIVE\winutil-config.json`" -Run"
|
|
||||||
}
|
|
||||||
|
|
||||||
'@
|
|
||||||
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
|
||||||
}
|
|
||||||
@@ -1,327 +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>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>c:\windows\csup.txt</CommandLine>
|
|
||||||
</SynchronousCommand>
|
|
||||||
<SynchronousCommand wcm:action="add">
|
|
||||||
<Order>3</Order>
|
|
||||||
<CommandLine>CMD /C echo GG>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>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>20</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>21</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>22</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>23</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>24</Order>
|
|
||||||
<Path>net.exe accounts /maxpwage:UNLIMITED</Path>
|
|
||||||
</RunSynchronousCommand>
|
|
||||||
<RunSynchronousCommand wcm:action="add">
|
|
||||||
<Order>25</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>26</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>27</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>28</Order>
|
|
||||||
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
|
||||||
</RunSynchronousCommand>
|
|
||||||
<RunSynchronousCommand wcm:action="add">
|
|
||||||
<Order>29</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>30</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>31</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>32</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>33</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>34</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>35</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>36</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>37</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>38</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>39</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>40</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>41</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>42</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>43</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>44</Order>
|
|
||||||
<Path>reg.exe unload "HKU\DefaultUser"</Path>
|
|
||||||
</RunSynchronousCommand>
|
|
||||||
<RunSynchronousCommand wcm:action="add">
|
|
||||||
<Order>45</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>46</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>47</Order>
|
|
||||||
<Path>reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT"</Path>
|
|
||||||
</RunSynchronousCommand>
|
|
||||||
<RunSynchronousCommand wcm:action="add">
|
|
||||||
<Order>48</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>49</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
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +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
|
|
||||||
}
|
|
||||||
@@ -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 /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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
function Microwin-TestKitsRootPaths {
|
|
||||||
param (
|
|
||||||
[Parameter(Mandatory = $true, Position = 0)] [string]$adkKitsRootPath,
|
|
||||||
[Parameter(Mandatory = $true, Position = 1)] [string]$adkKitsRootPath_WOW64Environ
|
|
||||||
)
|
|
||||||
|
|
||||||
if (Test-Path "$adkKitsRootPath") { return $true }
|
|
||||||
if (Test-Path "$adkKitsRootPath_WOW64Environ") { return $true }
|
|
||||||
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
function Toggle-MicrowinPanel {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Toggles the visibility of the Microwin options and ISO panels in the GUI.
|
|
||||||
.DESCRIPTION
|
|
||||||
This function toggles the visibility of the Microwin options and ISO panels in the GUI.
|
|
||||||
.PARAMETER MicrowinOptionsPanel
|
|
||||||
The panel containing Microwin options.
|
|
||||||
.PARAMETER MicrowinISOPanel
|
|
||||||
The panel containing the Microwin ISO options.
|
|
||||||
.EXAMPLE
|
|
||||||
Toggle-MicrowinPanel 1
|
|
||||||
#>
|
|
||||||
param (
|
|
||||||
[Parameter(Mandatory = $true, Position = 0)]
|
|
||||||
[ValidateSet(1, 2)]
|
|
||||||
[int]$PanelNumber
|
|
||||||
)
|
|
||||||
|
|
||||||
if ($PanelNumber -eq 1) {
|
|
||||||
$sync.MicrowinISOPanel.Visibility = 'Visible'
|
|
||||||
$sync.MicrowinOptionsPanel.Visibility = 'Collapsed'
|
|
||||||
|
|
||||||
} elseif ($PanelNumber -eq 2) {
|
|
||||||
$sync.MicrowinOptionsPanel.Visibility = 'Visible'
|
|
||||||
$sync.MicrowinISOPanel.Visibility = 'Collapsed'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,37 +13,68 @@ function Find-AppsByNameOrDescription {
|
|||||||
# Reset the visibility if the search string is empty or the search is cleared
|
# Reset the visibility if the search string is empty or the search is cleared
|
||||||
if ([string]::IsNullOrWhiteSpace($SearchString)) {
|
if ([string]::IsNullOrWhiteSpace($SearchString)) {
|
||||||
$sync.ItemsControl.Items | ForEach-Object {
|
$sync.ItemsControl.Items | ForEach-Object {
|
||||||
|
# Each item is a StackPanel container
|
||||||
$_.Visibility = [Windows.Visibility]::Visible
|
$_.Visibility = [Windows.Visibility]::Visible
|
||||||
$_.Children | ForEach-Object {
|
|
||||||
if ($null -ne $_) {
|
if ($_.Children.Count -ge 2) {
|
||||||
$_.Visibility = [Windows.Visibility]::Visible
|
$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 {
|
||||||
return
|
|
||||||
}
|
|
||||||
$sync.ItemsControl.Items | ForEach-Object {
|
|
||||||
# Ensure ToggleButtons remain visible
|
|
||||||
if ($_.Tag -like "CategoryToggleButton") {
|
|
||||||
$_.Visibility = [Windows.Visibility]::Visible
|
$_.Visibility = [Windows.Visibility]::Visible
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
# Hide all CategoryWrapPanel and ToggleButton
|
|
||||||
$_.Visibility = [Windows.Visibility]::Collapsed
|
# Perform search
|
||||||
if ($_.Tag -like "CategoryWrapPanel_*") {
|
$sync.ItemsControl.Items | ForEach-Object {
|
||||||
# Search for Apps that match the search string
|
# Each item is a StackPanel container with Children[0] = label, Children[1] = WrapPanel
|
||||||
$_.Children | Foreach-Object {
|
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)
|
$appEntry = $sync.configs.applicationsHashtable.$($_.Tag)
|
||||||
if ($appEntry.Content -like "*$SearchString*" -or $appEntry.Description -like "*$SearchString*") {
|
if ($appEntry.Content -like "*$SearchString*" -or $appEntry.Description -like "*$SearchString*") {
|
||||||
# Show the App and the parent CategoryWrapPanel if the string is found
|
# Show the App and mark that this category has a match
|
||||||
$_.Visibility = [Windows.Visibility]::Visible
|
$_.Visibility = [Windows.Visibility]::Visible
|
||||||
$_.parent.Visibility = [Windows.Visibility]::Visible
|
$categoryHasMatch = $true
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_.Visibility = [Windows.Visibility]::Collapsed
|
$_.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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,13 @@
|
|||||||
$itemsControl.VerticalAlignment = 'Stretch'
|
$itemsControl.VerticalAlignment = 'Stretch'
|
||||||
$scrollViewer.Content = $itemsControl
|
$scrollViewer.Content = $itemsControl
|
||||||
|
|
||||||
# Enable virtualization for the ItemsControl to improve performance (It's hard to test if this is actually working, so if you know what you're doing, please check this)
|
# Use WrapPanel to create dynamic columns based on AppEntryWidth and window width
|
||||||
$itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate
|
$itemsPanelTemplate = New-Object Windows.Controls.ItemsPanelTemplate
|
||||||
$factory = New-Object Windows.FrameworkElementFactory ([Windows.Controls.VirtualizingStackPanel])
|
$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
|
$itemsPanelTemplate.VisualTree = $factory
|
||||||
$itemsControl.ItemsPanel = $itemsPanelTemplate
|
$itemsControl.ItemsPanel = $itemsPanelTemplate
|
||||||
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::IsVirtualizingProperty, $true)
|
|
||||||
$itemsControl.SetValue([Windows.Controls.VirtualizingStackPanel]::VirtualizationModeProperty, [Windows.Controls.VirtualizationMode]::Recycling)
|
|
||||||
|
|
||||||
# Add the Border containing the App Area to the target Grid
|
# Add the Border containing the App Area to the target Grid
|
||||||
$targetGrid.Children.Add($Border) | Out-Null
|
$targetGrid.Children.Add($Border) | Out-Null
|
||||||
|
|||||||
@@ -15,22 +15,6 @@ function Initialize-InstallCategoryAppList {
|
|||||||
$TargetElement,
|
$TargetElement,
|
||||||
$Apps
|
$Apps
|
||||||
)
|
)
|
||||||
function Add-Category {
|
|
||||||
param(
|
|
||||||
[string]$Category,
|
|
||||||
[Windows.Controls.ItemsControl]$TargetElement
|
|
||||||
)
|
|
||||||
|
|
||||||
$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")
|
|
||||||
$sync.$Category = $toggleButton
|
|
||||||
|
|
||||||
$null = $TargetElement.Items.Add($toggleButton)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Pre-group apps by category
|
# Pre-group apps by category
|
||||||
$appsByCategory = @{}
|
$appsByCategory = @{}
|
||||||
@@ -42,16 +26,70 @@ function Initialize-InstallCategoryAppList {
|
|||||||
$appsByCategory[$category] += $appKey
|
$appsByCategory[$category] += $appKey
|
||||||
}
|
}
|
||||||
foreach ($category in $($appsByCategory.Keys | Sort-Object)) {
|
foreach ($category in $($appsByCategory.Keys | Sort-Object)) {
|
||||||
Add-Category -Category $category -TargetElement $TargetElement
|
# 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
|
||||||
|
|
||||||
|
# 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 = New-Object Windows.Controls.WrapPanel
|
||||||
$wrapPanel.Orientation = "Horizontal"
|
$wrapPanel.Orientation = "Horizontal"
|
||||||
$wrapPanel.HorizontalAlignment = "Stretch"
|
$wrapPanel.HorizontalAlignment = "Left"
|
||||||
$wrapPanel.VerticalAlignment = "Center"
|
$wrapPanel.VerticalAlignment = "Top"
|
||||||
$wrapPanel.Margin = New-Object Windows.Thickness(0, 0, 0, 20)
|
$wrapPanel.Margin = New-Object Windows.Thickness(0, 0, 0, 0)
|
||||||
$wrapPanel.Visibility = [Windows.Visibility]::Visible
|
$wrapPanel.Visibility = [Windows.Visibility]::Visible
|
||||||
$wrapPanel.Tag = "CategoryWrapPanel_$category"
|
$wrapPanel.Tag = "CategoryWrapPanel_$category"
|
||||||
$null = $TargetElement.Items.Add($wrapPanel)
|
|
||||||
$appsByCategory[$category] |Sort-Object | ForEach-Object {
|
$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 $_)
|
$sync.$_ = $(Initialize-InstallAppEntry -TargetElement $wrapPanel -AppKey $_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ function Invoke-WinUtilFontScaling {
|
|||||||
"CustomDialogWidth",
|
"CustomDialogWidth",
|
||||||
"CustomDialogHeight",
|
"CustomDialogHeight",
|
||||||
"CustomDialogLogoSize",
|
"CustomDialogLogoSize",
|
||||||
"MicroWinLogoSize",
|
|
||||||
"ToolTipWidth"
|
"ToolTipWidth"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
function Invoke-AutoConfigDialog {
|
function Invoke-AutoConfigDialog {
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Sets the automatic configuration file based on a specified JSON file
|
Sets the automatic configuration file based on a specified JSON file
|
||||||
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
|
||||||
@@ -12,13 +10,11 @@ function Invoke-AutoConfigDialog {
|
|||||||
$OFD.Filter = "JSON Files (*.json)|*.json"
|
$OFD.Filter = "JSON Files (*.json)|*.json"
|
||||||
$OFD.ShowDialog()
|
$OFD.ShowDialog()
|
||||||
|
|
||||||
if (($OFD.FileName -eq "") -and ($sync.MicrowinAutoConfigBox.Text -eq ""))
|
if ($OFD.FileName -eq "")
|
||||||
{
|
{
|
||||||
Write-Host "No automatic config file has been selected. Continuing without one..."
|
Write-Host "No automatic config file has been selected. Continuing without one..."
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
elseif ($OFD.FileName -ne "")
|
|
||||||
{
|
return $OFD.FileName
|
||||||
$sync.MicrowinAutoConfigBox.Text = "$($OFD.FileName)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ function Invoke-WPFButton {
|
|||||||
"WPFInstall" {Invoke-WPFInstall}
|
"WPFInstall" {Invoke-WPFInstall}
|
||||||
"WPFUninstall" {Invoke-WPFUnInstall}
|
"WPFUninstall" {Invoke-WPFUnInstall}
|
||||||
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
||||||
|
"WPFCollapseAllCategories" {Invoke-WPFToggleAllCategories -Action "Collapse"}
|
||||||
|
"WPFExpandAllCategories" {Invoke-WPFToggleAllCategories -Action "Expand"}
|
||||||
"WPFStandard" {Invoke-WPFPresets "Standard" -checkboxfilterpattern "WPFTweak*"}
|
"WPFStandard" {Invoke-WPFPresets "Standard" -checkboxfilterpattern "WPFTweak*"}
|
||||||
"WPFMinimal" {Invoke-WPFPresets "Minimal" -checkboxfilterpattern "WPFTweak*"}
|
"WPFMinimal" {Invoke-WPFPresets "Minimal" -checkboxfilterpattern "WPFTweak*"}
|
||||||
"WPFClearTweaksSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFTweak*"}
|
"WPFClearTweaksSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFTweak*"}
|
||||||
@@ -56,14 +58,10 @@ function Invoke-WPFButton {
|
|||||||
"WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true}
|
"WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true}
|
||||||
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
||||||
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
||||||
"WPFGetIso" {Invoke-MicrowinGetIso}
|
|
||||||
"WPFMicrowin" {Invoke-Microwin}
|
|
||||||
"WPFCloseButton" {Invoke-WPFCloseButton}
|
"WPFCloseButton" {Invoke-WPFCloseButton}
|
||||||
"WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile}
|
"WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile}
|
||||||
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
|
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
|
||||||
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
|
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
|
||||||
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
||||||
"WPFMicrowinPanelBack" {Toggle-MicrowinPanel 1}
|
|
||||||
"MicrowinAutoConfigBtn" {Invoke-AutoConfigDialog}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
51
functions/public/Invoke-WPFToggleAllCategories.ps1
Normal file
51
functions/public/Invoke-WPFToggleAllCategories.ps1
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
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*") {
|
||||||
|
$categoryLabel.Content = $categoryLabel.Content -replace "^$sourcePrefix ", "$targetPrefix "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error "Error toggling categories: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,275 +0,0 @@
|
|||||||
|
|
||||||
Name DisplayName Status StartType
|
|
||||||
---- ----------- ------ ---------
|
|
||||||
MapsBroker Downloaded Maps Manager Stopped Automatic
|
|
||||||
webthreatdefusersvc_42d01 Web Threat Defense User Service_42d01 Running Automatic
|
|
||||||
OneSyncSvc_42d01 Sync Host_42d01 Running Automatic
|
|
||||||
nsi Network Store Interface Service Running Automatic
|
|
||||||
Dhcp DHCP Client Running Automatic
|
|
||||||
ShellHWDetection Shell Hardware Detection Running Automatic
|
|
||||||
gpsvc Group Policy Client Running Automatic
|
|
||||||
VaultSvc Credential Manager Running Automatic
|
|
||||||
CoreMessagingRegistrar CoreMessaging Running Automatic
|
|
||||||
whesvc Windows Health and Optimized Experiences Running Automatic
|
|
||||||
WinDefend Microsoft Defender Antivirus Service Running Automatic
|
|
||||||
SENS System Event Notification Service Running Automatic
|
|
||||||
DcomLaunch DCOM Server Process Launcher Running Automatic
|
|
||||||
UserManager User Manager Running Automatic
|
|
||||||
CryptSvc Cryptographic Services Running Automatic
|
|
||||||
TermService Remote Desktop Services Running Automatic
|
|
||||||
SystemEventsBroker System Events Broker Running Automatic
|
|
||||||
W32Time Windows Time Running Automatic
|
|
||||||
DusmSvc Data Usage Running Automatic
|
|
||||||
DPS Diagnostic Policy Service Running Automatic
|
|
||||||
SysMain SysMain Running Automatic
|
|
||||||
EventLog Windows Event Log Running Automatic
|
|
||||||
mpssvc Windows Defender Firewall Running Automatic
|
|
||||||
StateRepository State Repository Service Running Automatic
|
|
||||||
EventSystem COM+ Event System Running Automatic
|
|
||||||
Wcmsvc Windows Connection Manager Running Automatic
|
|
||||||
MDCoreSvc Microsoft Defender Core Service Running Automatic
|
|
||||||
FontCache Windows Font Cache Service Running Automatic
|
|
||||||
DispBrokerDesktopSvc Display Policy Service Running Automatic
|
|
||||||
Spooler Print Spooler Running Automatic
|
|
||||||
sppsvc Software Protection Stopped Automatic
|
|
||||||
spice-agent Spice Agent Running Automatic
|
|
||||||
Dnscache DNS Client Running Automatic
|
|
||||||
LSM Local Session Manager Running Automatic
|
|
||||||
AudioEndpointBuilder Windows Audio Endpoint Builder Running Automatic
|
|
||||||
Audiosrv Windows Audio Running Automatic
|
|
||||||
WSearch Windows Search Running Automatic
|
|
||||||
wscsvc Security Center Running Automatic
|
|
||||||
BalloonService BalloonService Running Automatic
|
|
||||||
RpcSs Remote Procedure Call (RPC) Running Automatic
|
|
||||||
WSAIFabricSvc WSAIFabricSvc Running Automatic
|
|
||||||
WpnUserService_42d01 Windows Push Notifications User Service_42d01 Running Automatic
|
|
||||||
LanmanServer Server Running Automatic
|
|
||||||
TrkWks Distributed Link Tracking Client Running Automatic
|
|
||||||
LanmanWorkstation Workstation Running Automatic
|
|
||||||
QEMU-GA QEMU Guest Agent Running Automatic
|
|
||||||
KeyIso CNG Key Isolation Running Automatic
|
|
||||||
AppXSvc AppX Deployment Service (AppXSVC) Running Automatic
|
|
||||||
ProfSvc User Profile Service Running Automatic
|
|
||||||
RpcEptMapper RPC Endpoint Mapper Running Automatic
|
|
||||||
SamSs Security Accounts Manager Running Automatic
|
|
||||||
cbdhsvc_42d01 Clipboard User Service_42d01 Running Automatic
|
|
||||||
Schedule Task Scheduler Running Automatic
|
|
||||||
iphlpsvc IP Helper Running Automatic
|
|
||||||
CDPUserSvc_42d01 Connected Devices Platform User Service_42d01 Running Automatic
|
|
||||||
Winmgmt Windows Management Instrumentation Running Automatic
|
|
||||||
TextInputManagementService Text Input Management Service Running Automatic
|
|
||||||
Themes Themes Running Automatic
|
|
||||||
Power Power Running Automatic
|
|
||||||
BITS Background Intelligent Transfer Service Running Automatic
|
|
||||||
BFE Base Filtering Engine Running Automatic
|
|
||||||
BrokerInfrastructure Background Tasks Infrastructure Service Running Automatic
|
|
||||||
BthAvctpSvc AVCTP service Running Automatic
|
|
||||||
TapiSrv Telephony Stopped Manual
|
|
||||||
RasMan Remote Access Connection Manager Stopped Manual
|
|
||||||
TieringEngineService Storage Tiers Management Stopped Manual
|
|
||||||
TimeBrokerSvc Time Broker Running Manual
|
|
||||||
swprv Microsoft Software Shadow Copy Provider Stopped Manual
|
|
||||||
TokenBroker Web Account Manager Running Manual
|
|
||||||
svsvc Spot Verifier Stopped Manual
|
|
||||||
seclogon Secondary Logon Stopped Manual
|
|
||||||
SDRSVC Windows Backup Stopped Manual
|
|
||||||
SCPolicySvc Smart Card Removal Policy Stopped Manual
|
|
||||||
Sense Windows Defender Advanced Threat Protection Service Stopped Manual
|
|
||||||
SEMgrSvc Payments and NFC/SE Manager Stopped Manual
|
|
||||||
SecurityHealthService Windows Security Service Running Manual
|
|
||||||
RmSvc Radio Management Service Running Manual
|
|
||||||
RetailDemo Retail Demo Service Stopped Manual
|
|
||||||
refsdedupsvc ReFS Dedup Service Stopped Manual
|
|
||||||
ScDeviceEnum Smart Card Device Enumeration Service Stopped Manual
|
|
||||||
SCardSvr Smart Card Stopped Manual
|
|
||||||
RpcLocator Remote Procedure Call (RPC) Locator Stopped Manual
|
|
||||||
SSDPSRV SSDP Discovery Running Manual
|
|
||||||
SNMPTrap SNMP Trap Stopped Manual
|
|
||||||
SmsRouter Microsoft Windows SMS Router Service. Stopped Manual
|
|
||||||
StorSvc Storage Service Stopped Manual
|
|
||||||
StiSvc Windows Image Acquisition (WIA) Stopped Manual
|
|
||||||
SstpSvc Secure Socket Tunneling Protocol Service Stopped Manual
|
|
||||||
SensrSvc Sensor Monitoring Service Stopped Manual
|
|
||||||
SensorService Sensor Service Stopped Manual
|
|
||||||
SensorDataService Sensor Data Service Stopped Manual
|
|
||||||
smphost Microsoft Storage Spaces SMP Stopped Manual
|
|
||||||
SharedAccess Internet Connection Sharing (ICS) Stopped Manual
|
|
||||||
SessionEnv Remote Desktop Configuration Stopped Manual
|
|
||||||
WinRM Windows Remote Management (WS-Management) Stopped Manual
|
|
||||||
WinHttpAutoProxySvc WinHTTP Web Proxy Auto-Discovery Service Running Manual
|
|
||||||
WiaRpc Still Image Acquisition Events Stopped Manual
|
|
||||||
wlidsvc Microsoft Account Sign-in Assistant Running Manual
|
|
||||||
WlanSvc WLAN AutoConfig Stopped Manual
|
|
||||||
wisvc Windows Insider Service Stopped Manual
|
|
||||||
WFDSConMgrSvc Wi-Fi Direct Services Connection Manager Service Stopped Manual
|
|
||||||
Wecsvc Windows Event Collector Stopped Manual
|
|
||||||
webthreatdefsvc Web Threat Defense Service Stopped Manual
|
|
||||||
WebClient WebClient Stopped Manual
|
|
||||||
WerSvc Windows Error Reporting Service Stopped Manual
|
|
||||||
wercplsupport Problem Reports Control Panel Support Stopped Manual
|
|
||||||
WEPHOSTSVC Windows Encryption Provider Host Service Stopped Manual
|
|
||||||
wlpasvc Local Profile Assistant Service Stopped Manual
|
|
||||||
XblGameSave Xbox Live Game Save Stopped Manual
|
|
||||||
XblAuthManager Xbox Live Auth Manager Stopped Manual
|
|
||||||
WwanSvc WWAN AutoConfig Stopped Manual
|
|
||||||
ZTHELPER ZTDNS Helper service Stopped Manual
|
|
||||||
XboxNetApiSvc Xbox Live Networking Service Stopped Manual
|
|
||||||
XboxGipSvc Xbox Accessory Management Service Stopped Manual
|
|
||||||
wuqisvc Microsoft Usage and Quality Insights Stopped Manual
|
|
||||||
WpcMonSvc Parental Controls Stopped Manual
|
|
||||||
wmiApSrv WMI Performance Adapter Stopped Manual
|
|
||||||
WManSvc Windows Management Service Stopped Manual
|
|
||||||
wuauserv Windows Update Stopped Manual
|
|
||||||
WpnService Windows Push Notifications System Service Stopped Manual
|
|
||||||
WPDBusEnum Portable Device Enumerator Service Stopped Manual
|
|
||||||
WdNisSvc Microsoft Defender Antivirus Network Inspection Service Running Manual
|
|
||||||
VirtioFsSvc VirtIO-FS Service Stopped Manual
|
|
||||||
vds Virtual Disk Stopped Manual
|
|
||||||
UsoSvc Update Orchestrator Service Stopped Manual
|
|
||||||
vmickvpexchange Hyper-V Data Exchange Service Stopped Manual
|
|
||||||
vmicheartbeat Hyper-V Heartbeat Service Stopped Manual
|
|
||||||
vmicguestinterface Hyper-V Guest Service Interface Stopped Manual
|
|
||||||
UserDataSvc_42d01 User Data Access_42d01 Stopped Manual
|
|
||||||
UdkUserSvc_42d01 Udk User Service_42d01 Running Manual
|
|
||||||
TrustedInstaller Windows Modules Installer Stopped Manual
|
|
||||||
TroubleshootingSvc Recommended Troubleshooting Service Stopped Manual
|
|
||||||
upnphost UPnP Device Host Stopped Manual
|
|
||||||
UnistoreSvc_42d01 User Data Storage_42d01 Stopped Manual
|
|
||||||
UmRdpService Remote Desktop Services UserMode Port Redirector Stopped Manual
|
|
||||||
vmicrdv Hyper-V Remote Desktop Virtualization Service Stopped Manual
|
|
||||||
WbioSrvc Windows Biometric Service Stopped Manual
|
|
||||||
wbengine Block Level Backup Engine Service Stopped Manual
|
|
||||||
WarpJITSvc Warp JIT Service Stopped Manual
|
|
||||||
WdiSystemHost Diagnostic System Host Running Manual
|
|
||||||
WdiServiceHost Diagnostic Service Host Stopped Manual
|
|
||||||
wcncsvc Windows Connect Now - Config Registrar Stopped Manual
|
|
||||||
WalletService WalletService Stopped Manual
|
|
||||||
vmicvmsession Hyper-V PowerShell Direct Service Stopped Manual
|
|
||||||
vmictimesync Hyper-V Time Synchronization Service Stopped Manual
|
|
||||||
vmicshutdown Hyper-V Guest Shutdown Service Stopped Manual
|
|
||||||
WaaSMedicSvc WaaSMedicSvc Stopped Manual
|
|
||||||
VSS Volume Shadow Copy Stopped Manual
|
|
||||||
vmicvss Hyper-V Volume Shadow Copy Requestor Stopped Manual
|
|
||||||
DoSvc Delivery Optimization Stopped Manual
|
|
||||||
dmwappushservice Device Management Wireless Application Protocol (WAP) Push message Routing Service Stopped Manual
|
|
||||||
DmEnrollmentSvc Device Management Enrollment Service Stopped Manual
|
|
||||||
dot3svc Wired AutoConfig Stopped Manual
|
|
||||||
EapHost Extensible Authentication Protocol Stopped Manual
|
|
||||||
DsSvc Data Sharing Service Stopped Manual
|
|
||||||
DsmSvc Device Setup Manager Stopped Manual
|
|
||||||
DevicePickerUserSvc_42d01 DevicePicker_42d01 Stopped Manual
|
|
||||||
DeviceInstall Device Install Service Stopped Manual
|
|
||||||
DeviceAssociationService Device Association Service Stopped Manual
|
|
||||||
DevicesFlowUserSvc_42d01 DevicesFlow_42d01 Stopped Manual
|
|
||||||
DisplayEnhancementService Display Enhancement Service Stopped Manual
|
|
||||||
diagsvc Diagnostic Execution Service Stopped Manual
|
|
||||||
DevQueryBroker DevQuery Background Discovery Broker Stopped Manual
|
|
||||||
edgeupdate Microsoft Edge Update Service (edgeupdate) Stopped Manual
|
|
||||||
GameInputSvc GameInput Service Stopped Manual
|
|
||||||
FrameServerMonitor Windows Camera Frame Server Monitor Stopped Manual
|
|
||||||
FrameServer Windows Camera Frame Server Stopped Manual
|
|
||||||
GraphicsPerfSvc GraphicsPerfSvc Stopped Manual
|
|
||||||
HvHost HV Host Service Stopped Manual
|
|
||||||
hpatchmon Hotpatch Monitoring Service Stopped Manual
|
|
||||||
hidserv Human Interface Device Service Stopped Manual
|
|
||||||
embeddedmode Embedded Mode Stopped Manual
|
|
||||||
EFS Encrypting File System (EFS) Stopped Manual
|
|
||||||
edgeupdatem Microsoft Edge Update Service (edgeupdatem) Stopped Manual
|
|
||||||
EntAppSvc Enterprise App Management Service Stopped Manual
|
|
||||||
fhsvc File History Service Stopped Manual
|
|
||||||
FDResPub Function Discovery Resource Publication Stopped Manual
|
|
||||||
fdPHost Function Discovery Provider Host Stopped Manual
|
|
||||||
AxInstSV ActiveX Installer (AxInstSV) Stopped Manual
|
|
||||||
autotimesvc Cellular Time Stopped Manual
|
|
||||||
ApxSvc Windows Virtual Audio Device Proxy Service Stopped Manual
|
|
||||||
BcastDVRUserService_42d01 GameDVR and Broadcast User Service_42d01 Stopped Manual
|
|
||||||
BTAGService Bluetooth Audio Gateway Service Stopped Manual
|
|
||||||
BluetoothUserService_42d01 Bluetooth User Support Service_42d01 Stopped Manual
|
|
||||||
BDESVC BitLocker Drive Encryption Service Stopped Manual
|
|
||||||
ALG Application Layer Gateway Service Stopped Manual
|
|
||||||
ADPSvc Aggregated Data Platform Service Stopped Manual
|
|
||||||
AarSvc_42d01 Agent Activation Runtime_42d01 Stopped Manual
|
|
||||||
AppIDSvc Application Identity Running Manual
|
|
||||||
AppReadiness App Readiness Stopped Manual
|
|
||||||
AppMgmt Application Management Stopped Manual
|
|
||||||
Appinfo Application Information Running Manual
|
|
||||||
bthserv Bluetooth Support Service Stopped Manual
|
|
||||||
CredentialEnrollmentManagerUserSvc_42d01 CredentialEnrollmentManagerUserSvc_42d01 Stopped Manual
|
|
||||||
ConsentUxUserSvc_42d01 ConsentUX User Service_42d01 Stopped Manual
|
|
||||||
COMSysApp COM+ System Application Stopped Manual
|
|
||||||
CscService Offline Files Stopped Manual
|
|
||||||
DeviceAssociationBrokerSvc_42d01 DeviceAssociationBroker_42d01 Stopped Manual
|
|
||||||
defragsvc Optimize drives Stopped Manual
|
|
||||||
dcsvc Declared Configuration(DC) service Stopped Manual
|
|
||||||
CDPSvc Connected Devices Platform Service Running Manual
|
|
||||||
CaptureService_42d01 CaptureService_42d01 Stopped Manual
|
|
||||||
camsvc Capability Access Manager Service Running Manual
|
|
||||||
CertPropSvc Certificate Propagation Stopped Manual
|
|
||||||
cloudidsvc Microsoft Cloud Identity Service Stopped Manual
|
|
||||||
CloudBackupRestoreSvc_42d01 Cloud Backup and Restore Service_42d01 Stopped Manual
|
|
||||||
ClipSVC Client License Service (ClipSVC) Running Manual
|
|
||||||
P9RdrService_42d01 P9RdrService_42d01 Stopped Manual
|
|
||||||
NPSMSvc_42d01 Now Playing Session Manager Service_42d01 Stopped Manual
|
|
||||||
NlaSvc Network Location Awareness Stopped Manual
|
|
||||||
PcaSvc Program Compatibility Assistant Service Running Manual
|
|
||||||
perceptionsimulation Windows Perception Simulation Service Stopped Manual
|
|
||||||
PenService_42d01 PenService_42d01 Stopped Manual
|
|
||||||
PeerDistSvc BranchCache Stopped Manual
|
|
||||||
Netman Network Connections Stopped Manual
|
|
||||||
Netlogon Netlogon Stopped Manual
|
|
||||||
NcdAutoSetup Network Connected Devices Auto-Setup Stopped Manual
|
|
||||||
netprofm Network List Service Running Manual
|
|
||||||
NgcSvc Microsoft Passport Stopped Manual
|
|
||||||
NgcCtnrSvc Microsoft Passport Container Stopped Manual
|
|
||||||
NetSetupSvc Network Setup Service Stopped Manual
|
|
||||||
PrintWorkflowUserSvc_42d01 PrintWorkflow_42d01 Stopped Manual
|
|
||||||
PrintScanBrokerService PrintScanBrokerService Stopped Manual
|
|
||||||
PrintNotify Printer Extensions and Notifications Stopped Manual
|
|
||||||
PushToInstall Windows PushToInstall Service Stopped Manual
|
|
||||||
RasAuto Remote Access Auto Connection Manager Stopped Manual
|
|
||||||
QWAVE Quality Windows Audio Video Experience Stopped Manual
|
|
||||||
QEMU Guest Agent VSS Provider QEMU Guest Agent VSS Provider Stopped Manual
|
|
||||||
PimIndexMaintenanceSvc_42d01 Contact Data_42d01 Stopped Manual
|
|
||||||
PhoneSvc Phone Service Stopped Manual
|
|
||||||
PerfHost Performance Counter DLL Host Stopped Manual
|
|
||||||
pla Performance Logs & Alerts Stopped Manual
|
|
||||||
PrintDeviceConfigurationService Print Device Configuration Service Stopped Manual
|
|
||||||
PolicyAgent IPsec Policy Agent Stopped Manual
|
|
||||||
PlugPlay Plug and Play Running Manual
|
|
||||||
NcbService Network Connection Broker Running Manual
|
|
||||||
lmhosts TCP/IP NetBIOS Helper Running Manual
|
|
||||||
lltdsvc Link-Layer Topology Discovery Mapper Stopped Manual
|
|
||||||
LicenseManager Windows License Manager Service Running Manual
|
|
||||||
McmSvc Mobile Connectivity Management Service Stopped Manual
|
|
||||||
LxpSvc Language Experience Service Stopped Manual
|
|
||||||
LocalKdc Kerberos Local Key Distribution Center Stopped Manual
|
|
||||||
lfsvc Geolocation Service Stopped Manual
|
|
||||||
InstallService Microsoft Store Install Service Stopped Manual
|
|
||||||
IKEEXT IKE and AuthIP IPsec Keying Modules Stopped Manual
|
|
||||||
icssvc Windows Mobile Hotspot Service Stopped Manual
|
|
||||||
KtmRm KtmRm for Distributed Transaction Coordinator Stopped Manual
|
|
||||||
IpxlatCfgSvc IP Translation Configuration Service Stopped Manual
|
|
||||||
InventorySvc Inventory and Compatibility Appraisal service Stopped Manual
|
|
||||||
McpManagementService McpManagementService Stopped Manual
|
|
||||||
MsKeyboardFilter Microsoft Keyboard Filter Stopped Manual
|
|
||||||
msiserver Windows Installer Stopped Manual
|
|
||||||
NaturalAuthentication Natural Authentication Stopped Manual
|
|
||||||
NcaSvc Network Connectivity Assistant Stopped Manual
|
|
||||||
MSiSCSI Microsoft iSCSI Initiator Service Stopped Manual
|
|
||||||
MessagingService_42d01 MessagingService_42d01 Stopped Manual
|
|
||||||
MicrosoftEdgeElevationService Microsoft Edge Elevation Service (MicrosoftEdgeElevationService) Stopped Manual
|
|
||||||
midisrv Windows MIDI Service Stopped Manual
|
|
||||||
MSDTC Distributed Transaction Coordinator Stopped Manual
|
|
||||||
RemoteRegistry Remote Registry Stopped Disabled
|
|
||||||
UevAgentService User Experience Virtualization Service Stopped Disabled
|
|
||||||
AssignedAccessManagerSvc AssignedAccessManager Service Stopped Disabled
|
|
||||||
RemoteAccess Routing and Remote Access Stopped Disabled
|
|
||||||
ssh-agent OpenSSH Authentication Agent Stopped Disabled
|
|
||||||
shpamsvc Shared PC Account Manager Stopped Disabled
|
|
||||||
DialogBlockingService DialogBlockingService Stopped Disabled
|
|
||||||
DiagTrack Connected User Experiences and Telemetry Stopped Disabled
|
|
||||||
tzautoupdate Auto Time Zone Updater Stopped Disabled
|
|
||||||
AppVClient Microsoft App-V Client Stopped Disabled
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -19,7 +19,7 @@ $InitialSessionState = [System.Management.Automation.Runspaces.InitialSessionSta
|
|||||||
$InitialSessionState.Variables.Add($hashVars)
|
$InitialSessionState.Variables.Add($hashVars)
|
||||||
|
|
||||||
# Get every private function and add them to the session state
|
# 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) {
|
foreach ($function in $functions) {
|
||||||
$functionDefinition = Get-Content function:\$($function.name)
|
$functionDefinition = Get-Content function:\$($function.name)
|
||||||
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
$functionEntry = New-Object System.Management.Automation.Runspaces.SessionStateFunctionEntry -ArgumentList $($function.name), $functionDefinition
|
||||||
@@ -247,7 +247,6 @@ $commonKeyEvents = {
|
|||||||
"T" { Invoke-WPFButton "WPFTab2BT"; $keyEventArgs.Handled = $true } # Navigate to Tweaks tab
|
"T" { Invoke-WPFButton "WPFTab2BT"; $keyEventArgs.Handled = $true } # Navigate to Tweaks tab
|
||||||
"C" { Invoke-WPFButton "WPFTab3BT"; $keyEventArgs.Handled = $true } # Navigate to Config tab
|
"C" { Invoke-WPFButton "WPFTab3BT"; $keyEventArgs.Handled = $true } # Navigate to Config tab
|
||||||
"U" { Invoke-WPFButton "WPFTab4BT"; $keyEventArgs.Handled = $true } # Navigate to Updates tab
|
"U" { Invoke-WPFButton "WPFTab4BT"; $keyEventArgs.Handled = $true } # Navigate to Updates tab
|
||||||
"M" { Invoke-WPFButton "WPFTab5BT"; $keyEventArgs.Handled = $true } # Navigate to MicroWin tab
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Handle Ctrl key combinations for specific actions
|
# Handle Ctrl key combinations for specific actions
|
||||||
@@ -386,27 +385,6 @@ $sync["Form"].Add_ContentRendered({
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# Add event handlers for the RadioButtons
|
|
||||||
$sync["ISOdownloader"].add_Checked({
|
|
||||||
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible
|
|
||||||
})
|
|
||||||
|
|
||||||
$sync["ISOmanual"].add_Checked({
|
|
||||||
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
|
|
||||||
})
|
|
||||||
|
|
||||||
$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
|
|
||||||
|
|
||||||
# The SearchBarTimer is used to delay the search operation until the user has stopped typing for a short period
|
# 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
|
# This prevents the ui from stuttering when the user types quickly as it dosnt need to update the ui for every keystroke
|
||||||
|
|
||||||
@@ -510,7 +488,6 @@ $sync["AboutMenuItem"].Add_Click({
|
|||||||
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</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>
|
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>
|
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>, <a href="https://github.com/Marterich">@Marterich</a>
|
||||||
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>, <a href="https://github.com/CodingWonders">@CodingWonders</a>, <a href="https://github.com/Real-MullaC">@Real-MullaC</a>
|
|
||||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||||
"@
|
"@
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
|
||||||
<Setter Property="MaxWidth" Value="{DynamicResource ToolTipWidth}"/>
|
<Setter Property="MaxWidth" Value="{DynamicResource ToolTipWidth}"/>
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="Padding" Value="5"/>
|
<Setter Property="Padding" Value="2"/>
|
||||||
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
<Setter Property="FontSize" Value="{DynamicResource FontSize}"/>
|
||||||
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
<Setter Property="FontFamily" Value="{DynamicResource FontFamily}"/>
|
||||||
<!-- This ContentTemplate ensures that the content of the ToolTip wraps text properly for better readability -->
|
<!-- This ContentTemplate ensures that the content of the ToolTip wraps text properly for better readability -->
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
<Style x:Key="AppEntryBorderStyle" TargetType="Border">
|
<Style x:Key="AppEntryBorderStyle" TargetType="Border">
|
||||||
<Setter Property="BorderBrush" Value="Gray"/>
|
<Setter Property="BorderBrush" Value="Gray"/>
|
||||||
<Setter Property="BorderThickness" Value="{DynamicResource AppEntryBorderThickness}"/>
|
<Setter Property="BorderThickness" Value="{DynamicResource AppEntryBorderThickness}"/>
|
||||||
<Setter Property="CornerRadius" Value="5"/>
|
<Setter Property="CornerRadius" Value="2"/>
|
||||||
<Setter Property="Padding" Value="{DynamicResource AppEntryMargin}"/>
|
<Setter Property="Padding" Value="{DynamicResource AppEntryMargin}"/>
|
||||||
<Setter Property="Width" Value="{DynamicResource AppEntryWidth}"/>
|
<Setter Property="Width" Value="{DynamicResource AppEntryWidth}"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||||
@@ -101,10 +101,30 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="CheckBox">
|
<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}"
|
<ContentPresenter Content="{TemplateBinding Content}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"/>
|
||||||
Margin="{TemplateBinding Padding}"/>
|
</StackPanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
@@ -164,6 +184,7 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
|
|
||||||
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
||||||
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
<Setter Property="Foreground" Value="{DynamicResource MainForegroundColor}" />
|
||||||
@@ -532,7 +553,7 @@
|
|||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Width="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
Width="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
||||||
Height="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
Height="{DynamicResource CheckBoxBulletDecoratorSize *0.85}"
|
||||||
Margin="2"
|
Margin="1"
|
||||||
SnapsToDevicePixels="True"/>
|
SnapsToDevicePixels="True"/>
|
||||||
<Viewbox x:Name="CheckMarkContainer"
|
<Viewbox x:Name="CheckMarkContainer"
|
||||||
Width="{DynamicResource CheckBoxBulletDecoratorSize}"
|
Width="{DynamicResource CheckBoxBulletDecoratorSize}"
|
||||||
@@ -949,14 +970,6 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</ToggleButton.Content>
|
</ToggleButton.Content>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Margin="0,0,5,0" 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>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Search Bar and Action Buttons -->
|
<!-- Search Bar and Action Buttons -->
|
||||||
@@ -966,15 +979,6 @@
|
|||||||
<ColumnDefinition Width="Auto"/><!-- Buttons area -->
|
<ColumnDefinition Width="Auto"/><!-- Buttons area -->
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--
|
|
||||||
TODO:
|
|
||||||
Make this SearchBar TextBox Position itself and still
|
|
||||||
house the Magnifying Glass Character in place,
|
|
||||||
even if that Magnifying Icon changed its Size,
|
|
||||||
it should be positioned relative to the SearchBar.
|
|
||||||
Consider using a Math Solver, will help in making
|
|
||||||
development of these things much easier
|
|
||||||
-->
|
|
||||||
<Border Grid.Column="0" Margin="5,0,0,0" Width="{DynamicResource SearchBarWidth}" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Left">
|
<Border Grid.Column="0" Margin="5,0,0,0" Width="{DynamicResource SearchBarWidth}" Height="{DynamicResource SearchBarHeight}" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBox
|
<TextBox
|
||||||
@@ -997,13 +1001,6 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<!--
|
|
||||||
TODO:
|
|
||||||
Make this ClearButton Positioning react to
|
|
||||||
SearchBar Width Value changing, so it'll look correct.
|
|
||||||
Consider using a Math Solver, will help in making
|
|
||||||
development of these things much easier
|
|
||||||
-->
|
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Name="SearchBarClearButton"
|
Name="SearchBarClearButton"
|
||||||
@@ -1334,253 +1331,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5">
|
|
||||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="{DynamicResource TabContentMargin}">
|
|
||||||
<Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ScrollViewer}}">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="3*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</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 Name="MicrowinISOPanel" Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
|
||||||
<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"/>
|
|
||||||
<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="ISOLanguage" Visibility="Collapsed"/>
|
|
||||||
<Button Name="WPFGetIso" Margin="2" Padding="15">
|
|
||||||
<Button.Content>
|
|
||||||
<TextBlock Background="Transparent" Foreground="{DynamicResource ButtonForegroundColor}">
|
|
||||||
Get Windows <Underline>I</Underline>SO
|
|
||||||
</TextBlock>
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<!-- Visibility="Hidden" -->
|
|
||||||
<StackPanel Name="MicrowinOptionsPanel" HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Hidden">
|
|
||||||
<Grid Margin="0,0,0,10">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<Button Name="WPFMicrowinPanelBack"
|
|
||||||
Grid.Column="0"
|
|
||||||
Width="30" Height="30"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
FontFamily="Segoe MDL2 Assets"
|
|
||||||
FontSize="12"
|
|
||||||
Content=""
|
|
||||||
ToolTip="Back to main view"
|
|
||||||
Background="{DynamicResource ButtonBackgroundColor}"
|
|
||||||
Foreground="{DynamicResource ButtonForegroundColor}"
|
|
||||||
BorderBrush="{DynamicResource ButtonBackgroundColor}"
|
|
||||||
BorderThickness="1"
|
|
||||||
Padding="0">
|
|
||||||
<Button.ContentTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</Button.ContentTemplate>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<TextBlock Name="MicrowinPanel2Title"
|
|
||||||
Grid.Column="1"
|
|
||||||
Text="Configure Windows ISO"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Foreground="{DynamicResource MainForegroundColor}"
|
|
||||||
FontSize="16"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<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"/>
|
|
||||||
<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:</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"/>
|
|
||||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">WinUtil configuration file (JSON)</TextBlock>
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*" /> <!-- Takes the remaining space -->
|
|
||||||
<ColumnDefinition Width="32" /> <!-- Fixed width for Button -->
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<TextBox Name="MicrowinAutoConfigBox" Background="Transparent" BorderBrush="{DynamicResource MainForegroundColor}"
|
|
||||||
Text=""
|
|
||||||
Margin="2"
|
|
||||||
IsReadOnly="False"
|
|
||||||
Grid.Column="0"
|
|
||||||
ToolTip="Path of your configuration file"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Foreground="{DynamicResource LabelboxForegroundColor}">
|
|
||||||
</TextBox>
|
|
||||||
<Button Name="MicrowinAutoConfigBtn"
|
|
||||||
Width="Auto"
|
|
||||||
Height="Auto"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="2"
|
|
||||||
Padding="1" VerticalAlignment="Center">
|
|
||||||
<Button.Content>
|
|
||||||
...
|
|
||||||
</Button.Content>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
<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">
|
|
||||||
|
|
||||||
<StackPanel x:Name="MicrowinBusyIndicator" Orientation="Horizontal" Margin="15,15,15,0">
|
|
||||||
<TextBlock x:Name="BusyIcon" FontFamily="Segoe MDL2 Assets" Text=""
|
|
||||||
Margin="0,0,8,2"
|
|
||||||
FontSize="16"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Foreground="{DynamicResource MicrowinBusyColor}"/>
|
|
||||||
<TextBlock x:Name="BusyText" Text="Microwin"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextTrimming="CharacterEllipsis"
|
|
||||||
Foreground="{DynamicResource MicrowinBusyColor}"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<TextBlock x:Name = "asciiTextBlock"
|
|
||||||
xml:space ="preserve"
|
|
||||||
HorizontalAlignment = "Center"
|
|
||||||
Margin = "0"
|
|
||||||
VerticalAlignment = "Top"
|
|
||||||
Height = "Auto"
|
|
||||||
Width = "Auto"
|
|
||||||
FontSize = "{DynamicResource MicroWinLogoSize}"
|
|
||||||
FontFamily = "Courier New"
|
|
||||||
>
|
|
||||||
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
|
|
||||||
/ \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \
|
|
||||||
/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | |
|
|
||||||
\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_|
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<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/>
|
|
||||||
- Bypasses Windows 11 System Requirements on unsupported computers <LineBreak/>
|
|
||||||
- No internet requirement for install <LineBreak/>
|
|
||||||
- Apps debloat <LineBreak/>
|
|
||||||
<LineBreak/>
|
|
||||||
<LineBreak/>
|
|
||||||
|
|
||||||
<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 "Get 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 "Load Driver" 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: "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)" 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>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
|
||||||
</ScrollViewer>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user