mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 02:22:34 -05:00
Compare commits
128 Commits
fba593c8d1
...
24.06.29
Author | SHA1 | Date | |
---|---|---|---|
a5fbff142b | |||
e830894819 | |||
d4dc9aec9b | |||
e4d0e16b26 | |||
d6102e8954 | |||
227cb21c24 | |||
1891ea7966 | |||
6c49a8f2c9 | |||
ab384029f1 | |||
0c32d016b4 | |||
45818fd80c | |||
d08954945c | |||
a7ab24e3c9 | |||
a924d91d65 | |||
676e46f59f | |||
37b9c552df | |||
2e12176b2d | |||
7d1e4a8d82 | |||
4f8e7a8ea7 | |||
6c4c24b26d | |||
d205e75030 | |||
12561aba2c | |||
84fd1bc71c | |||
b9cd563915 | |||
58df438b92 | |||
9086b30a75 | |||
b268f98b91 | |||
25a4ebe062 | |||
60f5ef1f8e | |||
491b0b534c | |||
a59a30f905 | |||
227babe0e8 | |||
a0c4b33483 | |||
b831901967 | |||
d0427403f1 | |||
312f42f39a | |||
f68c9bf213 | |||
7b6a624ec6 | |||
43304808a9 | |||
ad0ed09940 | |||
b9813f86b9 | |||
2c5707e18f | |||
b646b139b8 | |||
5b369250b6 | |||
9274c683a2 | |||
f559de3a8c | |||
1e71020757 | |||
83ef15ccaf | |||
c2938f9339 | |||
b2be290be2 | |||
b6723bebf0 | |||
42c1ef434c | |||
a6ad919f16 | |||
52fd667ef9 | |||
04130231ff | |||
a510b52acb | |||
48581d6aad | |||
c3a77e71ad | |||
3d7b232248 | |||
b6d1dc50cb | |||
f6af93afbd | |||
0c841f98e8 | |||
e4c44e4878 | |||
8a78c960ea | |||
cb3b64e195 | |||
83f93ceba4 | |||
9ac93fd2dc | |||
13712b4c77 | |||
8d65f3bcf8 | |||
5c937efa9b | |||
ade1c3b830 | |||
8ded42a3ce | |||
65b91330ed | |||
98f8b07951 | |||
acaad991a7 | |||
e00bc5f723 | |||
a5fd8e355d | |||
8a2e1391e0 | |||
81c3722881 | |||
279e707a7a | |||
e894613f68 | |||
be08211cdc | |||
118c3e3964 | |||
3f4e353d13 | |||
a09ae3e251 | |||
f9c09495fc | |||
de424ce636 | |||
c28760e11a | |||
53090a6164 | |||
4661bf31ba | |||
5c687c98c6 | |||
495e08db05 | |||
a23d63613f | |||
acbabd4962 | |||
45a18b335f | |||
c23ea45e61 | |||
1f01933cc0 | |||
4958c5efe9 | |||
5dd3bb492f | |||
9d6d21bd40 | |||
ff80ef491a | |||
4bc54de8cd | |||
864f063878 | |||
009ab5066c | |||
a735a02257 | |||
360cc15b4b | |||
1e906696f5 | |||
b6902c116a | |||
8ace1a32bf | |||
4fcd3f5b2f | |||
c942287172 | |||
7c58eb0e78 | |||
9be030a4e2 | |||
4348f052c3 | |||
ad81bab274 | |||
3a83203298 | |||
09b1e56967 | |||
af94adbabe | |||
a609f771c8 | |||
2b80e14bf9 | |||
1325ef54b8 | |||
8a76641d20 | |||
3dca1ee43e | |||
7b6decb28a | |||
774b64b092 | |||
02ea93c80f | |||
5e10883547 | |||
a8af90a112 |
11
.gitattributes
vendored
11
.gitattributes
vendored
@ -1,3 +1,12 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.ps1 text eol=crlf
|
||||||
|
*.json text eol=crlf
|
||||||
|
*.cfg text eol=crlf
|
||||||
|
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
|
||||||
config/* diff
|
config/* diff
|
||||||
config/applications.json diff
|
config/applications.json diff
|
||||||
*.json diff
|
*.json diff
|
||||||
|
101
.github/workflows/close-old-issues.yaml
vendored
101
.github/workflows/close-old-issues.yaml
vendored
@ -4,91 +4,32 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # Run daily
|
- cron: '0 0 * * *' # Run daily
|
||||||
workflow_dispatch: # This line enables manual triggering
|
workflow_dispatch: # This line enables manual triggering
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
close-issues:
|
close-issues:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write # Ensure necessary permissions for issues
|
issues: write # Ensure necessary permissions for issues
|
||||||
|
pull-requests: none
|
||||||
|
contents: none
|
||||||
steps:
|
steps:
|
||||||
- name: Close inactive issues
|
- name: Close inactive issues
|
||||||
uses: actions/github-script@v7
|
uses: actions/stale@v9.0.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
# A list of labels to reference when looking through issues,
|
||||||
script: |
|
# and only when one (or even more) of these labels are found..
|
||||||
const octokit = github;
|
# then skip this issue, and never try to stale and/or close it.
|
||||||
|
exempt-issue-labels: "Keep Issue Open"
|
||||||
// Get the repository owner and name
|
# Split it into two weeks, after one week the issue will be marked as stale,
|
||||||
const { owner, repo } = context.repo;
|
# after another week have pasted without any update.. the issue will then be closed.
|
||||||
|
days-before-issue-stale: 7
|
||||||
// Define the inactivity period (14 days)
|
days-before-issue-close: 7
|
||||||
const inactivityPeriod = new Date();
|
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
|
||||||
inactivityPeriod.setDate(inactivityPeriod.getDate() - 14);
|
days-before-pr-stale: -1
|
||||||
|
days-before-pr-close: -1
|
||||||
const labelKeepIssue = 'Keep Issue Open';
|
# Sends a message for both the Stale and Close events of an issue.
|
||||||
|
stale-issue-message: "This issue was marked as stale because it has been inactive for 7 days"
|
||||||
try {
|
close-issue-message: "This issue was closed because it has been inactive for 7 days since it was marked as stale"
|
||||||
// Get all open issues with pagination
|
# Make this field equal true if you want to test your configuration if it works correctly or not
|
||||||
for await (const response of octokit.paginate.iterator(octokit.rest.issues.listForRepo, {
|
debug-only: false
|
||||||
owner,
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
repo,
|
|
||||||
state: 'open',
|
|
||||||
})) {
|
|
||||||
const issues = response.data;
|
|
||||||
|
|
||||||
// Close issues inactive for more than the inactivity period
|
|
||||||
for (const issue of issues) {
|
|
||||||
let closeIssue = true;
|
|
||||||
|
|
||||||
// Get all Labels of issue, and compared each label with the labelKeepIssue const variable
|
|
||||||
try {
|
|
||||||
const respondIssueLabels = await octokit.request("GET /repos/{owner}/{repo}/issues/{issue_number}/labels", {
|
|
||||||
owner: owner,
|
|
||||||
repo: repo,
|
|
||||||
issue_number: issue.number
|
|
||||||
});
|
|
||||||
const labels = respondIssueLabels.data;
|
|
||||||
|
|
||||||
for (let i = 0; i < labels.length; i++) {
|
|
||||||
const label = labels[i]
|
|
||||||
if (label.name === labelKeepIssue) {
|
|
||||||
console.log(`Issue #${issue.number} will not be closed`);
|
|
||||||
closeIssue = false;
|
|
||||||
break; // Break from the loop, no need to check the remaining Labels.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error while Fetching Labels for Issue #${issue.number}, Error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!closeIssue) {
|
|
||||||
continue; // Skip the next bit of code
|
|
||||||
}
|
|
||||||
|
|
||||||
const lastCommentDate = issue.updated_at;
|
|
||||||
if (new Date(lastCommentDate) < inactivityPeriod) {
|
|
||||||
try {
|
|
||||||
// Close the issue
|
|
||||||
await octokit.rest.issues.update({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issue.number,
|
|
||||||
state: 'closed',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add a comment
|
|
||||||
await octokit.rest.issues.createComment({
|
|
||||||
owner,
|
|
||||||
repo,
|
|
||||||
issue_number: issue.number,
|
|
||||||
body: 'Closed due to inactivity',
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error updating or commenting on issue #${issue.number}: ${error}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error fetching issues: ${error}`);
|
|
||||||
}
|
|
||||||
|
25
.github/workflows/compile.yaml
vendored
Normal file
25
.github/workflows/compile.yaml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Compile
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- test*
|
||||||
|
workflow_dispatch: # Manual trigger added
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-runspace:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
- name: Compile project
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
|
||||||
|
continue-on-error: false # Directly fail the job on error, removing the need for a separate check
|
||||||
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
commit_message: Compile Winutil
|
||||||
|
if: success()
|
46
.github/workflows/pre-release.yaml
vendored
Normal file
46
.github/workflows/pre-release.yaml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: Pre-Release WinUtil
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
workflow_dispatch: # Manual trigger added
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-runspace:
|
||||||
|
runs-on: windows-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.extract_version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Extract Version from winutil.ps1
|
||||||
|
id: extract_version
|
||||||
|
run: |
|
||||||
|
$version = ''
|
||||||
|
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object {
|
||||||
|
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
|
||||||
|
$version = $matches[1]
|
||||||
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
|
echo "::set-output name=version::$version"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-not $version) {
|
||||||
|
Write-Error "Version not found in winutil.ps1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Create and Upload Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
|
name: Pre-Release ${{ steps.extract_version.outputs.version }}
|
||||||
|
files: ./winutil.ps1
|
||||||
|
prerelease: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
52
.github/workflows/release.yaml
vendored
52
.github/workflows/release.yaml
vendored
@ -1,24 +1,42 @@
|
|||||||
name: Update Branch
|
name: Release WinUtil
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch: # Manual trigger added
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- test*
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-runspace:
|
build-runspace:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.extract_version.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout Repository
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
ref: ${{ github.head_ref }}
|
|
||||||
- name: Compile project
|
- name: Extract Version from winutil.ps1
|
||||||
shell: pwsh
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1
|
$version = ''
|
||||||
continue-on-error: false # Directly fail the job on error, removing the need for a separate check
|
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object {
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
|
||||||
with:
|
$version = $matches[1]
|
||||||
commit_message: Compile Winutil
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
if: success()
|
echo "::set-output name=version::$version"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-not $version) {
|
||||||
|
Write-Error "Version not found in winutil.ps1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
- name: Create and Upload Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.extract_version.outputs.version }}
|
||||||
|
name: Release ${{ steps.extract_version.outputs.version }}
|
||||||
|
files: ./winutil.ps1
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
4
.github/workflows/unittests.yaml
vendored
4
.github/workflows/unittests.yaml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
|
||||||
Invoke-Pester -Path 'pester/*.Tests.ps1' -Output Detailed
|
Invoke-Pester -Path 'pester/*.Tests.ps1' -Output Detailed
|
||||||
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
env:
|
env:
|
||||||
TEMP: ${{ runner.temp }}
|
TEMP: ${{ runner.temp }}
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -44,3 +44,4 @@ Microsoft.PowerShell.ConsoleHost.dll
|
|||||||
microwin.log
|
microwin.log
|
||||||
True
|
True
|
||||||
test.ps1
|
test.ps1
|
||||||
|
winutil.ps1
|
||||||
|
128
Compile.ps1
128
Compile.ps1
@ -1,30 +1,57 @@
|
|||||||
|
param (
|
||||||
|
[switch]$Debug,
|
||||||
|
[switch]$Run
|
||||||
|
)
|
||||||
$OFS = "`r`n"
|
$OFS = "`r`n"
|
||||||
$scriptname = "winutil.ps1"
|
$scriptname = "winutil.ps1"
|
||||||
|
|
||||||
# Variable to sync between runspaces
|
# Variable to sync between runspaces
|
||||||
$sync = [Hashtable]::Synchronized(@{})
|
$sync = [Hashtable]::Synchronized(@{})
|
||||||
$sync.PSScriptRoot = $PSScriptRoot
|
$sync.PSScriptRoot = $PSScriptRoot
|
||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
|
|
||||||
if (Test-Path -Path "$($scriptname)")
|
function Update-Progress {
|
||||||
{
|
param (
|
||||||
Remove-Item -Force "$($scriptname)"
|
[Parameter(Mandatory, position=0)]
|
||||||
|
[string]$StatusMessage,
|
||||||
|
|
||||||
|
[Parameter(Mandatory, position=1)]
|
||||||
|
[ValidateRange(0,100)]
|
||||||
|
[int]$Percent,
|
||||||
|
|
||||||
|
[Parameter(position=2)]
|
||||||
|
[string]$Activity = "Compiling"
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Progress -Activity $Activity -Status $StatusMessage -PercentComplete $Percent
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-output '
|
$header = @"
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
### ###
|
### ###
|
||||||
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
|
### WARNING: This file is automatically generated DO NOT modify this file directly as it will be overwritten ###
|
||||||
### ###
|
### ###
|
||||||
################################################################################################################
|
################################################################################################################
|
||||||
' | Out-File ./$scriptname -Append -Encoding ascii
|
"@
|
||||||
|
|
||||||
(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)") | Out-File ./$scriptname -Append -Encoding ascii
|
|
||||||
|
|
||||||
|
# Create the script in memory.
|
||||||
|
Update-Progress "Pre-req: Allocating Memory" 0
|
||||||
|
$script_content = [System.Collections.Generic.List[string]]::new()
|
||||||
|
|
||||||
|
Update-Progress "Adding: Header" 5
|
||||||
|
$script_content.Add($header)
|
||||||
|
|
||||||
|
Update-Progress "Adding: Version" 10
|
||||||
|
$script_content.Add($(Get-Content .\scripts\start.ps1).replace('#{replaceme}',"$(Get-Date -Format yy.MM.dd)"))
|
||||||
|
|
||||||
|
Update-Progress "Adding: Functions" 20
|
||||||
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
Get-ChildItem .\functions -Recurse -File | ForEach-Object {
|
||||||
Get-Content $psitem.FullName | Out-File ./$scriptname -Append -Encoding ascii
|
$script_content.Add($(Get-Content $psitem.FullName))
|
||||||
}
|
}
|
||||||
|
Update-Progress "Adding: Config *.json" 40
|
||||||
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-Object {
|
||||||
|
|
||||||
$json = (Get-Content $psitem.FullName).replace("'","''")
|
$json = (Get-Content $psitem.FullName).replace("'","''")
|
||||||
|
|
||||||
# Replace every XML Special Character so it'll render correctly in final build
|
# Replace every XML Special Character so it'll render correctly in final build
|
||||||
@ -35,25 +62,39 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach-
|
|||||||
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
$_.Replace('=}','').Replace('@{','').Replace(' ','')
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
# Note:
|
||||||
|
# Avoid using HTML Entity Codes, for example '”' (stands for "Right Double Quotation Mark"),
|
||||||
|
# Use **HTML decimal/hex codes instead**, as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
||||||
|
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||||
$firstLevelName = $firstLevelJsonList[$i]
|
$firstLevelName = $firstLevelJsonList[$i]
|
||||||
# Note: Avoid using HTML Entity Codes (for example '”' (stands for "Right Double Quotation Mark")), and use HTML decimal/hex codes instead.
|
|
||||||
# as using HTML Entity Codes will result in XML parse Error when running the compiled script.
|
|
||||||
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
if ($jsonAsObject.$firstLevelName.content -ne $null) {
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||||
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
$jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||||
}
|
}
|
||||||
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
if ($jsonAsObject.$firstLevelName.description -ne $null) {
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>')
|
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—')
|
||||||
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
$jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# The replace at the end is required, as without it the output of converto-json will be somewhat weird for Multiline String
|
|
||||||
# Most Notably is the scripts in json files, make=ing it harder for users who want to review these scripts that are found in the final compiled script
|
# Add 'WPFInstall' as a prefix to every entry-name in 'applications.json' file
|
||||||
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
if ($psitem.Name -eq "applications.json") {
|
||||||
|
for ($i = 0; $i -lt $firstLevelJsonList.Count; $i += 1) {
|
||||||
|
$appEntryName = $firstLevelJsonList[$i]
|
||||||
|
$appEntryContent = $jsonAsObject.$appEntryName
|
||||||
|
# Remove the entire app entry, so we could add it later with a different name
|
||||||
|
$jsonAsObject.PSObject.Properties.Remove($appEntryName)
|
||||||
|
# Add the app entry, but with a different name (WPFInstall + The App Entry Name)
|
||||||
|
$jsonAsObject | Add-Member -MemberType NoteProperty -Name "WPFInstall$appEntryName" -Value $appEntryContent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# The replace at the end is required, as without it the output of 'converto-json' will be somewhat weird for Multiline Strings
|
||||||
|
# Most Notably is the scripts in some json files, making it harder for users who want to review these scripts, which're found in the compiled script
|
||||||
|
$json = ($jsonAsObject | convertto-json -Depth 3).replace('\r\n',"`r`n")
|
||||||
|
|
||||||
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
$sync.configs.$($psitem.BaseName) = $json | convertfrom-json
|
||||||
Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" | Out-File ./$scriptname -Append -Encoding ascii
|
$script_content.Add($(Write-output "`$sync.configs.$($psitem.BaseName) = '$json' `| convertfrom-json" ))
|
||||||
}
|
}
|
||||||
|
|
||||||
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
$xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
||||||
@ -61,29 +102,44 @@ $xaml = (Get-Content .\xaml\inputXML.xaml).replace("'","''")
|
|||||||
# Dot-source the Get-TabXaml function
|
# Dot-source the Get-TabXaml function
|
||||||
. .\functions\private\Get-TabXaml.ps1
|
. .\functions\private\Get-TabXaml.ps1
|
||||||
|
|
||||||
## Xaml Manipulation
|
Update-Progress "Building: Xaml " 75
|
||||||
$tabColumns = Get-TabXaml "applications" 5
|
$appXamlContent = Get-TabXaml "applications" 5
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
$tweaksXamlContent = Get-TabXaml "tweaks"
|
||||||
$tabColumns = Get-TabXaml "tweaks"
|
$featuresXamlContent = Get-TabXaml "feature"
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
|
||||||
$tabColumns = Get-TabXaml "feature"
|
|
||||||
$tabColumns | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
|
||||||
|
|
||||||
# Assuming inputApp.xaml is in the same directory as main.ps1
|
|
||||||
$appXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputApp.xaml"
|
|
||||||
$tweaksXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputTweaks.xaml"
|
|
||||||
$featuresXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputFeatures.xaml"
|
|
||||||
|
|
||||||
# Load the XAML content from inputApp.xaml
|
|
||||||
$appXamlContent = Get-Content -Path $appXamlPath -Raw
|
|
||||||
$tweaksXamlContent = Get-Content -Path $tweaksXamlPath -Raw
|
|
||||||
$featuresXamlContent = Get-Content -Path $featuresXamlPath -Raw
|
|
||||||
|
|
||||||
|
Update-Progress "Adding: Xaml " 90
|
||||||
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
# Replace the placeholder in $inputXML with the content of inputApp.xaml
|
||||||
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
$xaml = $xaml -replace "{{InstallPanel_applications}}", $appXamlContent
|
||||||
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
$xaml = $xaml -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent
|
||||||
$xaml = $xaml -replace "{{InstallPanel_features}}", $featuresXamlContent
|
$xaml = $xaml -replace "{{InstallPanel_features}}", $featuresXamlContent
|
||||||
|
|
||||||
Write-output "`$inputXML = '$xaml'" | Out-File ./$scriptname -Append -Encoding ascii
|
$script_content.Add($(Write-output "`$inputXML = '$xaml'"))
|
||||||
|
|
||||||
Get-Content .\scripts\main.ps1 | Out-File ./$scriptname -Append -Encoding ascii
|
$script_content.Add($(Get-Content .\scripts\main.ps1))
|
||||||
|
|
||||||
|
if ($Debug){
|
||||||
|
Update-Progress "Writing debug files" 95
|
||||||
|
$appXamlContent | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii
|
||||||
|
$tweaksXamlContent | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii
|
||||||
|
$featuresXamlContent | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Update-Progress "Removing temporary files" 99
|
||||||
|
Remove-Item ".\xaml\inputApp.xaml" -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item ".\xaml\inputTweaks.xaml" -ErrorAction SilentlyContinue
|
||||||
|
Remove-Item ".\xaml\inputFeatures.xaml" -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding ascii
|
||||||
|
Write-Progress -Activity "Compiling" -Completed
|
||||||
|
|
||||||
|
if ($run){
|
||||||
|
try {
|
||||||
|
Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -13,14 +13,9 @@
|
|||||||
```
|
```
|
||||||
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
|
||||||
```
|
```
|
||||||
- Windows Insider Builds not installing: Telemetry needs to be enabled
|
|
||||||
```
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
|
||||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0
|
|
||||||
```
|
|
||||||
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
- Winget requires interaction on first run: Manually type 'y' and 'enter' into the PowerShell console to continue
|
||||||
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
|
- (Windows 11) Quick Settings no longer works: Launch the Script and click 'Enable Action Center'
|
||||||
- Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'.
|
|
||||||
- Script doesn't run/PowerShell crashes:
|
- Script doesn't run/PowerShell crashes:
|
||||||
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
|
||||||
2. Run:
|
2. Run:
|
||||||
|
44
README.md
44
README.md
@ -1,6 +1,8 @@
|
|||||||
# Chris Titus Tech's Windows Utility
|
# Chris Titus Tech's Windows Utility
|
||||||
|
|
||||||
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
|
[](https://github.com/ChrisTitusTech/winutil/releases/latest)
|
||||||
|
|
||||||
|
This utility is a compilation of Windows tasks I perform on each Windows system I use. It is meant to streamline *installs*, debloat with *tweaks*, troubleshoot with *config*, and fix Windows *updates*. I am extremely picky about any contributions to keep this project clean and efficient.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -10,7 +12,7 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach
|
|||||||
|
|
||||||
1. **Right-Click Method:**
|
1. **Right-Click Method:**
|
||||||
- Right-click on the start menu.
|
- Right-click on the start menu.
|
||||||
- Choose "PowerShell As Admin" (for Windows 10) or "Windows Terminal As Admin" (for Windows 11).
|
- Choose "Windows PowerShell (Admin)" (for Windows 10) or "Terminal (Admin)" (for Windows 11).
|
||||||
|
|
||||||
2. **Search and Launch Method:**
|
2. **Search and Launch Method:**
|
||||||
- Press the Windows key.
|
- Press the Windows key.
|
||||||
@ -22,25 +24,19 @@ Winutil must be run in Admin mode because it performs system-wide tweaks. To ach
|
|||||||
|
|
||||||
#### Simple way
|
#### Simple way
|
||||||
|
|
||||||
|
```ps1
|
||||||
|
irm "https://christitus.com/win" | iex
|
||||||
```
|
```
|
||||||
irm https://christitus.com/win | iex
|
Courtesy of the issue: [#144](/../../issues/144)
|
||||||
```
|
|
||||||
Courtesy of the issue raised at: [#144](/../../issues/144)
|
|
||||||
|
|
||||||
or by executing:
|
If this site is not reachable from your country, please try running it directly from GitHub.
|
||||||
```
|
```ps1
|
||||||
iwr -useb https://christitus.com/win | iex
|
irm "https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1" | iex
|
||||||
```
|
|
||||||
|
|
||||||
if for some reason this site is not reachable from your country please try running it directly from github
|
|
||||||
|
|
||||||
```
|
|
||||||
irm https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/winutil.ps1 | iex
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Automation
|
#### Automation
|
||||||
|
|
||||||
Some features are avaliable through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
|
||||||
|
|
||||||
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
|
||||||

|

|
||||||
@ -84,15 +80,15 @@ If you are still having issues try changing your DNS provider to 1.1.1.1 || 1.0.
|
|||||||
|
|
||||||
- Install
|
- Install
|
||||||
- Install Selection: Organize programs by category and facilitate installation by enabling users to select programs and initiate the installation process with a single click.
|
- Install Selection: Organize programs by category and facilitate installation by enabling users to select programs and initiate the installation process with a single click.
|
||||||
|
|
||||||
- Upgrade All: Upgrade all existing programs to their latest versions, ensuring users have the most up-to-date and feature-rich software.
|
- Upgrade All: Upgrade all existing programs to their latest versions, ensuring users have the most up-to-date and feature-rich software.
|
||||||
|
|
||||||
- Uninstall Selection: Effortlessly uninstall selected programs, providing users with a streamlined way to remove unwanted software from their system.
|
- Uninstall Selection: Effortlessly uninstall selected programs, providing users with a streamlined way to remove unwanted software from their system.
|
||||||
|
|
||||||
- Get Installed: Retrieve a comprehensive list of installed programs on the system, offering users visibility into the software currently installed on their computer.
|
- Get Installed: Retrieve a comprehensive list of installed programs on the system, offering users visibility into the software currently installed on their computer.
|
||||||
|
|
||||||
- Import / Export: Enable users to import or export the selection list of programs, allowing them to save their preferred program configurations or share them with others. This feature promotes convenience and flexibility in managing program selections across different systems.
|
- Import / Export: Enable users to import or export the selection list of programs, allowing them to save their preferred program configurations or share them with others. This feature promotes convenience and flexibility in managing program selections across different systems.
|
||||||
|
|
||||||
- Tweaks
|
- Tweaks
|
||||||
- Recommended Selection: Provides pre-defined templates tailored for desktop, laptop, and minimal configurations, allowing users to select recommended settings and optimizations specific to their system type.
|
- Recommended Selection: Provides pre-defined templates tailored for desktop, laptop, and minimal configurations, allowing users to select recommended settings and optimizations specific to their system type.
|
||||||
|
|
||||||
@ -114,7 +110,7 @@ If you are still having issues try changing your DNS provider to 1.1.1.1 || 1.0.
|
|||||||
|
|
||||||
- Updates:
|
- Updates:
|
||||||
- Default (Out of Box) Settings: Provides the default settings that come with Windows for updates.
|
- Default (Out of Box) Settings: Provides the default settings that come with Windows for updates.
|
||||||
|
|
||||||
- Security (Recommended) Settings: Offers recommended settings, including a slight delay of feature updates by 2 years and installation of security updates 4 days after release.
|
- Security (Recommended) Settings: Offers recommended settings, including a slight delay of feature updates by 2 years and installation of security updates 4 days after release.
|
||||||
|
|
||||||
- Disable All Updates (Not Recommended!): Allows users to disable all Windows updates, but it's not recommended due to potential security risks.
|
- Disable All Updates (Not Recommended!): Allows users to disable all Windows updates, but it's not recommended due to potential security risks.
|
||||||
@ -128,7 +124,9 @@ If you encounter any challenges or problems with the script, I kindly request th
|
|||||||
|
|
||||||
## Contribute Code
|
## Contribute Code
|
||||||
|
|
||||||
To contribute new code, please ensure that it is submitted to the **TEST BRANCH**. Please note that merges will not be performed directly on the MAIN branch.
|
Pull Requests are now handled directly on the MAIN branch. This was done since we can now select specific releases to launch via releases in GitHub.
|
||||||
|
|
||||||
|
If doing a code change and you can submit a PR to main branch, but I am very selective about these. Do not use a code formatter, massive amounts of line changes, and make multiple feature changes. EACH FEATURE CHANGE SHOULD BE IT'S OWN Pull Request!
|
||||||
|
|
||||||
When creating pull requests, it is essential to thoroughly document all changes made. This includes documenting any additions made to the tweaks section and ensuring that corresponding undo measures are in place to remove the newly added tweaks if necessary. Failure to adhere to this format may result in denial of the pull request. Additionally, comprehensive documentation is required for all code changes. Any code lacking sufficient documentation may also be denied.
|
When creating pull requests, it is essential to thoroughly document all changes made. This includes documenting any additions made to the tweaks section and ensuring that corresponding undo measures are in place to remove the newly added tweaks if necessary. Failure to adhere to this format may result in denial of the pull request. Additionally, comprehensive documentation is required for all code changes. Any code lacking sufficient documentation may also be denied.
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,244 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# This file was created with O&O ShutUp10++ V1.9.1436
|
|
||||||
# and can be imported onto another computer.
|
|
||||||
#
|
|
||||||
# Download the application at https://www.oo-software.com/shutup10
|
|
||||||
# You can then import the file from within the program.
|
|
||||||
#
|
|
||||||
# Alternatively you can import it automatically over a command line.
|
|
||||||
# Simply use the following parameter:
|
|
||||||
# OOSU10.exe <path to file>
|
|
||||||
#
|
|
||||||
# Selecting the Option /quiet ends the app right after the import and the
|
|
||||||
# user does not get any feedback about the import.
|
|
||||||
#
|
|
||||||
# We are always happy to answer any questions you may have!
|
|
||||||
# © 2015-2023 O&O Software GmbH, Berlin. All rights reserved.
|
|
||||||
# https://www.oo-software.com/
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
P001 -
|
|
||||||
P002 -
|
|
||||||
P003 -
|
|
||||||
P004 -
|
|
||||||
P005 -
|
|
||||||
P006 -
|
|
||||||
P008 -
|
|
||||||
P026 -
|
|
||||||
P027 -
|
|
||||||
P028 -
|
|
||||||
P064 -
|
|
||||||
P065 -
|
|
||||||
P066 -
|
|
||||||
P067 -
|
|
||||||
P070 -
|
|
||||||
P069 -
|
|
||||||
P009 -
|
|
||||||
P010 -
|
|
||||||
P015 -
|
|
||||||
P068 -
|
|
||||||
P016 -
|
|
||||||
A001 -
|
|
||||||
A002 -
|
|
||||||
A003 -
|
|
||||||
A004 -
|
|
||||||
A006 -
|
|
||||||
A005 -
|
|
||||||
P007 -
|
|
||||||
P036 -
|
|
||||||
P025 -
|
|
||||||
P033 -
|
|
||||||
P023 -
|
|
||||||
P056 -
|
|
||||||
P057 -
|
|
||||||
P012 -
|
|
||||||
P034 -
|
|
||||||
P013 -
|
|
||||||
P035 -
|
|
||||||
P062 -
|
|
||||||
P063 -
|
|
||||||
P081 -
|
|
||||||
P047 -
|
|
||||||
P019 -
|
|
||||||
P048 -
|
|
||||||
P049 -
|
|
||||||
P020 -
|
|
||||||
P037 -
|
|
||||||
P011 -
|
|
||||||
P038 -
|
|
||||||
P050 -
|
|
||||||
P051 -
|
|
||||||
P018 -
|
|
||||||
P039 -
|
|
||||||
P021 -
|
|
||||||
P040 -
|
|
||||||
P022 -
|
|
||||||
P041 -
|
|
||||||
P014 -
|
|
||||||
P042 -
|
|
||||||
P052 -
|
|
||||||
P053 -
|
|
||||||
P054 -
|
|
||||||
P055 -
|
|
||||||
P029 -
|
|
||||||
P043 -
|
|
||||||
P030 -
|
|
||||||
P044 -
|
|
||||||
P031 -
|
|
||||||
P045 -
|
|
||||||
P032 -
|
|
||||||
P046 -
|
|
||||||
P058 -
|
|
||||||
P059 -
|
|
||||||
P060 -
|
|
||||||
P061 -
|
|
||||||
P071 -
|
|
||||||
P072 -
|
|
||||||
P073 -
|
|
||||||
P074 -
|
|
||||||
P075 -
|
|
||||||
P076 -
|
|
||||||
P077 -
|
|
||||||
P078 -
|
|
||||||
P079 -
|
|
||||||
P080 -
|
|
||||||
P024 -
|
|
||||||
S001 -
|
|
||||||
S002 -
|
|
||||||
S003 -
|
|
||||||
S008 -
|
|
||||||
E101 -
|
|
||||||
E201 -
|
|
||||||
E115 -
|
|
||||||
E215 -
|
|
||||||
E118 -
|
|
||||||
E218 -
|
|
||||||
E107 -
|
|
||||||
E207 -
|
|
||||||
E111 -
|
|
||||||
E211 -
|
|
||||||
E112 -
|
|
||||||
E212 -
|
|
||||||
E109 -
|
|
||||||
E209 -
|
|
||||||
E121 -
|
|
||||||
E221 -
|
|
||||||
E103 -
|
|
||||||
E203 -
|
|
||||||
E123 -
|
|
||||||
E223 -
|
|
||||||
E124 -
|
|
||||||
E224 -
|
|
||||||
E128 -
|
|
||||||
E228 -
|
|
||||||
E119 -
|
|
||||||
E219 -
|
|
||||||
E120 -
|
|
||||||
E220 -
|
|
||||||
E122 -
|
|
||||||
E222 -
|
|
||||||
E125 -
|
|
||||||
E225 -
|
|
||||||
E126 -
|
|
||||||
E226 -
|
|
||||||
E106 -
|
|
||||||
E206 -
|
|
||||||
E127 -
|
|
||||||
E227 -
|
|
||||||
E001 -
|
|
||||||
E002 -
|
|
||||||
E003 -
|
|
||||||
E008 -
|
|
||||||
E007 -
|
|
||||||
E010 -
|
|
||||||
E011 +
|
|
||||||
E012 +
|
|
||||||
E009 -
|
|
||||||
E004 -
|
|
||||||
E005 -
|
|
||||||
E013 -
|
|
||||||
E014 -
|
|
||||||
E006 -
|
|
||||||
F002 -
|
|
||||||
F014 -
|
|
||||||
F015 -
|
|
||||||
F016 -
|
|
||||||
F001 -
|
|
||||||
F003 -
|
|
||||||
F004 -
|
|
||||||
F005 -
|
|
||||||
F007 -
|
|
||||||
F008 -
|
|
||||||
F009 -
|
|
||||||
F006 -
|
|
||||||
F010 -
|
|
||||||
F011 -
|
|
||||||
F012 -
|
|
||||||
F013 -
|
|
||||||
Y001 -
|
|
||||||
Y002 -
|
|
||||||
Y003 -
|
|
||||||
Y004 -
|
|
||||||
Y005 -
|
|
||||||
Y006 -
|
|
||||||
Y007 -
|
|
||||||
C012 -
|
|
||||||
C002 -
|
|
||||||
C013 -
|
|
||||||
C007 -
|
|
||||||
C008 -
|
|
||||||
C009 -
|
|
||||||
C010 -
|
|
||||||
C011 -
|
|
||||||
C014 -
|
|
||||||
C015 -
|
|
||||||
C101 -
|
|
||||||
C201 -
|
|
||||||
C102 -
|
|
||||||
L001 -
|
|
||||||
L003 -
|
|
||||||
L004 -
|
|
||||||
L005 -
|
|
||||||
U001 -
|
|
||||||
U004 -
|
|
||||||
U005 -
|
|
||||||
U006 -
|
|
||||||
U007 -
|
|
||||||
W001 -
|
|
||||||
W011 -
|
|
||||||
W004 -
|
|
||||||
W005 -
|
|
||||||
W010 -
|
|
||||||
W009 -
|
|
||||||
P017 -
|
|
||||||
W006 -
|
|
||||||
W008 -
|
|
||||||
M006 -
|
|
||||||
M011 -
|
|
||||||
M010 -
|
|
||||||
O003 -
|
|
||||||
O001 -
|
|
||||||
S012 -
|
|
||||||
S013 -
|
|
||||||
S014 -
|
|
||||||
K001 -
|
|
||||||
K002 -
|
|
||||||
K005 -
|
|
||||||
M025 -
|
|
||||||
M003 -
|
|
||||||
M015 -
|
|
||||||
M016 -
|
|
||||||
M017 -
|
|
||||||
M018 -
|
|
||||||
M019 -
|
|
||||||
M020 -
|
|
||||||
M021 -
|
|
||||||
M022 -
|
|
||||||
M001 -
|
|
||||||
M004 -
|
|
||||||
M005 -
|
|
||||||
M024 -
|
|
||||||
M012 -
|
|
||||||
M013 -
|
|
||||||
M014 -
|
|
||||||
N001 -
|
|
@ -1,244 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# This file was created with O&O ShutUp10++ V1.9.1436
|
|
||||||
# and can be imported onto another computer.
|
|
||||||
#
|
|
||||||
# Download the application at https://www.oo-software.com/shutup10
|
|
||||||
# You can then import the file from within the program.
|
|
||||||
#
|
|
||||||
# Alternatively you can import it automatically over a command line.
|
|
||||||
# Simply use the following parameter:
|
|
||||||
# OOSU10.exe <path to file>
|
|
||||||
#
|
|
||||||
# Selecting the Option /quiet ends the app right after the import and the
|
|
||||||
# user does not get any feedback about the import.
|
|
||||||
#
|
|
||||||
# We are always happy to answer any questions you may have!
|
|
||||||
# © 2015-2023 O&O Software GmbH, Berlin. All rights reserved.
|
|
||||||
# https://www.oo-software.com/
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
P001 +
|
|
||||||
P002 +
|
|
||||||
P003 +
|
|
||||||
P004 +
|
|
||||||
P005 +
|
|
||||||
P006 +
|
|
||||||
P008 +
|
|
||||||
P026 +
|
|
||||||
P027 +
|
|
||||||
P028 +
|
|
||||||
P064 +
|
|
||||||
P065 +
|
|
||||||
P066 +
|
|
||||||
P067 +
|
|
||||||
P070 +
|
|
||||||
P069 +
|
|
||||||
P009 -
|
|
||||||
P010 -
|
|
||||||
P015 -
|
|
||||||
P068 -
|
|
||||||
P016 -
|
|
||||||
A001 +
|
|
||||||
A002 +
|
|
||||||
A003 +
|
|
||||||
A004 +
|
|
||||||
A006 +
|
|
||||||
A005 +
|
|
||||||
P007 +
|
|
||||||
P036 +
|
|
||||||
P025 +
|
|
||||||
P033 +
|
|
||||||
P023 +
|
|
||||||
P056 -
|
|
||||||
P057 -
|
|
||||||
P012 -
|
|
||||||
P034 -
|
|
||||||
P013 -
|
|
||||||
P035 -
|
|
||||||
P062 -
|
|
||||||
P063 -
|
|
||||||
P081 -
|
|
||||||
P047 -
|
|
||||||
P019 -
|
|
||||||
P048 -
|
|
||||||
P049 -
|
|
||||||
P020 -
|
|
||||||
P037 -
|
|
||||||
P011 -
|
|
||||||
P038 -
|
|
||||||
P050 -
|
|
||||||
P051 -
|
|
||||||
P018 -
|
|
||||||
P039 -
|
|
||||||
P021 -
|
|
||||||
P040 -
|
|
||||||
P022 -
|
|
||||||
P041 -
|
|
||||||
P014 -
|
|
||||||
P042 -
|
|
||||||
P052 -
|
|
||||||
P053 -
|
|
||||||
P054 -
|
|
||||||
P055 -
|
|
||||||
P029 -
|
|
||||||
P043 -
|
|
||||||
P030 -
|
|
||||||
P044 -
|
|
||||||
P031 -
|
|
||||||
P045 -
|
|
||||||
P032 -
|
|
||||||
P046 -
|
|
||||||
P058 -
|
|
||||||
P059 -
|
|
||||||
P060 -
|
|
||||||
P061 -
|
|
||||||
P071 -
|
|
||||||
P072 -
|
|
||||||
P073 -
|
|
||||||
P074 -
|
|
||||||
P075 -
|
|
||||||
P076 -
|
|
||||||
P077 -
|
|
||||||
P078 -
|
|
||||||
P079 -
|
|
||||||
P080 -
|
|
||||||
P024 -
|
|
||||||
S001 +
|
|
||||||
S002 +
|
|
||||||
S003 +
|
|
||||||
S008 -
|
|
||||||
E101 +
|
|
||||||
E201 +
|
|
||||||
E115 +
|
|
||||||
E215 +
|
|
||||||
E118 +
|
|
||||||
E218 +
|
|
||||||
E107 +
|
|
||||||
E207 +
|
|
||||||
E111 +
|
|
||||||
E211 +
|
|
||||||
E112 +
|
|
||||||
E212 +
|
|
||||||
E109 +
|
|
||||||
E209 +
|
|
||||||
E121 +
|
|
||||||
E221 +
|
|
||||||
E103 +
|
|
||||||
E203 +
|
|
||||||
E123 +
|
|
||||||
E223 +
|
|
||||||
E124 +
|
|
||||||
E224 +
|
|
||||||
E128 +
|
|
||||||
E228 +
|
|
||||||
E119 -
|
|
||||||
E219 -
|
|
||||||
E120 -
|
|
||||||
E220 -
|
|
||||||
E122 -
|
|
||||||
E222 -
|
|
||||||
E125 -
|
|
||||||
E225 -
|
|
||||||
E126 -
|
|
||||||
E226 -
|
|
||||||
E106 -
|
|
||||||
E206 -
|
|
||||||
E127 -
|
|
||||||
E227 -
|
|
||||||
E001 +
|
|
||||||
E002 +
|
|
||||||
E003 +
|
|
||||||
E008 +
|
|
||||||
E007 +
|
|
||||||
E010 +
|
|
||||||
E011 +
|
|
||||||
E012 +
|
|
||||||
E009 -
|
|
||||||
E004 -
|
|
||||||
E005 -
|
|
||||||
E013 -
|
|
||||||
E014 -
|
|
||||||
E006 -
|
|
||||||
F002 +
|
|
||||||
F014 +
|
|
||||||
F015 +
|
|
||||||
F016 +
|
|
||||||
F001 +
|
|
||||||
F003 +
|
|
||||||
F004 +
|
|
||||||
F005 +
|
|
||||||
F007 +
|
|
||||||
F008 +
|
|
||||||
F009 +
|
|
||||||
F006 -
|
|
||||||
F010 -
|
|
||||||
F011 -
|
|
||||||
F012 -
|
|
||||||
F013 -
|
|
||||||
Y001 +
|
|
||||||
Y002 +
|
|
||||||
Y003 +
|
|
||||||
Y004 +
|
|
||||||
Y005 +
|
|
||||||
Y006 +
|
|
||||||
Y007 +
|
|
||||||
C012 +
|
|
||||||
C002 +
|
|
||||||
C013 +
|
|
||||||
C007 +
|
|
||||||
C008 +
|
|
||||||
C009 +
|
|
||||||
C010 +
|
|
||||||
C011 +
|
|
||||||
C014 +
|
|
||||||
C015 +
|
|
||||||
C101 +
|
|
||||||
C201 +
|
|
||||||
C102 +
|
|
||||||
L001 +
|
|
||||||
L003 +
|
|
||||||
L004 -
|
|
||||||
L005 -
|
|
||||||
U001 +
|
|
||||||
U004 +
|
|
||||||
U005 +
|
|
||||||
U006 +
|
|
||||||
U007 +
|
|
||||||
W001 +
|
|
||||||
W011 +
|
|
||||||
W004 -
|
|
||||||
W005 -
|
|
||||||
W010 -
|
|
||||||
W009 -
|
|
||||||
P017 -
|
|
||||||
W006 -
|
|
||||||
W008 -
|
|
||||||
M006 +
|
|
||||||
M011 -
|
|
||||||
M010 -
|
|
||||||
O003 -
|
|
||||||
O001 -
|
|
||||||
S012 -
|
|
||||||
S013 -
|
|
||||||
S014 -
|
|
||||||
K001 +
|
|
||||||
K002 +
|
|
||||||
K005 +
|
|
||||||
M025 +
|
|
||||||
M003 -
|
|
||||||
M015 -
|
|
||||||
M016 -
|
|
||||||
M017 -
|
|
||||||
M018 -
|
|
||||||
M019 -
|
|
||||||
M020 -
|
|
||||||
M021 -
|
|
||||||
M022 +
|
|
||||||
M001 +
|
|
||||||
M004 +
|
|
||||||
M005 +
|
|
||||||
M024 +
|
|
||||||
M012 -
|
|
||||||
M013 -
|
|
||||||
M014 -
|
|
||||||
N001 -
|
|
@ -1,31 +1,24 @@
|
|||||||
{
|
{
|
||||||
"desktop": [
|
"Standard": [
|
||||||
"WPFTweaksAH",
|
"WPFTweaksAH",
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksDVR",
|
"WPFTweaksDVR",
|
||||||
"WPFTweaksHiber",
|
"WPFTweaksHiber",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksLoc",
|
"WPFTweaksLoc",
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
|
||||||
"WPFTweaksStorage",
|
|
||||||
"WPFTweaksTele",
|
|
||||||
"WPFTweaksWifi"
|
|
||||||
],
|
|
||||||
"laptop": [
|
|
||||||
"WPFTweaksAH",
|
|
||||||
"WPFTweaksDVR",
|
|
||||||
"WPFTweaksHome",
|
|
||||||
"WPFTweaksLoc",
|
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksStorage",
|
"WPFTweaksStorage",
|
||||||
"WPFTweaksTele",
|
"WPFTweaksTele",
|
||||||
"WPFTweaksWifi",
|
"WPFTweaksWifi",
|
||||||
"WPFMiscTweaksLapPower"
|
"WPFTweaksDiskCleanup",
|
||||||
|
"WPFTweaksDeleteTempFiles",
|
||||||
|
"WPFTweaksEndTaskOnTaskbar",
|
||||||
|
"WPFTweaksRestorePoint",
|
||||||
|
"WPFTweaksTeredo"
|
||||||
],
|
],
|
||||||
"minimal": [
|
"Minimal": [
|
||||||
|
"WPFTweaksConsumerFeatures",
|
||||||
"WPFTweaksHome",
|
"WPFTweaksHome",
|
||||||
"WPFTweaksOO",
|
|
||||||
"WPFTweaksServices",
|
"WPFTweaksServices",
|
||||||
"WPFTweaksTele"
|
"WPFTweaksTele"
|
||||||
]
|
]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"MainBackgroundColor": "#FFFFFF",
|
"MainBackgroundColor": "#FFFFFF",
|
||||||
"LabelBackgroundColor": "#FAFAFA",
|
"LabelBackgroundColor": "#FAFAFA",
|
||||||
"LinkForegroundColor": "#000000",
|
"LinkForegroundColor": "#000000",
|
||||||
"LinkHoverForegroundColor": "#000000",
|
"LinkHoverForegroundColor": "#000000",
|
||||||
"GroupBorderBackgroundColor": "#000000",
|
"GroupBorderBackgroundColor": "#000000",
|
||||||
"ComboBoxForegroundColor": "#000000",
|
"ComboBoxForegroundColor": "#000000",
|
||||||
"ButtonInstallBackgroundColor": "#FFFFFF",
|
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||||
@ -23,6 +23,7 @@
|
|||||||
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
"ButtonBackgroundMouseoverColor": "#C2C2C2",
|
||||||
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||||
"ButtonForegroundColor": "#000000",
|
"ButtonForegroundColor": "#000000",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
"ButtonBorderThickness": "1",
|
"ButtonBorderThickness": "1",
|
||||||
"ButtonMargin": "1",
|
"ButtonMargin": "1",
|
||||||
"ButtonCornerRadius": "2",
|
"ButtonCornerRadius": "2",
|
||||||
@ -30,7 +31,7 @@
|
|||||||
"BorderColor": "#000000",
|
"BorderColor": "#000000",
|
||||||
"BorderOpacity": "0.2",
|
"BorderOpacity": "0.2",
|
||||||
"ShadowPulse": "Forever"
|
"ShadowPulse": "Forever"
|
||||||
},
|
},
|
||||||
"Matrix": {
|
"Matrix": {
|
||||||
"ComboBoxBackgroundColor": "#000000",
|
"ComboBoxBackgroundColor": "#000000",
|
||||||
"LabelboxForegroundColor": "#FFEE58",
|
"LabelboxForegroundColor": "#FFEE58",
|
||||||
@ -53,6 +54,7 @@
|
|||||||
"ButtonBackgroundMouseoverColor": "#A55A64",
|
"ButtonBackgroundMouseoverColor": "#A55A64",
|
||||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
"ButtonForegroundColor": "#9CCC65",
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
"ButtonBorderThickness": "1",
|
"ButtonBorderThickness": "1",
|
||||||
"ButtonMargin": "1",
|
"ButtonMargin": "1",
|
||||||
"ButtonCornerRadius": "2",
|
"ButtonCornerRadius": "2",
|
||||||
@ -83,6 +85,7 @@
|
|||||||
"ButtonBackgroundMouseoverColor": "#FF5733",
|
"ButtonBackgroundMouseoverColor": "#FF5733",
|
||||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||||
"ButtonForegroundColor": "#9CCC65",
|
"ButtonForegroundColor": "#9CCC65",
|
||||||
|
"ToggleButtonOnColor": "#2e77ff",
|
||||||
"ButtonBorderThickness": "1",
|
"ButtonBorderThickness": "1",
|
||||||
"ButtonMargin": "1",
|
"ButtonMargin": "1",
|
||||||
"ButtonCornerRadius": "2",
|
"ButtonCornerRadius": "2",
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.",
|
"Description": "Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a011_",
|
"Order": "a005_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
|
"Path": "HKLM:\\System\\CurrentControlSet\\Control\\Session Manager\\Power",
|
||||||
@ -58,12 +58,59 @@
|
|||||||
"powercfg.exe /hibernate on"
|
"powercfg.exe /hibernate on"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"WPFTweaksLaptopHibernation": {
|
||||||
|
"Content": "Set Hibernation as default (good for laptops)",
|
||||||
|
"Description": "Most modern laptops have connected stadby enabled which drains the battery, this sets hibernation as default which will not drain the battery. See issue https://github.com/ChrisTitusTech/winutil/issues/1399",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a014_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0",
|
||||||
|
"OriginalValue": "1",
|
||||||
|
"Name": "Attributes",
|
||||||
|
"Value": "2",
|
||||||
|
"Type": "DWord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Power\\PowerSettings\\abfc2519-3608-4c2a-94ea-171b0ed546ab\\94ac6d29-73ce-41a6-809f-6363ba21b47e",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Name": "Attributes ",
|
||||||
|
"Value": "2",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
Write-Host \"Turn on Hibernation\"
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/hibernate on\" -NoNewWindow -Wait
|
||||||
|
|
||||||
|
# Set hibernation as the default action
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 60\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 60\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 10\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 1\" -NoNewWindow -Wait
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
Write-Host \"Turn off Hibernation\"
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/hibernate off\" -NoNewWindow -Wait
|
||||||
|
|
||||||
|
# Set standby to detault values
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-ac 15\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change standby-timeout-dc 15\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-ac 15\" -NoNewWindow -Wait
|
||||||
|
Start-Process -FilePath powercfg -ArgumentList \"/change monitor-timeout-dc 15\" -NoNewWindow -Wait
|
||||||
|
"
|
||||||
|
]
|
||||||
|
},
|
||||||
"WPFTweaksHome": {
|
"WPFTweaksHome": {
|
||||||
"Content": "Disable Homegroup",
|
"Content": "Disable Homegroup",
|
||||||
"Description": "Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network.",
|
"Description": "Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a009_",
|
"Order": "a005_",
|
||||||
"service": [
|
"service": [
|
||||||
{
|
{
|
||||||
"Name": "HomeGroupListener",
|
"Name": "HomeGroupListener",
|
||||||
@ -82,7 +129,7 @@
|
|||||||
"Description": "Disables Location Tracking...DUH!",
|
"Description": "Disables Location Tracking...DUH!",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a008_",
|
"Order": "a005_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location",
|
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location",
|
||||||
@ -1176,11 +1223,6 @@
|
|||||||
"StartupType": "Automatic",
|
"StartupType": "Automatic",
|
||||||
"OriginalType": "Automatic"
|
"OriginalType": "Automatic"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Name": "WwanSvc",
|
|
||||||
"StartupType": "Manual",
|
|
||||||
"OriginalType": "Manual"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "XblAuthManager",
|
"Name": "XblAuthManager",
|
||||||
"StartupType": "Manual",
|
"StartupType": "Manual",
|
||||||
@ -1538,6 +1580,22 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"WPFTweaksConsumerFeatures":{
|
||||||
|
"Content": "Disable ConsumerFeatures",
|
||||||
|
"Description": "Windows 10 will not automatically install any games, third-party apps, or application links from the Windows Store for the signed-in user. Some default Apps will be inaccessible (eg. Phone Link)",
|
||||||
|
"category": "Essential Tweaks",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a003_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
||||||
|
"OriginalValue": "0",
|
||||||
|
"Name": "DisableWindowsConsumerFeatures",
|
||||||
|
"Value": "1",
|
||||||
|
"Type": "DWord"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"WPFTweaksTele": {
|
"WPFTweaksTele": {
|
||||||
"Content": "Disable Telemetry",
|
"Content": "Disable Telemetry",
|
||||||
"Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.",
|
"Description": "Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser.",
|
||||||
@ -1696,13 +1754,6 @@
|
|||||||
"Value": "0",
|
"Value": "0",
|
||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\CloudContent",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"Name": "DisableWindowsConsumerFeatures",
|
|
||||||
"Value": "1",
|
|
||||||
"Type": "DWord"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
"Path": "HKCU:\\SOFTWARE\\Microsoft\\Siuf\\Rules",
|
||||||
"OriginalValue": "0",
|
"OriginalValue": "0",
|
||||||
@ -1872,27 +1923,6 @@
|
|||||||
"Value": "1",
|
"Value": "1",
|
||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
|
||||||
"OriginalValue": "1",
|
|
||||||
"Name": "GPU Priority",
|
|
||||||
"Value": "8",
|
|
||||||
"Type": "DWord"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
|
||||||
"OriginalValue": "1",
|
|
||||||
"Name": "Priority",
|
|
||||||
"Value": "6",
|
|
||||||
"Type": "DWord"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Path": "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Multimedia\\SystemProfile\\Tasks\\Games",
|
|
||||||
"OriginalValue": "High",
|
|
||||||
"Name": "Scheduling Category",
|
|
||||||
"Value": "High",
|
|
||||||
"Type": "String"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement",
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\UserProfileEngagement",
|
||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
@ -1942,7 +1972,7 @@
|
|||||||
"Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.",
|
"Description": "Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a004_",
|
"Order": "a005_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting",
|
"Path": "HKLM:\\Software\\Microsoft\\PolicyManager\\default\\WiFi\\AllowWiFiHotSpotReporting",
|
||||||
@ -1965,7 +1995,7 @@
|
|||||||
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.",
|
"Description": "Essential for computers that are dual booting. Fixes the time sync with Linux Systems.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a022_",
|
"Order": "a027_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
|
||||||
@ -1981,7 +2011,7 @@
|
|||||||
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
|
"Description": "Sets the system preferences to performance. You can do this manually with sysdm.cpl as well.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a021_",
|
"Order": "a027_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\Control Panel\\Desktop",
|
"Path": "HKCU:\\Control Panel\\Desktop",
|
||||||
@ -2087,7 +2117,7 @@
|
|||||||
"Description": "USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!",
|
"Description": "USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a025_",
|
"Order": "a028_",
|
||||||
"appx": [
|
"appx": [
|
||||||
"Microsoft.Microsoft3DViewer",
|
"Microsoft.Microsoft3DViewer",
|
||||||
"Microsoft.AppConnector",
|
"Microsoft.AppConnector",
|
||||||
@ -2206,7 +2236,7 @@
|
|||||||
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications",
|
"Description": "Creates a restore point at runtime in case a revert is needed from WinUtil modifications",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Checked": "True",
|
"Checked": "False",
|
||||||
"Order": "a001_",
|
"Order": "a001_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
@ -2215,7 +2245,7 @@
|
|||||||
Write-Host \"Please run this script as an administrator.\"
|
Write-Host \"Please run this script as an administrator.\"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if System Restore is enabled for the main drive
|
# Check if System Restore is enabled for the main drive
|
||||||
try {
|
try {
|
||||||
# Try getting restore points to check if System Restore is enabled
|
# Try getting restore points to check if System Restore is enabled
|
||||||
@ -2223,14 +2253,14 @@
|
|||||||
} catch {
|
} catch {
|
||||||
Write-Host \"An error occurred while enabling System Restore: $_\"
|
Write-Host \"An error occurred while enabling System Restore: $_\"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if the SystemRestorePointCreationFrequency value exists
|
# Check if the SystemRestorePointCreationFrequency value exists
|
||||||
$exists = Get-ItemProperty -path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -ErrorAction SilentlyContinue
|
$exists = Get-ItemProperty -path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -ErrorAction SilentlyContinue
|
||||||
if($null -eq $exists){
|
if($null -eq $exists){
|
||||||
write-host 'Changing system to allow multiple restore points per day'
|
write-host 'Changing system to allow multiple restore points per day'
|
||||||
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -Value \"0\" -Type DWord -Force -ErrorAction Stop | Out-Null
|
Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\" -Name \"SystemRestorePointCreationFrequency\" -Value \"0\" -Type DWord -Force -ErrorAction Stop | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Attempt to load the required module for Get-ComputerRestorePoint
|
# Attempt to load the required module for Get-ComputerRestorePoint
|
||||||
try {
|
try {
|
||||||
Import-Module Microsoft.PowerShell.Management -ErrorAction Stop
|
Import-Module Microsoft.PowerShell.Management -ErrorAction Stop
|
||||||
@ -2238,7 +2268,7 @@
|
|||||||
Write-Host \"Failed to load the Microsoft.PowerShell.Management module: $_\"
|
Write-Host \"Failed to load the Microsoft.PowerShell.Management module: $_\"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get all the restore points for the current day
|
# Get all the restore points for the current day
|
||||||
try {
|
try {
|
||||||
$existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date }
|
$existingRestorePoints = Get-ComputerRestorePoint | Where-Object { $_.CreationTime.Date -eq (Get-Date).Date }
|
||||||
@ -2246,11 +2276,11 @@
|
|||||||
Write-Host \"Failed to retrieve restore points: $_\"
|
Write-Host \"Failed to retrieve restore points: $_\"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if there is already a restore point created today
|
# Check if there is already a restore point created today
|
||||||
if ($existingRestorePoints.Count -eq 0) {
|
if ($existingRestorePoints.Count -eq 0) {
|
||||||
$description = \"System Restore Point created by WinUtil\"
|
$description = \"System Restore Point created by WinUtil\"
|
||||||
|
|
||||||
Checkpoint-Computer -Description $description -RestorePointType \"MODIFY_SETTINGS\"
|
Checkpoint-Computer -Description $description -RestorePointType \"MODIFY_SETTINGS\"
|
||||||
Write-Host -ForegroundColor Green \"System Restore Point Created Successfully\"
|
Write-Host -ForegroundColor Green \"System Restore Point Created Successfully\"
|
||||||
}
|
}
|
||||||
@ -2262,7 +2292,7 @@
|
|||||||
"Description": "Enables option to end task when right clicking a program in the taskbar",
|
"Description": "Enables option to end task when right clicking a program in the taskbar",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a002_",
|
"Order": "a006_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\"
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\TaskbarDeveloperSettings\" -Name \"TaskbarEndTask\" -Type \"DWord\" -Value \"1\"
|
||||||
@ -2274,18 +2304,17 @@
|
|||||||
"
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksOO": {
|
"WPFTweaksPowershell7": {
|
||||||
"Content": "Run OO Shutup",
|
"Content": "Replace Default Powershell 5 to Powershell 7",
|
||||||
"Description": "Runs OO Shutup and applies the recommended Tweaks. https://www.oo-software.com/en/shutup10",
|
"Description": "This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a002_",
|
"Order": "a009_",
|
||||||
"ToolTip": "Runs OO Shutup and applies the recommended Tweaks https://www.oo-software.com/en/shutup10",
|
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Invoke-WPFOOSU -action \"recommended\""
|
"Invoke-WPFTweakPS7 -action \"PS7\""
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"Invoke-WPFOOSU -action \"undo\""
|
"Invoke-WPFTweakPS7 -action \"PS5\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksStorage": {
|
"WPFTweaksStorage": {
|
||||||
@ -2293,7 +2322,7 @@
|
|||||||
"Description": "Storage Sense deletes temp files automatically.",
|
"Description": "Storage Sense deletes temp files automatically.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a010_",
|
"Order": "a005_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 0 -Type Dword -Force"
|
"Set-ItemProperty -Path \"HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\StorageSense\\Parameters\\StoragePolicy\" -Name \"01\" -Value 0 -Type Dword -Force"
|
||||||
],
|
],
|
||||||
@ -2303,17 +2332,15 @@
|
|||||||
},
|
},
|
||||||
"WPFTweaksRemoveEdge": {
|
"WPFTweaksRemoveEdge": {
|
||||||
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
"Content": "Remove Microsoft Edge - NOT RECOMMENDED",
|
||||||
"Description": "Removes MS Edge when it gets reinstalled by updates.",
|
"Description": "Removes MS Edge when it gets reinstalled by updates. Credit: AveYo",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a026_",
|
"Order": "a029_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
#:: Standalone script by AveYo Source: https://raw.githubusercontent.com/AveYo/fox/main/Edge_Removal.bat
|
||||||
|
Invoke-WebRequest -Uri \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -OutFile \"$ENV:TEMP\\edgeremoval.bat\"
|
||||||
curl.exe -s \"https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/edgeremoval.bat\" -o $ENV:temp\\edgeremoval.bat
|
|
||||||
Start-Process $ENV:temp\\edgeremoval.bat
|
Start-Process $ENV:temp\\edgeremoval.bat
|
||||||
|
|
||||||
"
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
@ -2323,81 +2350,194 @@
|
|||||||
"
|
"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksRemoveOnedrive": {
|
"WPFTweaksRemoveCopilot": {
|
||||||
"Content": "Remove OneDrive",
|
"Content": "Disable Microsoft Copilot",
|
||||||
"Description": "Copies OneDrive files to Default Home Folders and Uninstalls it.",
|
"Description": "Disables MS Copilot AI built into Windows since 23H2.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a027_",
|
"Order": "a025_",
|
||||||
|
"registry": [
|
||||||
|
{
|
||||||
|
|
||||||
|
"Path": "HKLM:\\SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsCopilot",
|
||||||
|
"Name": "TurnOffWindowsCopilot",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\WindowsCopilot",
|
||||||
|
"Name": "TurnOffWindowsCopilot",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "1",
|
||||||
|
"OriginalValue": "0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Path": "HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
|
||||||
|
"Name": "ShowCopilotButton",
|
||||||
|
"Type": "DWord",
|
||||||
|
"Value": "0",
|
||||||
|
"OriginalValue": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
Write-Host \"Remove Copilot\"
|
||||||
|
dism /online /remove-package /package-name:Microsoft.Windows.Copilot
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
Write-Host \"Install Copilot\"
|
||||||
|
dism /online /add-package /package-name:Microsoft.Windows.Copilot
|
||||||
|
"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"WPFTweaksDisableLMS1": {
|
||||||
|
"Content": "Disable Intel MM (vPro LMS)",
|
||||||
|
"Description": "Intel LMS service is always listening on all ports and could be a huge security risk. There is no need to run LMS on home machines and even in the Enterprise there are better solutions.",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a026_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
|
Write-Host \"Kill LMS\"
|
||||||
|
$serviceName = \"LMS\"
|
||||||
|
Write-Host \"Stopping and disabling service: $serviceName\"
|
||||||
|
Stop-Service -Name $serviceName -Force -ErrorAction SilentlyContinue;
|
||||||
|
Set-Service -Name $serviceName -StartupType Disabled -ErrorAction SilentlyContinue;
|
||||||
|
|
||||||
Write-Host \"Kill OneDrive process\"
|
Write-Host \"Removing service: $serviceName\";
|
||||||
taskkill.exe /F /IM \"OneDrive.exe\"
|
sc.exe delete $serviceName;
|
||||||
taskkill.exe /F /IM \"explorer.exe\"
|
|
||||||
|
|
||||||
Write-Host \"Copy all OneDrive to Root UserProfile\"
|
Write-Host \"Removing LMS driver packages\";
|
||||||
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($env:USERPROFILE.TrimEnd())\\OneDrive' '$($env:USERPROFILE.TrimEnd())\\' /e /xj\" -NoNewWindow -Wait
|
$lmsDriverPackages = Get-ChildItem -Path \"C:\\Windows\\System32\\DriverStore\\FileRepository\" -Recurse -Filter \"lms.inf*\";
|
||||||
|
foreach ($package in $lmsDriverPackages) {
|
||||||
Write-Host \"Remove OneDrive\"
|
Write-Host \"Removing driver package: $($package.Name)\";
|
||||||
Start-Process -FilePath winget -ArgumentList \"uninstall -e --purge --force --silent Microsoft.OneDrive \" -NoNewWindow -Wait
|
pnputil /delete-driver $($package.Name) /uninstall /force;
|
||||||
|
}
|
||||||
Write-Host \"Removing OneDrive leftovers\"
|
if ($lmsDriverPackages.Count -eq 0) {
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
Write-Host \"No LMS driver packages found in the driver store.\";
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\"
|
} else {
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\"
|
Write-Host \"All found LMS driver packages have been removed.\";
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\"
|
|
||||||
# check if directory is empty before removing:
|
|
||||||
If ((Get-ChildItem \"$env:userprofile\\OneDrive\" -Recurse | Measure-Object).Count -eq 0) {
|
|
||||||
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:userprofile\\OneDrive\"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host \"Remove Onedrive from explorer sidebar\"
|
Write-Host \"Searching and deleting LMS executable files\";
|
||||||
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
$programFilesDirs = @(\"C:\\Program Files\", \"C:\\Program Files (x86)\");
|
||||||
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
$lmsFiles = @();
|
||||||
|
foreach ($dir in $programFilesDirs) {
|
||||||
|
$lmsFiles += Get-ChildItem -Path $dir -Recurse -Filter \"LMS.exe\" -ErrorAction SilentlyContinue;
|
||||||
|
}
|
||||||
|
foreach ($file in $lmsFiles) {
|
||||||
|
Write-Host \"Taking ownership of file: $($file.FullName)\";
|
||||||
|
& icacls $($file.FullName) /grant Administrators:F /T /C /Q;
|
||||||
|
& takeown /F $($file.FullName) /A /R /D Y;
|
||||||
|
Write-Host \"Deleting file: $($file.FullName)\";
|
||||||
|
Remove-Item $($file.FullName) -Force -ErrorAction SilentlyContinue;
|
||||||
|
}
|
||||||
|
if ($lmsFiles.Count -eq 0) {
|
||||||
|
Write-Host \"No LMS.exe files found in Program Files directories.\";
|
||||||
|
} else {
|
||||||
|
Write-Host \"All found LMS.exe files have been deleted.\";
|
||||||
|
}
|
||||||
|
Write-Host 'Intel LMS vPro service has been disabled, removed, and blocked.';
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
Write-Host \"LMS vPro needs to be redownloaded from intel.com\"
|
||||||
|
|
||||||
Write-Host \"Removing run hook for new users\"
|
"
|
||||||
reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\"
|
]
|
||||||
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
},
|
||||||
reg unload \"hku\\Default\"
|
"WPFTweaksRemoveOnedrive": {
|
||||||
|
"Content": "Remove OneDrive",
|
||||||
|
"Description": "Moves OneDrive files to Default Home Folders and Uninstalls it.",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a030_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
$OneDrivePath = $($env:OneDrive)
|
||||||
|
Write-Host \"Removing OneDrive\"
|
||||||
|
$regPath = \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OneDriveSetup.exe\"
|
||||||
|
if (Test-Path $regPath){
|
||||||
|
$OneDriveUninstallString = Get-ItemPropertyValue \"$regPath\" -Name \"UninstallString\"
|
||||||
|
$OneDriveExe, $OneDriveArgs = $OneDriveUninstallString.Split(\" \")
|
||||||
|
Start-Process -FilePath $OneDriveExe -ArgumentList \"$OneDriveArgs /silent\" -NoNewWindow -Wait
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Host \"Onedrive dosn't seem to be installed anymore\" -ForegroundColor Red
|
||||||
|
return
|
||||||
|
}
|
||||||
|
# Check if OneDrive got Uninstalled
|
||||||
|
if (-not (Test-Path $regPath)){
|
||||||
|
Write-Host \"Copy downloaded Files from the OneDrive Folder to Root UserProfile\"
|
||||||
|
Start-Process -FilePath powershell -ArgumentList \"robocopy '$($OneDrivePath)' '$($env:USERPROFILE.TrimEnd())\\' /mov /e /xj\" -NoNewWindow -Wait
|
||||||
|
|
||||||
Write-Host \"Removing startmenu entry\"
|
Write-Host \"Removing OneDrive leftovers\"
|
||||||
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\Microsoft\\OneDrive\"
|
||||||
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:localappdata\\OneDrive\"
|
||||||
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:programdata\\Microsoft OneDrive\"
|
||||||
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$env:systemdrive\\OneDriveTemp\"
|
||||||
|
reg delete \"HKEY_CURRENT_USER\\Software\\Microsoft\\OneDrive\" -f
|
||||||
|
# check if directory is empty before removing:
|
||||||
|
If ((Get-ChildItem \"$OneDrivePath\" -Recurse | Measure-Object).Count -eq 0) {
|
||||||
|
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue \"$OneDrivePath\"
|
||||||
|
}
|
||||||
|
|
||||||
Write-Host \"Removing scheduled task\"
|
Write-Host \"Remove Onedrive from explorer sidebar\"
|
||||||
Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
|
Set-ItemProperty -Path \"HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||||
|
Set-ItemProperty -Path \"HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\" -Name \"System.IsPinnedToNameSpaceTree\" -Value 0
|
||||||
|
|
||||||
# Add Shell folders restoring default locations
|
Write-Host \"Removing run hook for new users\"
|
||||||
Write-Host \"Shell Fixing\"
|
reg load \"hku\\Default\" \"C:\\Users\\Default\\NTUSER.DAT\"
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString
|
reg delete \"HKEY_USERS\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"OneDriveSetup\" /f
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString
|
reg unload \"hku\\Default\"
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
|
||||||
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
|
||||||
Write-Host \"Restarting explorer\"
|
|
||||||
Start-Process \"explorer.exe\"
|
|
||||||
|
|
||||||
Write-Host \"Waiting for explorer to complete loading\"
|
Write-Host \"Removing startmenu entry\"
|
||||||
Write-Host \"Please Note - OneDrive folder may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
Remove-Item -Force -ErrorAction SilentlyContinue \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\OneDrive.lnk\"
|
||||||
Start-Sleep 5
|
|
||||||
"
|
Write-Host \"Removing scheduled task\"
|
||||||
|
Get-ScheduledTask -TaskPath '\\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
|
||||||
|
|
||||||
|
# Add Shell folders restoring default locations
|
||||||
|
Write-Host \"Shell Fixing\"
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"AppData\" -Value \"$env:userprofile\\AppData\\Roaming\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cache\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCache\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Cookies\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\INetCookies\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Favorites\" -Value \"$env:userprofile\\Favorites\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"History\" -Value \"$env:userprofile\\AppData\\Local\\Microsoft\\Windows\\History\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Local AppData\" -Value \"$env:userprofile\\AppData\\Local\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Music\" -Value \"$env:userprofile\\Music\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Video\" -Value \"$env:userprofile\\Videos\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"NetHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Network Shortcuts\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"PrintHood\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Printer Shortcuts\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Programs\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Recent\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Recent\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"SendTo\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\SendTo\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Start Menu\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Startup\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Templates\" -Value \"$env:userprofile\\AppData\\Roaming\\Microsoft\\Windows\\Templates\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{374DE290-123F-4565-9164-39C4925E467B}\" -Value \"$env:userprofile\\Downloads\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Desktop\" -Value \"$env:userprofile\\Desktop\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"My Pictures\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"Personal\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{F42EE2D3-909F-4907-8871-4C22FC0BF756}\" -Value \"$env:userprofile\\Documents\" -Type ExpandString
|
||||||
|
Set-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\" -Name \"{0DDD015D-B06C-45D5-8C4C-F59713854639}\" -Value \"$env:userprofile\\Pictures\" -Type ExpandString
|
||||||
|
Write-Host \"Restarting explorer\"
|
||||||
|
taskkill.exe /F /IM \"explorer.exe\"
|
||||||
|
Start-Process \"explorer.exe\"
|
||||||
|
|
||||||
|
Write-Host \"Waiting for explorer to complete loading\"
|
||||||
|
Write-Host \"Please Note - The OneDrive folder at $OneDrivePath may still have items in it. You must manually delete it, but all the files should already be copied to the base user folder.\"
|
||||||
|
Write-Host \"If there are Files missing afterwards, please Login to Onedrive.com and Download them manually\" -ForegroundColor Yellow
|
||||||
|
Start-Sleep 5
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Host \"Something went Wrong during the Unistallation of OneDrive\" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
"
|
||||||
],
|
],
|
||||||
"UndoScript": [
|
"UndoScript": [
|
||||||
"
|
"
|
||||||
@ -2411,7 +2551,7 @@
|
|||||||
"Description": "Disables all Notifications INCLUDING Calendar",
|
"Description": "Disables all Notifications INCLUDING Calendar",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a024_",
|
"Order": "a026_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
"Path": "HKCU:\\Software\\Policies\\Microsoft\\Windows\\Explorer",
|
||||||
@ -2429,12 +2569,273 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"WPFTweaksDebloatAdobe": {
|
||||||
|
"Content": "Adobe Debloat",
|
||||||
|
"Description": "Manages Adobe Services, Adobe Desktop Service, and Acrobat Updates",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a021_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
function CCStopper {
|
||||||
|
$path = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||||
|
|
||||||
|
# Test if the path exists before proceeding
|
||||||
|
if (Test-Path $path) {
|
||||||
|
Takeown /f $path
|
||||||
|
$acl = Get-Acl $path
|
||||||
|
$acl.SetOwner([System.Security.Principal.NTAccount]\"Administrators\")
|
||||||
|
$acl | Set-Acl $path
|
||||||
|
|
||||||
|
Rename-Item -Path $path -NewName \"Adobe Desktop Service.exe.old\" -Force
|
||||||
|
} else {
|
||||||
|
Write-Host \"Adobe Desktop Service is not in the default location.\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function AcrobatUpdates {
|
||||||
|
# Editing Acrobat Updates. The last folder before the key is dynamic, therefore using a script.
|
||||||
|
# Possible Values for the edited key:
|
||||||
|
# 0 = Do not download or install updates automatically
|
||||||
|
# 2 = Automatically download updates but let the user choose when to install them
|
||||||
|
# 3 = Automatically download and install updates (default value)
|
||||||
|
# 4 = Notify the user when an update is available but don't download or install it automatically
|
||||||
|
# = It notifies the user using Windows Notifications. It runs on startup without having to have a Service/Acrobat/Reader running, therefore 0 is the next best thing.
|
||||||
|
|
||||||
|
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||||
|
|
||||||
|
# Get all subkeys under the specified root path
|
||||||
|
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||||
|
|
||||||
|
# Loop through each subkey
|
||||||
|
foreach ($subKey in $subKeys) {
|
||||||
|
# Get the full registry path
|
||||||
|
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||||
|
try {
|
||||||
|
Set-ItemProperty -Path $fullPath -Name Mode -Value 0
|
||||||
|
Write-Host \"Acrobat Updates have been disabled.\"
|
||||||
|
} catch {
|
||||||
|
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CCStopper
|
||||||
|
AcrobatUpdates
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
function RestoreCCService {
|
||||||
|
$originalPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe.old\"
|
||||||
|
$newPath = \"C:\\Program Files (x86)\\Common Files\\Adobe\\Adobe Desktop Common\\ADS\\Adobe Desktop Service.exe\"
|
||||||
|
|
||||||
|
if (Test-Path -Path $originalPath) {
|
||||||
|
Rename-Item -Path $originalPath -NewName \"Adobe Desktop Service.exe\" -Force
|
||||||
|
Write-Host \"Adobe Desktop Service has been restored.\"
|
||||||
|
} else {
|
||||||
|
Write-Host \"Backup file does not exist. No changes were made.\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function AcrobatUpdates {
|
||||||
|
# Default Value:
|
||||||
|
# 3 = Automatically download and install updates
|
||||||
|
|
||||||
|
$rootPath = \"HKLM:\\SOFTWARE\\WOW6432Node\\Adobe\\Adobe ARM\\Legacy\\Acrobat\"
|
||||||
|
|
||||||
|
# Get all subkeys under the specified root path
|
||||||
|
$subKeys = Get-ChildItem -Path $rootPath | Where-Object { $_.PSChildName -like \"{*}\" }
|
||||||
|
|
||||||
|
# Loop through each subkey
|
||||||
|
foreach ($subKey in $subKeys) {
|
||||||
|
# Get the full registry path
|
||||||
|
$fullPath = Join-Path -Path $rootPath -ChildPath $subKey.PSChildName
|
||||||
|
try {
|
||||||
|
Set-ItemProperty -Path $fullPath -Name Mode -Value 3
|
||||||
|
} catch {
|
||||||
|
Write-Host \"Registry Key for changing Acrobat Updates does not exist in $fullPath\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RestoreCCService
|
||||||
|
AcrobatUpdates
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"service": [
|
||||||
|
{
|
||||||
|
"Name": "AGSService",
|
||||||
|
"StartupType": "Disabled",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "AGMService",
|
||||||
|
"StartupType": "Disabled",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "AdobeUpdateService",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Adobe Acrobat Update",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Adobe Genuine Monitor Service",
|
||||||
|
"StartupType": "Disabled",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "AdobeARMservice",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Adobe Licensing Console",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "CCXProcess",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "AdobeIPCBroker",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "CoreSync",
|
||||||
|
"StartupType": "Manual",
|
||||||
|
"OriginalType": "Automatic"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"WPFTweaksBlockAdobeNet": {
|
||||||
|
"Content": "Adobe Network Block",
|
||||||
|
"Description": "Reduce user interruptions by selectively blocking connections to Adobe's activation and telemetry servers. Credit: Ruddernation-Designs",
|
||||||
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
|
"panel": "1",
|
||||||
|
"Order": "a021_",
|
||||||
|
"InvokeScript": [
|
||||||
|
"
|
||||||
|
# Define the URL of the remote HOSTS file and the local paths
|
||||||
|
$remoteHostsUrl = \"https://raw.githubusercontent.com/Ruddernation-Designs/Adobe-URL-Block-List/master/hosts\"
|
||||||
|
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||||
|
$tempHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\temp_hosts\"
|
||||||
|
|
||||||
|
# Download the remote HOSTS file to a temporary location
|
||||||
|
try {
|
||||||
|
Invoke-WebRequest -Uri $remoteHostsUrl -OutFile $tempHostsPath
|
||||||
|
Write-Output \"Downloaded the remote HOSTS file to a temporary location.\"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Failed to download the HOSTS file. Error: $_\"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if the AdobeNetBlock has already been started
|
||||||
|
try {
|
||||||
|
$localHostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||||
|
|
||||||
|
# Check if AdobeNetBlock markers exist
|
||||||
|
$blockStartExists = $localHostsContent -like \"*#AdobeNetBlock-start*\"
|
||||||
|
if ($blockStartExists) {
|
||||||
|
Write-Output \"AdobeNetBlock-start already exists. Skipping addition of new block.\"
|
||||||
|
} else {
|
||||||
|
# Load the new block from the downloaded file
|
||||||
|
$newBlockContent = Get-Content $tempHostsPath -ErrorAction Stop
|
||||||
|
$newBlockContent = $newBlockContent | Where-Object { $_ -notmatch \"^\\s*#\" -and $_ -ne \"\" } # Exclude empty lines and comments
|
||||||
|
$newBlockHeader = \"#AdobeNetBlock-start\"
|
||||||
|
$newBlockFooter = \"#AdobeNetBlock-end\"
|
||||||
|
|
||||||
|
# Combine the contents, ensuring new block is properly formatted
|
||||||
|
$combinedContent = $localHostsContent + $newBlockHeader, $newBlockContent, $newBlockFooter | Out-String
|
||||||
|
|
||||||
|
# Write the combined content back to the original HOSTS file
|
||||||
|
$combinedContent | Set-Content $localHostsPath -Encoding ASCII
|
||||||
|
Write-Output \"Successfully added the AdobeNetBlock.\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Error during processing: $_\"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clean up temporary file
|
||||||
|
Remove-Item $tempHostsPath -ErrorAction Ignore
|
||||||
|
|
||||||
|
# Flush the DNS resolver cache
|
||||||
|
try {
|
||||||
|
Invoke-Expression \"ipconfig /flushdns\"
|
||||||
|
Write-Output \"DNS cache flushed successfully.\"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||||
|
}
|
||||||
|
"
|
||||||
|
],
|
||||||
|
"UndoScript": [
|
||||||
|
"
|
||||||
|
# Define the local path of the HOSTS file
|
||||||
|
$localHostsPath = \"C:\\Windows\\System32\\drivers\\etc\\hosts\"
|
||||||
|
|
||||||
|
# Load the content of the HOSTS file
|
||||||
|
try {
|
||||||
|
$hostsContent = Get-Content $localHostsPath -ErrorAction Stop
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Failed to load the HOSTS file. Error: $_\"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# Initialize flags and buffer for new content
|
||||||
|
$recording = $true
|
||||||
|
$newContent = @()
|
||||||
|
|
||||||
|
# Iterate over each line of the HOSTS file
|
||||||
|
foreach ($line in $hostsContent) {
|
||||||
|
if ($line -match \"#AdobeNetBlock-start\") {
|
||||||
|
$recording = $false
|
||||||
|
}
|
||||||
|
if ($recording) {
|
||||||
|
$newContent += $line
|
||||||
|
}
|
||||||
|
if ($line -match \"#AdobeNetBlock-end\") {
|
||||||
|
$recording = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Write the filtered content back to the HOSTS file
|
||||||
|
try {
|
||||||
|
$newContent | Set-Content $localHostsPath -Encoding ASCII
|
||||||
|
Write-Output \"Successfully removed the AdobeNetBlock section from the HOSTS file.\"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Failed to write back to the HOSTS file. Error: $_\"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Flush the DNS resolver cache
|
||||||
|
try {
|
||||||
|
Invoke-Expression \"ipconfig /flushdns\"
|
||||||
|
Write-Output \"DNS cache flushed successfully.\"
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Error \"Failed to flush DNS cache. Error: $_\"
|
||||||
|
}
|
||||||
|
"
|
||||||
|
]
|
||||||
|
},
|
||||||
"WPFTweaksRightClickMenu": {
|
"WPFTweaksRightClickMenu": {
|
||||||
"Content": "Set Classic Right-Click Menu ",
|
"Content": "Set Classic Right-Click Menu ",
|
||||||
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
|
"Description": "Great Windows 11 tweak to bring back good context menus when right clicking things in explorer.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a028_",
|
"Order": "a027_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
New-Item -Path \"HKCU:\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\" -Name \"InprocServer32\" -force -value \"\"
|
||||||
@ -2458,7 +2859,7 @@
|
|||||||
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
|
"Description": "Runs Disk Cleanup on Drive C: and removes old Windows Updates.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a007_",
|
"Order": "a009_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"
|
"
|
||||||
cleanmgr.exe /d C: /VERYLOWDISK
|
cleanmgr.exe /d C: /VERYLOWDISK
|
||||||
@ -2471,7 +2872,7 @@
|
|||||||
"Description": "Erases TEMP Folders",
|
"Description": "Erases TEMP Folders",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a006_",
|
"Order": "a002_",
|
||||||
"InvokeScript": [
|
"InvokeScript": [
|
||||||
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
|
"Get-ChildItem -Path \"C:\\Windows\\Temp\" *.* -Recurse | Remove-Item -Force -Recurse
|
||||||
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse"
|
Get-ChildItem -Path $env:TEMP *.* -Recurse | Remove-Item -Force -Recurse"
|
||||||
@ -2482,7 +2883,7 @@
|
|||||||
"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": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a012_",
|
"Order": "a005_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\System\\GameConfigStore",
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
@ -2498,13 +2899,6 @@
|
|||||||
"OriginalValue": "1",
|
"OriginalValue": "1",
|
||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Path": "HKCU:\\System\\GameConfigStore",
|
|
||||||
"Name": "GameDVR_DXGIHonorFSEWindowsCompatible",
|
|
||||||
"Value": "1",
|
|
||||||
"OriginalValue": "0",
|
|
||||||
"Type": "DWord"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Path": "HKCU:\\System\\GameConfigStore",
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
"Name": "GameDVR_HonorUserFSEBehaviorMode",
|
||||||
@ -2533,8 +2927,7 @@
|
|||||||
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency.",
|
"Description": "Teredo network tunneling is a ipv6 feature that can cause additional latency.",
|
||||||
"category": "Essential Tweaks",
|
"category": "Essential Tweaks",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a029_",
|
"Order": "a005_",
|
||||||
"Order": "a013_",
|
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
@ -2556,7 +2949,7 @@
|
|||||||
"Description": "Disables IPv6.",
|
"Description": "Disables IPv6.",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a031_",
|
"Order": "a023_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
||||||
@ -2573,26 +2966,20 @@
|
|||||||
"Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
"Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFTweaksEnableipsix": {
|
"WPFTweaksDisableFSO": {
|
||||||
"Content": "Enable IPv6",
|
"Content": "Disable Fullscreen Optimizations",
|
||||||
"Description": "Enables IPv6.",
|
"Description": "Disables FSO in all applications. NOTE: This will disable Color Management in Exclusive Fullscreen",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a030_",
|
"Order": "a024_",
|
||||||
"registry": [
|
"registry": [
|
||||||
{
|
{
|
||||||
"Path": "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\Tcpip6\\Parameters",
|
"Path": "HKCU:\\System\\GameConfigStore",
|
||||||
"Name": "DisabledComponents",
|
"Name": "GameDVR_DXGIHonorFSEWindowsCompatible",
|
||||||
"Value": "0",
|
"Value": "1",
|
||||||
"OriginalValue": "0",
|
"OriginalValue": "0",
|
||||||
"Type": "DWord"
|
"Type": "DWord"
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"InvokeScript": [
|
|
||||||
"Enable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
|
||||||
],
|
|
||||||
"UndoScript": [
|
|
||||||
"Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"WPFToggleDarkMode": {
|
"WPFToggleDarkMode": {
|
||||||
@ -2635,12 +3022,28 @@
|
|||||||
"Order": "a064_",
|
"Order": "a064_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
|
"WPFToggleSnapWindow": {
|
||||||
|
"Content": "Snap Window",
|
||||||
|
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a065_",
|
||||||
|
"Type": "Toggle"
|
||||||
|
},
|
||||||
"WPFToggleSnapFlyout": {
|
"WPFToggleSnapFlyout": {
|
||||||
"Content": "Snap Assist Flyout",
|
"Content": "Snap Assist Flyout",
|
||||||
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a065_",
|
"Order": "a066_",
|
||||||
|
"Type": "Toggle"
|
||||||
|
},
|
||||||
|
"WPFToggleSnapSuggestion": {
|
||||||
|
"Content": "Snap Assist Suggestion",
|
||||||
|
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a067_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFToggleMouseAcceleration": {
|
"WPFToggleMouseAcceleration": {
|
||||||
@ -2648,7 +3051,7 @@
|
|||||||
"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.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a066_",
|
"Order": "a068_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFToggleStickyKeys": {
|
"WPFToggleStickyKeys": {
|
||||||
@ -2656,11 +3059,19 @@
|
|||||||
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a067_",
|
"Order": "a070_",
|
||||||
|
"Type": "Toggle"
|
||||||
|
},
|
||||||
|
"WPFToggleTaskbarSearch": {
|
||||||
|
"Content": "Taskbar Search",
|
||||||
|
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a068_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFOOSUbutton": {
|
"WPFOOSUbutton": {
|
||||||
"Content": "Customize OO Shutup Tweaks",
|
"Content": "Run OO Shutup 10",
|
||||||
"category": "z__Advanced Tweaks - CAUTION",
|
"category": "z__Advanced Tweaks - CAUTION",
|
||||||
"panel": "1",
|
"panel": "1",
|
||||||
"Order": "a039_",
|
"Order": "a039_",
|
||||||
@ -2671,7 +3082,7 @@
|
|||||||
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
||||||
"category": "Customize Preferences",
|
"category": "Customize Preferences",
|
||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a068_",
|
"Order": "a069_",
|
||||||
"Type": "Toggle"
|
"Type": "Toggle"
|
||||||
},
|
},
|
||||||
"WPFchangedns": {
|
"WPFchangedns": {
|
||||||
@ -2716,5 +3127,13 @@
|
|||||||
"panel": "2",
|
"panel": "2",
|
||||||
"Order": "a082_",
|
"Order": "a082_",
|
||||||
"Type": "300"
|
"Type": "300"
|
||||||
|
},
|
||||||
|
"WPFToggleTaskView": {
|
||||||
|
"Content": "Task View",
|
||||||
|
"Description": "If Enabled then Task View Icon in Taskbar will be shown.",
|
||||||
|
"category": "Customize Preferences",
|
||||||
|
"panel": "2",
|
||||||
|
"Order": "a069_",
|
||||||
|
"Type": "Toggle"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ function global:prepare_edge {
|
|||||||
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\microsoft-edge' -recurse -force -ea 0
|
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\microsoft-edge' -recurse -force -ea 0
|
||||||
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\MSEdgeHTM' -recurse -force -ea 0
|
ri 'Registry::HKEY_Users\S-1-5-21*\Software\Classes\MSEdgeHTM' -recurse -force -ea 0
|
||||||
ni "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" -force -ea 0 >''
|
ni "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" -force -ea 0 >''
|
||||||
sp "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" '(Default)' "`"$MS`" --single-argument %%1" -force -ea 0
|
sp "HKLM:\SOFTWARE\Classes\microsoft-edge\shell\open\command" '(Default)' "`"$MS`" --single-argument %%1" -force -ea 0
|
||||||
ni "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" -force -ea 0 >''
|
ni "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" -force -ea 0 >''
|
||||||
sp "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" '(Default)' "`"$MS`" --single-argument %%1" -force -ea 0
|
sp "HKLM:\SOFTWARE\Classes\MSEdgeHTM\shell\open\command" '(Default)' "`"$MS`" --single-argument %%1" -force -ea 0
|
||||||
foreach ($p in 'HKLM:\SOFTWARE\Policies','HKLM:\SOFTWARE','HKLM:\SOFTWARE\WOW6432Node') {
|
foreach ($p in 'HKLM:\SOFTWARE\Policies','HKLM:\SOFTWARE','HKLM:\SOFTWARE\WOW6432Node') {
|
||||||
@ -54,7 +54,7 @@ function global:prepare_edge {
|
|||||||
}
|
}
|
||||||
## helper for webview reinstall - restore webexperience (widgets) if available
|
## helper for webview reinstall - restore webexperience (widgets) if available
|
||||||
function global:prepare_webview {
|
function global:prepare_webview {
|
||||||
$cfg = @{Register=$true; ForceApplicationShutdown=$true; ForceUpdateFromAnyVersion=$true; DisableDevelopmentMode=$true}
|
$cfg = @{Register=$true; ForceApplicationShutdown=$true; ForceUpdateFromAnyVersion=$true; DisableDevelopmentMode=$true}
|
||||||
dir "$env:ProgramFiles\WindowsApps\MicrosoftWindows.Client.WebExperience*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
|
dir "$env:ProgramFiles\WindowsApps\MicrosoftWindows.Client.WebExperience*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
|
||||||
dir "$env:SystemRoot\SystemApps\Microsoft.Win32WebViewHost*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
|
dir "$env:SystemRoot\SystemApps\Microsoft.Win32WebViewHost*\AppxManifest.xml" -rec -ea 0 | Add-AppxPackage @cfg
|
||||||
kill -name explorer -ea 0; if ((get-process -name 'explorer' -ea 0) -eq $null) {start explorer}
|
kill -name explorer -ea 0; if ((get-process -name 'explorer' -ea 0) -eq $null) {start explorer}
|
||||||
@ -66,7 +66,7 @@ $D1=[uri].module.gettype('System.Diagnostics.Process')."GetM`ethods"(42) |where
|
|||||||
|
|
||||||
## 3 shut edge & webview clone stuff down and gather install paths
|
## 3 shut edge & webview clone stuff down and gather install paths
|
||||||
$shut = 'explorer','Widgets','widgetservice','msedgewebview2','MicrosoftEdge*','chredge','msedge','edge'
|
$shut = 'explorer','Widgets','widgetservice','msedgewebview2','MicrosoftEdge*','chredge','msedge','edge'
|
||||||
$shut+= 'msteams','msfamily','WebViewHost','Clipchamp'
|
$shut+= 'msteams','msfamily','WebViewHost','Clipchamp'
|
||||||
cd $env:systemdrive; taskkill /im explorer.exe /f 2>&1 >''; foreach ($p in $shut) {kill -name $p -force -ea 0}
|
cd $env:systemdrive; taskkill /im explorer.exe /f 2>&1 >''; foreach ($p in $shut) {kill -name $p -force -ea 0}
|
||||||
prepare_edge
|
prepare_edge
|
||||||
## clear win32 uninstall block
|
## clear win32 uninstall block
|
||||||
@ -93,15 +93,15 @@ $users = @('S-1-5-18'); if (test-path $store) {$users += $((dir $store -ea 0 |wh
|
|||||||
foreach ($choice in $remove_appx) { if ('' -eq $choice.Trim()) {continue}
|
foreach ($choice in $remove_appx) { if ('' -eq $choice.Trim()) {continue}
|
||||||
foreach ($appx in $($provisioned |where {$_.PackageName -like "*$choice*"})) {
|
foreach ($appx in $($provisioned |where {$_.PackageName -like "*$choice*"})) {
|
||||||
$next = !1; foreach ($no in $skip) {if ($appx.PackageName -like "*$no*") {$next = !0}} ; if ($next) {continue}
|
$next = !1; foreach ($no in $skip) {if ($appx.PackageName -like "*$no*") {$next = !0}} ; if ($next) {continue}
|
||||||
$PackageName = $appx.PackageName; $PackageFamilyName = ($appxpackage |where {$_.Name -eq $appx.DisplayName}).PackageFamilyName
|
$PackageName = $appx.PackageName; $PackageFamilyName = ($appxpackage |where {$_.Name -eq $appx.DisplayName}).PackageFamilyName
|
||||||
ni "$store\Deprovisioned\$PackageFamilyName" -force >''; $PackageFamilyName
|
ni "$store\Deprovisioned\$PackageFamilyName" -force >''; $PackageFamilyName
|
||||||
foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageName" -force >''} ; $eol += $PackageName
|
foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageName" -force >''} ; $eol += $PackageName
|
||||||
dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
|
dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
|
||||||
remove-appxprovisionedpackage -packagename $PackageName -online -allusers >''
|
remove-appxprovisionedpackage -packagename $PackageName -online -allusers >''
|
||||||
}
|
}
|
||||||
foreach ($appx in $($appxpackage |where {$_.PackageFullName -like "*$choice*"})) {
|
foreach ($appx in $($appxpackage |where {$_.PackageFullName -like "*$choice*"})) {
|
||||||
$next = !1; foreach ($no in $skip) {if ($appx.PackageFullName -like "*$no*") {$next = !0}} ; if ($next) {continue}
|
$next = !1; foreach ($no in $skip) {if ($appx.PackageFullName -like "*$no*") {$next = !0}} ; if ($next) {continue}
|
||||||
$PackageFullName = $appx.PackageFullName;
|
$PackageFullName = $appx.PackageFullName;
|
||||||
ni "$store\Deprovisioned\$appx.PackageFamilyName" -force >''; $PackageFullName
|
ni "$store\Deprovisioned\$appx.PackageFamilyName" -force >''; $PackageFullName
|
||||||
foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageFullName" -force >''} ; $eol += $PackageFullName
|
foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageFullName" -force >''} ; $eol += $PackageFullName
|
||||||
dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
|
dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
|
||||||
@ -125,16 +125,16 @@ foreach ($PF in $env:ProgramFiles,${env:ProgramFiles(x86)}) { if (test-path "$PF
|
|||||||
if ($also_remove_webview -eq 1) { foreach ($hk in 'HKCU:','HKLM:') { foreach ($wow in '','\Wow6432Node') {
|
if ($also_remove_webview -eq 1) { foreach ($hk in 'HKCU:','HKLM:') { foreach ($wow in '','\Wow6432Node') {
|
||||||
ri "$hk\SOFTWARE${wow}\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -rec -force -ea 0 }}
|
ri "$hk\SOFTWARE${wow}\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge Update" -rec -force -ea 0 }}
|
||||||
ri "$PF\Microsoft\EdgeUpdate" -rec -force -ea 0; Unregister-ScheduledTask -TaskName MicrosoftEdgeUpdate* -Confirm:$false -ea 0
|
ri "$PF\Microsoft\EdgeUpdate" -rec -force -ea 0; Unregister-ScheduledTask -TaskName MicrosoftEdgeUpdate* -Confirm:$false -ea 0
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
$appdata = $([Environment]::GetFolderPath('ApplicationData'))
|
$appdata = $([Environment]::GetFolderPath('ApplicationData'))
|
||||||
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Tombstones\Microsoft Edge.lnk" -force
|
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Tombstones\Microsoft Edge.lnk" -force
|
||||||
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk" -force
|
ri "$appdata\Microsoft\Internet Explorer\Quick Launch\Microsoft Edge.lnk" -force
|
||||||
|
|
||||||
## undo eol unblock trick to prevent latest cumulative update (LCU) failing
|
## undo eol unblock trick to prevent latest cumulative update (LCU) failing
|
||||||
foreach ($sid in $users) { foreach ($PackageName in $eol) {ri "$store\EndOfLife\$sid\$PackageName" -force >''} }
|
foreach ($sid in $users) { foreach ($PackageName in $eol) {ri "$store\EndOfLife\$sid\$PackageName" -force >''} }
|
||||||
|
|
||||||
## set (almost) useless policies to prevent unsolicited reinstalls
|
## set (almost) useless policies to prevent unsolicited reinstalls
|
||||||
foreach ($p in 'HKLM:\SOFTWARE\Policies','HKLM:\SOFTWARE','HKLM:\SOFTWARE\WOW6432Node') {
|
foreach ($p in 'HKLM:\SOFTWARE\Policies','HKLM:\SOFTWARE','HKLM:\SOFTWARE\WOW6432Node') {
|
||||||
ni "$p\Microsoft\EdgeUpdate" -force >''
|
ni "$p\Microsoft\EdgeUpdate" -force >''
|
||||||
sp "$p\Microsoft\EdgeUpdate" 'InstallDefault' 0 -type Dword -force
|
sp "$p\Microsoft\EdgeUpdate" 'InstallDefault' 0 -type Dword -force
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
function ConvertTo-Icon {
|
function ConvertTo-Icon {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will convert PNG to ICO file
|
This function will convert PNG to ICO file
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
||||||
#>
|
#>
|
||||||
param( [Parameter(Mandatory=$true)]
|
param( [Parameter(Mandatory=$true)]
|
||||||
$bitmapPath,
|
$bitmapPath,
|
||||||
$iconPath = "$env:temp\newicon.ico"
|
$iconPath = "$env:temp\newicon.ico"
|
||||||
)
|
)
|
||||||
|
|
||||||
Add-Type -AssemblyName System.Drawing
|
Add-Type -AssemblyName System.Drawing
|
||||||
|
|
||||||
if (Test-Path $bitmapPath) {
|
if (Test-Path $bitmapPath) {
|
||||||
$b = [System.Drawing.Bitmap]::FromFile($bitmapPath)
|
$b = [System.Drawing.Bitmap]::FromFile($bitmapPath)
|
||||||
$icon = [System.Drawing.Icon]::FromHandle($b.GetHicon())
|
$icon = [System.Drawing.Icon]::FromHandle($b.GetHicon())
|
||||||
$file = New-Object System.IO.FileStream($iconPath, 'OpenOrCreate')
|
$file = New-Object System.IO.FileStream($iconPath, 'OpenOrCreate')
|
||||||
$icon.Save($file)
|
$icon.Save($file)
|
||||||
$file.Close()
|
$file.Close()
|
||||||
$icon.Dispose()
|
$icon.Dispose()
|
||||||
#explorer "/SELECT,$iconpath"
|
#explorer "/SELECT,$iconpath"
|
||||||
}
|
}
|
||||||
else { Write-Warning "$BitmapPath does not exist" }
|
else { Write-Warning "$BitmapPath does not exist" }
|
||||||
}
|
}
|
@ -1,22 +1,22 @@
|
|||||||
function Copy-Files {
|
function Copy-Files {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will make all modifications to the registry
|
This function will make all modifications to the registry
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
|
|
||||||
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
Set-WinUtilRegistry -Name "PublishUserActivities" -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Type "DWord" -Value "0"
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
[string] $Path,
|
[string] $Path,
|
||||||
[string] $Destination,
|
[string] $Destination,
|
||||||
[switch] $Recurse = $false,
|
[switch] $Recurse = $false,
|
||||||
[switch] $Force = $false
|
[switch] $Force = $false
|
||||||
)
|
)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$files = Get-ChildItem -Path $path -Recurse:$recurse
|
$files = Get-ChildItem -Path $path -Recurse:$recurse
|
||||||
Write-Host "Copy $($files.Count)(s) from $path to $destination"
|
Write-Host "Copy $($files.Count)(s) from $path to $destination"
|
||||||
@ -35,9 +35,9 @@ function Copy-Files {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Debug "Copy from $($file.FullName) to $($destination+$restpath)"
|
Write-Debug "Copy from $($file.FullName) to $($destination+$restpath)"
|
||||||
Copy-Item $file.FullName ($destination+$restpath) -ErrorAction SilentlyContinue -Force:$force
|
Copy-Item $file.FullName ($destination+$restpath) -ErrorAction SilentlyContinue -Force:$force
|
||||||
Set-ItemProperty -Path ($destination+$restpath) -Name IsReadOnly -Value $false
|
Set-ItemProperty -Path ($destination+$restpath) -Name IsReadOnly -Value $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Copy Windows files" -Status "Ready" -Completed
|
Write-Progress -Activity "Copy Windows files" -Status "Ready" -Completed
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
function Get-LocalizedYesNo {
|
function Get-LocalizedYesNo {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
This function runs choice.exe and captures its output to extract yes no in a localized Windows
|
This function runs choice.exe and captures its output to extract yes no in a localized Windows
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
The function retrieves the output of the command 'cmd /c "choice <nul 2>nul"' and converts the default output for Yes and No
|
The function retrieves the output of the command 'cmd /c "choice <nul 2>nul"' and converts the default output for Yes and No
|
||||||
in the localized format, such as "Yes=<first character>, No=<second character>".
|
in the localized format, such as "Yes=<first character>, No=<second character>".
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
$yesNoArray = Get-LocalizedYesNo
|
$yesNoArray = Get-LocalizedYesNo
|
||||||
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
||||||
#>
|
#>
|
||||||
|
|
||||||
# Run choice and capture its options as output
|
# Run choice and capture its options as output
|
||||||
# The output shows the options for Yes and No as "[Y,N]?" in the (partitially) localized format.
|
# The output shows the options for Yes and No as "[Y,N]?" in the (partitially) localized format.
|
||||||
# eg. English: [Y,N]?
|
# eg. English: [Y,N]?
|
||||||
@ -21,7 +21,7 @@ function Get-LocalizedYesNo {
|
|||||||
# Spanish: [S,N]?
|
# Spanish: [S,N]?
|
||||||
# Italian: [S,N]?
|
# Italian: [S,N]?
|
||||||
# Russian: [Y,N]?
|
# Russian: [Y,N]?
|
||||||
|
|
||||||
$line = cmd /c "choice <nul 2>nul"
|
$line = cmd /c "choice <nul 2>nul"
|
||||||
$charactersArray = @()
|
$charactersArray = @()
|
||||||
$regexPattern = '([a-zA-Z])'
|
$regexPattern = '([a-zA-Z])'
|
||||||
@ -30,58 +30,5 @@ function Get-LocalizedYesNo {
|
|||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
||||||
# Return the array of characters
|
# Return the array of characters
|
||||||
return $charactersArray
|
return $charactersArray
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function Get-LocalizedYesNoTakeown {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
This function runs takeown.exe and captures its output to extract yes no in a localized Windows
|
|
||||||
|
|
||||||
.DESCRIPTION
|
|
||||||
The function retrieves lines from the output of takeown.exe until there are at least 2 characters
|
|
||||||
captured in a specific format, such as "Yes=<first character>, No=<second character>".
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
$yesNoArray = Get-LocalizedYesNo
|
|
||||||
Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])"
|
|
||||||
#>
|
|
||||||
|
|
||||||
# Run takeown.exe and capture its output
|
|
||||||
$takeownOutput = & takeown.exe /? | Out-String
|
|
||||||
|
|
||||||
# Parse the output and retrieve lines until there are at least 2 characters in the array
|
|
||||||
$found = $false
|
|
||||||
$charactersArray = @()
|
|
||||||
foreach ($line in $takeownOutput -split "`r`n")
|
|
||||||
{
|
|
||||||
# skip everything before /D flag help
|
|
||||||
if ($found)
|
|
||||||
{
|
|
||||||
# now that /D is found start looking for a single character in double quotes
|
|
||||||
# in help text there is another string in double quotes but it is not a single character
|
|
||||||
$regexPattern = '"([a-zA-Z])"'
|
|
||||||
|
|
||||||
$charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value }
|
|
||||||
|
|
||||||
# if ($charactersArray.Count -gt 0) {
|
|
||||||
# Write-Output "Extracted symbols: $($matches -join ', ')"
|
|
||||||
# } else {
|
|
||||||
# Write-Output "No matches found."
|
|
||||||
# }
|
|
||||||
|
|
||||||
if ($charactersArray.Count -ge 2)
|
|
||||||
{
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif ($line -match "/D ")
|
|
||||||
{
|
|
||||||
$found = $true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Debug "According to takeown.exe local Yes is $charactersArray[0]"
|
|
||||||
# Return the array of characters
|
|
||||||
return $charactersArray
|
|
||||||
}
|
}
|
@ -1,13 +1,13 @@
|
|||||||
function Get-Oscdimg {
|
function Get-Oscdimg {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function will download oscdimg file from github Release folders and put it into env:temp folder
|
This function will download oscdimg file from github Release folders and put it into env:temp folder
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Get-Oscdimg
|
Get-Oscdimg
|
||||||
#>
|
#>
|
||||||
param( [Parameter(Mandatory=$true)]
|
param( [Parameter(Mandatory=$true)]
|
||||||
[string]$oscdimgPath
|
[string]$oscdimgPath
|
||||||
)
|
)
|
||||||
$oscdimgPath = "$env:TEMP\oscdimg.exe"
|
$oscdimgPath = "$env:TEMP\oscdimg.exe"
|
||||||
@ -24,4 +24,4 @@ function Get-Oscdimg {
|
|||||||
} else {
|
} else {
|
||||||
Write-Host "Hashes do not match. File may be corrupted or tampered with."
|
Write-Host "Hashes do not match. File may be corrupted or tampered with."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,8 @@ function Get-TabXaml {
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Get-TabXaml "applications" 3
|
Get-TabXaml "applications" 3
|
||||||
#>
|
#>
|
||||||
|
|
||||||
|
|
||||||
param( [Parameter(Mandatory=$true)]
|
param( [Parameter(Mandatory=$true)]
|
||||||
$tabname,
|
$tabname,
|
||||||
$columncount = 0
|
$columncount = 0
|
||||||
@ -61,65 +61,71 @@ function Get-TabXaml {
|
|||||||
$paneltotal = $columncount
|
$paneltotal = $columncount
|
||||||
}
|
}
|
||||||
# add ColumnDefinitions to evenly draw colums
|
# add ColumnDefinitions to evenly draw colums
|
||||||
$blockXml="<Grid.ColumnDefinitions>`n"+("<ColumnDefinition Width=""*""/>`n"*($paneltotal))+"</Grid.ColumnDefinitions>`n"
|
$blockXml="<Grid.ColumnDefinitions>`r`n"+("<ColumnDefinition Width=""*""/>`r`n"*($paneltotal))+"</Grid.ColumnDefinitions>`r`n"
|
||||||
# Iterate through organizedData by panel, category, and application
|
# Iterate through organizedData by panel, category, and application
|
||||||
$count = 0
|
$count = 0
|
||||||
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
||||||
$count++
|
$count++
|
||||||
if ($columncount -gt 0) {
|
if ($columncount -gt 0) {
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
if ($panelcount -eq $panelcount2 ) {
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$blockXml += "<Label Content=""$($category -replace '^.__', '')"" FontSize=""16""/>`n"
|
|
||||||
|
# Dot-source the Get-WPFObjectName function
|
||||||
|
. .\functions\private\Get-WPFObjectName
|
||||||
|
|
||||||
|
$categorycontent = $($category -replace '^.__', '')
|
||||||
|
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
||||||
|
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`r`n"
|
||||||
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
||||||
foreach ($appName in $sortedApps) {
|
foreach ($appName in $sortedApps) {
|
||||||
$count++
|
$count++
|
||||||
if ($columncount -gt 0) {
|
if ($columncount -gt 0) {
|
||||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||||
if ($panelcount -eq $panelcount2 ) {
|
if ($panelcount -eq $panelcount2 ) {
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`n"
|
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||||
$panelcount++
|
$panelcount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$appInfo = $organizedData[$panel][$category][$appName]
|
$appInfo = $organizedData[$panel][$category][$appName]
|
||||||
if ("Toggle" -eq $appInfo.Type) {
|
if ("Toggle" -eq $appInfo.Type) {
|
||||||
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,10,0,0`">`n<Label Content=`"$($appInfo.Content)`" Style=`"{StaticResource labelfortweaks}`" ToolTip=`"$($appInfo.Description)`" />`n"
|
$blockXml += "<DockPanel LastChildFill=`"True`">`r`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`r`n"
|
||||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`"/>`n</StackPanel>`n"
|
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`r`n</DockPanel>`r`n"
|
||||||
} elseif ("Combobox" -eq $appInfo.Type) {
|
} elseif ("Combobox" -eq $appInfo.Type) {
|
||||||
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`n"
|
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`r`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`r`n"
|
||||||
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`n"
|
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`r`n"
|
||||||
$addfirst="IsSelected=`"True`""
|
$addfirst="IsSelected=`"True`""
|
||||||
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
||||||
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`n"
|
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`r`n"
|
||||||
$addfirst=""
|
$addfirst=""
|
||||||
}
|
}
|
||||||
$blockXml += "</ComboBox>`n</StackPanel>"
|
$blockXml += "</ComboBox>`r`n</StackPanel>"
|
||||||
# If it is a digit, type is button and button length is digits
|
# If it is a digit, type is button and button length is digits
|
||||||
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
||||||
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`n"
|
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`r`n"
|
||||||
# else it is a checkbox
|
# else it is a checkbox
|
||||||
} else {
|
} else {
|
||||||
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
||||||
if ($null -eq $appInfo.Link)
|
if ($null -eq $appInfo.Link)
|
||||||
{
|
{
|
||||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`n"
|
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`r`n"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$blockXml += "<StackPanel Orientation=""Horizontal"">`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`n</StackPanel>`n"
|
$blockXml += "<StackPanel Orientation=""Horizontal"">`r`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`r`n</StackPanel>`r`n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$blockXml +="`n</StackPanel>`n</Border>`n"
|
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||||
}
|
}
|
||||||
return ($blockXml)
|
return ($blockXml)
|
||||||
}
|
}
|
||||||
|
27
functions/private/Get-WPFObjectName.ps1
Normal file
27
functions/private/Get-WPFObjectName.ps1
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
function Get-WPFObjectName {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
This is a helper function that generates an objectname with the prefix WPF that can be used as a Powershell Variable after compilation.
|
||||||
|
To achieve this, all characters that are not a-z, A-Z or 0-9 are simply removed from the name.
|
||||||
|
.PARAMETER type
|
||||||
|
The type of object for which the name should be generated. (e.g. Label, Button, CheckBox...)
|
||||||
|
.PARAMETER name
|
||||||
|
The name or description to be used for the object. (invalid characters are removed)
|
||||||
|
.OUTPUTS
|
||||||
|
A string that can be used as a object/variable name in powershell.
|
||||||
|
For example: WPFLabelMicrosoftTools
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
Get-WPFObjectName -type Label -name "Microsoft Tools"
|
||||||
|
#>
|
||||||
|
|
||||||
|
param( [Parameter(Mandatory=$true)]
|
||||||
|
$type,
|
||||||
|
$name
|
||||||
|
)
|
||||||
|
|
||||||
|
$Output = $("WPF"+$type+$name) -replace '[^a-zA-Z0-9]', ''
|
||||||
|
|
||||||
|
return $Output
|
||||||
|
|
||||||
|
}
|
@ -5,9 +5,6 @@ Function Get-WinUtilCheckBoxes {
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Finds all checkboxes that are checked on the specific tab and inputs them into a script.
|
Finds all checkboxes that are checked on the specific tab and inputs them into a script.
|
||||||
|
|
||||||
.PARAMETER Group
|
|
||||||
The group of checkboxes to check
|
|
||||||
|
|
||||||
.PARAMETER unCheck
|
.PARAMETER unCheck
|
||||||
Whether to uncheck the checkboxes that are checked. Defaults to true
|
Whether to uncheck the checkboxes that are checked. Defaults to true
|
||||||
|
|
||||||
@ -32,23 +29,33 @@ Function Get-WinUtilCheckBoxes {
|
|||||||
|
|
||||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
|
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
|
||||||
|
|
||||||
|
# First check and add WPFTweaksRestorePoint if checked
|
||||||
|
$RestorePoint = $CheckBoxes | Where-Object { $_.Key -eq 'WPFTweaksRestorePoint' -and $_.Value.IsChecked -eq $true }
|
||||||
|
if ($RestorePoint) {
|
||||||
|
$Output["WPFTweaks"] = @('WPFTweaksRestorePoint')
|
||||||
|
Write-Debug "Adding WPFTweaksRestorePoint as first in WPFTweaks"
|
||||||
|
|
||||||
|
if ($unCheck) {
|
||||||
|
$RestorePoint.Value.IsChecked = $false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($CheckBox in $CheckBoxes) {
|
foreach ($CheckBox in $CheckBoxes) {
|
||||||
|
if ($CheckBox.Key -eq 'WPFTweaksRestorePoint') { continue } # Skip since it's already handled
|
||||||
|
|
||||||
$group = if ($CheckBox.Key.StartsWith("WPFInstall")) { "Install" }
|
$group = if ($CheckBox.Key.StartsWith("WPFInstall")) { "Install" }
|
||||||
elseif ($CheckBox.Key.StartsWith("WPFTweaks")) { "WPFTweaks" }
|
elseif ($CheckBox.Key.StartsWith("WPFTweaks")) { "WPFTweaks" }
|
||||||
elseif ($CheckBox.Key.StartsWith("WPFFeature")) { "WPFFeature" }
|
elseif ($CheckBox.Key.StartsWith("WPFFeature")) { "WPFFeature" }
|
||||||
|
|
||||||
if ($group) {
|
if ($group) {
|
||||||
if ($CheckBox.Value.IsChecked -eq $true) {
|
if ($CheckBox.Value.IsChecked -eq $true) {
|
||||||
$feature = switch ($group) {
|
$feature = switch ($group) {
|
||||||
"Install" {
|
"Install" {
|
||||||
# Get the winget value
|
# Get the winget value
|
||||||
$wingetValue = $sync.configs.applications.$($CheckBox.Name).winget
|
[PsCustomObject]@{
|
||||||
|
winget="$($sync.configs.applications.$($CheckBox.Name).winget)";
|
||||||
if (-not [string]::IsNullOrWhiteSpace($wingetValue) -and $wingetValue -ne "na") {
|
choco="$($sync.configs.applications.$($CheckBox.Name).choco)";
|
||||||
$wingetValue -split ";"
|
|
||||||
} else {
|
|
||||||
$sync.configs.applications.$($CheckBox.Name).choco
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
$CheckBox.Name
|
$CheckBox.Name
|
||||||
@ -66,12 +73,11 @@ Function Get-WinUtilCheckBoxes {
|
|||||||
Write-Debug "Adding: $($feature) under: $($group)"
|
Write-Debug "Adding: $($feature) under: $($group)"
|
||||||
$Output[$group] += $feature
|
$Output[$group] += $feature
|
||||||
|
|
||||||
if ($uncheck -eq $true) {
|
if ($unCheck) {
|
||||||
$CheckBox.Value.IsChecked = $false
|
$CheckBox.Value.IsChecked = $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $Output
|
return $Output
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ Function Get-WinUtilToggleStatus {
|
|||||||
else{
|
else{
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($ToggleSwitch -eq "WPFToggleShowExt"){
|
if($ToggleSwitch -eq "WPFToggleShowExt"){
|
||||||
$hideextvalue = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').HideFileExt
|
$hideextvalue = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').HideFileExt
|
||||||
if($hideextvalue -eq 0){
|
if($hideextvalue -eq 0){
|
||||||
@ -58,7 +58,16 @@ Function Get-WinUtilToggleStatus {
|
|||||||
else{
|
else{
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($ToggleSwitch -eq "WPFToggleSnapWindow"){
|
||||||
|
$hidesnap = (Get-ItemProperty -path 'HKCU:\Control Panel\Desktop').WindowArrangementActive
|
||||||
|
if($hidesnap -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if($ToggleSwitch -eq "WPFToggleSnapFlyout"){
|
if($ToggleSwitch -eq "WPFToggleSnapFlyout"){
|
||||||
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout
|
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout
|
||||||
if($hidesnap -eq 0){
|
if($hidesnap -eq 0){
|
||||||
@ -67,7 +76,16 @@ Function Get-WinUtilToggleStatus {
|
|||||||
else{
|
else{
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($ToggleSwitch -eq "WPFToggleSnapSuggestion"){
|
||||||
|
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').SnapAssist
|
||||||
|
if($hidesnap -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if($ToggleSwitch -eq "WPFToggleMouseAcceleration"){
|
if($ToggleSwitch -eq "WPFToggleMouseAcceleration"){
|
||||||
$MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed
|
$MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed
|
||||||
$MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1
|
$MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1
|
||||||
@ -80,6 +98,15 @@ Function Get-WinUtilToggleStatus {
|
|||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($ToggleSwitch -eq "WPFToggleTaskbarSearch"){
|
||||||
|
$SearchButton = (Get-ItemProperty -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search").SearchboxTaskbarMode
|
||||||
|
if($SearchButton -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
if ($ToggleSwitch -eq "WPFToggleStickyKeys") {
|
||||||
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
$StickyKeys = (Get-ItemProperty -path 'HKCU:\Control Panel\Accessibility\StickyKeys').Flags
|
||||||
if($StickyKeys -eq 58){
|
if($StickyKeys -eq 58){
|
||||||
@ -89,6 +116,15 @@ Function Get-WinUtilToggleStatus {
|
|||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($ToggleSwitch -eq "WPFToggleTaskView") {
|
||||||
|
$TaskView = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').ShowTaskViewButton
|
||||||
|
if($TaskView -eq 0){
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return $true
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
if ($ToggleSwitch -eq "WPFToggleTaskbarWidgets") {
|
||||||
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
$TaskbarWidgets = (Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced").TaskBarDa
|
||||||
if($TaskbarWidgets -eq 0) {
|
if($TaskbarWidgets -eq 0) {
|
||||||
|
@ -11,9 +11,7 @@ function Get-WinUtilVariables {
|
|||||||
[Parameter()]
|
[Parameter()]
|
||||||
[string[]]$Type
|
[string[]]$Type
|
||||||
)
|
)
|
||||||
|
$keys = ($sync.keys).where{ $_ -like "WPF*" }
|
||||||
$keys = $sync.keys | Where-Object { $_ -like "WPF*" }
|
|
||||||
|
|
||||||
if ($Type) {
|
if ($Type) {
|
||||||
$output = $keys | ForEach-Object {
|
$output = $keys | ForEach-Object {
|
||||||
Try {
|
Try {
|
||||||
|
@ -5,14 +5,17 @@ function Get-WinUtilWingetLatest {
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function grabs the latest version of Winget and returns the download path to Install-WinUtilWinget for installation.
|
This function grabs the latest version of Winget and returns the download path to Install-WinUtilWinget for installation.
|
||||||
#>
|
#>
|
||||||
|
# Invoke-WebRequest is notoriously slow when the byte progress is displayed. The following lines disable the progress bar and reset them at the end of the function
|
||||||
|
$PreviousProgressPreference = $ProgressPreference
|
||||||
|
$ProgressPreference = "silentlyContinue"
|
||||||
Try{
|
Try{
|
||||||
# Grabs the latest release of Winget from the Github API for the install process.
|
# Grabs the latest release of Winget from the Github API for the install process.
|
||||||
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/Winget-cli/releases/latest" -Method Get -ErrorAction Stop
|
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/microsoft/Winget-cli/releases/latest" -Method Get -ErrorAction Stop
|
||||||
$latestVersion = $response.tag_name #Stores version number of latest release.
|
$latestVersion = $response.tag_name #Stores version number of latest release.
|
||||||
$licenseWingetUrl = $response.assets.browser_download_url[0] #Index value for License file.
|
$licenseWingetUrl = $response.assets.browser_download_url | Where-Object {$_ -like "*License1.xml"} #Index value for License file.
|
||||||
Write-Host "Latest Version:`t$($latestVersion)`n"
|
Write-Host "Latest Version:`t$($latestVersion)`n"
|
||||||
$assetUrl = $response.assets.browser_download_url[2] #Index value for download URL.
|
Write-Host "Downloading..."
|
||||||
|
$assetUrl = $response.assets.browser_download_url | Where-Object {$_ -like "*Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"}
|
||||||
Invoke-WebRequest -Uri $licenseWingetUrl -OutFile $ENV:TEMP\License1.xml
|
Invoke-WebRequest -Uri $licenseWingetUrl -OutFile $ENV:TEMP\License1.xml
|
||||||
# The only pain is that the msixbundle for winget-cli is 246MB. In some situations this can take a bit, with slower connections.
|
# The only pain is that the msixbundle for winget-cli is 246MB. In some situations this can take a bit, with slower connections.
|
||||||
Invoke-WebRequest -Uri $assetUrl -OutFile $ENV:TEMP\Microsoft.DesktopAppInstaller.msixbundle
|
Invoke-WebRequest -Uri $assetUrl -OutFile $ENV:TEMP\Microsoft.DesktopAppInstaller.msixbundle
|
||||||
@ -20,4 +23,5 @@ function Get-WinUtilWingetLatest {
|
|||||||
Catch{
|
Catch{
|
||||||
throw [WingetFailedInstall]::new('Failed to get latest Winget release and license')
|
throw [WingetFailedInstall]::new('Failed to get latest Winget release and license')
|
||||||
}
|
}
|
||||||
|
$ProgressPreference = $PreviousProgressPreference
|
||||||
}
|
}
|
||||||
|
91
functions/private/Install-WinUtilProgramChoco.ps1
Normal file
91
functions/private/Install-WinUtilProgramChoco.ps1
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
function Install-WinUtilProgramChoco {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Manages the provided programs using Chocolatey
|
||||||
|
|
||||||
|
.PARAMETER ProgramsToInstall
|
||||||
|
A list of programs to manage
|
||||||
|
|
||||||
|
.PARAMETER manage
|
||||||
|
The action to perform on the programs, can be either 'Installing' or 'Uninstalling'
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
The triple quotes are required any time you need a " in a normal script block.
|
||||||
|
#>
|
||||||
|
|
||||||
|
param(
|
||||||
|
[Parameter(Mandatory, Position=0)]
|
||||||
|
[PsCustomObject]$ProgramsToInstall,
|
||||||
|
|
||||||
|
[Parameter(Position=1)]
|
||||||
|
[String]$manage = "Installing"
|
||||||
|
)
|
||||||
|
|
||||||
|
$x = 0
|
||||||
|
$count = $ProgramsToInstall.Count
|
||||||
|
|
||||||
|
# This check isn't really necessary, as there's a couple of checks before this Private Function gets called, but just to make sure ;)
|
||||||
|
if($count -le 0) {
|
||||||
|
throw "Private Function 'Install-WinUtilProgramChoco' expected Parameter 'ProgramsToInstall' to be of size 1 or greater, instead got $count,`nPlease double check your code and re-compile WinUtil."
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Write-Host "-- Configuring Chocolatey pacakages ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
|
Foreach ($Program in $ProgramsToInstall){
|
||||||
|
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.choco) $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
||||||
|
if($manage -eq "Installing"){
|
||||||
|
write-host "Starting install of $($Program.choco) with Chocolatey."
|
||||||
|
try{
|
||||||
|
$tryUpgrade = $false
|
||||||
|
$installOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.install-command.output.txt"
|
||||||
|
New-Item -ItemType File -Path $installOutputFilePath
|
||||||
|
$chocoInstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "install $($Program.choco) -y" -Wait -PassThru -RedirectStandardOutput $installOutputFilePath).ExitCode
|
||||||
|
if(($chocoInstallStatus -eq 0) -AND (Test-Path -Path $installOutputFilePath)) {
|
||||||
|
$keywordsFound = Get-Content -Path $installOutputFilePath | Where-Object {$_ -match "reinstall" -OR $_ -match "already installed"}
|
||||||
|
if ($keywordsFound) {
|
||||||
|
$tryUpgrade = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# TODO: Implement the Upgrade part using 'choco upgrade' command, this will make choco consistent with WinGet, as WinGet tries to Upgrade when you use the install command.
|
||||||
|
if ($tryUpgrade) {
|
||||||
|
throw "Automatic Upgrade for Choco isn't implemented yet, a feature to make it consistent with WinGet, the install command using choco simply failed because $($Program.choco) is already installed."
|
||||||
|
}
|
||||||
|
if(($chocoInstallStatus -eq 0) -AND ($tryUpgrade -eq $false)){
|
||||||
|
Write-Host "$($Program.choco) installed successfully using Chocolatey."
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
Write-Host "Failed to install $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $installOutputFilePath)."
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to install $($Program.choco) due to an error: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($manage -eq "Uninstalling"){
|
||||||
|
write-host "Starting uninstall of $($Program.choco) with Chocolatey."
|
||||||
|
try{
|
||||||
|
$uninstallOutputFilePath = "$env:TEMP\Install-WinUtilProgramChoco.uninstall-command.output.txt"
|
||||||
|
New-Item -ItemType File -Path $uninstallOutputFilePath
|
||||||
|
$chocoUninstallStatus = $(Start-Process -FilePath "choco" -ArgumentList "uninstall $($Program.choco) -y" -Wait -PassThru).ExitCode
|
||||||
|
if($chocoUninstallStatus -eq 0){
|
||||||
|
Write-Host "$($Program.choco) uninstalled successfully using Chocolatey."
|
||||||
|
continue
|
||||||
|
} else {
|
||||||
|
Write-Host "Failed to uninstall $($Program.choco) using Chocolatey, Chocolatey output:`n`n$(Get-Content -Path $uninstallOutputFilePath)."
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to uninstall $($Program.choco) due to an error: $_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$x++
|
||||||
|
}
|
||||||
|
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
|
||||||
|
|
||||||
|
# Cleanup leftovers files
|
||||||
|
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $installOutputFilePath }
|
||||||
|
if(Test-Path -Path $installOutputFilePath){ Remove-Item -Path $uninstallOutputFilePath }
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
@ -2,74 +2,102 @@ Function Install-WinUtilProgramWinget {
|
|||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Manages the provided programs using Winget
|
Manages the provided programs using Winget
|
||||||
|
|
||||||
.PARAMETER ProgramsToInstall
|
.PARAMETER ProgramsToInstall
|
||||||
A list of programs to manage
|
A list of programs to manage
|
||||||
|
|
||||||
.PARAMETER manage
|
.PARAMETER manage
|
||||||
The action to perform on the programs, can be either 'Installing' or 'Uninstalling'
|
The action to perform on the programs, can be either 'Installing' or 'Uninstalling'
|
||||||
|
|
||||||
.NOTES
|
.NOTES
|
||||||
The triple quotes are required any time you need a " in a normal script block.
|
The triple quotes are required any time you need a " in a normal script block.
|
||||||
|
The winget Return codes are documented here: https://github.com/microsoft/winget-cli/blob/master/doc/windows/package-manager/winget/returnCodes.md
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param(
|
param(
|
||||||
$ProgramsToInstall,
|
[Parameter(Mandatory, Position=0)]
|
||||||
$manage = "Installing"
|
[PsCustomObject]$ProgramsToInstall,
|
||||||
)
|
|
||||||
|
|
||||||
|
[Parameter(Position=1)]
|
||||||
|
[String]$manage = "Installing"
|
||||||
|
)
|
||||||
$x = 0
|
$x = 0
|
||||||
$count = $($ProgramsToInstall -split ",").Count
|
$count = $ProgramsToInstall.Count
|
||||||
|
|
||||||
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
Write-Progress -Activity "$manage Applications" -Status "Starting" -PercentComplete 0
|
||||||
|
Write-Host "==========================================="
|
||||||
Foreach ($Program in $($ProgramsToInstall -split ",")){
|
Write-Host "-- Configuring winget packages ---"
|
||||||
|
Write-Host "==========================================="
|
||||||
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
Foreach ($Program in $ProgramsToInstall){
|
||||||
|
$failedPackages = @()
|
||||||
|
Write-Progress -Activity "$manage Applications" -Status "$manage $($Program.winget) $($x + 1) of $count" -PercentComplete $($x/$count*100)
|
||||||
if($manage -eq "Installing"){
|
if($manage -eq "Installing"){
|
||||||
# Install package via ID, if it fails try again with different scope and then with an unelevated prompt.
|
# Install package via ID, if it fails try again with different scope and then with an unelevated prompt.
|
||||||
# Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround.
|
# Since Install-WinGetPackage might not be directly available, we use winget install command as a workaround.
|
||||||
# Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode.
|
# Winget, not all installers honor any of the following: System-wide, User Installs, or Unelevated Prompt OR Silent Install Mode.
|
||||||
# This is up to the individual package maintainers to enable these options. Aka. not as clean as Linux Package Managers.
|
# This is up to the individual package maintainers to enable these options. Aka. not as clean as Linux Package Managers.
|
||||||
|
Write-Host "Starting install of $($Program.winget) with winget."
|
||||||
try {
|
try {
|
||||||
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $Program --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru).ExitCode
|
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
|
||||||
if($status -ne 0){
|
if($status -eq 0){
|
||||||
Write-Host "Attempt with User scope"
|
Write-Host "$($Program.winget) installed successfully."
|
||||||
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $Program --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru).ExitCode
|
continue
|
||||||
if($status -ne 0){
|
}
|
||||||
Write-Host "Attempt with Unelevated prompt"
|
if ($status -eq -1978335189){
|
||||||
$status = $(Start-Process -FilePath "powershell" -ArgumentList "-Command Start-Process winget -ArgumentList 'install --id $Program --silent --accept-source-agreements --accept-package-agreements' -Verb runAsUser" -Wait -PassThru).ExitCode
|
Write-Host "$($Program.winget) No applicable update found"
|
||||||
if($status -ne 0){
|
continue
|
||||||
Write-Host "Failed to install $Program."
|
}
|
||||||
} else {
|
Write-Host "Attempt with User scope"
|
||||||
Write-Host "$Program installed successfully with Unelevated prompt."
|
$status = $(Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --scope user --silent --accept-source-agreements --accept-package-agreements" -Wait -PassThru -NoNewWindow).ExitCode
|
||||||
}
|
if($status -eq 0){
|
||||||
} else {
|
Write-Host "$($Program.winget) installed successfully with User scope."
|
||||||
Write-Host "$Program installed successfully with User scope."
|
continue
|
||||||
}
|
}
|
||||||
|
if ($status -eq -1978335189){
|
||||||
|
Write-Host "$($Program.winget) No applicable update found"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
Write-Host "Attempt with User prompt"
|
||||||
|
$userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $($Program.winget) installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User Credential Prompt", [System.Windows.MessageBoxButton]::YesNo)
|
||||||
|
if ($userChoice -eq 'Yes') {
|
||||||
|
$getcreds = Get-Credential
|
||||||
|
$process = Start-Process -FilePath "winget" -ArgumentList "install --id $($Program.winget) --silent --accept-source-agreements --accept-package-agreements" -Credential $getcreds -PassThru -NoNewWindow
|
||||||
|
Wait-Process -Id $process.Id
|
||||||
|
$status = $process.ExitCode
|
||||||
} else {
|
} else {
|
||||||
Write-Host "$Program installed successfully."
|
Write-Host "Skipping installation with specific user credentials."
|
||||||
|
}
|
||||||
|
if($status -eq 0){
|
||||||
|
Write-Host "$($Program.winget) installed successfully with User prompt."
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if ($status -eq -1978335189){
|
||||||
|
Write-Host "$($Program.winget) No applicable update found"
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Failed to install $Program due to an error: $_"
|
Write-Host "Failed to install $($Program.winget). With winget"
|
||||||
|
$failedPackages += $Program
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($manage -eq "Uninstalling"){
|
if($manage -eq "Uninstalling"){
|
||||||
# Uninstall package via ID using winget directly.
|
# Uninstall package via ID using winget directly.
|
||||||
try {
|
try {
|
||||||
$status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $Program --silent" -Wait -PassThru).ExitCode
|
$status = $(Start-Process -FilePath "winget" -ArgumentList "uninstall --id $($Program.winget) --silent" -Wait -PassThru -NoNewWindow).ExitCode
|
||||||
if($status -ne 0){
|
if($status -ne 0){
|
||||||
Write-Host "Failed to uninstall $Program."
|
Write-Host "Failed to uninstall $($Program.winget)."
|
||||||
} else {
|
} else {
|
||||||
Write-Host "$Program uninstalled successfully."
|
Write-Host "$($Program.winget) uninstalled successfully."
|
||||||
|
$failedPackages += $Program
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Failed to uninstall $Program due to an error: $_"
|
Write-Host "Failed to uninstall $($Program.winget) due to an error: $_"
|
||||||
|
$failedPackages += $Program
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$X++
|
$X++
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
|
Write-Progress -Activity "$manage Applications" -Status "Finished" -Completed
|
||||||
|
return $failedPackages;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ function Install-WinUtilWinget {
|
|||||||
Write-Host "Installing Winget w/ Prerequsites`r"
|
Write-Host "Installing Winget w/ Prerequsites`r"
|
||||||
Add-AppxProvisionedPackage -Online -PackagePath $ENV:TEMP\Microsoft.DesktopAppInstaller.msixbundle -DependencyPackagePath $ENV:TEMP\Microsoft.VCLibs.x64.Desktop.appx, $ENV:TEMP\Microsoft.UI.Xaml.x64.appx -LicensePath $ENV:TEMP\License1.xml
|
Add-AppxProvisionedPackage -Online -PackagePath $ENV:TEMP\Microsoft.DesktopAppInstaller.msixbundle -DependencyPackagePath $ENV:TEMP\Microsoft.VCLibs.x64.Desktop.appx, $ENV:TEMP\Microsoft.UI.Xaml.x64.appx -LicensePath $ENV:TEMP\License1.xml
|
||||||
Write-Host "Manually adding Winget Sources, from Winget CDN."
|
Write-Host "Manually adding Winget Sources, from Winget CDN."
|
||||||
Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix #Seems some installs of Winget don't add the repo source, this should makes sure that it's installed every time.
|
Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix #Seems some installs of Winget don't add the repo source, this should makes sure that it's installed every time.
|
||||||
Write-Host "Winget Installed" -ForegroundColor Green
|
Write-Host "Winget Installed" -ForegroundColor Green
|
||||||
Write-Host "Enabling NuGet and Module..."
|
Write-Host "Enabling NuGet and Module..."
|
||||||
Install-PackageProvider -Name NuGet -Force
|
Install-PackageProvider -Name NuGet -Force
|
||||||
@ -53,6 +53,8 @@ function Install-WinUtilWinget {
|
|||||||
Write-Host "Failure detected while installing via GitHub method. Continuing with Chocolatey method as fallback." -ForegroundColor Red
|
Write-Host "Failure detected while installing via GitHub method. Continuing with Chocolatey method as fallback." -ForegroundColor Red
|
||||||
# In case install fails via GitHub method.
|
# In case install fails via GitHub method.
|
||||||
Try {
|
Try {
|
||||||
|
# Install Choco if not already present
|
||||||
|
Install-WinUtilChoco
|
||||||
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install winget-cli"
|
Start-Process -Verb runas -FilePath powershell.exe -ArgumentList "choco install winget-cli"
|
||||||
Write-Host "Winget Installed" -ForegroundColor Green
|
Write-Host "Winget Installed" -ForegroundColor Green
|
||||||
Write-Output "Refreshing Environment Variables...`n"
|
Write-Output "Refreshing Environment Variables...`n"
|
||||||
|
@ -1,19 +1,3 @@
|
|||||||
function Invoke-MicroWin-Helper {
|
|
||||||
<#
|
|
||||||
|
|
||||||
.SYNOPSIS
|
|
||||||
checking unit tests
|
|
||||||
|
|
||||||
.PARAMETER Name
|
|
||||||
no parameters
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
placeholder
|
|
||||||
|
|
||||||
#>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function Test-CompatibleImage() {
|
function Test-CompatibleImage() {
|
||||||
<#
|
<#
|
||||||
|
|
||||||
@ -121,8 +105,8 @@ function Remove-Packages
|
|||||||
$_ -NotLike "*DesktopAppInstaller*" -AND
|
$_ -NotLike "*DesktopAppInstaller*" -AND
|
||||||
$_ -NotLike "*WebMediaExtensions*" -AND
|
$_ -NotLike "*WebMediaExtensions*" -AND
|
||||||
$_ -NotLike "*WMIC*" -AND
|
$_ -NotLike "*WMIC*" -AND
|
||||||
$_ -NotLike "*UI.XaML*"
|
$_ -NotLike "*UI.XaML*"
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($pkg in $pkglist)
|
foreach ($pkg in $pkglist)
|
||||||
{
|
{
|
||||||
@ -164,9 +148,9 @@ function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
|
|||||||
$_.PackageName -NotLike "*Notepad*" -and
|
$_.PackageName -NotLike "*Notepad*" -and
|
||||||
$_.PackageName -NotLike "*Printing*" -and
|
$_.PackageName -NotLike "*Printing*" -and
|
||||||
$_.PackageName -NotLike "*Wifi*" -and
|
$_.PackageName -NotLike "*Wifi*" -and
|
||||||
$_.PackageName -NotLike "*Foundation*"
|
$_.PackageName -NotLike "*Foundation*"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($?)
|
if ($?)
|
||||||
{
|
{
|
||||||
if ($keepSecurity) { $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { $_.PackageName -NotLike "*SecHealthUI*" }}
|
if ($keepSecurity) { $appxProvisionedPackages = $appxProvisionedPackages | Where-Object { $_.PackageName -NotLike "*SecHealthUI*" }}
|
||||||
@ -175,7 +159,13 @@ function Remove-ProvisionedPackages([switch] $keepSecurity = $false)
|
|||||||
{
|
{
|
||||||
$status = "Removing Provisioned $($appx.PackageName)"
|
$status = "Removing Provisioned $($appx.PackageName)"
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
Write-Progress -Activity "Removing Provisioned Apps" -Status $status -PercentComplete ($counter++/$appxProvisionedPackages.Count*100)
|
||||||
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
try {
|
||||||
|
Remove-AppxProvisionedPackage -Path $scratchDir -PackageName $appx.PackageName -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Application $($appx.PackageName) could not be removed"
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
|
||||||
}
|
}
|
||||||
@ -227,13 +217,13 @@ function Remove-FileOrDirectory([string] $pathToDelete, [string] $mask = "", [sw
|
|||||||
# Remove-Item -Path $directoryPath -Recurse -Force
|
# Remove-Item -Path $directoryPath -Recurse -Force
|
||||||
|
|
||||||
# # Grant full control to BUILTIN\Administrators using icacls
|
# # Grant full control to BUILTIN\Administrators using icacls
|
||||||
# $directoryPath = "$($scratchDir)\Windows\System32\WebThreatDefSvc"
|
# $directoryPath = "$($scratchDir)\Windows\System32\WebThreatDefSvc"
|
||||||
# takeown /a /r /d $yesNo[0] /f "$($directoryPath)" > $null
|
# takeown /a /r /d $yesNo[0] /f "$($directoryPath)" > $null
|
||||||
# icacls "$($directoryPath)" /q /c /t /reset > $null
|
# icacls "$($directoryPath)" /q /c /t /reset > $null
|
||||||
# icacls $directoryPath /setowner "*S-1-5-32-544"
|
# icacls $directoryPath /setowner "*S-1-5-32-544"
|
||||||
# icacls $directoryPath /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q
|
# icacls $directoryPath /grant "*S-1-5-32-544:(OI)(CI)F" /t /c /q
|
||||||
# Remove-Item -Path $directoryPath -Recurse -Force
|
# Remove-Item -Path $directoryPath -Recurse -Force
|
||||||
|
|
||||||
$itemsToDelete = [System.Collections.ArrayList]::new()
|
$itemsToDelete = [System.Collections.ArrayList]::new()
|
||||||
|
|
||||||
if ($mask -eq "")
|
if ($mask -eq "")
|
||||||
@ -241,9 +231,9 @@ function Remove-FileOrDirectory([string] $pathToDelete, [string] $mask = "", [sw
|
|||||||
Write-Debug "Adding $($pathToDelete) to array."
|
Write-Debug "Adding $($pathToDelete) to array."
|
||||||
[void]$itemsToDelete.Add($pathToDelete)
|
[void]$itemsToDelete.Add($pathToDelete)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Debug "Adding $($pathToDelete) to array and mask is $($mask)"
|
Write-Debug "Adding $($pathToDelete) to array and mask is $($mask)"
|
||||||
if ($Directory) { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse -Directory }
|
if ($Directory) { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse -Directory }
|
||||||
else { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse }
|
else { $itemsToDelete = Get-ChildItem $pathToDelete -Include $mask -Recurse }
|
||||||
}
|
}
|
||||||
@ -253,7 +243,7 @@ function Remove-FileOrDirectory([string] $pathToDelete, [string] $mask = "", [sw
|
|||||||
$status = "Deleting $($itemToDelete)"
|
$status = "Deleting $($itemToDelete)"
|
||||||
Write-Progress -Activity "Removing Items" -Status $status -PercentComplete ($counter++/$itemsToDelete.Count*100)
|
Write-Progress -Activity "Removing Items" -Status $status -PercentComplete ($counter++/$itemsToDelete.Count*100)
|
||||||
|
|
||||||
if (Test-Path -Path "$($itemToDelete)" -PathType Container)
|
if (Test-Path -Path "$($itemToDelete)" -PathType Container)
|
||||||
{
|
{
|
||||||
$status = "Deleting directory: $($itemToDelete)"
|
$status = "Deleting directory: $($itemToDelete)"
|
||||||
|
|
||||||
@ -473,16 +463,16 @@ function New-FirstRun {
|
|||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$RegistryPath,
|
[string]$RegistryPath,
|
||||||
|
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string]$ValueName
|
[string]$ValueName
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if the registry path exists
|
# Check if the registry path exists
|
||||||
if (Test-Path -Path $RegistryPath)
|
if (Test-Path -Path $RegistryPath)
|
||||||
{
|
{
|
||||||
$registryValue = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue
|
$registryValue = Get-ItemProperty -Path $RegistryPath -Name $ValueName -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
# Check if the registry value exists
|
# Check if the registry value exists
|
||||||
if ($registryValue)
|
if ($registryValue)
|
||||||
{
|
{
|
||||||
@ -500,7 +490,7 @@ function New-FirstRun {
|
|||||||
Write-Host "Registry path '$RegistryPath' not found."
|
Write-Host "Registry path '$RegistryPath' not found."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function Stop-UnnecessaryServices
|
function Stop-UnnecessaryServices
|
||||||
{
|
{
|
||||||
$servicesToExclude = @(
|
$servicesToExclude = @(
|
||||||
@ -566,8 +556,8 @@ function New-FirstRun {
|
|||||||
"vm3dservice",
|
"vm3dservice",
|
||||||
"webthreatdefusersvc_dc2a4",
|
"webthreatdefusersvc_dc2a4",
|
||||||
"wscsvc"
|
"wscsvc"
|
||||||
)
|
)
|
||||||
|
|
||||||
$runningServices = Get-Service | Where-Object { $servicesToExclude -notcontains $_.Name }
|
$runningServices = Get-Service | Where-Object { $servicesToExclude -notcontains $_.Name }
|
||||||
foreach($service in $runningServices)
|
foreach($service in $runningServices)
|
||||||
{
|
{
|
||||||
@ -576,28 +566,28 @@ function New-FirstRun {
|
|||||||
"Stopping service $($service.Name)" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
"Stopping service $($service.Name)" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"FirstStartup has worked" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
"FirstStartup has worked" | Out-File -FilePath c:\windows\LogFirstRun.txt -Append -NoClobber
|
||||||
|
|
||||||
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||||
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value 1
|
Set-ItemProperty -Path $Theme -Name AppsUseLightTheme -Value 1
|
||||||
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value 1
|
Set-ItemProperty -Path $Theme -Name SystemUsesLightTheme -Value 1
|
||||||
|
|
||||||
# figure this out later how to set updates to security only
|
# figure this out later how to set updates to security only
|
||||||
#Import-Module -Name PSWindowsUpdate;
|
#Import-Module -Name PSWindowsUpdate;
|
||||||
#Stop-Service -Name wuauserv
|
#Stop-Service -Name wuauserv
|
||||||
#Set-WUSettings -MicrosoftUpdateEnabled -AutoUpdateOption 'Never'
|
#Set-WUSettings -MicrosoftUpdateEnabled -AutoUpdateOption 'Never'
|
||||||
#Start-Service -Name wuauserv
|
#Start-Service -Name wuauserv
|
||||||
|
|
||||||
Stop-UnnecessaryServices
|
Stop-UnnecessaryServices
|
||||||
|
|
||||||
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
|
||||||
# Delete all files on the Taskbar
|
# Delete all files on the Taskbar
|
||||||
Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force
|
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 "FavoritesRemovedChanges"
|
||||||
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges"
|
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges"
|
||||||
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites"
|
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites"
|
||||||
|
|
||||||
# Stop-Process -Name explorer -Force
|
# Stop-Process -Name explorer -Force
|
||||||
|
|
||||||
$process = Get-Process -Name "explorer"
|
$process = Get-Process -Name "explorer"
|
||||||
@ -609,9 +599,9 @@ function New-FirstRun {
|
|||||||
# Delete Edge Icon from the desktop
|
# Delete Edge Icon from the desktop
|
||||||
$edgeShortcutFiles = Get-ChildItem -Path $desktopPath -Filter "*Edge*.lnk"
|
$edgeShortcutFiles = Get-ChildItem -Path $desktopPath -Filter "*Edge*.lnk"
|
||||||
# Check if Edge shortcuts exist on the desktop
|
# Check if Edge shortcuts exist on the desktop
|
||||||
if ($edgeShortcutFiles)
|
if ($edgeShortcutFiles)
|
||||||
{
|
{
|
||||||
foreach ($shortcutFile in $edgeShortcutFiles)
|
foreach ($shortcutFile in $edgeShortcutFiles)
|
||||||
{
|
{
|
||||||
# Remove each Edge shortcut
|
# Remove each Edge shortcut
|
||||||
Remove-Item -Path $shortcutFile.FullName -Force
|
Remove-Item -Path $shortcutFile.FullName -Force
|
||||||
@ -631,7 +621,7 @@ function New-FirstRun {
|
|||||||
$shortcutPath = Join-Path $desktopPath 'winutil.lnk'
|
$shortcutPath = Join-Path $desktopPath 'winutil.lnk'
|
||||||
# Create a shell object
|
# Create a shell object
|
||||||
$shell = New-Object -ComObject WScript.Shell
|
$shell = New-Object -ComObject WScript.Shell
|
||||||
|
|
||||||
# Create a shortcut object
|
# Create a shortcut object
|
||||||
$shortcut = $shell.CreateShortcut($shortcutPath)
|
$shortcut = $shell.CreateShortcut($shortcutPath)
|
||||||
|
|
||||||
@ -639,26 +629,26 @@ function New-FirstRun {
|
|||||||
{
|
{
|
||||||
$shortcut.IconLocation = "c:\Windows\cttlogo.png"
|
$shortcut.IconLocation = "c:\Windows\cttlogo.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set properties of the shortcut
|
# Set properties of the shortcut
|
||||||
$shortcut.TargetPath = "powershell.exe"
|
$shortcut.TargetPath = "powershell.exe"
|
||||||
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
||||||
# Save the shortcut
|
# Save the shortcut
|
||||||
$shortcut.Save()
|
$shortcut.Save()
|
||||||
|
|
||||||
# Make the shortcut have 'Run as administrator' property on
|
# Make the shortcut have 'Run as administrator' property on
|
||||||
$bytes = [System.IO.File]::ReadAllBytes($shortcutPath)
|
$bytes = [System.IO.File]::ReadAllBytes($shortcutPath)
|
||||||
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
# Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex
|
||||||
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
$bytes[0x15] = $bytes[0x15] -bor 0x20
|
||||||
[System.IO.File]::WriteAllBytes($shortcutPath, $bytes)
|
[System.IO.File]::WriteAllBytes($shortcutPath, $bytes)
|
||||||
|
|
||||||
Write-Host "Shortcut created at: $shortcutPath"
|
Write-Host "Shortcut created at: $shortcutPath"
|
||||||
#
|
#
|
||||||
# Done create WinUtil shortcut on the desktop
|
# Done create WinUtil shortcut on the desktop
|
||||||
# ************************************************
|
# ************************************************
|
||||||
|
|
||||||
Start-Process explorer
|
Start-Process explorer
|
||||||
|
|
||||||
'@
|
'@
|
||||||
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,21 @@
|
|||||||
function Invoke-WinUtilGPU {
|
function Invoke-WinUtilGPU {
|
||||||
$gpuInfo = Get-CimInstance Win32_VideoController
|
$gpuInfo = Get-CimInstance Win32_VideoController
|
||||||
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
# GPUs to blacklist from using Demanding Theming
|
||||||
$gpuName = $gpu.Name
|
$lowPowerGPUs = (
|
||||||
if ($gpuName -like "*NVIDIA*") {
|
"*NVIDIA GeForce*M*",
|
||||||
return $true # NVIDIA GPU found
|
"*NVIDIA GeForce*Laptop*",
|
||||||
}
|
"*NVIDIA GeForce*GT*",
|
||||||
}
|
"*AMD Radeon(TM)*",
|
||||||
|
"*UHD*"
|
||||||
|
)
|
||||||
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
foreach ($gpu in $gpuInfo) {
|
||||||
$gpuName = $gpu.Name
|
foreach ($gpuPattern in $lowPowerGPUs){
|
||||||
if ($gpuName -like "*AMD Radeon RX*") {
|
if ($gpu.Name -like $gpuPattern) {
|
||||||
return $true # AMD GPU Found
|
return $false
|
||||||
}
|
}
|
||||||
}
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
|
||||||
$gpuName = $gpu.Name
|
|
||||||
if ($gpuName -like "*UHD*") {
|
|
||||||
return $false # Intel Intergrated GPU Found
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($gpu in $gpuInfo) {
|
|
||||||
$gpuName = $gpu.Name
|
|
||||||
if ($gpuName -like "*AMD Radeon(TM)*") {
|
|
||||||
return $false # AMD Intergrated GPU Found
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $true
|
||||||
}
|
}
|
@ -15,13 +15,13 @@ Function Invoke-WinUtilMouseAcceleration {
|
|||||||
$MouseSpeed = 1
|
$MouseSpeed = 1
|
||||||
$MouseThreshold1 = 6
|
$MouseThreshold1 = 6
|
||||||
$MouseThreshold2 = 10
|
$MouseThreshold2 = 10
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host "Disabling Mouse Acceleration"
|
Write-Host "Disabling Mouse Acceleration"
|
||||||
$MouseSpeed = 0
|
$MouseSpeed = 0
|
||||||
$MouseThreshold1 = 0
|
$MouseThreshold1 = 0
|
||||||
$MouseThreshold2 = 0
|
$MouseThreshold2 = 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$Path = "HKCU:\Control Panel\Mouse"
|
$Path = "HKCU:\Control Panel\Mouse"
|
||||||
|
@ -15,7 +15,8 @@ function Invoke-WinUtilNumLock {
|
|||||||
Write-Host "Disabling Numlock on startup"
|
Write-Host "Disabling Numlock on startup"
|
||||||
$value = 0
|
$value = 0
|
||||||
}
|
}
|
||||||
$Path = "HKCU:\Control Panel\Keyboard"
|
New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS
|
||||||
|
$Path = "HKU:\.Default\Control Panel\Keyboard"
|
||||||
Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value
|
Set-ItemProperty -Path $Path -Name InitialKeyboardIndicators -Value $value
|
||||||
}
|
}
|
||||||
Catch [System.Security.SecurityException] {
|
Catch [System.Security.SecurityException] {
|
||||||
|
34
functions/private/Invoke-WinUtilSnapSuggestion.ps1
Normal file
34
functions/private/Invoke-WinUtilSnapSuggestion.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Invoke-WinUtilSnapSuggestion {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Snap Assist Suggestions on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Snap Assist Suggestions on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Snap Assist Suggestion On startup"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Snap Assist Suggestion On startup"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
# taskkill.exe /F /IM "explorer.exe"
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
taskkill.exe /F /IM "explorer.exe"
|
||||||
|
Set-ItemProperty -Path $Path -Name SnapAssist -Value $value
|
||||||
|
Start-Process "explorer.exe"
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
31
functions/private/Invoke-WinUtilSnapWindow.ps1
Normal file
31
functions/private/Invoke-WinUtilSnapWindow.ps1
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
function Invoke-WinUtilSnapWindow {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Disables/Enables Snapping Windows on startup
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Snapping Windows on startup
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Snap Windows On startup | Relogin Required"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Snap Windows On startup | Relogin Required"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Control Panel\Desktop"
|
||||||
|
Set-ItemProperty -Path $Path -Name WindowArrangementActive -Value $value
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@ Function Invoke-WinUtilStickyKeys {
|
|||||||
Indicates whether to enable or disable Sticky Keys on startup
|
Indicates whether to enable or disable Sticky Keys on startup
|
||||||
#>
|
#>
|
||||||
Param($Enabled)
|
Param($Enabled)
|
||||||
Try {
|
Try {
|
||||||
if ($Enabled -eq $false){
|
if ($Enabled -eq $false){
|
||||||
Write-Host "Enabling Sticky Keys On startup"
|
Write-Host "Enabling Sticky Keys On startup"
|
||||||
$value = 510
|
$value = 510
|
||||||
|
34
functions/private/Invoke-WinUtilTaskView.ps1
Normal file
34
functions/private/Invoke-WinUtilTaskView.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Invoke-WinUtilTaskView {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enable/Disable Task View
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Task View
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Task View"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Task View"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||||
|
Set-ItemProperty -Path $Path -Name ShowTaskViewButton -Value $value
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
34
functions/private/Invoke-WinUtilTaskbarSearch.ps1
Normal file
34
functions/private/Invoke-WinUtilTaskbarSearch.ps1
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
function Invoke-WinUtilTaskbarSearch {
|
||||||
|
<#
|
||||||
|
|
||||||
|
.SYNOPSIS
|
||||||
|
Enable/Disable Taskbar Widgets
|
||||||
|
|
||||||
|
.PARAMETER Enabled
|
||||||
|
Indicates whether to enable or disable Taskbar Widgets
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param($Enabled)
|
||||||
|
Try{
|
||||||
|
if ($Enabled -eq $false){
|
||||||
|
Write-Host "Enabling Search Button"
|
||||||
|
$value = 1
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Disabling Search Button"
|
||||||
|
$value = 0
|
||||||
|
}
|
||||||
|
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search\"
|
||||||
|
Set-ItemProperty -Path $Path -Name SearchboxTaskbarMode -Value $value
|
||||||
|
}
|
||||||
|
Catch [System.Security.SecurityException] {
|
||||||
|
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
|
||||||
|
}
|
||||||
|
Catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
|
Write-Warning $psitem.Exception.ErrorRecord
|
||||||
|
}
|
||||||
|
Catch{
|
||||||
|
Write-Warning "Unable to set $Name due to unhandled exception"
|
||||||
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
|
}
|
||||||
|
}
|
@ -50,7 +50,7 @@ function Invoke-WinUtilTweaks {
|
|||||||
Write-Debug "KeepServiceStartup is $KeepServiceStartup"
|
Write-Debug "KeepServiceStartup is $KeepServiceStartup"
|
||||||
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
$sync.configs.tweaks.$CheckBox.service | ForEach-Object {
|
||||||
$changeservice = $true
|
$changeservice = $true
|
||||||
|
|
||||||
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable memeber, which's the 'OriginalService' Property
|
# The check for !($undo) is required, without it the script will throw an error for accessing unavailable memeber, which's the 'OriginalService' Property
|
||||||
if($KeepServiceStartup -AND !($undo)) {
|
if($KeepServiceStartup -AND !($undo)) {
|
||||||
try {
|
try {
|
||||||
|
@ -2,10 +2,10 @@ function Show-CustomDialog {
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Displays a custom dialog box with an image, heading, message, and an OK button.
|
Displays a custom dialog box with an image, heading, message, and an OK button.
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This function creates a custom dialog box with the specified message and additional elements such as an image, heading, and an OK button. The dialog box is designed with a green border, rounded corners, and a black background.
|
This function creates a custom dialog box with the specified message and additional elements such as an image, heading, and an OK button. The dialog box is designed with a green border, rounded corners, and a black background.
|
||||||
|
|
||||||
.PARAMETER Message
|
.PARAMETER Message
|
||||||
The message to be displayed in the dialog box.
|
The message to be displayed in the dialog box.
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ function Show-CustomDialog {
|
|||||||
|
|
||||||
.PARAMETER Height
|
.PARAMETER Height
|
||||||
The height of the custom dialog window.
|
The height of the custom dialog window.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
|
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
|
||||||
|
|
||||||
#>
|
#>
|
||||||
param(
|
param(
|
||||||
[string]$Message,
|
[string]$Message,
|
||||||
@ -99,7 +99,7 @@ function Show-CustomDialog {
|
|||||||
$grid.RowDefinitions.Add($row0)
|
$grid.RowDefinitions.Add($row0)
|
||||||
$grid.RowDefinitions.Add($row1)
|
$grid.RowDefinitions.Add($row1)
|
||||||
$grid.RowDefinitions.Add($row2)
|
$grid.RowDefinitions.Add($row2)
|
||||||
|
|
||||||
# Add StackPanel for horizontal layout with margins
|
# Add StackPanel for horizontal layout with margins
|
||||||
$stackPanel = New-Object Windows.Controls.StackPanel
|
$stackPanel = New-Object Windows.Controls.StackPanel
|
||||||
$stackPanel.Margin = New-Object Windows.Thickness(10) # Add margins around the stack panel
|
$stackPanel.Margin = New-Object Windows.Thickness(10) # Add margins around the stack panel
|
||||||
@ -113,7 +113,7 @@ function Show-CustomDialog {
|
|||||||
$viewbox = New-Object Windows.Controls.Viewbox
|
$viewbox = New-Object Windows.Controls.Viewbox
|
||||||
$viewbox.Width = 25
|
$viewbox.Width = 25
|
||||||
$viewbox.Height = 25
|
$viewbox.Height = 25
|
||||||
|
|
||||||
# Combine the paths into a single string
|
# Combine the paths into a single string
|
||||||
# $cttLogoPath = @"
|
# $cttLogoPath = @"
|
||||||
# M174 1094 c-4 -14 -4 -55 -2 -92 3 -57 9 -75 41 -122 41 -60 45 -75 22 -84 -25 -9 -17 -21 30 -44 l45 -22 0 -103 c0 -91 3 -109 26 -155 30 -60 65 -87 204 -157 l95 -48 110 58 c184 96 205 127 205 293 l0 108 45 22 c47 23 55 36 30 46 -22 8 -18 30 9 63 13 16 34 48 46 71 20 37 21 52 15 116 l-6 73 -69 -23 c-38 -12 -137 -59 -220 -103 -82 -45 -160 -81 -171 -81 -12 0 -47 15 -78 34 -85 51 -239 127 -309 151 l-62 22 -6 -23z m500 -689 c20 -8 36 -19 36 -24 0 -18 -53 -51 -80 -51 -28 0 -80 33 -80 51 0 10 55 38 76 39 6 0 28 -7 48 -15z
|
# M174 1094 c-4 -14 -4 -55 -2 -92 3 -57 9 -75 41 -122 41 -60 45 -75 22 -84 -25 -9 -17 -21 30 -44 l45 -22 0 -103 c0 -91 3 -109 26 -155 30 -60 65 -87 204 -157 l95 -48 110 58 c184 96 205 127 205 293 l0 108 45 22 c47 23 55 36 30 46 -22 8 -18 30 9 63 13 16 34 48 46 71 20 37 21 52 15 116 l-6 73 -69 -23 c-38 -12 -137 -59 -220 -103 -82 -45 -160 -81 -171 -81 -12 0 -47 15 -78 34 -85 51 -239 127 -309 151 l-62 22 -6 -23z m500 -689 c20 -8 36 -19 36 -24 0 -18 -53 -51 -80 -51 -28 0 -80 33 -80 51 0 10 55 38 76 39 6 0 28 -7 48 -15z
|
||||||
@ -159,7 +159,7 @@ $cttLogoPath = @"
|
|||||||
46.21,102.83 36.63,98.57 31.04,93.68
|
46.21,102.83 36.63,98.57 31.04,93.68
|
||||||
16.88,81.28 19.00,62.88 19.00,46.00 Z
|
16.88,81.28 19.00,62.88 19.00,46.00 Z
|
||||||
"@
|
"@
|
||||||
|
|
||||||
# Add SVG path
|
# Add SVG path
|
||||||
$svgPath = New-Object Windows.Shapes.Path
|
$svgPath = New-Object Windows.Shapes.Path
|
||||||
$svgPath.Data = [Windows.Media.Geometry]::Parse($cttLogoPath)
|
$svgPath.Data = [Windows.Media.Geometry]::Parse($cttLogoPath)
|
||||||
@ -167,7 +167,7 @@ $cttLogoPath = @"
|
|||||||
|
|
||||||
# Add SVG path to Viewbox
|
# Add SVG path to Viewbox
|
||||||
$viewbox.Child = $svgPath
|
$viewbox.Child = $svgPath
|
||||||
|
|
||||||
# Add SVG path to the stack panel
|
# Add SVG path to the stack panel
|
||||||
$stackPanel.Children.Add($viewbox)
|
$stackPanel.Children.Add($viewbox)
|
||||||
|
|
||||||
@ -178,17 +178,67 @@ $cttLogoPath = @"
|
|||||||
$winutilTextBlock.Foreground = $foregroundColor
|
$winutilTextBlock.Foreground = $foregroundColor
|
||||||
$winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block
|
$winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block
|
||||||
$stackPanel.Children.Add($winutilTextBlock)
|
$stackPanel.Children.Add($winutilTextBlock)
|
||||||
|
|
||||||
# Add TextBlock for information with text wrapping and margins
|
# Add TextBlock for information with text wrapping and margins
|
||||||
$messageTextBlock = New-Object Windows.Controls.TextBlock
|
$messageTextBlock = New-Object Windows.Controls.TextBlock
|
||||||
$messageTextBlock.Text = $Message
|
|
||||||
$messageTextBlock.TextWrapping = [Windows.TextWrapping]::Wrap # Enable text wrapping
|
$messageTextBlock.TextWrapping = [Windows.TextWrapping]::Wrap # Enable text wrapping
|
||||||
$messageTextBlock.HorizontalAlignment = [Windows.HorizontalAlignment]::Left
|
$messageTextBlock.HorizontalAlignment = [Windows.HorizontalAlignment]::Left
|
||||||
$messageTextBlock.VerticalAlignment = [Windows.VerticalAlignment]::Top
|
$messageTextBlock.VerticalAlignment = [Windows.VerticalAlignment]::Top
|
||||||
$messageTextBlock.Margin = New-Object Windows.Thickness(10) # Add margins around the text block
|
$messageTextBlock.Margin = New-Object Windows.Thickness(10) # Add margins around the text block
|
||||||
|
|
||||||
|
# Define the Regex to find hyperlinks formatted as HTML <a> tags
|
||||||
|
$regex = [regex]::new('<a href="([^"]+)">([^<]+)</a>')
|
||||||
|
$lastPos = 0
|
||||||
|
|
||||||
|
# Iterate through each match and add regular text and hyperlinks
|
||||||
|
foreach ($match in $regex.Matches($Message)) {
|
||||||
|
# Add the text before the hyperlink, if any
|
||||||
|
$textBefore = $Message.Substring($lastPos, $match.Index - $lastPos)
|
||||||
|
if ($textBefore.Length -gt 0) {
|
||||||
|
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($textBefore)))
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create and add the hyperlink
|
||||||
|
$hyperlink = New-Object Windows.Documents.Hyperlink
|
||||||
|
$hyperlink.NavigateUri = New-Object System.Uri($match.Groups[1].Value)
|
||||||
|
$hyperlink.Inlines.Add($match.Groups[2].Value)
|
||||||
|
$hyperlink.TextDecorations = [Windows.TextDecorations]::None # Remove underline
|
||||||
|
$hyperlink.Foreground = $foregroundColor
|
||||||
|
$hyperlink.Add_Click({
|
||||||
|
param($sender, $args)
|
||||||
|
Start-Process $sender.NavigateUri.AbsoluteUri
|
||||||
|
})
|
||||||
|
$hyperlink.Add_MouseEnter({
|
||||||
|
param($sender, $args)
|
||||||
|
$sender.Foreground = [Windows.Media.Brushes]::LightGray
|
||||||
|
})
|
||||||
|
$hyperlink.Add_MouseLeave({
|
||||||
|
param($sender, $args)
|
||||||
|
$sender.Foreground = $foregroundColor
|
||||||
|
})
|
||||||
|
|
||||||
|
$messageTextBlock.Inlines.Add($hyperlink)
|
||||||
|
|
||||||
|
# Update the last position
|
||||||
|
$lastPos = $match.Index + $match.Length
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add any remaining text after the last hyperlink
|
||||||
|
if ($lastPos -lt $Message.Length) {
|
||||||
|
$textAfter = $Message.Substring($lastPos)
|
||||||
|
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($textAfter)))
|
||||||
|
}
|
||||||
|
|
||||||
|
# If no matches, add the entire message as a run
|
||||||
|
if ($regex.Matches($Message).Count -eq 0) {
|
||||||
|
$messageTextBlock.Inlines.Add((New-Object Windows.Documents.Run($Message)))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Add the TextBlock to the Grid
|
||||||
$grid.Children.Add($messageTextBlock)
|
$grid.Children.Add($messageTextBlock)
|
||||||
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
[Windows.Controls.Grid]::SetRow($messageTextBlock, 1) # Set the row to the second row (0-based index)
|
||||||
|
|
||||||
|
|
||||||
# Add OK button
|
# Add OK button
|
||||||
$okButton = New-Object Windows.Controls.Button
|
$okButton = New-Object Windows.Controls.Button
|
||||||
$okButton.Content = "OK"
|
$okButton.Content = "OK"
|
||||||
|
@ -20,13 +20,22 @@ function Test-WinUtilPackageManager {
|
|||||||
$status = "not-installed"
|
$status = "not-installed"
|
||||||
|
|
||||||
if ($winget) {
|
if ($winget) {
|
||||||
# Install Winget if not detected
|
# Check if Winget is available while getting it's Version if it's available
|
||||||
$wingetExists = Get-Command -Name winget -ErrorAction SilentlyContinue
|
$wingetExists = $true
|
||||||
|
try {
|
||||||
if ($wingetExists) {
|
$wingetVersionFull = winget --version
|
||||||
# Check Winget Version
|
} catch [System.Management.Automation.CommandNotFoundException], [System.Management.Automation.ApplicationFailedException] {
|
||||||
$wingetVersionFull = (winget --version) # Full Version without 'v'.
|
Write-Warning "Winget was not found due to un-availablity reasons"
|
||||||
|
$wingetExists = $false
|
||||||
|
} catch {
|
||||||
|
Write-Warning "Winget was not found due to un-known reasons, The Stack Trace is:`n$($psitem.Exception.StackTrace)"
|
||||||
|
$wingetExists = $false
|
||||||
|
}
|
||||||
|
|
||||||
|
# If Winget is available, Parse it's Version and give proper information to Terminal Output.
|
||||||
|
# If it isn't available, the return of this funtion will be "not-installed", indicating that
|
||||||
|
# Winget isn't installed/available on The System.
|
||||||
|
if ($wingetExists) {
|
||||||
# Check if Preview Version
|
# Check if Preview Version
|
||||||
if ($wingetVersionFull.Contains("-preview")) {
|
if ($wingetVersionFull.Contains("-preview")) {
|
||||||
$wingetVersion = $wingetVersionFull.Trim("-preview")
|
$wingetVersion = $wingetVersionFull.Trim("-preview")
|
||||||
@ -61,7 +70,7 @@ function Test-WinUtilPackageManager {
|
|||||||
Write-Host " - Winget is Out of Date" -ForegroundColor Red
|
Write-Host " - Winget is Out of Date" -ForegroundColor Red
|
||||||
$status = "outdated"
|
$status = "outdated"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "===========================================" -ForegroundColor Red
|
Write-Host "===========================================" -ForegroundColor Red
|
||||||
Write-Host "--- Winget is not installed ---" -ForegroundColor Red
|
Write-Host "--- Winget is not installed ---" -ForegroundColor Red
|
||||||
Write-Host "===========================================" -ForegroundColor Red
|
Write-Host "===========================================" -ForegroundColor Red
|
||||||
|
@ -8,13 +8,13 @@ function Invoke-ScratchDialog {
|
|||||||
|
|
||||||
.PARAMETER Button
|
.PARAMETER Button
|
||||||
#>
|
#>
|
||||||
$sync.WPFMicrowinISOScratchDir.IsChecked
|
$sync.WPFMicrowinISOScratchDir.IsChecked
|
||||||
|
|
||||||
|
|
||||||
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
|
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
|
||||||
$Dialog = New-Object System.Windows.Forms.FolderBrowserDialog
|
$Dialog = New-Object System.Windows.Forms.FolderBrowserDialog
|
||||||
$Dialog.SelectedPath = $sync.MicrowinScratchDirBox.Text
|
$Dialog.SelectedPath = $sync.MicrowinScratchDirBox.Text
|
||||||
$Dialog.ShowDialog()
|
$Dialog.ShowDialog()
|
||||||
$filePath = $Dialog.SelectedPath
|
$filePath = $Dialog.SelectedPath
|
||||||
Write-Host "No ISO is chosen+ $filePath"
|
Write-Host "No ISO is chosen+ $filePath"
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ function Invoke-ScratchDialog {
|
|||||||
Write-Host "No Folder had chosen"
|
Write-Host "No Folder had chosen"
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$sync.MicrowinScratchDirBox.Text = Join-Path $filePath "\"
|
$sync.MicrowinScratchDirBox.Text = Join-Path $filePath "\"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,12 @@ function Invoke-WPFButton {
|
|||||||
"WPFinstall" {Invoke-WPFInstall}
|
"WPFinstall" {Invoke-WPFInstall}
|
||||||
"WPFuninstall" {Invoke-WPFUnInstall}
|
"WPFuninstall" {Invoke-WPFUnInstall}
|
||||||
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
||||||
"WPFdesktop" {Invoke-WPFPresets "Desktop"}
|
"WPFstandard" {Invoke-WPFPresets "Standard"}
|
||||||
"WPFlaptop" {Invoke-WPFPresets "laptop"}
|
"WPFminimal" {Invoke-WPFPresets "Minimal"}
|
||||||
"WPFminimal" {Invoke-WPFPresets "minimal"}
|
|
||||||
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
"WPFclear" {Invoke-WPFPresets -preset $null -imported $true}
|
||||||
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
"WPFclearWinget" {Invoke-WPFPresets -preset $null -imported $true -CheckBox "WPFInstall"}
|
||||||
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
||||||
"WPFOOSUbutton" {Invoke-WPFOOSU -action "customize"}
|
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
||||||
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enabled"}
|
||||||
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disabled"}
|
||||||
"WPFundoall" {Invoke-WPFundoall}
|
"WPFundoall" {Invoke-WPFundoall}
|
||||||
|
@ -3,11 +3,12 @@ function Invoke-WPFFixesWinget {
|
|||||||
<#
|
<#
|
||||||
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Fixes Winget by running choco install winget
|
Fixes Winget by running choco install winget
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
BravoNorris for the fantastic idea of a button to reinstall winget
|
BravoNorris for the fantastic idea of a button to reinstall winget
|
||||||
#>
|
#>
|
||||||
|
# Install Choco if not already present
|
||||||
|
Install-WinUtilChoco
|
||||||
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
Start-Process -FilePath "choco" -ArgumentList "install winget -y --force" -NoNewWindow -Wait
|
||||||
|
|
||||||
}
|
}
|
@ -12,7 +12,7 @@ function Invoke-WPFGetIso {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$sync.BusyMessage.Visibility="Visible"
|
$sync.BusyMessage.Visibility="Visible"
|
||||||
$sync.BusyText.Text="N Busy"
|
$sync.BusyText.Text="N Busy"
|
||||||
|
|
||||||
|
|
||||||
@ -22,28 +22,26 @@ function Invoke-WPFGetIso {
|
|||||||
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
|
Write-Host "/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | | "
|
||||||
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
Write-Host "\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_| "
|
||||||
|
|
||||||
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
$oscdimgPath = Join-Path $env:TEMP 'oscdimg.exe'
|
||||||
if( ! (Test-Path $oscdimgPath -PathType Leaf) ) {
|
|
||||||
$oscdimgPath = Join-Path '.\releases\' 'oscdimg.exe'
|
|
||||||
}
|
|
||||||
|
|
||||||
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
$oscdImgFound = [bool] (Get-Command -ErrorAction Ignore -Type Application oscdimg.exe) -or (Test-Path $oscdimgPath -PathType Leaf)
|
||||||
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
Write-Host "oscdimg.exe on system: $oscdImgFound"
|
||||||
|
|
||||||
if (!$oscdImgFound)
|
if (!$oscdImgFound)
|
||||||
{
|
{
|
||||||
$downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked
|
$downloadFromGitHub = $sync.WPFMicrowinDownloadFromGitHub.IsChecked
|
||||||
$sync.BusyMessage.Visibility="Hidden"
|
$sync.BusyMessage.Visibility="Hidden"
|
||||||
|
|
||||||
if (!$downloadFromGitHub)
|
if (!$downloadFromGitHub)
|
||||||
{
|
{
|
||||||
# only show the message to people who did check the box to download from github, if you check the box
|
# only show the message to people who did check the box to download from github, if you check the box
|
||||||
# you consent to downloading it, no need to show extra dialogs
|
# you consent to downloading it, no need to show extra dialogs
|
||||||
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
[System.Windows.MessageBox]::Show("oscdimge.exe is not found on the system, winutil will now attempt do download and install it using choco. This might take a long time.")
|
||||||
# the step below needs choco to download oscdimg
|
# the step below needs choco to download oscdimg
|
||||||
|
# Install Choco if not already present
|
||||||
|
Install-WinUtilChoco
|
||||||
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
$chocoFound = [bool] (Get-Command -ErrorAction Ignore -Type Application choco)
|
||||||
Write-Host "choco on system: $chocoFound"
|
Write-Host "choco on system: $chocoFound"
|
||||||
if (!$chocoFound)
|
if (!$chocoFound)
|
||||||
{
|
{
|
||||||
[System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe")
|
[System.Windows.MessageBox]::Show("choco.exe is not found on the system, you need choco to download oscdimg.exe")
|
||||||
return
|
return
|
||||||
@ -108,7 +106,7 @@ function Invoke-WPFGetIso {
|
|||||||
Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
|
Write-Host "You don't have enough space for this operation. You need at least $([Math]::Round(($isoSize / ([Math]::Pow(1024, 2))) * 2, 2)) MB of free space to copy the ISO files to a temp directory and to be able to perform additional operations."
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Host "You have enough space for this operation."
|
Write-Host "You have enough space for this operation."
|
||||||
}
|
}
|
||||||
@ -146,7 +144,7 @@ function Invoke-WPFGetIso {
|
|||||||
$sync.MicrowinScratchDirBox.Text = Join-Path $sync.MicrowinScratchDirBox.Text.Trim() '\'
|
$sync.MicrowinScratchDirBox.Text = Join-Path $sync.MicrowinScratchDirBox.Text.Trim() '\'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Detect if the folders already exist and remove them
|
# Detect if the folders already exist and remove them
|
||||||
if (($sync.MicrowinMountDir.Text -ne "") -and (Test-Path -Path $sync.MicrowinMountDir.Text))
|
if (($sync.MicrowinMountDir.Text -ne "") -and (Test-Path -Path $sync.MicrowinMountDir.Text))
|
||||||
{
|
{
|
||||||
@ -166,7 +164,7 @@ function Invoke-WPFGetIso {
|
|||||||
$randomMicrowin = "Microwin_${timestamp}_${randomNumber}"
|
$randomMicrowin = "Microwin_${timestamp}_${randomNumber}"
|
||||||
$randomMicrowinScratch = "MicrowinScratch_${timestamp}_${randomNumber}"
|
$randomMicrowinScratch = "MicrowinScratch_${timestamp}_${randomNumber}"
|
||||||
$sync.BusyText.Text=" - Mounting"
|
$sync.BusyText.Text=" - Mounting"
|
||||||
Write-Host "Mounting Iso. Please wait."
|
Write-Host "Mounting Iso. Please wait."
|
||||||
if ($sync.MicrowinScratchDirBox.Text -eq "") {
|
if ($sync.MicrowinScratchDirBox.Text -eq "") {
|
||||||
$mountDir = Join-Path $env:TEMP $randomMicrowin
|
$mountDir = Join-Path $env:TEMP $randomMicrowin
|
||||||
$scratchDir = Join-Path $env:TEMP $randomMicrowinScratch
|
$scratchDir = Join-Path $env:TEMP $randomMicrowinScratch
|
||||||
@ -182,12 +180,12 @@ function Invoke-WPFGetIso {
|
|||||||
Write-Host "Image dir is $mountDir"
|
Write-Host "Image dir is $mountDir"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
#$data = @($driveLetter, $filePath)
|
#$data = @($driveLetter, $filePath)
|
||||||
New-Item -ItemType Directory -Force -Path "$($mountDir)" | Out-Null
|
New-Item -ItemType Directory -Force -Path "$($mountDir)" | Out-Null
|
||||||
New-Item -ItemType Directory -Force -Path "$($scratchDir)" | Out-Null
|
New-Item -ItemType Directory -Force -Path "$($scratchDir)" | Out-Null
|
||||||
Write-Host "Copying Windows image. This will take awhile, please don't use UI or cancel this step!"
|
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 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
|
# xcopy.exe /E /I /H /R /Y /J $DriveLetter":" $mountDir >$null
|
||||||
$totalTime = Measure-Command { Copy-Files "$($driveLetter):" $mountDir -Recurse -Force }
|
$totalTime = Measure-Command { Copy-Files "$($driveLetter):" $mountDir -Recurse -Force }
|
||||||
|
@ -33,12 +33,12 @@ function Invoke-WPFImpex {
|
|||||||
|
|
||||||
if($FileBrowser.FileName -eq ""){
|
if($FileBrowser.FileName -eq ""){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$Config = $FileBrowser.FileName
|
$Config = $FileBrowser.FileName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type -eq "export"){
|
if ($type -eq "export"){
|
||||||
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
|
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
|
||||||
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
||||||
|
@ -12,23 +12,43 @@ function Invoke-WPFInstall {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$WingetInstall = (Get-WinUtilCheckBoxes)["Install"]
|
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||||
|
Write-Host $PackagesToInstall
|
||||||
if ($wingetinstall.Count -eq 0) {
|
if ($PackagesToInstall.Count -eq 0) {
|
||||||
$WarningMsg = "Please select the program(s) to install or upgrade"
|
$WarningMsg = "Please select the program(s) to install or upgrade"
|
||||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-WPFRunspace -ArgumentList $WingetInstall -DebugPreference $DebugPreference -ScriptBlock {
|
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
param($WingetInstall, $DebugPreference)
|
param($PackagesToInstall, $DebugPreference)
|
||||||
|
$packagesWinget, $packagesChoco = {
|
||||||
|
$packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
foreach ($package in $PackagesToInstall) {
|
||||||
|
if ($package.winget -eq "na") {
|
||||||
|
$packagesChoco.add($package)
|
||||||
|
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
||||||
|
} else {
|
||||||
|
$packagesWinget.add($package)
|
||||||
|
Write-Host "Queueing $($package.winget) for Winget install"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $packagesWinget, $packagesChoco
|
||||||
|
}.Invoke($PackagesToInstall)
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
|
$errorPackages = @()
|
||||||
Install-WinUtilWinget
|
if($packagesWinget.Count -gt 0){
|
||||||
Install-WinUtilProgramWinget -ProgramsToInstall $WingetInstall
|
Install-WinUtilWinget
|
||||||
|
$errorPackages += Install-WinUtilProgramWinget -ProgramsToInstall $packagesWinget
|
||||||
|
$errorPackages| ForEach-Object {if($_.choco -ne "na") {$packagesChoco += $_}}
|
||||||
|
}
|
||||||
|
if($packagesChoco.Count -gt 0){
|
||||||
|
Install-WinUtilChoco
|
||||||
|
Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco
|
||||||
|
}
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
Write-Host "-- Installs have finished ---"
|
Write-Host "-- Installs have finished ---"
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
|
@ -53,6 +53,7 @@ public class PowerManagement {
|
|||||||
$keepEdge = $sync.WPFMicrowinKeepEdge.IsChecked
|
$keepEdge = $sync.WPFMicrowinKeepEdge.IsChecked
|
||||||
$copyToUSB = $sync.WPFMicrowinCopyToUsb.IsChecked
|
$copyToUSB = $sync.WPFMicrowinCopyToUsb.IsChecked
|
||||||
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
|
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
|
||||||
|
$importDrivers = $sync.MicrowinImportDrivers.IsChecked
|
||||||
|
|
||||||
$mountDir = $sync.MicrowinMountDir.Text
|
$mountDir = $sync.MicrowinMountDir.Text
|
||||||
$scratchDir = $sync.MicrowinScratchDir.Text
|
$scratchDir = $sync.MicrowinScratchDir.Text
|
||||||
@ -91,7 +92,7 @@ public class PowerManagement {
|
|||||||
|
|
||||||
$mountDirExists = Test-Path $mountDir
|
$mountDirExists = Test-Path $mountDir
|
||||||
$scratchDirExists = Test-Path $scratchDir
|
$scratchDirExists = Test-Path $scratchDir
|
||||||
if (-not $mountDirExists -or -not $scratchDirExists)
|
if (-not $mountDirExists -or -not $scratchDirExists)
|
||||||
{
|
{
|
||||||
Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
|
Write-Error "Required directories '$mountDirExists' '$scratchDirExists' and do not exist."
|
||||||
return
|
return
|
||||||
@ -111,15 +112,56 @@ public class PowerManagement {
|
|||||||
return
|
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)
|
if ($injectDrivers)
|
||||||
{
|
{
|
||||||
$driverPath = $sync.MicrowinDriverLocation.Text
|
$driverPath = $sync.MicrowinDriverLocation.Text
|
||||||
if (Test-Path $driverPath)
|
if (Test-Path $driverPath)
|
||||||
{
|
{
|
||||||
Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) "
|
Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) "
|
||||||
Add-WindowsDriver -Path "$scratchDir" -Recurse -Driver "$driverPath"
|
dism /English /image:$scratchDir /add-driver /driver:$driverPath /recurse | Out-Host
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Host "Path to drivers is invalid continuing without driver injection"
|
Write-Host "Path to drivers is invalid continuing without driver injection"
|
||||||
}
|
}
|
||||||
@ -140,12 +182,12 @@ public class PowerManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# special code, for some reason when you try to delete some inbox apps
|
# special code, for some reason when you try to delete some inbox apps
|
||||||
# we have to get and delete log files directory.
|
# we have to get and delete log files directory.
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LogFiles\WMI\RtBackup" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\WebThreatDefSvc" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\WebThreatDefSvc" -Directory
|
||||||
|
|
||||||
# Defender is hidden in 2 places we removed a feature above now need to remove it from the disk
|
# Defender is hidden in 2 places we removed a feature above now need to remove it from the disk
|
||||||
if (!$keepDefender)
|
if (!$keepDefender)
|
||||||
{
|
{
|
||||||
Write-Host "Removing Defender"
|
Write-Host "Removing Defender"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Defender" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Defender" -Directory
|
||||||
@ -162,7 +204,7 @@ public class PowerManagement {
|
|||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\DiagTrack" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\InboxApps" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\SecurityHealthSystray.exe"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\SecurityHealthSystray.exe"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe"
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Windows\System32\LocationNotificationWindows.exe"
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Photo Viewer" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files\Windows Photo Viewer" -Directory
|
||||||
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Media Player" -Directory
|
Remove-FileOrDirectory -pathToDelete "$($scratchDir)\Program Files (x86)\Windows Media Player" -Directory
|
||||||
@ -202,26 +244,27 @@ public class PowerManagement {
|
|||||||
$desktopDir = "$($scratchDir)\Windows\Users\Default\Desktop"
|
$desktopDir = "$($scratchDir)\Windows\Users\Default\Desktop"
|
||||||
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
New-Item -ItemType Directory -Force -Path "$desktopDir"
|
||||||
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
dism /English /image:$($scratchDir) /set-profilepath:"$($scratchDir)\Windows\Users\Default"
|
||||||
$command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
|
||||||
$shortcutPath = "$desktopDir\WinUtil.lnk"
|
|
||||||
$shell = New-Object -ComObject WScript.Shell
|
|
||||||
$shortcut = $shell.CreateShortcut($shortcutPath)
|
|
||||||
|
|
||||||
if (Test-Path -Path "$env:TEMP\cttlogo.png")
|
# $command = "powershell.exe -NoProfile -ExecutionPolicy Bypass -Command 'irm https://christitus.com/win | iex'"
|
||||||
{
|
# $shortcutPath = "$desktopDir\WinUtil.lnk"
|
||||||
$pngPath = "$env:TEMP\cttlogo.png"
|
# $shell = New-Object -ComObject WScript.Shell
|
||||||
$icoPath = "$env:TEMP\cttlogo.ico"
|
# $shortcut = $shell.CreateShortcut($shortcutPath)
|
||||||
ConvertTo-Icon -bitmapPath $pngPath -iconPath $icoPath
|
|
||||||
Write-Host "ICO file created at: $icoPath"
|
|
||||||
Copy-Item "$env:TEMP\cttlogo.png" "$($scratchDir)\Windows\cttlogo.png" -force
|
|
||||||
Copy-Item "$env:TEMP\cttlogo.ico" "$($scratchDir)\Windows\cttlogo.ico" -force
|
|
||||||
$shortcut.IconLocation = "c:\Windows\cttlogo.ico"
|
|
||||||
}
|
|
||||||
|
|
||||||
$shortcut.TargetPath = "powershell.exe"
|
# if (Test-Path -Path "$env:TEMP\cttlogo.png")
|
||||||
$shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
# {
|
||||||
$shortcut.Save()
|
# $pngPath = "$env:TEMP\cttlogo.png"
|
||||||
Write-Host "Shortcut to winutil created at: $shortcutPath"
|
# $icoPath = "$env:TEMP\cttlogo.ico"
|
||||||
|
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $icoPath
|
||||||
|
# Write-Host "ICO file created at: $icoPath"
|
||||||
|
# Copy-Item "$env:TEMP\cttlogo.png" "$($scratchDir)\Windows\cttlogo.png" -force
|
||||||
|
# Copy-Item "$env:TEMP\cttlogo.ico" "$($scratchDir)\Windows\cttlogo.ico" -force
|
||||||
|
# $shortcut.IconLocation = "c:\Windows\cttlogo.ico"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# $shortcut.TargetPath = "powershell.exe"
|
||||||
|
# $shortcut.Arguments = "-NoProfile -ExecutionPolicy Bypass -Command `"$command`""
|
||||||
|
# $shortcut.Save()
|
||||||
|
# Write-Host "Shortcut to winutil created at: $shortcutPath"
|
||||||
# *************************** Automation black ***************************
|
# *************************** Automation black ***************************
|
||||||
|
|
||||||
Write-Host "Copy checkinstall.cmd into the ISO"
|
Write-Host "Copy checkinstall.cmd into the ISO"
|
||||||
@ -242,7 +285,7 @@ public class PowerManagement {
|
|||||||
Write-Host "Disabling Teams"
|
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\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\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 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
|
reg query "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" >$null 2>&1
|
||||||
# Write-Host Error code $LASTEXITCODE
|
# Write-Host Error code $LASTEXITCODE
|
||||||
Write-Host "Done disabling Teams"
|
Write-Host "Done disabling Teams"
|
||||||
@ -284,7 +327,7 @@ public class PowerManagement {
|
|||||||
reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d 1 /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
|
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 "Done removing Sponsored Apps"
|
||||||
|
|
||||||
Write-Host "Disabling Reserved Storage"
|
Write-Host "Disabling Reserved Storage"
|
||||||
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d 0 /f
|
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d 0 /f
|
||||||
|
|
||||||
@ -308,8 +351,8 @@ public class PowerManagement {
|
|||||||
|
|
||||||
Write-Host "Unmounting image..."
|
Write-Host "Unmounting image..."
|
||||||
Dismount-WindowsImage -Path $scratchDir -Save
|
Dismount-WindowsImage -Path $scratchDir -Save
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Write-Host "Exporting image into $mountDir\sources\install2.wim"
|
Write-Host "Exporting image into $mountDir\sources\install2.wim"
|
||||||
@ -325,7 +368,7 @@ public class PowerManagement {
|
|||||||
}
|
}
|
||||||
Write-Host "Windows image completed. Continuing with boot.wim."
|
Write-Host "Windows image completed. Continuing with boot.wim."
|
||||||
|
|
||||||
# Next step boot image
|
# Next step boot image
|
||||||
Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir"
|
Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir"
|
||||||
Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir"
|
Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir"
|
||||||
|
|
||||||
@ -335,14 +378,14 @@ public class PowerManagement {
|
|||||||
if (Test-Path $driverPath)
|
if (Test-Path $driverPath)
|
||||||
{
|
{
|
||||||
Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) "
|
Write-Host "Adding Windows Drivers image($scratchDir) drivers($driverPath) "
|
||||||
Add-WindowsDriver -Path "$scratchDir" -Driver "$driverPath" -Recurse
|
dism /English /image:$scratchDir /add-driver /driver:$driverPath /recurse | Out-Host
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Write-Host "Path to drivers is invalid continuing without driver injection"
|
Write-Host "Path to drivers is invalid continuing without driver injection"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Loading registry..."
|
Write-Host "Loading registry..."
|
||||||
reg load HKLM\zCOMPONENTS "$($scratchDir)\Windows\System32\config\COMPONENTS" >$null
|
reg load HKLM\zCOMPONENTS "$($scratchDir)\Windows\System32\config\COMPONENTS" >$null
|
||||||
reg load HKLM\zDEFAULT "$($scratchDir)\Windows\System32\config\default" >$null
|
reg load HKLM\zDEFAULT "$($scratchDir)\Windows\System32\config\default" >$null
|
||||||
@ -406,7 +449,7 @@ public class PowerManagement {
|
|||||||
Copy-ToUSB("$($SaveDialog.FileName)")
|
Copy-ToUSB("$($SaveDialog.FileName)")
|
||||||
if ($?) { Write-Host "Done Copying target ISO to USB drive!" } else { Write-Host "ISO copy failed." }
|
if ($?) { Write-Host "Done Copying target ISO to USB drive!" } else { Write-Host "ISO copy failed." }
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host " _____ "
|
Write-Host " _____ "
|
||||||
Write-Host "(____ \ "
|
Write-Host "(____ \ "
|
||||||
Write-Host " _ \ \ ___ ____ ____ "
|
Write-Host " _ \ \ ___ ____ ____ "
|
||||||
@ -426,9 +469,9 @@ public class PowerManagement {
|
|||||||
} else {
|
} else {
|
||||||
Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed."
|
Write-Host "ISO creation failed. The "$($mountDir)" directory has not been removed."
|
||||||
}
|
}
|
||||||
|
|
||||||
$sync.MicrowinOptionsPanel.Visibility = 'Collapsed'
|
$sync.MicrowinOptionsPanel.Visibility = 'Collapsed'
|
||||||
|
|
||||||
#$sync.MicrowinFinalIsoLocation.Text = "$env:temp\microwin.iso"
|
#$sync.MicrowinFinalIsoLocation.Text = "$env:temp\microwin.iso"
|
||||||
$sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)"
|
$sync.MicrowinFinalIsoLocation.Text = "$($SaveDialog.FileName)"
|
||||||
# Allow the machine to sleep again (optional)
|
# Allow the machine to sleep again (optional)
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
function Invoke-WPFOOSU {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Downloads and runs OO Shutup 10 with or without config files
|
|
||||||
.PARAMETER action
|
|
||||||
Specifies how OOSU should be started
|
|
||||||
customize: Opens the OOSU GUI
|
|
||||||
recommended: Loads and applies the recommended OOSU policies silently
|
|
||||||
undo: Resets all policies to factory silently
|
|
||||||
#>
|
|
||||||
|
|
||||||
param (
|
|
||||||
[ValidateSet("customize", "recommended", "undo")]
|
|
||||||
[string]$action
|
|
||||||
)
|
|
||||||
|
|
||||||
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
|
||||||
|
|
||||||
$Initial_ProgressPreference = $ProgressPreference
|
|
||||||
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
|
||||||
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
|
||||||
|
|
||||||
switch ($action)
|
|
||||||
{
|
|
||||||
"customize"{
|
|
||||||
Write-Host "Starting OO Shutup 10 ..."
|
|
||||||
Start-Process $OOSU_filepath
|
|
||||||
}
|
|
||||||
"recommended"{
|
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_recommended.cfg"
|
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_recommended.cfg" -OutFile $oosu_config
|
|
||||||
Write-Host "Applying recommended OO Shutup 10 Policies"
|
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
|
||||||
}
|
|
||||||
"undo"{
|
|
||||||
$oosu_config = "$ENV:temp\ooshutup10_factory.cfg"
|
|
||||||
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/config/ooshutup10_factory.cfg" -OutFile $oosu_config
|
|
||||||
Write-Host "Resetting all OO Shutup 10 Policies"
|
|
||||||
Start-Process $OOSU_filepath -ArgumentList "$oosu_config /quiet" -Wait
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$ProgressPreference = $Initial_ProgressPreference
|
|
||||||
}
|
|
20
functions/public/Invoke-WPFOOSU.ps1
Normal file
20
functions/public/Invoke-WPFOOSU.ps1
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
function Invoke-WPFOOSU {
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Downloads and runs OO Shutup 10
|
||||||
|
#>
|
||||||
|
try {
|
||||||
|
$OOSU_filepath = "$ENV:temp\OOSU10.exe"
|
||||||
|
$Initial_ProgressPreference = $ProgressPreference
|
||||||
|
$ProgressPreference = "SilentlyContinue" # Disables the Progress Bar to drasticly speed up Invoke-WebRequest
|
||||||
|
Invoke-WebRequest -Uri "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -OutFile $OOSU_filepath
|
||||||
|
Write-Host "Starting OO Shutup 10 ..."
|
||||||
|
Start-Process $OOSU_filepath
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "Error Downloading and Running OO Shutup 10" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
$ProgressPreference = $Initial_ProgressPreference
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,8 @@ function Invoke-WPFPanelAutologin {
|
|||||||
Enables autologin using Sysinternals Autologon.exe
|
Enables autologin using Sysinternals Autologon.exe
|
||||||
|
|
||||||
#>
|
#>
|
||||||
curl.exe -ss "https://live.sysinternals.com/Autologon.exe" -o $env:temp\autologin.exe # Official Microsoft recommendation https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
|
||||||
cmd /c $env:temp\autologin.exe /accepteula
|
# Official Microsoft recommendation: https://learn.microsoft.com/en-us/sysinternals/downloads/autologon
|
||||||
}
|
Invoke-WebRequest -Uri "https://live.sysinternals.com/Autologon.exe" -OutFile "$env:temp\autologin.exe"
|
||||||
|
cmd /c "$env:temp\autologin.exe" /accepteula
|
||||||
|
}
|
||||||
|
@ -35,7 +35,7 @@ function Invoke-WPFPresets {
|
|||||||
Write-Debug $_
|
Write-Debug $_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($CheckBox in $CheckBoxes) {
|
foreach ($CheckBox in $CheckBoxes) {
|
||||||
$checkboxName = $CheckBox.Key
|
$checkboxName = $CheckBox.Key
|
||||||
|
|
||||||
|
@ -17,27 +17,35 @@ function Invoke-WPFShortcut {
|
|||||||
[bool]$RunAsAdmin = $false
|
[bool]$RunAsAdmin = $false
|
||||||
)
|
)
|
||||||
|
|
||||||
$iconPath = $null
|
# Preper the Shortcut Fields and add an a Custom Icon if it's available at "$env:TEMP\cttlogo.png", else don't add a Custom Icon.
|
||||||
Switch ($ShortcutToAdd) {
|
$iconPath = $null
|
||||||
"WinUtil" {
|
Switch ($ShortcutToAdd) {
|
||||||
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
|
"WinUtil" {
|
||||||
$IRM = 'irm https://christitus.com/win | iex'
|
$SourceExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
|
||||||
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
$IRM = 'irm https://christitus.com/win | iex'
|
||||||
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
$Powershell = '-ExecutionPolicy Bypass -Command "Start-Process powershell.exe -verb runas -ArgumentList'
|
||||||
$DestinationName = "WinUtil.lnk"
|
$ArgumentsToSourceExe = "$powershell '$IRM'"
|
||||||
|
$DestinationName = "WinUtil.lnk"
|
||||||
|
|
||||||
if (Test-Path -Path "$env:TEMP\cttlogo.png") {
|
if (Test-Path -Path "$env:TEMP\cttlogo.png") {
|
||||||
$iconPath = "$env:SystempRoot\cttlogo.ico"
|
$iconPath = "$env:SystempRoot\cttlogo.ico"
|
||||||
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
ConvertTo-Icon -bitmapPath "$env:TEMP\cttlogo.png" -iconPath $iconPath
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show a File Dialog Browser, to let the User choose the Name and Location of where to save the Shortcut
|
||||||
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
$FileBrowser = New-Object System.Windows.Forms.SaveFileDialog
|
||||||
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
$FileBrowser.InitialDirectory = [Environment]::GetFolderPath('Desktop')
|
||||||
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
$FileBrowser.Filter = "Shortcut Files (*.lnk)|*.lnk"
|
||||||
$FileBrowser.FileName = $DestinationName
|
$FileBrowser.FileName = $DestinationName
|
||||||
$FileBrowser.ShowDialog() | Out-Null
|
|
||||||
|
# Do an Early Return if The Save Shortcut operation was cancel by User's Input.
|
||||||
|
$FileBrowserResult = $FileBrowser.ShowDialog()
|
||||||
|
$DialogResultEnum = New-Object System.Windows.Forms.DialogResult
|
||||||
|
if (-not ($FileBrowserResult -eq $DialogResultEnum::OK)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
$WshShell = New-Object -comObject WScript.Shell
|
$WshShell = New-Object -comObject WScript.Shell
|
||||||
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
$Shortcut = $WshShell.CreateShortcut($FileBrowser.FileName)
|
||||||
@ -56,4 +64,4 @@ function Invoke-WPFShortcut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin"
|
Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin"
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,13 @@ function Invoke-WPFToggle {
|
|||||||
"WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)}
|
"WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)}
|
||||||
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)}
|
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)}
|
||||||
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
|
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
|
||||||
|
"WPFToggleSnapWindow" {Invoke-WinUtilSnapWindow $(Get-WinUtilToggleStatus WPFToggleSnapWindow)}
|
||||||
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
|
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
|
||||||
|
"WPFToggleSnapSuggestion" {Invoke-WinUtilSnapSuggestion $(Get-WinUtilToggleStatus WPFToggleSnapSuggestion)}
|
||||||
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
|
||||||
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
"WPFToggleStickyKeys" {Invoke-WinUtilStickyKeys $(Get-WinUtilToggleStatus WPFToggleStickyKeys)}
|
||||||
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
"WPFToggleTaskbarWidgets" {Invoke-WinUtilTaskbarWidgets $(Get-WinUtilToggleStatus WPFToggleTaskbarWidgets)}
|
||||||
|
"WPFToggleTaskbarSearch" {Invoke-WinUtilTaskbarSearch $(Get-WinUtilToggleStatus WPFToggleTaskbarSearch)}
|
||||||
|
"WPFToggleTaskView" {Invoke-WinUtilTaskView $(Get-WinUtilToggleStatus WPFToggleTaskView)}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
46
functions/public/Invoke-WPFTweakPS7.ps1
Normal file
46
functions/public/Invoke-WPFTweakPS7.ps1
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
function Invoke-WPFTweakPS7{
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
This will edit the config file of the Windows Terminal Replacing the Powershell 5 to Powershell 7 and install Powershell 7 if necessary
|
||||||
|
.PARAMETER action
|
||||||
|
PS7: Configures Powershell 7 to be the default Terminal
|
||||||
|
PS5: Configures Powershell 5 to be the default Terminal
|
||||||
|
#>
|
||||||
|
param (
|
||||||
|
[ValidateSet("PS7", "PS5")]
|
||||||
|
[string]$action
|
||||||
|
)
|
||||||
|
|
||||||
|
switch ($action) {
|
||||||
|
"PS7"{
|
||||||
|
if (Test-Path -Path "$env:ProgramFiles\PowerShell\7") {
|
||||||
|
Write-Host "Powershell 7 is already installed."
|
||||||
|
} else {
|
||||||
|
Write-Host "Installing Powershell 7..."
|
||||||
|
Install-WinUtilProgramWinget -ProgramsToInstall @(@{"winget"="Microsoft.PowerShell"})
|
||||||
|
}
|
||||||
|
$targetTerminalName = "PowerShell"
|
||||||
|
}
|
||||||
|
"PS5"{
|
||||||
|
$targetTerminalName = "Windows PowerShell"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"
|
||||||
|
if (Test-Path -Path $settingsPath) {
|
||||||
|
Write-Host "Settings file found."
|
||||||
|
$settingsContent = Get-Content -Path $settingsPath | ConvertFrom-Json
|
||||||
|
$ps7Profile = $settingsContent.profiles.list | Where-Object { $_.name -eq $targetTerminalName }
|
||||||
|
if ($ps7Profile) {
|
||||||
|
$settingsContent.defaultProfile = $ps7Profile.guid
|
||||||
|
$updatedSettings = $settingsContent | ConvertTo-Json -Depth 100
|
||||||
|
Set-Content -Path $settingsPath -Value $updatedSettings
|
||||||
|
Write-Host "Default profile updated to $targetTerminalName using the name attribute."
|
||||||
|
} else {
|
||||||
|
Write-Host "No PowerShell 7 profile found in Windows Terminal settings using the name attribute."
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "Settings file not found at $settingsPath"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -12,31 +12,49 @@ function Invoke-WPFUnInstall {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$WingetInstall = (Get-WinUtilCheckBoxes)["Install"]
|
$PackagesToInstall = (Get-WinUtilCheckBoxes)["Install"]
|
||||||
|
|
||||||
if ($wingetinstall.Count -eq 0) {
|
if ($PackagesToInstall.Count -eq 0) {
|
||||||
$WarningMsg = "Please select the program(s) to install"
|
$WarningMsg = "Please select the program(s) to uninstall"
|
||||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
$ButtonType = [System.Windows.MessageBoxButton]::YesNo
|
$ButtonType = [System.Windows.MessageBoxButton]::YesNo
|
||||||
$MessageboxTitle = "Are you sure?"
|
$MessageboxTitle = "Are you sure?"
|
||||||
$Messageboxbody = ("This will uninstall the following applications: `n $WingetInstall")
|
$Messageboxbody = ("This will uninstall the following applications: `n $($PackagesToInstall | Format-Table | Out-String)")
|
||||||
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
$MessageIcon = [System.Windows.MessageBoxImage]::Information
|
||||||
|
|
||||||
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
if($confirm -eq "No"){return}
|
if($confirm -eq "No"){return}
|
||||||
|
|
||||||
Invoke-WPFRunspace -ArgumentList $WingetInstall -DebugPreference $DebugPreference -ScriptBlock {
|
Invoke-WPFRunspace -ArgumentList $PackagesToInstall -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
param($WingetInstall, $DebugPreference)
|
param($PackagesToInstall, $DebugPreference)
|
||||||
|
$packagesWinget, $packagesChoco = {
|
||||||
|
$packagesWinget = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
$packagesChoco = [System.Collections.Generic.List`1[System.Object]]::new()
|
||||||
|
foreach ($package in $PackagesToInstall) {
|
||||||
|
if ($package.winget -eq "na") {
|
||||||
|
$packagesChoco.add($package)
|
||||||
|
Write-Host "Queueing $($package.choco) for Chocolatey Uninstall"
|
||||||
|
} else {
|
||||||
|
$packagesWinget.add($package)
|
||||||
|
Write-Host "Queueing $($package.winget) for Winget Uninstall"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $packagesWinget, $packagesChoco
|
||||||
|
}.Invoke($PackagesToInstall)
|
||||||
try{
|
try{
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
# Install all selected programs in new window
|
# Install all selected programs in new window
|
||||||
Install-WinUtilProgramWinget -ProgramsToInstall $WingetInstall -Manage "Uninstalling"
|
if($packagesWinget.Count -gt 0){
|
||||||
|
Install-WinUtilProgramWinget -ProgramsToInstall $packagesWinget -Manage "Uninstalling"
|
||||||
|
}
|
||||||
|
if($packagesChoco.Count -gt 0){
|
||||||
|
Install-WinUtilProgramChoco -ProgramsToInstall $packagesChoco -Manage "Uninstalling"
|
||||||
|
}
|
||||||
|
|
||||||
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
$ButtonType = [System.Windows.MessageBoxButton]::OK
|
||||||
$MessageboxTitle = "Uninstalls are Finished "
|
$MessageboxTitle = "Uninstalls are Finished "
|
||||||
@ -51,9 +69,9 @@ function Invoke-WPFUnInstall {
|
|||||||
}
|
}
|
||||||
Catch {
|
Catch {
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
Write-Host "-- Winget failed to install ---"
|
Write-Host "Error: $_"
|
||||||
Write-Host "==========================================="
|
Write-Host "==========================================="
|
||||||
}
|
}
|
||||||
$sync.ProcessRunning = $False
|
$sync.ProcessRunning = $False
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ function Invoke-WPFtweaksbutton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"]
|
$Tweaks = (Get-WinUtilCheckBoxes)["WPFTweaks"]
|
||||||
|
|
||||||
Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text
|
Set-WinUtilDNS -DNSProvider $sync["WPFchangedns"].text
|
||||||
|
|
||||||
if ($tweaks.count -eq 0 -and $sync["WPFchangedns"].text -eq "Default"){
|
if ($tweaks.count -eq 0 -and $sync["WPFchangedns"].text -eq "Default"){
|
||||||
|
112
scripts/main.ps1
112
scripts/main.ps1
@ -10,7 +10,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 -like "*winutil*" -or $_.name -like "*WPF*"}
|
$functions = (Get-ChildItem function:\).where{$_.name -like "*winutil*" -or $_.name -like "*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
|
||||||
@ -133,9 +133,17 @@ $sync.keys | ForEach-Object {
|
|||||||
|
|
||||||
# Load computer information in the background
|
# Load computer information in the background
|
||||||
Invoke-WPFRunspace -ScriptBlock {
|
Invoke-WPFRunspace -ScriptBlock {
|
||||||
$sync.ConfigLoaded = $False
|
try{
|
||||||
$sync.ComputerInfo = Get-ComputerInfo
|
$oldProgressPreference = $ProgressPreference
|
||||||
$sync.ConfigLoaded = $True
|
$ProgressPreference = "SilentlyContinue"
|
||||||
|
$sync.ConfigLoaded = $False
|
||||||
|
$sync.ComputerInfo = Get-ComputerInfo
|
||||||
|
$sync.ConfigLoaded = $True
|
||||||
|
}
|
||||||
|
finally{
|
||||||
|
$ProgressPreference = "Continue"
|
||||||
|
}
|
||||||
|
|
||||||
} | Out-Null
|
} | Out-Null
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
@ -145,9 +153,6 @@ Invoke-WPFRunspace -ScriptBlock {
|
|||||||
# Print the logo
|
# Print the logo
|
||||||
Invoke-WPFFormVariables
|
Invoke-WPFFormVariables
|
||||||
|
|
||||||
# Check if Chocolatey is installed
|
|
||||||
Install-WinUtilChoco
|
|
||||||
|
|
||||||
# Set the titlebar
|
# Set the titlebar
|
||||||
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
$sync["Form"].title = $sync["Form"].title + " " + $sync.version
|
||||||
# Set the commands that will run when the form is closed
|
# Set the commands that will run when the form is closed
|
||||||
@ -271,26 +276,48 @@ Add-Type @"
|
|||||||
"@
|
"@
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($proc in (Get-Process | Where-Object { $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" })) {
|
foreach ($proc in (Get-Process).where{ $_.MainWindowTitle -and $_.MainWindowTitle -like "*titus*" }) {
|
||||||
if ($proc.Id -ne [System.IntPtr]::Zero) {
|
# Check if the process's MainWindowHandle is valid
|
||||||
|
if ($proc.MainWindowHandle -ne [System.IntPtr]::Zero) {
|
||||||
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
Write-Debug "MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle) $($proc.MainWindowHandle)"
|
||||||
$windowHandle = $proc.MainWindowHandle
|
$windowHandle = $proc.MainWindowHandle
|
||||||
|
} else {
|
||||||
|
Write-Warning "Process found, but no MainWindowHandle: $($proc.Id) $($proc.MainWindowTitle)"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# need to experiemnt more
|
|
||||||
# setting icon for the windows is still not working
|
# Using a TaskbarItem Overlay until someone figures out how to replace the icon correctly
|
||||||
# $pngUrl = "https://christitus.com/images/logo-full.png"
|
|
||||||
# $pngPath = "$env:TEMP\cttlogo.png"
|
# URL of the image
|
||||||
# $iconPath = "$env:TEMP\cttlogo.ico"
|
$imageUrl = "https://christitus.com/images/logo-full.png"
|
||||||
# # Download the PNG file
|
|
||||||
# Invoke-WebRequest -Uri $pngUrl -OutFile $pngPath
|
# Download the image
|
||||||
# if (Test-Path -Path $pngPath) {
|
$imagePath = "$env:TEMP\logo-full.png"
|
||||||
# ConvertTo-Icon -bitmapPath $pngPath -iconPath $iconPath
|
Invoke-WebRequest -Uri $imageUrl -OutFile $imagePath
|
||||||
# }
|
|
||||||
# $icon = [System.Drawing.Icon]::ExtractAssociatedIcon($iconPath)
|
# Read the image file as a byte array
|
||||||
# Write-Host $icon.Handle
|
$imageBytes = [System.IO.File]::ReadAllBytes($imagePath)
|
||||||
# [Window]::SendMessage($windowHandle, 0x80, [IntPtr]::Zero, $icon.Handle)
|
|
||||||
|
# Convert the byte array to a Base64 string
|
||||||
|
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
||||||
|
|
||||||
|
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
||||||
|
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
||||||
|
$bitmap.BeginInit()
|
||||||
|
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
||||||
|
$bitmap.EndInit()
|
||||||
|
$bitmap.Freeze()
|
||||||
|
|
||||||
|
# Ensure TaskbarItemInfo is created if not already
|
||||||
|
if (-not $sync["Form"].TaskbarItemInfo) {
|
||||||
|
$sync["Form"].TaskbarItemInfo = New-Object System.Windows.Shell.TaskbarItemInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the overlay icon for the taskbar
|
||||||
|
$sync["Form"].TaskbarItemInfo.Overlay = $bitmap
|
||||||
|
|
||||||
|
|
||||||
$rect = New-Object RECT
|
$rect = New-Object RECT
|
||||||
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
[Window]::GetWindowRect($windowHandle, [ref]$rect)
|
||||||
@ -363,6 +390,16 @@ Add-Type @"
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Load Checkboxes and Labels outside of the Filter fuction only once on startup for performance reasons
|
||||||
|
$filter = Get-WinUtilVariables -Type CheckBox
|
||||||
|
$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter }
|
||||||
|
|
||||||
|
$filter = Get-WinUtilVariables -Type Label
|
||||||
|
$labels = @{}
|
||||||
|
($sync.GetEnumerator()).where{$PSItem.Key -in $filter} | ForEach-Object {$labels[$_.Key] = $_.Value}
|
||||||
|
|
||||||
|
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
|
||||||
|
|
||||||
$sync["CheckboxFilter"].Add_TextChanged({
|
$sync["CheckboxFilter"].Add_TextChanged({
|
||||||
|
|
||||||
if ($sync.CheckboxFilter.Text -ne "") {
|
if ($sync.CheckboxFilter.Text -ne "") {
|
||||||
@ -372,8 +409,7 @@ $sync["CheckboxFilter"].Add_TextChanged({
|
|||||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter = Get-WinUtilVariables -Type CheckBox
|
$activeApplications = @()
|
||||||
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $psitem.Key -in $filter }
|
|
||||||
|
|
||||||
foreach ($CheckBox in $CheckBoxes) {
|
foreach ($CheckBox in $CheckBoxes) {
|
||||||
# Check if the checkbox is null or if it doesn't have content
|
# Check if the checkbox is null or if it doesn't have content
|
||||||
@ -390,6 +426,7 @@ $sync["CheckboxFilter"].Add_TextChanged({
|
|||||||
|
|
||||||
if ($CheckBox.Value.Content.ToLower().Contains($textToSearch)) {
|
if ($CheckBox.Value.Content.ToLower().Contains($textToSearch)) {
|
||||||
$CheckBox.Value.Visibility = "Visible"
|
$CheckBox.Value.Visibility = "Visible"
|
||||||
|
$activeApplications += $sync.configs.applications.$checkboxName
|
||||||
# Set the corresponding text block visibility
|
# Set the corresponding text block visibility
|
||||||
if ($textBlock -ne $null) {
|
if ($textBlock -ne $null) {
|
||||||
$textBlock.Visibility = "Visible"
|
$textBlock.Visibility = "Visible"
|
||||||
@ -403,7 +440,21 @@ $sync["CheckboxFilter"].Add_TextChanged({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$activeCategories = $activeApplications | Select-Object -ExpandProperty category -Unique
|
||||||
|
|
||||||
|
foreach ($category in $activeCategories){
|
||||||
|
$label = $labels[$(Get-WPFObjectName -type "Label" -name $category)]
|
||||||
|
$label.Visibility = "Visible"
|
||||||
|
}
|
||||||
|
if ($activeCategories){
|
||||||
|
$inactiveCategories = Compare-Object -ReferenceObject $allCategories -DifferenceObject $activeCategories -PassThru
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$inactiveCategories = $allCategories
|
||||||
|
}
|
||||||
|
foreach ($category in $inactiveCategories){
|
||||||
|
$label = $labels[$(Get-WPFObjectName -type "Label" -name $category)]
|
||||||
|
$label.Visibility = "Collapsed"}
|
||||||
})
|
})
|
||||||
|
|
||||||
# Define event handler for button click
|
# Define event handler for button click
|
||||||
@ -439,17 +490,14 @@ $sync["AboutMenuItem"].Add_Click({
|
|||||||
# Handle Export menu item click
|
# Handle Export menu item click
|
||||||
Write-Debug "About clicked"
|
Write-Debug "About clicked"
|
||||||
$sync["SettingsPopup"].IsOpen = $false
|
$sync["SettingsPopup"].IsOpen = $false
|
||||||
# Example usage
|
|
||||||
$authorInfo = @"
|
$authorInfo = @"
|
||||||
Author : @christitustech
|
Author : <a href="https://github.com/ChrisTitusTech">@christitustech</a>
|
||||||
Runspace : @DeveloperDurp
|
Runspace : <a href="https://github.com/DeveloperDurp">@DeveloperDurp</a>
|
||||||
GUI : @KonTy
|
MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
||||||
MicroWin : @KonTy
|
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||||
GitHub : https://github.com/ChrisTitusTech/winutil
|
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||||
Version : $($sync.version)
|
|
||||||
"@
|
"@
|
||||||
Show-CustomDialog -Message $authorInfo -Width 400
|
Show-CustomDialog -Message $authorInfo -Width 400
|
||||||
})
|
})
|
||||||
|
|
||||||
$sync["Form"].ShowDialog() | out-null
|
$sync["Form"].ShowDialog() | out-null
|
||||||
Stop-Transcript
|
Stop-Transcript
|
||||||
|
@ -44,21 +44,16 @@ $sync.version = "#{replaceme}"
|
|||||||
$sync.configs = @{}
|
$sync.configs = @{}
|
||||||
$sync.ProcessRunning = $false
|
$sync.ProcessRunning = $false
|
||||||
|
|
||||||
$currentPid = [System.Security.Principal.WindowsIdentity]::GetCurrent()
|
# If script isn't running as admin, show error message and quit
|
||||||
$principal = new-object System.Security.Principal.WindowsPrincipal($currentPid)
|
If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544")
|
||||||
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
|
|
||||||
|
|
||||||
|
|
||||||
if ($principal.IsInRole($adminRole))
|
|
||||||
{
|
|
||||||
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
|
||||||
clear-host
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
Write-Host "===========================================" -Foregroundcolor Red
|
||||||
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
|
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
|
||||||
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
|
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
|
||||||
Write-Host "===========================================" -Foregroundcolor Red
|
Write-Host "===========================================" -Foregroundcolor Red
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set PowerShell window title
|
||||||
|
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
||||||
|
clear-host
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Battery drains too fast.
|
# Battery drains too fast.
|
||||||
When your battery on teh laptop drains too fast please perform these steps and report the results back to Winutil community.
|
When your battery on the laptop drains too fast, please perform these steps and report the results back to the Winutil community.
|
||||||
|
|
||||||
1. **Check Battery Health:**
|
1. **Check Battery Health:**
|
||||||
- Open a Command Prompt as an administrator.
|
- Open a Command Prompt as an administrator.
|
||||||
@ -80,4 +80,4 @@ When your battery on teh laptop drains too fast please perform these steps and r
|
|||||||
- 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.
|
||||||
|
|
||||||
By following these detailed instructions, you should be able to thoroughly diagnose and address battery drain issues on your Windows laptop. Adjust settings as needed to optimize power management and improve battery life.
|
By following these detailed instructions, you should be able to thoroughly diagnose and address battery drain issues on your Windows laptop. Adjust settings as needed to optimize power management and improve battery life.
|
||||||
|
@ -21,7 +21,7 @@ This error code typically indicates an issue related to Windows Management Instr
|
|||||||
- Press `Win + R` to open the Run dialog.
|
- Press `Win + R` to open the Run dialog.
|
||||||
- Type `services.msc` and press Enter.
|
- Type `services.msc` and press Enter.
|
||||||
- Locate "Windows Management Instrumentation" in the list.
|
- Locate "Windows Management Instrumentation" in the list.
|
||||||
- Make sure its status is set to "Running" and the startup type is set to "Automatic."
|
- Make sure to set its status to "Running" and the startup type to "Automatic."
|
||||||
|
|
||||||
5. **Check for Security Software Interference:**
|
5. **Check for Security Software Interference:**
|
||||||
Security software can sometimes interfere with WMI operations. Temporarily disable your antivirus or security software and check if the issue persists.
|
Security software can sometimes interfere with WMI operations. Temporarily disable your antivirus or security software and check if the issue persists.
|
||||||
@ -31,9 +31,9 @@ This error code typically indicates an issue related to Windows Management Instr
|
|||||||
|
|
||||||
- Press `Win + X` and select "Event Viewer."
|
- Press `Win + X` and select "Event Viewer."
|
||||||
- Navigate to "Windows Logs" -> "Application" or "System."
|
- Navigate to "Windows Logs" -> "Application" or "System."
|
||||||
- Look for entries with the source related to WMI or the application you're using to mount the ISO.
|
- Look for entries with the source related to WMI or the application use to mount the ISO.
|
||||||
|
|
||||||
7. **ISO File Integrity:**
|
7. **ISO File Integrity:**
|
||||||
Ensure that the ISO file you are trying to mount is not corrupted. Try mounting a different ISO file to see if the issue persists.
|
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 may be required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you are using to mount the ISO.
|
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.
|
40
windev.ps1
Normal file
40
windev.ps1
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
This Script is used as a target for the https://christitus.com/windev alias.
|
||||||
|
It queries the latest winget release (no matter if Pre-Release, Draft or Full Release) and invokes It
|
||||||
|
.DESCRIPTION
|
||||||
|
This Script provides a simple way to always start the bleeding edge release even if it's not yet a full release.
|
||||||
|
This function should be run with administrative privileges.
|
||||||
|
Because this way of recursively invoking scripts via Invoke-Expression it might very well happen that AV Programs flag this because it's a common way of mulitstage exploits to run
|
||||||
|
.EXAMPLE
|
||||||
|
irm https://christitus.com/windev | iex
|
||||||
|
OR
|
||||||
|
Run in Admin Powershell > ./windev.ps1
|
||||||
|
#>
|
||||||
|
|
||||||
|
# Function to fetch the latest release tag from the GitHub API
|
||||||
|
function Get-LatestRelease {
|
||||||
|
try {
|
||||||
|
$releases = Invoke-RestMethod -Uri 'https://api.github.com/repos/ChrisTitusTech/winutil/releases'
|
||||||
|
$latestRelease = $releases | Select-Object -First 1
|
||||||
|
return $latestRelease.tag_name
|
||||||
|
} catch {
|
||||||
|
Write-Host "Error fetching release data: $_" -ForegroundColor Red
|
||||||
|
return $null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to redirect to the latest pre-release version
|
||||||
|
function RedirectToLatestPreRelease {
|
||||||
|
$latestRelease = Get-LatestRelease
|
||||||
|
if ($latestRelease) {
|
||||||
|
$url = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/$latestRelease/winutil.ps1"
|
||||||
|
Invoke-RestMethod $url | Invoke-Expression
|
||||||
|
} else {
|
||||||
|
Write-Host 'Unable to determine latest pre-release version.' -ForegroundColor Red
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the redirect function
|
||||||
|
|
||||||
|
RedirectToLatestPreRelease
|
@ -922,4 +922,4 @@ try {
|
|||||||
}
|
}
|
||||||
Write-Warning "Error: $($_.Exception.Message)`n"
|
Write-Warning "Error: $($_.Exception.Message)`n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3235
winutil.ps1
3235
winutil.ps1
File diff suppressed because it is too large
Load Diff
1014
xaml/inputApp.xaml
1014
xaml/inputApp.xaml
File diff suppressed because it is too large
Load Diff
@ -1,43 +0,0 @@
|
|||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border Grid.Row="1" Grid.Column="0">
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
|
||||||
<Label Content="Features" FontSize="16"/>
|
|
||||||
<CheckBox Name="WPFFeaturesdotnet" Content="All .Net Framework (2,3,4)" Margin="5,0" ToolTip=".NET and .NET Framework is a developer platform made up of tools, programming languages, and libraries for building many different types of applications."/>
|
|
||||||
<CheckBox Name="WPFFeatureshyperv" Content="HyperV Virtualization" Margin="5,0" ToolTip="Hyper-V is a hardware virtualization product developed by Microsoft that allows users to create and manage virtual machines."/>
|
|
||||||
<CheckBox Name="WPFFeatureslegacymedia" Content="Legacy Media (WMP, DirectPlay)" Margin="5,0" ToolTip="Enables legacy programs from previous versions of windows"/>
|
|
||||||
<CheckBox Name="WPFFeaturenfs" Content="NFS - Network File System" Margin="5,0" ToolTip="Network File System (NFS) is a mechanism for storing files on a network."/>
|
|
||||||
<CheckBox Name="WPFFeatureEnableSearchSuggestions" Content="Enable Search Box Web Suggestions in Registry(explorer restart)" Margin="5,0" ToolTip="Enables web suggestions when searching using Windows Search."/>
|
|
||||||
<CheckBox Name="WPFFeatureDisableSearchSuggestions" Content="Disable Search Box Web Suggestions in Registry(explorer restart)" Margin="5,0" ToolTip="Disables web suggestions when searching using Windows Search."/>
|
|
||||||
<CheckBox Name="WPFFeatureRegBackup" Content="Enable Daily Registry Backup Task 12.30am" Margin="5,0" ToolTip="Enables daily registry backup, previously disabled by Microsoft in Windows 10 1803."/>
|
|
||||||
<CheckBox Name="WPFFeatureEnableLegacyRecovery" Content="Enable Legacy F8 Boot Recovery" Margin="5,0" ToolTip="Enables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes."/>
|
|
||||||
<CheckBox Name="WPFFeatureDisableLegacyRecovery" Content="Disable Legacy F8 Boot Recovery" Margin="5,0" ToolTip="Disables Advanced Boot Options screen that lets you start Windows in advanced troubleshooting modes."/>
|
|
||||||
<CheckBox Name="WPFFeaturewsl" Content="Windows Subsystem for Linux" Margin="5,0" ToolTip="Windows Subsystem for Linux is an optional feature of Windows that allows Linux programs to run natively on Windows without the need for a separate virtual machine or dual booting."/>
|
|
||||||
<CheckBox Name="WPFFeaturesandbox" Content="Windows Sandbox" Margin="5,0" ToolTip="Windows Sandbox is a lightweight virtual machine that provides a temporary desktop environment to safely run applications and programs in isolation."/>
|
|
||||||
<Button Name="WPFFeatureInstall" Content="Install Features" HorizontalAlignment = "Left" Width="150" Margin="5" Padding="20,5" />
|
|
||||||
<Label Content="Fixes" FontSize="16"/>
|
|
||||||
<Button Name="WPFPanelAutologin" Content="Set Up Autologin" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFFixesUpdate" Content="Reset Windows Update" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFFixesNetwork" Content="Reset Network" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelDISM" Content="System Corruption Scan" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFFixesWinget" Content="WinGet Reinstall" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFRunAdobeCCCleanerTool" Content="Remove Adobe Creative Cloud" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Grid.Row="1" Grid.Column="1">
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
|
||||||
<Label Content="Legacy Windows Panels" FontSize="16"/>
|
|
||||||
<Button Name="WPFPanelcontrol" Content="Control Panel" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelnetwork" Content="Network Connections" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelpower" Content="Power Panel" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelregion" Content="Region" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelsound" Content="Sound Settings" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPanelsystem" Content="System Properties" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFPaneluser" Content="User Accounts" HorizontalAlignment = "Left" Width="200" Margin="5" Padding="20,5" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
|||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Border Grid.Row="1" Grid.Column="0">
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
|
||||||
<Label Content="Essential Tweaks" FontSize="16"/>
|
|
||||||
<CheckBox Name="WPFTweaksRestorePoint" Content="Create Restore Point" IsChecked="True" Margin="5,0" ToolTip="Creates a restore point at runtime in case a revert is needed from WinUtil modifications"/>
|
|
||||||
<CheckBox Name="WPFTweaksEndTaskOnTaskbar" Content="Enable End Task With Right Click" Margin="5,0" ToolTip="Enables option to end task when right clicking a program in the taskbar"/>
|
|
||||||
<CheckBox Name="WPFTweaksOO" Content="Run OO Shutup" Margin="5,0" ToolTip="Runs OO Shutup and applies the recommended Tweaks. https://www.oo-software.com/en/shutup10"/>
|
|
||||||
<CheckBox Name="WPFTweaksTele" Content="Disable Telemetry" Margin="5,0" ToolTip="Disables Microsoft Telemetry. Note: This will lock many Edge Browser settings. Microsoft spies heavily on you when using the Edge browser."/>
|
|
||||||
<CheckBox Name="WPFTweaksWifi" Content="Disable Wifi-Sense" Margin="5,0" ToolTip="Wifi Sense is a spying service that phones home all nearby scanned wifi networks and your current geo location."/>
|
|
||||||
<CheckBox Name="WPFTweaksAH" Content="Disable Activity History" Margin="5,0" ToolTip="This erases recent docs, clipboard, and run history."/>
|
|
||||||
<CheckBox Name="WPFTweaksDeleteTempFiles" Content="Delete Temporary Files" Margin="5,0" ToolTip="Erases TEMP Folders"/>
|
|
||||||
<CheckBox Name="WPFTweaksDiskCleanup" Content="Run Disk Cleanup" Margin="5,0" ToolTip="Runs Disk Cleanup on Drive C: and removes old Windows Updates."/>
|
|
||||||
<CheckBox Name="WPFTweaksLoc" Content="Disable Location Tracking" Margin="5,0" ToolTip="Disables Location Tracking...DUH!"/>
|
|
||||||
<CheckBox Name="WPFTweaksHome" Content="Disable Homegroup" Margin="5,0" ToolTip="Disables HomeGroup - HomeGroup is a password-protected home networking service that lets you share your stuff with other PCs that are currently running and connected to your network."/>
|
|
||||||
<CheckBox Name="WPFTweaksStorage" Content="Disable Storage Sense" Margin="5,0" ToolTip="Storage Sense deletes temp files automatically."/>
|
|
||||||
<CheckBox Name="WPFTweaksHiber" Content="Disable Hibernation" Margin="5,0" ToolTip="Hibernation is really meant for laptops as it saves what's in memory before turning the pc off. It really should never be used, but some people are lazy and rely on it. Don't be like Bob. Bob likes hibernation."/>
|
|
||||||
<CheckBox Name="WPFTweaksDVR" Content="Disable GameDVR" Margin="5,0" ToolTip="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."/>
|
|
||||||
<CheckBox Name="WPFTweaksTeredo" Content="Disable Teredo" Margin="5,0" ToolTip="Teredo network tunneling is a ipv6 feature that can cause additional latency."/>
|
|
||||||
<CheckBox Name="WPFTweaksServices" Content="Set Services to Manual" Margin="5,0" ToolTip="Turns a bunch of system services to manual that don't need to be running all the time. This is pretty harmless as if the service is needed, it will simply start on demand."/>
|
|
||||||
<Label Content="Advanced Tweaks - CAUTION" FontSize="16"/>
|
|
||||||
<CheckBox Name="WPFTweaksDisplay" Content="Set Display for Performance" Margin="5,0" ToolTip="Sets the system preferences to performance. You can do this manually with sysdm.cpl as well."/>
|
|
||||||
<CheckBox Name="WPFTweaksUTC" Content="Set Time to UTC (Dual Boot)" Margin="5,0" ToolTip="Essential for computers that are dual booting. Fixes the time sync with Linux Systems."/>
|
|
||||||
<CheckBox Name="WPFTweaksDisableNotifications" Content="Disable Notification Tray/Calendar" Margin="5,0" ToolTip="Disables all Notifications INCLUDING Calendar"/>
|
|
||||||
<CheckBox Name="WPFTweaksDeBloat" Content="Remove ALL MS Store Apps - NOT RECOMMENDED" Margin="5,0" ToolTip="USE WITH CAUTION!!!!! This will remove ALL Microsoft store apps other than the essentials to make winget work. Games installed by MS Store ARE INCLUDED!"/>
|
|
||||||
<CheckBox Name="WPFTweaksRemoveEdge" Content="Remove Microsoft Edge - NOT RECOMMENDED" Margin="5,0" ToolTip="Removes MS Edge when it gets reinstalled by updates."/>
|
|
||||||
<CheckBox Name="WPFTweaksRemoveOnedrive" Content="Remove OneDrive" Margin="5,0" ToolTip="Copies OneDrive files to Default Home Folders and Uninstalls it."/>
|
|
||||||
<CheckBox Name="WPFTweaksRightClickMenu" Content="Set Classic Right-Click Menu " Margin="5,0" ToolTip="Great Windows 11 tweak to bring back good context menus when right clicking things in explorer."/>
|
|
||||||
<CheckBox Name="WPFTweaksEnableipsix" Content="Enable IPv6" Margin="5,0" ToolTip="Enables IPv6."/>
|
|
||||||
<CheckBox Name="WPFTweaksDisableipsix" Content="Disable IPv6" Margin="5,0" ToolTip="Disables IPv6."/>
|
|
||||||
<Button Name="WPFOOSUbutton" Content="Customize OO Shutup Tweaks" HorizontalAlignment = "Left" Width="220" Margin="5" Padding="20,5" />
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,5,0,0">
|
|
||||||
<Label Content="DNS" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
|
||||||
<ComboBox Name="WPFchangedns" Height="32" Width="186" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,5">
|
|
||||||
<ComboBoxItem IsSelected="True" Content="Default"/>
|
|
||||||
<ComboBoxItem Content="DHCP"/>
|
|
||||||
<ComboBoxItem Content="Google"/>
|
|
||||||
<ComboBoxItem Content="Cloudflare"/>
|
|
||||||
<ComboBoxItem Content="Cloudflare_Malware"/>
|
|
||||||
<ComboBoxItem Content="Cloudflare_Malware_Adult"/>
|
|
||||||
<ComboBoxItem Content="Level3"/>
|
|
||||||
<ComboBoxItem Content="Open_DNS"/>
|
|
||||||
<ComboBoxItem Content="Quad9"/>
|
|
||||||
</ComboBox>
|
|
||||||
</StackPanel><Button Name="WPFTweaksbutton" Content="Run Tweaks" HorizontalAlignment = "Left" Width="160" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFUndoall" Content="Undo Selected Tweaks" HorizontalAlignment = "Left" Width="160" Margin="5" Padding="20,5" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
<Border Grid.Row="1" Grid.Column="1">
|
|
||||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
|
||||||
<Label Content="Customize Preferences" FontSize="16"/>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Dark Theme" Style="{StaticResource labelfortweaks}" ToolTip="Enable/Disable Dark Mode." />
|
|
||||||
<CheckBox Name="WPFToggleDarkMode" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Bing Search in Start Menu" Style="{StaticResource labelfortweaks}" ToolTip="If enable then includes web search results from Bing in your Start Menu search." />
|
|
||||||
<CheckBox Name="WPFToggleBingSearch" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="NumLock on Startup" Style="{StaticResource labelfortweaks}" ToolTip="Toggle the Num Lock key state when your computer starts." />
|
|
||||||
<CheckBox Name="WPFToggleNumLock" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Verbose Logon Messages" Style="{StaticResource labelfortweaks}" ToolTip="Show detailed messages during the login process for troubleshooting and diagnostics." />
|
|
||||||
<CheckBox Name="WPFToggleVerboseLogon" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Show File Extensions" Style="{StaticResource labelfortweaks}" ToolTip="If enabled then File extensions (e.g., .txt, .jpg) are visible." />
|
|
||||||
<CheckBox Name="WPFToggleShowExt" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Snap Assist Flyout" Style="{StaticResource labelfortweaks}" ToolTip="If enabled then Snap preview is disabled when maximize button is hovered." />
|
|
||||||
<CheckBox Name="WPFToggleSnapFlyout" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Mouse Acceleration" Style="{StaticResource labelfortweaks}" ToolTip="If Enabled then Cursor movement is affected by the speed of your physical mouse movements." />
|
|
||||||
<CheckBox Name="WPFToggleMouseAcceleration" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Sticky Keys" Style="{StaticResource labelfortweaks}" ToolTip="If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury." />
|
|
||||||
<CheckBox Name="WPFToggleStickyKeys" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
|
|
||||||
<Label Content="Taskbar Widgets" Style="{StaticResource labelfortweaks}" ToolTip="If Enabled then Widgets Icon in Taskbar will be shown." />
|
|
||||||
<CheckBox Name="WPFToggleTaskbarWidgets" Style="{StaticResource ColorfulToggleSwitchStyle}" Margin="2.5,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
<Label Content="Performance Plans" FontSize="16"/>
|
|
||||||
<Button Name="WPFAddUltPerf" Content="Add and Activate Ultimate Performance Profile" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Button Name="WPFRemoveUltPerf" Content="Remove Ultimate Performance Profile" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
<Label Content="Shortcuts" FontSize="16"/>
|
|
||||||
<Button Name="WPFWinUtilShortcut" Content="Create WinUtil Shortcut" HorizontalAlignment = "Left" Width="300" Margin="5" Padding="20,5" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
@ -186,7 +186,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="ButtonGlow"
|
<Border x:Name="ButtonGlow"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{ButtonForegroundColor}"
|
BorderBrush="{ButtonForegroundColor}"
|
||||||
BorderThickness="{ButtonBorderThickness}"
|
BorderThickness="{ButtonBorderThickness}"
|
||||||
@ -197,7 +197,7 @@
|
|||||||
BorderBrush="{ButtonBackgroundColor}"
|
BorderBrush="{ButtonBackgroundColor}"
|
||||||
BorderThickness="{ButtonBorderThickness}"
|
BorderThickness="{ButtonBorderThickness}"
|
||||||
CornerRadius="{ButtonCornerRadius}">
|
CornerRadius="{ButtonCornerRadius}">
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Margin="10,2,10,2"/>
|
Margin="10,2,10,2"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -295,7 +295,7 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="CheckBox">
|
<ControlTemplate TargetType="CheckBox">
|
||||||
<Grid Background="{TemplateBinding Background}">
|
<Grid Background="{TemplateBinding Background}" Margin="6,0,0,0">
|
||||||
<BulletDecorator Background="Transparent">
|
<BulletDecorator Background="Transparent">
|
||||||
<BulletDecorator.Bullet>
|
<BulletDecorator.Bullet>
|
||||||
<Grid Width="16" Height="16">
|
<Grid Width="16" Height="16">
|
||||||
@ -403,86 +403,93 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ColorfulToggleSwitchStyle" TargetType="{x:Type CheckBox}">
|
<Style x:Key="ColorfulToggleSwitchStyle" TargetType="{x:Type CheckBox}">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid x:Name="toggleSwitch">
|
<Grid x:Name="toggleSwitch">
|
||||||
<Border x:Name="Border" CornerRadius="10"
|
|
||||||
Background="#FFFFFFFF"
|
|
||||||
Width="70" Height="25">
|
|
||||||
<Border.Effect>
|
|
||||||
<DropShadowEffect ShadowDepth="0.5" Direction="0" Opacity="0.3" />
|
|
||||||
</Border.Effect>
|
|
||||||
<Ellipse x:Name="Ellipse" Fill="#FFFFFFFF" Stretch="Uniform"
|
|
||||||
Margin="2 2 2 1"
|
|
||||||
Stroke="Gray" StrokeThickness="0.2"
|
|
||||||
HorizontalAlignment="Left" Width="22">
|
|
||||||
<Ellipse.Effect>
|
|
||||||
<DropShadowEffect BlurRadius="10" ShadowDepth="1" Opacity="0.3" Direction="260" />
|
|
||||||
</Ellipse.Effect>
|
|
||||||
</Ellipse>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<TextBlock x:Name="txtDisable" Text="Disable " VerticalAlignment="Center" FontWeight="DemiBold" HorizontalAlignment="Right" Foreground="White" FontSize="12" />
|
<Grid.ColumnDefinitions>
|
||||||
<TextBlock x:Name="txtEnable" Text=" Enable" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="White" HorizontalAlignment="Left" FontSize="12" />
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0" x:Name="txtToggle" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="{MainForegroundColor}" FontSize="12">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Setter Property="Text" Value="Off"/>
|
||||||
|
<Setter Property="Margin" Value="4,0,4,0"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked}" Value="True">
|
||||||
|
<Setter Property="Text" Value="On"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
<Border Grid.Column="1" x:Name="Border" CornerRadius="8"
|
||||||
|
BorderThickness="1"
|
||||||
|
Width="34" Height="17">
|
||||||
|
<Ellipse x:Name="Ellipse" Fill="{MainForegroundColor}" Stretch="Uniform"
|
||||||
|
Margin="2,2,2,1"
|
||||||
|
HorizontalAlignment="Left" Width="12">
|
||||||
|
</Ellipse>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="{MainForegroundColor}" />
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="{LinkHoverForegroundColor}"/>
|
||||||
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
|
<Setter Property="Panel.ZIndex" Value="1000"/>
|
||||||
|
</Trigger>
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
||||||
<Setter TargetName="Border" Property="Background" Value="#C2283B" />
|
<Setter TargetName="Border" Property="Background" Value="{MainBackgroundColor}" />
|
||||||
<Setter TargetName="Ellipse" Property="Margin" Value="2 2 2 1" />
|
<Setter TargetName="Border" Property="BorderBrush" Value="{MainForegroundColor}" />
|
||||||
<Setter TargetName="txtDisable" Property="Opacity" Value="1.0" />
|
<Setter TargetName="Ellipse" Property="Fill" Value="{MainForegroundColor}" />
|
||||||
<Setter TargetName="txtEnable" Property="Opacity" Value="0.0" />
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="{MainBackgroundColor}" />
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="{MainForegroundColor}" />
|
||||||
|
<Setter TargetName="Ellipse" Property="Fill" Value="{MainForegroundColor}" />
|
||||||
|
|
||||||
<Trigger.EnterActions>
|
<Trigger.EnterActions>
|
||||||
<BeginStoryboard>
|
<BeginStoryboard>
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ColorAnimation Storyboard.TargetName="Border"
|
<ColorAnimation Storyboard.TargetName="Border"
|
||||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||||
To="#34A543" Duration="0:0:0.1" />
|
To="{ToggleButtonOnColor}" Duration="0:0:0.1" />
|
||||||
|
<ColorAnimation Storyboard.TargetName="Border"
|
||||||
|
Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
|
||||||
|
To="{ToggleButtonOnColor}" Duration="0:0:0.1" />
|
||||||
|
|
||||||
|
<ColorAnimation Storyboard.TargetName="Ellipse"
|
||||||
|
Storyboard.TargetProperty="(Fill).(SolidColorBrush.Color)"
|
||||||
|
To="White" Duration="0:0:0.1" />
|
||||||
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
||||||
Storyboard.TargetProperty="Margin"
|
Storyboard.TargetProperty="Margin"
|
||||||
To="46 2 2 1" Duration="0:0:0.1" />
|
To="18,2,2,2" Duration="0:0:0.1" />
|
||||||
|
|
||||||
<DoubleAnimation Storyboard.TargetName="txtDisable"
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
|
||||||
To="0.0" Duration="0:0:0:0.1" />
|
|
||||||
|
|
||||||
<DoubleAnimation Storyboard.TargetName="txtEnable"
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
|
||||||
To="1.0" Duration="0:0:0:0.1" />
|
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</Trigger.EnterActions>
|
</Trigger.EnterActions>
|
||||||
|
|
||||||
<!-- Some out fading -->
|
|
||||||
<Trigger.ExitActions>
|
<Trigger.ExitActions>
|
||||||
<BeginStoryboard>
|
<BeginStoryboard>
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ColorAnimation Storyboard.TargetName="Border"
|
<ColorAnimation Storyboard.TargetName="Border"
|
||||||
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
|
||||||
To="#C2283B" Duration="0:0:0.1" />
|
To="{MainBackgroundColor}" Duration="0:0:0.1" />
|
||||||
|
|
||||||
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
<ThicknessAnimation Storyboard.TargetName="Ellipse"
|
||||||
Storyboard.TargetProperty="Margin"
|
Storyboard.TargetProperty="Margin"
|
||||||
To="2 2 2 1" Duration="0:0:0.1" />
|
To="2,2,2,1" Duration="0:0:0.1" />
|
||||||
|
|
||||||
<DoubleAnimation Storyboard.TargetName="txtDisable"
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
|
||||||
To="1.0" Duration="0:0:0:0.1" />
|
|
||||||
|
|
||||||
<DoubleAnimation Storyboard.TargetName="txtEnable"
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Opacity)"
|
|
||||||
To="0.0" Duration="0:0:0:0.1" />
|
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</Trigger.ExitActions>
|
</Trigger.ExitActions>
|
||||||
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource IdealForegroundColorBrush}" />
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
@ -490,6 +497,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="labelfortweaks" TargetType="{x:Type Label}">
|
<Style x:Key="labelfortweaks" TargetType="{x:Type Label}">
|
||||||
<Setter Property="Foreground" Value="{MainForegroundColor}" />
|
<Setter Property="Foreground" Value="{MainForegroundColor}" />
|
||||||
<Setter Property="Background" Value="{MainBackgroundColor}" />
|
<Setter Property="Background" Value="{MainBackgroundColor}" />
|
||||||
@ -546,9 +554,9 @@
|
|||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="TextBox">
|
<ControlTemplate TargetType="TextBox">
|
||||||
<Border Background="{TemplateBinding Background}"
|
<Border Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="5">
|
CornerRadius="5">
|
||||||
<Grid>
|
<Grid>
|
||||||
<ScrollViewer x:Name="PART_ContentHost" />
|
<ScrollViewer x:Name="PART_ContentHost" />
|
||||||
@ -563,6 +571,18 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition Binding="{Binding Path=ComputedHorizontalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
<Condition Binding="{Binding Path=ComputedVerticalScrollBarVisibility, ElementName=scrollViewer}" Value="Visible"/>
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</MultiDataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@ -573,7 +593,7 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto">
|
<DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto">
|
||||||
<Image Height="{ToggleButtonHeight}" Width="{ToggleButtonHeight}" Name="WPFIcon"
|
<Image Height="{ToggleButtonHeight}" Width="{ToggleButtonHeight}" Name="WPFIcon"
|
||||||
SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/>
|
SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/>
|
||||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||||
Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
|
Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
|
||||||
@ -621,42 +641,42 @@
|
|||||||
<ColumnDefinition Width="50px"/>
|
<ColumnDefinition Width="50px"/>
|
||||||
<ColumnDefinition Width="50px"/>
|
<ColumnDefinition Width="50px"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Width="200"
|
Width="200"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Height="25" Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
Height="25" Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
||||||
Name="CheckboxFilter"
|
Name="CheckboxFilter"
|
||||||
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
||||||
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||||
Name="CheckboxFilterClear"
|
Name="CheckboxFilterClear"
|
||||||
Style="{StaticResource ClearButtonStyle}"
|
Style="{StaticResource ClearButtonStyle}"
|
||||||
Margin="193,0,0,0" Visibility="Collapsed"/>
|
Margin="193,0,0,0" Visibility="Collapsed"/>
|
||||||
|
|
||||||
<Button Name="SettingsButton"
|
<Button Name="SettingsButton"
|
||||||
Style="{StaticResource HoverButtonStyle}"
|
Style="{StaticResource HoverButtonStyle}"
|
||||||
Grid.Column="1" BorderBrush="Transparent"
|
Grid.Column="1" BorderBrush="Transparent"
|
||||||
Background="{MainBackgroundColor}"
|
Background="{MainBackgroundColor}"
|
||||||
Foreground="{MainForegroundColor}"
|
Foreground="{MainForegroundColor}"
|
||||||
FontSize="18"
|
FontSize="18"
|
||||||
Width="35" Height="35"
|
Width="35" Height="35"
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||||
Margin="0,5,5,0"
|
Margin="0,5,5,0"
|
||||||
FontFamily="Segoe MDL2 Assets"
|
FontFamily="Segoe MDL2 Assets"
|
||||||
Content=""/>
|
Content=""/>
|
||||||
<Popup Grid.Column="1" Name="SettingsPopup"
|
<Popup Grid.Column="1" Name="SettingsPopup"
|
||||||
IsOpen="False"
|
IsOpen="False"
|
||||||
PlacementTarget="{Binding ElementName=SettingsButton}" Placement="Bottom"
|
PlacementTarget="{Binding ElementName=SettingsButton}" Placement="Bottom"
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Top">
|
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||||
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
||||||
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
@ -667,25 +687,25 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Popup>
|
</Popup>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Content="×" BorderThickness="0"
|
Content="×" BorderThickness="0"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
Background="{MainBackgroundColor}"
|
Background="{MainBackgroundColor}"
|
||||||
Width="35" Height="35"
|
Width="35" Height="35"
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||||
Margin="0,5,5,0"
|
Margin="0,5,5,0"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
Foreground="{MainForegroundColor}" FontSize="18" Name="WPFCloseButton" />
|
Foreground="{MainForegroundColor}" FontSize="18" Name="WPFCloseButton" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
<TabControl Name="WPFTabNav" Background="Transparent" Width="Auto" Height="Auto" BorderBrush="Transparent" BorderThickness="0" Grid.Row="1" Grid.Column="0" Padding="-1">
|
<TabControl Name="WPFTabNav" Background="Transparent" Width="Auto" Height="Auto" BorderBrush="Transparent" BorderThickness="0" Grid.Row="1" Grid.Column="0" Padding="-1">
|
||||||
<TabItem Header="Install" Visibility="Collapsed" Name="WPFTab1">
|
<TabItem Header="Install" Visibility="Collapsed" Name="WPFTab1">
|
||||||
<Grid Background="Transparent" >
|
<Grid Background="Transparent" >
|
||||||
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="45px"/>
|
<RowDefinition Height="45px"/>
|
||||||
<RowDefinition Height="0.95*"/>
|
<RowDefinition Height="0.95*"/>
|
||||||
@ -693,18 +713,20 @@
|
|||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.ColumnSpan="3" Margin="5">
|
||||||
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
<Button Name="WPFinstall" Content=" Install/Upgrade Selected" Margin="2" />
|
||||||
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
<Button Name="WPFInstallUpgrade" Content=" Upgrade All" Margin="2"/>
|
||||||
<Button Name="WPFuninstall" Content=" Uninstall Selection" Margin="2"/>
|
<Button Name="WPFuninstall" Content=" Uninstall Selected" Margin="2"/>
|
||||||
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
<Button Name="WPFGetInstalled" Content=" Get Installed" Margin="2"/>
|
||||||
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
<Button Name="WPFclearWinget" Content=" Clear Selection" Margin="2"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.Column="0" Padding="-1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
|
||||||
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
BorderBrush="Transparent" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
{{InstallPanel_applications}}
|
{{InstallPanel_applications}}
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|
||||||
|
<Rectangle Grid.Row="1" Grid.Column="0" Width="18" Height="18" Fill="{MainBackgroundColor}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Style="{StaticResource ScrollVisibilityRectangle}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
<TabItem Header="Tweaks" Visibility="Collapsed" Name="WPFTab2">
|
||||||
@ -718,8 +740,7 @@
|
|||||||
{{InstallPanel_tweaks}}
|
{{InstallPanel_tweaks}}
|
||||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
|
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
|
||||||
<Label Content="Recommended Selections:" FontSize="14" VerticalAlignment="Center"/>
|
<Label Content="Recommended Selections:" FontSize="14" VerticalAlignment="Center"/>
|
||||||
<Button Name="WPFdesktop" Content=" Desktop " Margin="1"/>
|
<Button Name="WPFstandard" Content=" Standard " Margin="1"/>
|
||||||
<Button Name="WPFlaptop" Content=" Laptop " Margin="1"/>
|
|
||||||
<Button Name="WPFminimal" Content=" Minimal " Margin="1"/>
|
<Button Name="WPFminimal" Content=" Minimal " Margin="1"/>
|
||||||
<Button Name="WPFclear" Content=" Clear " Margin="1"/>
|
<Button Name="WPFclear" Content=" Clear " Margin="1"/>
|
||||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="1"/>
|
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="1"/>
|
||||||
@ -795,20 +816,29 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
||||||
ToolTip="Use ISO directory for ScratchDir " />
|
ToolTip="Use ISO directory for ScratchDir " />
|
||||||
|
<Grid>
|
||||||
<Button Name="MicrowinScratchDirBT" Margin="2" Padding="1">
|
<Grid.ColumnDefinitions>
|
||||||
<Button.Content>
|
<ColumnDefinition Width="*" /> <!-- Takes the remaining space -->
|
||||||
|
<ColumnDefinition Width="30" /> <!-- Fixed width for Button -->
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox Name="MicrowinScratchDirBox" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
<TextBox Name="MicrowinScratchDirBox" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
||||||
Text="Scratch" Padding="0"
|
Text="Scratch"
|
||||||
ToolTip="Alt Path For Scratch Directory" BorderThickness="1"
|
Margin="2"
|
||||||
Margin="0,0,0,3" HorizontalAlignment="Left"
|
IsReadOnly="False"
|
||||||
IsReadOnly="False"
|
ToolTip="Alt Path For Scratch Directory"
|
||||||
Height="Auto"
|
Grid.Column="0"
|
||||||
Width="110"
|
VerticalAlignment="Center"
|
||||||
Foreground="{ButtonForegroundColor}"
|
Foreground="{LabelboxForegroundColor}">
|
||||||
/>
|
</TextBox>
|
||||||
</Button.Content>
|
<Button Name="MicrowinScratchDirBT"
|
||||||
</Button>
|
Grid.Column="1"
|
||||||
|
Margin="2"
|
||||||
|
Padding="1" VerticalAlignment="Center">
|
||||||
|
<Button.Content>
|
||||||
|
...
|
||||||
|
</Button.Content>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
<TextBox Name="MicrowinFinalIsoLocation" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
<TextBox Name="MicrowinFinalIsoLocation" Background="Transparent" BorderBrush="{MainForegroundColor}"
|
||||||
Text="ISO location will be printed here"
|
Text="ISO location will be printed here"
|
||||||
Margin="2"
|
Margin="2"
|
||||||
@ -843,6 +873,7 @@
|
|||||||
Foreground="{LabelboxForegroundColor}"
|
Foreground="{LabelboxForegroundColor}"
|
||||||
ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"
|
ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"
|
||||||
/>
|
/>
|
||||||
|
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="5,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="5,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="5,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||||
@ -864,10 +895,10 @@
|
|||||||
|
|
||||||
<Grid Name = "BusyMessage" Visibility="Collapsed">
|
<Grid Name = "BusyMessage" Visibility="Collapsed">
|
||||||
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
|
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
|
||||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
|
||||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock x:Name = "asciiTextBlock"
|
<TextBlock x:Name = "asciiTextBlock"
|
||||||
xml:space ="preserve"
|
xml:space ="preserve"
|
||||||
HorizontalAlignment = "Center"
|
HorizontalAlignment = "Center"
|
||||||
@ -878,16 +909,16 @@
|
|||||||
FontSize = "10"
|
FontSize = "10"
|
||||||
FontFamily = "Courier New"
|
FontFamily = "Courier New"
|
||||||
>
|
>
|
||||||
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
|
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
|
||||||
/ \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \
|
/ \ | | / __|| '__| / _ \ \ \/ \/ /| || '_ \
|
||||||
/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | |
|
/ /\/\ \| || (__ | | | (_) | \ /\ / | || | | |
|
||||||
\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_|
|
\/ \/|_| \___||_| \___/ \/ \/ |_||_| |_|
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
|
|
||||||
<TextBlock Margin="15,15,15,0"
|
<TextBlock Margin="15,15,15,0"
|
||||||
Padding="8,8,8,0"
|
Padding="8,8,8,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="WrapWithOverflow"
|
TextWrapping="WrapWithOverflow"
|
||||||
Height = "Auto"
|
Height = "Auto"
|
||||||
Width = "Auto"
|
Width = "Auto"
|
||||||
Foreground="{ComboBoxForegroundColor}">
|
Foreground="{ComboBoxForegroundColor}">
|
||||||
@ -919,9 +950,9 @@
|
|||||||
<LineBreak/>
|
<LineBreak/>
|
||||||
If you are injecting drivers ensure you put all your inf, sys, and dll files for each driver into a separate directory
|
If you are injecting drivers ensure you put all your inf, sys, and dll files for each driver into a separate directory
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Margin="15,0,15,15"
|
<TextBlock Margin="15,0,15,15"
|
||||||
Padding = "1"
|
Padding = "1"
|
||||||
TextWrapping="WrapWithOverflow"
|
TextWrapping="WrapWithOverflow"
|
||||||
Height = "Auto"
|
Height = "Auto"
|
||||||
Width = "Auto"
|
Width = "Auto"
|
||||||
VerticalAlignment = "Top"
|
VerticalAlignment = "Top"
|
||||||
|
Reference in New Issue
Block a user