mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 02:22:34 -05:00
Compare commits
9 Commits
24.08.13
...
admin-elev
Author | SHA1 | Date | |
---|---|---|---|
ae57539640 | |||
b0d54e41ad | |||
d0fa506e4f | |||
67be99bb7b | |||
46d9e2c437 | |||
863dd83faa | |||
09eb4eaa00 | |||
17d523d8f8 | |||
fa17abdd49 |
0
LICENSE → .github/LICENSE
vendored
0
LICENSE → .github/LICENSE
vendored
5
.github/SECURITY.md
vendored
Normal file
5
.github/SECURITY.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# Security Policy
|
||||
|
||||
If you find a security issue please make post it in the issues tab. If you think it should be private you can email me at contact@christitus.com.
|
||||
|
||||
For immediate response check out our discord server @ [](https://discord.gg/RUbZUZyByQ)
|
3
mkdocs.yml → .github/mkdocs.yml
vendored
3
mkdocs.yml → .github/mkdocs.yml
vendored
@ -1,4 +1,5 @@
|
||||
site_name: WinUtil Documentation
|
||||
docs_dir: '../docs'
|
||||
repo_url: https://github.com/ChrisTitusTech/winutil
|
||||
|
||||
nav:
|
||||
@ -12,7 +13,7 @@ nav:
|
||||
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: 'overrides'
|
||||
custom_dir: '../overrides'
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
6
.github/workflows/github-pages.yaml
vendored
6
.github/workflows/github-pages.yaml
vendored
@ -24,8 +24,8 @@ jobs:
|
||||
python-version: 3.x # Install latest Stable release of Python 3
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Install Necessary Dependencies using 'pip install -r requirements.txt'
|
||||
run: pip install -r requirements.txt
|
||||
- name: Install Necessary Dependencies using 'pip install -r .github/requirements.txt'
|
||||
run: pip install -r .github/requirements.txt
|
||||
|
||||
- name: Build & Deploy using 'mkdocs'
|
||||
run: mkdocs gh-deploy --force
|
||||
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
|
@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
|
||||
|
||||
These are the sponsors that help keep this project alive with monthly contributions.
|
||||
|
||||
<!-- sponsors --><a href="https://github.com/GregoryNavasarkian"><img src="https://github.com/GregoryNavasarkian.png" width="60px" alt="Gregory Navasarkian" /></a><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><!-- sponsors -->
|
||||
<!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><!-- sponsors -->
|
||||
|
||||
## 🏅 Thanks to all Contributors
|
||||
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.
|
||||
|
@ -1,3 +1,3 @@
|
||||
--8<-- "CONTRIBUTING.md"
|
||||
--8<-- ".github/CONTRIBUTING.md"
|
||||
|
||||
<!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. -->
|
||||
|
@ -1,4 +0,0 @@
|
||||
Get-ChildItem @(
|
||||
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum",
|
||||
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum"
|
||||
) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" }
|
@ -44,12 +44,23 @@ $sync.version = "#{replaceme}"
|
||||
$sync.configs = @{}
|
||||
$sync.ProcessRunning = $false
|
||||
|
||||
# If script isn't running as admin, show error message and quit
|
||||
If (([Security.Principal.WindowsIdentity]::GetCurrent()).Owner.Value -ne "S-1-5-32-544") {
|
||||
Write-Host "===========================================" -Foregroundcolor Red
|
||||
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
|
||||
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
|
||||
Write-Host "===========================================" -Foregroundcolor Red
|
||||
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
||||
Write-Output "Winutil needs to be run as Administrator. Attempting to relaunch."
|
||||
|
||||
$wtInstalled = Get-Command wt.exe -ErrorAction SilentlyContinue
|
||||
$pwshInstalled = Get-Command pwsh -ErrorAction SilentlyContinue
|
||||
if ($pwshInstalled) {
|
||||
$powershellcmd = "pwsh"
|
||||
} else {
|
||||
$powershellcmd = "powershell"
|
||||
}
|
||||
|
||||
if ($wtInstalled) {
|
||||
Start-Process wt.exe -ArgumentList "new-tab $powershellcmd -ExecutionPolicy Bypass -Command `"irm https://christitus.com/win | iex`"" -Verb RunAs
|
||||
} else {
|
||||
Start-Process $powershellcmd -ArgumentList "-ExecutionPolicy Bypass -Command `"irm https://christitus.com/win | iex`"" -Verb RunAs
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -563,17 +563,17 @@ function Add-LinkAttributeToJson {
|
||||
}
|
||||
|
||||
Update-Progress "Loading JSON files" 10
|
||||
$tweaks = Get-Content -Path "config/tweaks.json" | ConvertFrom-Json
|
||||
$features = Get-Content -Path "config/feature.json" | ConvertFrom-Json
|
||||
$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json
|
||||
$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json
|
||||
|
||||
Update-Progress "Getting last modified dates of the JSON files" 20
|
||||
$tweaksLastModified = (Get-Item "config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||
$featuresLastModified = (Get-Item "config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||
$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||
$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
|
||||
|
||||
$tweaksOutputDir = "docs/dev/tweaks"
|
||||
$featuresOutputDir = "docs/dev/features"
|
||||
$privateFunctionsDir = "functions/private"
|
||||
$publicFunctionsDir = "functions/public"
|
||||
$tweaksOutputDir = "../docs/dev/tweaks"
|
||||
$featuresOutputDir = "../docs/dev/features"
|
||||
$privateFunctionsDir = "../functions/private"
|
||||
$publicFunctionsDir = "../functions/public"
|
||||
$functions = @{}
|
||||
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
|
||||
|
||||
@ -592,7 +592,7 @@ Load-Functions -dir $publicFunctionsDir
|
||||
Update-Progress "Adding documentation links to JSON files" 50
|
||||
|
||||
# Define the JSON file paths
|
||||
$jsonPaths = @(".\config\feature.json", ".\config\tweaks.json")
|
||||
$jsonPaths = @("../config/feature.json", "../config/tweaks.json")
|
||||
|
||||
# Loop through each JSON file path
|
||||
foreach ($jsonPath in $jsonPaths) {
|
||||
@ -612,12 +612,12 @@ foreach ($jsonPath in $jsonPaths) {
|
||||
Set-Content -Path $jsonPath -Value $jsonString
|
||||
}
|
||||
|
||||
Add-LinkAttributeToJson -jsonFilePath "config/tweaks.json" -outputDir "dev/tweaks"
|
||||
Add-LinkAttributeToJson -jsonFilePath "config/feature.json" -outputDir "dev/features"
|
||||
Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks"
|
||||
Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features"
|
||||
|
||||
Update-Progress "Generating content for documentation" 60
|
||||
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
|
||||
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
|
||||
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
|
||||
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
|
||||
|
||||
Update-Progress "Generating table of contents" 80
|
||||
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
|
||||
@ -639,6 +639,6 @@ $indexContent += Process-MultilineStrings @"
|
||||
\\
|
||||
"@
|
||||
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
|
||||
Set-Content -Path "docs/devdocs.md" -Value $indexContent -Encoding utf8
|
||||
Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8
|
||||
|
||||
Update-Progress "Process Completed" 100
|
Reference in New Issue
Block a user