Adds all files for winutil docs (#2342)

* Adds all files for winutil docs

* Adds and changes content

* Adds more content

* Added even more content to the docs

* Create screen-install.png

* Adds KnownIssues File

* Delete createchangelog.yml

* Fixes spelling
This commit is contained in:
Real-MullaC 2024-07-13 16:59:35 +01:00 committed by GitHub
parent b2e3487989
commit 2844b0df54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 425 additions and 0 deletions

23
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: ci
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material
- run: pip install pillow cairosvg
- run: mkdocs gh-deploy --force

83
Battery.txt Normal file
View File

@ -0,0 +1,83 @@
# Battery drains too fast.
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:**
- Open a Command Prompt as an administrator.
- Run the following command to generate a battery report:
```powershell
powercfg /batteryreport /output "C:\battery_report.html"
```
- Open the generated HTML report to review information about battery health and usage.
2. **Review Power Settings:**
- Go to "Settings" > "System" > "Power & sleep."
- Adjust power plan settings based on your preferences and usage patterns.
- Click on "Additional power settings" to access advanced power settings.
3. **Identify Power-Hungry Apps:**
- Right-click on the taskbar and select "Task Manager."
- Navigate to the "Processes" tab to identify applications with high CPU or memory usage.
- Consider closing unnecessary background applications.
4. **Update Drivers:**
- Visit your laptop manufacturer's website or use Windows Update to check for driver updates.
- Ensure graphics, chipset, and other essential drivers are up to date.
5. **Check for Windows Updates:**
- Go to "Settings" > "Update & Security" > "Windows Update."
- Check for and install any available updates for your operating system.
6. **Reduce Screen Brightness:**
- Adjust screen brightness based on your preferences and lighting conditions.
- Go to "Settings" > "System" > "Display" to adjust brightness.
7. **Battery Saver Mode:**
- Go to "Settings" > "System" > "Battery."
- Turn on "Battery saver" to limit background activity and conserve power.
8. **Check Power Usage in Settings:**
- Go to "Settings" > "System" > "Battery" > "Battery usage by app."
- Review the list of apps and their power usage.
9. **Check Background Apps:**
- Go to "Settings" > "Privacy" > "Background apps."
- Disable unnecessary apps running in the background.
10. **Use Powercfg for Analysis:**
- Open a Command Prompt as an administrator.
- Run the following command to analyze energy usage and generate a report:
```powershell
powercfg /energy /output "C:\energy_report.html"
```
- Open the generated HTML report to identify energy consumption patterns.
11. **Review Event Viewer:**
- Open Event Viewer by searching for it in the Start menu.
- Navigate to "Windows Logs" > "System."
- Look for events with the source "Power-Troubleshooter" to identify power-related events.
12. **Check Wake-up Sources:**
- Open a Command Prompt as an administrator.
- Use the command `powercfg /requests` to identify processes preventing sleep.
- Check Task Scheduler for tasks waking up the computer.
- Use the command `powercfg /waketimers` to view active wake timers.
13. **Resource Monitor:**
- Open Resource Monitor from the Start menu.
- Navigate to the "CPU" tab and identify processes with high CPU usage.
14. **Windows Settings - Activity History:**
- In "Settings," go to "Privacy" > "Activity history."
- Turn off "Let Windows collect my activities from this PC."
15. **Network Adapters:**
- Open Device Manager by searching for it in the Start menu.
- Locate your network adapter, right-click, and go to "Properties."
- Under the "Power Management" tab, uncheck the option that allows the device to wake the computer.
16. **Review Installed Applications:**
- Manually review installed applications by searching for "Add or remove programs" in the Start menu.
- Check settings/preferences of individual applications for power-related options.
- Uninstall unnecessary or problematic software.
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.

View File

@ -0,0 +1,39 @@
# Troubleshoot errors during Microwin usage
## Error `0x80041031`
This error code typically indicates an issue related to Windows Management Instrumentation (WMI). Here are a few steps you can try to resolve the issue:
1. **Reboot Your Computer:**
Sometimes, a simple reboot can resolve temporary issues. Restart your computer and try mounting the ISO again.
2. **Check for System Corruption:**
Run the System File Checker (SFC) utility to scan and repair system files that may be corrupted.
```powershell
sfc /scannow
```
3. **Update Your System:**
Make sure your operating system is up-to-date. Check for Windows updates and install any pending updates.
4. **Check WMI Service:**
Ensure that the Windows Management Instrumentation (WMI) service is running. You can do this through the Services application:
- Press `Win + R` to open the Run dialog.
- Type `services.msc` and press Enter.
- Locate "Windows Management Instrumentation" in the list.
- Make sure to set its status to "Running" and the startup type to "Automatic."
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.
6. **Event Viewer:**
Check the Event Viewer for more detailed error information. Look for entries related to the `80041031` error and check if there are any additional details that can help identify the cause.
- Press `Win + X` and select "Event Viewer."
- Navigate to "Windows Logs" -> "Application" or "System."
- Look for entries with the source related to WMI or the application use to mount the ISO.
7. **ISO File Integrity:**
Ensure that the ISO file you are trying to mount is uncorrupted. Try mounting a different ISO file to see if the issue persists.
If the problem persists after trying these steps, additional troubleshooting is required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you use to mount the ISO.

53
docs/KnownIssues.md Normal file
View File

@ -0,0 +1,53 @@
## Known Issues and Fixes
### Launch Issues:
- Windows Security (formerly Defender) and other anti-virus software are known to block the script. The script gets flagged due to the fact that it requires administrator privileges & makes drastic system changes.
- If possible: Allow script in Anti-Virus software settings.
- If you are having TLS 1.2 issues, or are having trouble resolving `christitus.com/win` then run with the following command:
```ps1
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;iex(New-Object Net.WebClient).DownloadString('https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1')
```
- If you are unable to resolve `christitus.com/win` and are getting errors launching the tool, it might be due to India blocking GitHub's content domain and preventing downloads.
- Source: <https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms>
If you are still having issues try using a **VPN**, or changing your **DNS provider** to:
| `1.1.1.1` | `1.0.0.1` | or | `8.8.8.8` | `8.8.4.4` |
|---------|---------|-----|---------|---------|
- Script doesn't run/PowerShell crashes:
1. Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11)
2. Run:
```ps1
Set-ExecutionPolicy Unrestricted -Scope Process -Force
```
3. Run:
```ps1
irm christitus.com/win | iex
```
### Other Issues:
- Windows taking longer to shut down:
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) Turn on fast startup: Press Windows key + R, then type:
```
control /name Microsoft.PowerOptions /page pageGlobalSettings
```
- If that doesn't work, Disable Hibernation: Press Windows Key+X and select 'PowerShell (Admin)' (Windows 10) or 'Windows Terminal (Admin)' (Windows 11) and enter:
```ps1
powercfg /H off
```
- [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232) Windows Search does not work: Enable Background Apps
- [#198](https://github.com/ChrisTitusTech/winutil/issues/198) Xbox Game Bar Activation Broken: Set the Xbox Accessory Management Service to Automatic
```ps1
Get-Service -Name "XboxGipSvc" | Set-Service -StartupType Automatic
```
- 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'
- Explorer no longer launches: Go to Control Panel, File Explorer Options, Change the 'Open File Explorer to' option to 'This PC'.

BIN
docs/assets/CommitGHD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
docs/assets/ForkButton.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
docs/assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

57
docs/contribute.md Normal file
View File

@ -0,0 +1,57 @@
# How to Contribute?
## Issues
* If you encounter any challenges or problems with the script, I kindly request that you submit them via the "Issues" tab on the GitHub repository. By filling out the provided template, you can provide specific details about the issue, allowing me (and others in the community) to promptly address any bugs, or consider feature requests.
## Contribute Code
* Pull Requests are now handled directly on the **MAIN branch**. This was done since we can now select specific releases to launch via releases in GitHub.
* If you're doing code changes, then you can submit a PR to `main` branch, but I am very selective about these.
> [!WARNING]
> 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, but not limited to, documenting any additions made to the `tweaks` section and corresponding `undo tweak`, so users are able to remove the newly added tweaks if necessary, and comprehensive documentation is required for all code changes, document your changes and briefly explain why you made your changes in your Pull Request Description. Failure to adhere to this format may result in denial of the pull request. Additionally, Any code lacking sufficient documentation may also be denied.
* By following these guidelines, we can maintain a high standard of quality and ensure that the codebase remains organized and well-documented.
> [!NOTE]
> When creating a function, please include "WPF" or "WinUtil" in the file name so it can be loaded into the runspace.
## Walk through
### Fork the Repo
* Fork the WinUtil Repository [here](https://github.com/ChrisTitusTech/winutil) to create a copy that will be available in your Repository-list.
![Fork](assets/ForkButton.png)
### Clone the Fork
* While you can make your changes directly through the Web, we recommend cloning the repo to your device to test your fork easily.
* Using the application GitHub Desktop (available in WinUtil) you can easily manage your repos locally. You can do it using other tools like git-cli (available in WinUtil), we recommend GitHub Desktop for ease of use.
* Install GitHub Desktop if not already installed
* Log in using the same GitHub account u used to fork WinUtil
* Choose the fork under "Your Repositories" and press "clone {repo name}"
* Create a new Branch and name it something relatable to your changes,
* Now you can modify WinUtil to your liking using your prefered text editor.
### Testing your changes
* To test to see if your changes work as intended run following commands in a powershell teminal:
* Change the directory where you are running the commands to the forked project.
* `cd {path to the folder with the compile.ps1}`
* Run following command to compile and run Winutil
* `.\Compile.ps1 -run`
* After seeing that your changes work properly feel free to commit the changes to the repository and make a PR, for help on that follow the documentation below.
### Commiting the changes
* Commit your changes once you are fine with the result
* Push the changes to "upload" them to your fork on github.com.
### Making a PR
* To make a PR on your repo under a new branch linking to the main branch a button will show and say Preview and Create pull request. Click that button and fill in all information that is provided on the template. Once all the information is filled in correctly check your PR to make sure there is not a WinUtil.ps1 file attached to the PR. Once everything is good make the PR and wait for Chris (The Maintainer) to accept or deny your PR. Once it is accepted in by Chris you will be able to see your changes in the /windev build.
* If you do not see your feature in the main /win build that is fine. As all new changes go into the /windev build to make sure everything is working ok before going fully public.
* Congrats you just submitted your first PR. Thank you so much for contributing to WinUtil.

4
docs/faq.md Normal file
View File

@ -0,0 +1,4 @@
# FAQ's
## How do I uninstall WinUtil?
* You do not have to uninstall WinUtil. As it is a script you run from Powershell it only loads into your RAM. This means as soon as you close WinUtil it will be deleted off your system.

BIN
docs/img/ProgramInstall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

BIN
docs/img/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

12
docs/index.md Normal file
View File

@ -0,0 +1,12 @@
# Welcome to Chris Titus WinUtil Official Documentation!
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ)](https://discord.gg/RUbZUZyByQ)
## Running
There are 4 ways to run WinUtil. The 4 ways goes as follows:
* `irm christitus.com/win | iex` - Runs WinUtil from ChrisTitus's website using the latest Full Releases.
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1 | iex` - Runs WinUtil from github using the latest Full Release.
* `irm christitus.com/windev | iex` - Runs WinUtil from ChrisTitus website using the latest Pre-Release.
* `irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/windev.ps1 | iex` - Runs WinUtil from github using the latest Pre-Release.

3
docs/updates.md Normal file
View File

@ -0,0 +1,3 @@
# Update Log
#

97
docs/userguide.md Normal file
View File

@ -0,0 +1,97 @@
# User Guide
## Overview
* short one
## Walkthrough
### Program
#### Installation & Updates
* To install programs select the programs you wish to install or update like the picture below.
![Program Install](assets/ProgramInstall.png)
* Once you have selected the programs you wish to install click the select Install/Upgrade Selected button as seen below.
![Program Install Button](assets/ProgramInstallButton.png)
#### Upgrade All
* Press the button to upgrade all installed programs that are supported by WinGet, there is no selection needed.
#### Uninstall
* To uninstall programs select the programs you wish to uninstall like the picture below.
![Program Uninstall](assets/ProgramInstall.png)
* Once you have selected the programs you wish to uninstall click the select Uninstall Selected button as seen below.
![Program Uninstall Button](assets/ProgramUninstall.png)
#### Get Installed
* Checks for installed programs that are supported by WinGet and selects them in the Utility.
#### Clear Selection
* Clears ur current selection so no program is checked.
### Tweaks
#### Tweaks Addition
* To enable tweaks on your system select Tweaks at the top next to Install.
* Then you can select what tweaks you want adding to your system. We do have some presets you can select from at the top you can see this in the picture below.
![Tweaks Screen](assets/TweaksScreen.PNG)
* After you have chosen your tweaks click the Run Tweaks button at the bottom of the screen.
#### Tweaks Removal
* To disable tweaks on your system select Tweaks at the top next to Install.
* Then you can select what tweaks you want removing from your system.
* After you have chosen your tweaks you want to remove click the Undo Selected Tweaks button at the bottom of the screen.
#### Essential Tweaks
* The Tweaks under the Essential
#### Advanced Tweaks - CAUTION
#### O&O Shutup
#### DNS
#### Customize Preferences
#### Performance Plans
#### Shortcuts
![Tweaks Screen](assets/TweaksScreen.PNG)
### Config
#### Features
* Install the most used Windows Features by checking the checkbox and clicking "Install Features" to install them
#### Fixes
* Quick Fixes for your system if you are having Issues.
* Set Up Autologin
* Reset Windows Update
* Reset Network
* System Corruption Scan
* WinGet Reinstall
* Remove Adobe Creative Cloud
#### Legacy Windows Panels
### Updates | Not working rn
### MicroWin
## Automation
* Some features are available through automation. This allows you to save your config file pass it to Winutil walk away and come back to a finished system. Here is how you can set it up currently with Winutil >24.01.15
* On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
![GetInstalled](assets/Get-Installed.png)
* Click on the Settings cog in the upper right corner and chose Export, chose file file and location, this will export the setting file.
![SettingsExport](assets/Settings-Export.png)
* Copy this file to a USB or somewhere you can use after Windows installation.
* Use Microwin tab to create a custom Windows image.
* Install the Windows image.
* In the new Windows, Open PowerShell in the admin mode and run command to automatically apply tweaks and install apps from the config file.
* ``` iex "& { $(irm christitus.com/win) } -Config [path-to-your-config] -Run" ```
* Have a cup of coffee! Come back when it's done.

42
mkdocs.yml Normal file
View File

@ -0,0 +1,42 @@
site_name: Chris Titus WinUtil Official Documentation
repo_url: https://github.com/ChrisTitusTech/winutil
nav:
- Introduction: 'index.md'
- User Guide: 'userguide.md'
- Contribute: 'contribute.md'
- Updates: 'updates.md'
- Known Issues: 'KnownIssues.md'
- FAQ: 'faq.md'
theme:
name: material
custom_dir: 'overrides'
features:
- navigation.tabs
- navigation.sections
- toc.integrate
- navigation.top
- search.suggest
- search.highlight
- content.tabs.link
- content.code.annotation
- content.code.copy
language: en
logo: assets/favicon.png
favicon: assets/favicon.png
palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
primary: black
accent: purple
- scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
primary: teal
accent: lime
markdown_extensions:
- admonition

12
overrides/main.html Normal file
View File

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block header %}
{{ super() }}
<div style="color: red; text-align: center; padding: 10px; font-size: 20px;">
<strong>Announcement:</strong> This documentation is still in progress.
</div>
{% endblock %}
{% block footer %}
{# Empty block to override the footer #}
{% endblock %}