Test 2024 01 15 (#1456)

* File Converter

* Adding wiki directory where we can start storing all the wikis for now (#1405)

* change logseq url and add .net 8 (#1385)

* Update applications.json

Add Official logseq url 
Add .net runtime 8.0

* compile with new logseq and .net 8 runtime

* add thorium avx2

* Compile Winutil

* Anoter one of those huge PRs
- Fix version inefficiency the version is already stored in sync, no need to slow down loading by one extra replace.
- Created custom dialog and About message
- Create a menu with Import/Export values
	- press on teh Settings cog in the right upper corner and save all the checkboxes
	- then you can either load them or load and run automatically
- Made Import Export load accross the whole app
- Optimized the way checkbox controls are looked up, it is 20% faster now
- Added a switch to load all the boxes from a config file
	- example: .winutil.ps1 -Config "C:UsersasdfDesktop\111.json"
- Added a switch to run all the action in unattended mode by passing -Run siwthc
	- example: .winutil.ps1 -Config "C:UsersasdfDesktop\111.json" -Run
	- This will run all the tweaks and install all the apps

* Fixing a couple of bugs and blur fonts, also menu now closes when focus is lost

* Remove Cider Music Player (#1400)

* Update winutil.ps1

* Update applications.json

* Compile Winutil

* Checking in wiki files. Once you get wiki going you will be able to just copy this content to the wiki. Or leave it as-is, which maybe better because than the community could edit it

* Adding microwin usage error wiki

* fixing link the the new wiki location

* Adding automation section to the readme

* Fixing doc errors

* Adding conda and a couple or tools used by scientists, also fixing a nesty bug with winget if you don't specify scope=machine tools like python will not work correctly

* fix application mismatch

* Update applications.json

---------

Co-authored-by: Cristian Negulescu <cristian@clamsen.com>
Co-authored-by: Chris Titus <dfm.titus@gmail.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Tommi Pöntinen <98650216+hamburgerghini1@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>

* Compile Winutil

* remove files application (#1408)

* Update README.md (#1421)

* Compile Winutil

* Update links, descriptions + add choco id for twinkle tray (#1426)

* update twinkle tray

* update wingetui

* update wisetoys link

* update floorp link

* Compile Winutil

* Add some useful programs and fix an app's url (#1427)

* fix the link for strawberry music player

The existing one opens a python library

* feat: add some useful apps

* changed the link in the wrong place

* Compile Winutil

* Added new toggle tweak button (#1434)

* add new ToggleSwitch

* add new function to disable/enable toggle button

* add new name of the button for the given toggle

* added new toggle tweak

* Compile Winutil

* Feat: Add Microsoft Power BI program (#1438)

* Compile Winutil

* Fix Fredium App Link (#1440)

* Update applications.json (#1448)

Updated the link to Prism Launcher to point to the correct url

* Compile Winutil

* fix for bug with selecting presets and toggle switches (#1447)

* Update Invoke-WPFPresets.ps1

* Update Invoke-WPFPresets.ps1

* Compile Winutil

* Update winutil.ps1

---------

Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: Cristian Negulescu <cristian@clamsen.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Tommi Pöntinen <98650216+hamburgerghini1@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: DeveloperDurp <developerdurp@durp.info>
Co-authored-by: OmriOn <76548146+OmriOn@users.noreply.github.com>
Co-authored-by: Keshav S <55992029+Keshav13142@users.noreply.github.com>
Co-authored-by: Vuk Lekić <vuklekic22@gmail.com>
Co-authored-by: André Gonzalez <lopescg@gmail.com>
Co-authored-by: playgroundsskiff <149293245+playgroundsskiff@users.noreply.github.com>
Co-authored-by: BusterBean <73446417+BusterBean@users.noreply.github.com>
This commit is contained in:
Chris Titus 2024-01-25 14:44:51 -06:00 committed by GitHub
parent 3b133e704e
commit bf271b89e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 565 additions and 56 deletions

View File

@ -4,12 +4,23 @@ This utility is a compilation of Windows tasks I perform on each Windows system
![screen-install](screen-install.png)
## Usage:
## Usage
Requires you to launch PowerShell or Windows Terminal As **ADMINISTRATOR!**
The recommended way is to right-click on the start menu and select (PowerShell As Admin *Windows 10* - Windows Terminal As Admin *Windows 11*)
Winutil must be run in Admin mode because it performs system-wide tweaks. To achieve this, open PowerShell or Windows Terminal as an administrator. Here are a few ways to do it:
Launch Command:
1. **Right-Click Method:**
- Right-click on the start menu.
- Choose "PowerShell As Admin" (for Windows 10) or "Windows Terminal As Admin" (for Windows 11).
2. **Search and Launch Method:**
- Press the Windows key.
- Type "PowerShell" or "Terminal" (for Windows 11).
- Press `Ctrl + Shift + Enter` to launch it with administrator privileges.
### Launch Command
#### Simple way
```
iwr -useb https://christitus.com/win | iex
@ -20,7 +31,31 @@ irm https://christitus.com/win | iex
```
Courtesy of the issue raised at: [#144](/../../issues/144)
### Issues:
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
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
1. On the Install Tab, click "Get Installed", this will get all installed apps **supported by Winutil** on the system
![GetInstalled](/wiki/Get-Installed.png)
2. 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](/wiki/Settings-Export.png)
3. Copy this file to a USB or somewhere you can use after Windows installation
4. Use Microwin tab to create a cusom Windows image
5. Install the Windows image
6. In the new Windows, Open PowerShell in the admin mode and run command to automatically apply twekas and install apps from the config file
```
irm https://christitus.com/win -Config [path-to-your-config] -Run | iex
```
7. Have a cup of coffee! Come back when it's done.
## Issues:
- 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. You may use a VPN or change your DNS provider to Google/Cloudflare/etc.
@ -96,6 +131,8 @@ When creating pull requests, it is essential to thoroughly document all changes
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 name so that it can be loaded into the runspace.
## Thanks to all Contributors
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.

View File

@ -59,7 +59,7 @@
"category": "Browsers",
"panel": "0",
"content": "Floorp",
"link": "https://github.com/Floorp-Projects/Floorp",
"link": "https://floorp.app/",
"description": "Floorp is an open-source web browser project that aims to provide a simple and fast browsing experience."
},
"WPFInstalllibrewolf": {
@ -125,6 +125,96 @@
"link": "https://www.chatterino.com/",
"description": "Chatterino is a chat client for Twitch chat that offers a clean and customizable interface for a better streaming experience."
},
"WPFInstallgoogledrive": {
"winget": "Google.Drive",
"choco": "googledrive",
"category": "Utilities",
"panel": "4",
"content": "Google Drive",
"link": "https://www.google.com/drive/",
"description": "File syncing across devices all tied to your google account"
},
"WPFInstallsynctrayzor": {
"winget": "SyncTrayzor.SyncTrayzor",
"choco": "synctrayzor",
"category": "Utilities",
"panel": "4",
"content": "Synctrayzor",
"link": "https://github.com/canton7/SyncTrayzor/",
"description": "Windows tray utility / filesystem watcher / launcher for Syncthing"
},
"WPFInstallauthy": {
"winget": "Twilio.Authy",
"choco": "authy-desktop",
"category": "Utilities",
"panel": "4",
"content": "Authy",
"link": "https://authy.com/",
"description": "Simple and cross-platform 2FA app"
},
"WPFInstallbleachbit": {
"winget": "BleachBit.BleachBit",
"choco": "bleachbit",
"category": "Utilities",
"panel": "4",
"content": "BleachBit",
"link": "https://www.bleachbit.org/",
"description": "Clean Your System and Free Disk Space"
},
"WPFInstallespanso": {
"winget": "Espanso.Espanso",
"choco": "espanso",
"category": "Utilities",
"panel": "4",
"content": "Espanso",
"link": "https://espanso.org/",
"description": "Cross-platform and open-source Text Expander written in Rust"
},
"WPFInstallpdf24creator": {
"winget": "geeksoftwareGmbH.PDF24Creator",
"choco": "pdf24",
"category": "Document",
"panel": "1",
"content": "PDF24 creator",
"link": "https://tools.pdf24.org/en/",
"description": "Free and easy-to-use online/desktop PDF tools that make you more productive"
},
"WPFInstalllazygit": {
"winget": "JesseDuffield.lazygit",
"choco": "lazygit",
"category": "Development",
"panel": "1",
"content": "Lazygit",
"link": "https://github.com/jesseduffield/lazygit/",
"description": "Simple terminal UI for git commands"
},
"WPFInstallwezterm": {
"winget": "wez.wezterm",
"choco": "wezterm",
"category": "Development",
"panel": "1",
"content": "Wezterm",
"link": "https://wezfurlong.org/wezterm/index.html",
"description": "WezTerm is a powerful cross-platform terminal emulator and multiplexer"
},
"WPFInstallripgrep": {
"winget": "BurntSushi.ripgrep.MSVC",
"choco": "ripgrep",
"category": "Utilities",
"panel": "4",
"content": "Ripgrep",
"link": "https://github.com/BurntSushi/ripgrep/",
"description": "Fast and powerful commandline search tool"
},
"WPFInstallfzf": {
"winget": "junegunn.fzf",
"choco": "fzf",
"category": "Utilities",
"panel": "4",
"content": "Fzf",
"link": "https://github.com/junegunn/fzf/",
"description": "A command-line fuzzy finder"
},
"WPFInstalldiscord": {
"winget": "Discord.Discord",
"choco": "discord",
@ -140,7 +230,7 @@
"category": "Communications",
"panel": "0",
"content": "Ferdium",
"link": "https://www.ferdiapp.com/",
"link": "https://ferdium.org/",
"description": "Ferdium is a messaging application that combines multiple messaging services into a single app for easy management."
},
"WPFInstallguilded": {
@ -539,6 +629,15 @@
"link": "https://code.visualstudio.com/",
"description": "Visual Studio Code is a free, open-source code editor with support for multiple programming languages."
},
"WPFInstallanaconda3": {
"winget": "Anaconda.Anaconda3",
"choco": "anaconda3",
"category": "Development",
"panel": "1",
"content": "Anaconda",
"link": "https://www.anaconda.com/products/distribution",
"description": "Anaconda is a distribution of the Python and R programming languages for scientific computing."
},
"WPFInstallvscodium": {
"winget": "Git.Git;VSCodium.VSCodium",
"choco": "vscodium",
@ -870,7 +969,7 @@
"panel": "2",
"content": "Prism Launcher",
"description": "Prism Launcher is a game launcher and manager designed to provide a clean and intuitive interface for organizing and launching your games.",
"link": "https://prismlauncher.com/"
"link": "https://prismlauncher.org/"
},
"WPFInstallsidequest": {
"winget": "SideQuestVR.SideQuest",
@ -1061,6 +1160,15 @@
"description": "Windows Terminal is a modern, fast, and efficient terminal application for command-line users, supporting multiple tabs, panes, and more.",
"link": "https://aka.ms/terminal"
},
"WPFInstallpowerbi": {
"winget": "Microsoft.PowerBI",
"choco": "powerbi",
"category": "Microsoft Tools",
"panel": "2",
"content": "Power BI",
"description": "Create stunning reports and visualizations with Power BI Desktop. It puts visual analytics at your fingertips with intuitive report authoring. Drag-and-drop to place content exactly where you want it on the flexible and fluid canvas. Quickly discover patterns as you explore a single unified view of linked, interactive visualizations.",
"link": "https://www.microsoft.com/en-us/power-platform/products/power-bi/"
},
"WPFInstallaimp": {
"winget": "AIMP.AIMP",
"choco": "aimp",
@ -1097,15 +1205,33 @@
"description": "Clementine is a modern music player and library organizer, supporting various audio formats and online radio services.",
"link": "https://www.clementine-player.org/"
},
"WPFInstallclipgrab": {
"winget": "na",
"choco": "clipgrab",
"WPFInstallytdlp": {
"winget": "yt-dlp.yt-dlp",
"choco": "yt-dlp",
"category": "Multimedia Tools",
"panel": "3",
"content": "Clipgrab",
"description": "Clipgrab is a free downloader and converter for YouTube, Vimeo, Facebook, and many other online video sites.",
"link": "https://clipgrab.org/"
"content": "Yt-dlp",
"description": "Command-line tool that allows you to download videos from YouTube and other supported sites. It is an improved version of the popular youtube-dl.",
"link": "https://github.com/yt-dlp/yt-dlp"
},
"WPFInstallvideomass": {
"winget": "GianlucaPernigotto.Videomass",
"choco": "na",
"category": "Multimedia Tools",
"panel": "3",
"content": "Videomass",
"description": "Videomass by GianlucaPernigotto is a cross-platform GUI for FFmpeg, streamlining multimedia file processing with batch conversions and user-friendly features.",
"link": "https://github.com/jeanslack/Videomass"
},
"WPFInstallffmpeg": {
"winget": "Gyan.FFmpeg",
"choco": "ffmpeg-full",
"category": "Multimedia Tools",
"panel": "3",
"content": "Ffmpeg full",
"description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats.",
"link": "https://ffmpeg.org/"
},
"WPFInstallcopyq": {
"winget": "hluk.CopyQ",
"choco": "copyq",
@ -1373,7 +1499,7 @@
"category": "Multimedia Tools",
"panel": "3",
"content": "Strawberry (Music Player)",
"link": "https://strawberry.rocks/",
"link": "https://github.com/strawberrymusicplayer/strawberry/",
"description": "Strawberry is an open-source music player that focuses on music collection management and audio quality. It supports various audio formats and features a clean user interface."
},
"WPFInstalltidal": {
@ -1736,14 +1862,14 @@
"link": "https://www.voidtools.com/",
"description": "Everything Search is a fast and efficient file search utility for Windows."
},
"WPFInstallfiles": {
"winget": "YairAichenbaum.Files",
"WPFInstallfileconverter": {
"winget": "AdrienAllard.FileConverter",
"choco": "files",
"category": "Utilities",
"panel": "4",
"content": "Files File Explorer",
"link": "https://www.yairaichenbaum.com/files",
"description": "Files is a feature-rich file explorer providing a user-friendly interface for file management."
"content": "File Converter",
"link": "https://file-converter.org/",
"description": "File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in windows explorer."
},
"WPFInstallflux": {
"winget": "flux.flux",
@ -2089,12 +2215,12 @@
},
"WPFInstalltwinkletray": {
"winget": "xanderfrangos.twinkletray",
"choco": "na",
"choco": "twinkle-tray",
"category": "Utilities",
"panel": "4",
"content": "Twinkle Tray",
"link": "https://github.com/xanderfrangos/TwinkleTray",
"description": "Twinkle Tray is a small utility that allows you to customize the system tray icons on your Windows taskbar."
"link": "https://twinkletray.com/",
"description": "Twinkle Tray lets you easily manage the brightness levels of multiple monitors."
},
"WPFInstallwindirstat": {
"winget": "WinDirStat.WinDirStat",
@ -2107,11 +2233,11 @@
},
"WPFInstallwingetui": {
"winget": "SomePythonThings.WingetUIStore",
"choco": "na",
"choco": "wingetui",
"category": "Utilities",
"panel": "4",
"content": "WingetUI",
"link": "https://github.com/lostindark/WingetUIStore",
"link": "https://github.com/marticliment/WingetUI",
"description": "WingetUI is a graphical user interface for Microsoft's Windows Package Manager (winget)."
},
"WPFInstallwiztree": {
@ -2147,7 +2273,7 @@
"category": "Utilities",
"panel": "4",
"content": "WiseToys",
"link": "https://www.wisecleaner.com/wisetoys.html",
"link": "https://toys.wisecleaner.com/",
"description": "WiseToys is a set of utilities and tools designed to enhance and optimize your Windows experience."
},
"WPFInstallxdm": {

View File

@ -59,6 +59,15 @@ Function Get-WinUtilToggleStatus {
return $false
}
}
if($ToggleSwitch -eq "WPFToggleSnapFlyout"){
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout
if($hidesnap -eq 0){
return $false
}
else{
return $true
}
}
if($ToggleSwitch -eq "WPFToggleMouseAcceleration"){
$MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed
$MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1

View File

@ -30,7 +30,7 @@ Function Install-WinUtilProgramWinget {
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --scope=machine --silent $Program" -NoNewWindow -Wait
}
if($manage -eq "Uninstalling"){
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait

View File

@ -0,0 +1,34 @@
function Invoke-WinUtilSnapFlyout {
<#
.SYNOPSIS
Disables/Enables Snap Assist Flyout on startup
.PARAMETER Enabled
Indicates whether to enable or disable Snap Assist Flyout on startup
#>
Param($Enabled)
Try{
if ($Enabled -eq $false){
Write-Host "Enabling Snap Assist Flyout On startup"
$value = 1
}
else {
Write-Host "Disabling Snap Assist Flyout On startup"
$value = 0
}
# taskkill.exe /F /IM "explorer.exe"
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
taskkill.exe /F /IM "explorer.exe"
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
Start-Process "explorer.exe"
}
Catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
}
Catch [System.Management.Automation.ItemNotFoundException] {
Write-Warning $psitem.Exception.ErrorRecord
}
Catch{
Write-Warning "Unable to set $Name due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}
}

View File

@ -90,7 +90,7 @@ function Invoke-WPFGetIso {
# @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki
Write-Error "Failed to mount the image. Error: $($_.Exception.Message)"
Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system"
Write-Error "Please refer to this wiki for more details https://github.com/KonTy/winutil/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting"
Write-Error "Please refer to this wiki for more details https://github.com/ChrisTitusTech/winutil/blob/main/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting%2Cmd"
return
}
# storing off values in hidden fields for further steps

View File

@ -27,7 +27,7 @@ function Invoke-WPFPresets {
$CheckBoxesToCheck = $sync.configs.preset.$preset
}
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" }
Write-Debug "Getting checkboxes to set $($CheckBoxes.Count)"
$CheckBoxesToCheck | ForEach-Object {
@ -56,4 +56,4 @@ function Invoke-WPFPresets {
Write-Debug "$checkboxName is not checked"
}
}
}
}

View File

@ -22,6 +22,7 @@ function Invoke-WPFToggle {
"WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)}
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)}
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
}
}

83
wiki/Battery.md Normal file
View File

@ -0,0 +1,83 @@
# 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.
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 its status is set to "Running" and the startup type is set 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 you're using to mount the ISO.
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.
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.

BIN
wiki/Get-Installed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
wiki/Settings-Export.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@ -10,7 +10,7 @@
Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech
Version : 24.01.15
Version : 24.01.25
#>
param (
[switch]$Debug,
@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms
# Variable to sync between runspaces
$sync = [Hashtable]::Synchronized(@{})
$sync.PSScriptRoot = $PSScriptRoot
$sync.version = "24.01.15"
$sync.version = "24.01.25"
$sync.configs = @{}
$sync.ProcessRunning = $false
@ -452,6 +452,15 @@ Function Get-WinUtilToggleStatus {
return $false
}
}
if($ToggleSwitch -eq "WPFToggleSnapFlyout"){
$hidesnap = (Get-ItemProperty -path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced').EnableSnapAssistFlyout
if($hidesnap -eq 0){
return $false
}
else{
return $true
}
}
if($ToggleSwitch -eq "WPFToggleMouseAcceleration"){
$MouseSpeed = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseSpeed
$MouseThreshold1 = (Get-ItemProperty -path 'HKCU:\Control Panel\Mouse').MouseThreshold1
@ -558,7 +567,7 @@ Function Install-WinUtilProgramWinget {
Write-Progress -Activity "$manage Applications" -Status "$manage $Program $($x + 1) of $count" -PercentComplete $($x/$count*100)
if($manage -eq "Installing"){
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --silent $Program" -NoNewWindow -Wait
Start-Process -FilePath winget -ArgumentList "install -e --accept-source-agreements --accept-package-agreements --scope=machine --silent $Program" -NoNewWindow -Wait
}
if($manage -eq "Uninstalling"){
Start-Process -FilePath winget -ArgumentList "uninstall -e --purge --force --silent $Program" -NoNewWindow -Wait
@ -1599,6 +1608,40 @@ function Invoke-WinUtilShowExt {
Write-Warning $psitem.Exception.StackTrace
}
}
function Invoke-WinUtilSnapFlyout {
<#
.SYNOPSIS
Disables/Enables Snap Assist Flyout on startup
.PARAMETER Enabled
Indicates whether to enable or disable Snap Assist Flyout on startup
#>
Param($Enabled)
Try{
if ($Enabled -eq $false){
Write-Host "Enabling Snap Assist Flyout On startup"
$value = 1
}
else {
Write-Host "Disabling Snap Assist Flyout On startup"
$value = 0
}
# taskkill.exe /F /IM "explorer.exe"
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
taskkill.exe /F /IM "explorer.exe"
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
Start-Process "explorer.exe"
}
Catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
}
Catch [System.Management.Automation.ItemNotFoundException] {
Write-Warning $psitem.Exception.ErrorRecord
}
Catch{
Write-Warning "Unable to set $Name due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}
}
function Invoke-WinUtilTweaks {
<#
@ -2663,7 +2706,7 @@ function Invoke-WPFGetIso {
# @ChrisTitusTech please copy this wiki and change the link below to your copy of the wiki
Write-Error "Failed to mount the image. Error: $($_.Exception.Message)"
Write-Error "This is NOT winutil's problem, your ISO might be corrupt, or there is a problem on the system"
Write-Error "Please refer to this wiki for more details https://github.com/KonTy/winutil/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting"
Write-Error "Please refer to this wiki for more details https://github.com/ChrisTitusTech/winutil/blob/main/wiki/Error-in-Winutil-MicroWin-during-ISO-mounting%2Cmd"
return
}
# storing off values in hidden fields for further steps
@ -3330,7 +3373,7 @@ function Invoke-WPFPresets {
$CheckBoxesToCheck = $sync.configs.preset.$preset
}
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
$CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" }
Write-Debug "Getting checkboxes to set $($CheckBoxes.Count)"
$CheckBoxesToCheck | ForEach-Object {
@ -3510,6 +3553,7 @@ function Invoke-WPFToggle {
"WPFToggleNumLock" {Invoke-WinUtilNumLock $(Get-WinUtilToggleStatus WPFToggleNumLock)}
"WPFToggleVerboseLogon" {Invoke-WinUtilVerboseLogon $(Get-WinUtilToggleStatus WPFToggleVerboseLogon)}
"WPFToggleShowExt" {Invoke-WinUtilShowExt $(Get-WinUtilToggleStatus WPFToggleShowExt)}
"WPFToggleSnapFlyout" {Invoke-WinUtilSnapFlyout $(Get-WinUtilToggleStatus WPFToggleSnapFlyout)}
"WPFToggleMouseAcceleration" {Invoke-WinUtilMouseAcceleration $(Get-WinUtilToggleStatus WPFToggleMouseAcceleration)}
}
}
@ -4881,6 +4925,11 @@ $inputXML = '<Window x:Class="WinUtility.MainWindow"
<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 File extensions (e.g., .txt, .jpg) are visible." />
<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"/>
@ -5184,7 +5233,7 @@ $sync.configs.applications = '{
"category": "Browsers",
"panel": "0",
"content": "Floorp",
"link": "https://github.com/Floorp-Projects/Floorp",
"link": "https://floorp.app/",
"description": "Floorp is an open-source web browser project that aims to provide a simple and fast browsing experience."
},
"WPFInstalllibrewolf": {
@ -5250,6 +5299,96 @@ $sync.configs.applications = '{
"link": "https://www.chatterino.com/",
"description": "Chatterino is a chat client for Twitch chat that offers a clean and customizable interface for a better streaming experience."
},
"WPFInstallgoogledrive": {
"winget": "Google.Drive",
"choco": "googledrive",
"category": "Utilities",
"panel": "4",
"content": "Google Drive",
"link": "https://www.google.com/drive/",
"description": "File syncing across devices all tied to your google account"
},
"WPFInstallsynctrayzor": {
"winget": "SyncTrayzor.SyncTrayzor",
"choco": "synctrayzor",
"category": "Utilities",
"panel": "4",
"content": "Synctrayzor",
"link": "https://github.com/canton7/SyncTrayzor/",
"description": "Windows tray utility / filesystem watcher / launcher for Syncthing"
},
"WPFInstallauthy": {
"winget": "Twilio.Authy",
"choco": "authy-desktop",
"category": "Utilities",
"panel": "4",
"content": "Authy",
"link": "https://authy.com/",
"description": "Simple and cross-platform 2FA app"
},
"WPFInstallbleachbit": {
"winget": "BleachBit.BleachBit",
"choco": "bleachbit",
"category": "Utilities",
"panel": "4",
"content": "BleachBit",
"link": "https://www.bleachbit.org/",
"description": "Clean Your System and Free Disk Space"
},
"WPFInstallespanso": {
"winget": "Espanso.Espanso",
"choco": "espanso",
"category": "Utilities",
"panel": "4",
"content": "Espanso",
"link": "https://espanso.org/",
"description": "Cross-platform and open-source Text Expander written in Rust"
},
"WPFInstallpdf24creator": {
"winget": "geeksoftwareGmbH.PDF24Creator",
"choco": "pdf24",
"category": "Document",
"panel": "1",
"content": "PDF24 creator",
"link": "https://tools.pdf24.org/en/",
"description": "Free and easy-to-use online/desktop PDF tools that make you more productive"
},
"WPFInstalllazygit": {
"winget": "JesseDuffield.lazygit",
"choco": "lazygit",
"category": "Development",
"panel": "1",
"content": "Lazygit",
"link": "https://github.com/jesseduffield/lazygit/",
"description": "Simple terminal UI for git commands"
},
"WPFInstallwezterm": {
"winget": "wez.wezterm",
"choco": "wezterm",
"category": "Development",
"panel": "1",
"content": "Wezterm",
"link": "https://wezfurlong.org/wezterm/index.html",
"description": "WezTerm is a powerful cross-platform terminal emulator and multiplexer"
},
"WPFInstallripgrep": {
"winget": "BurntSushi.ripgrep.MSVC",
"choco": "ripgrep",
"category": "Utilities",
"panel": "4",
"content": "Ripgrep",
"link": "https://github.com/BurntSushi/ripgrep/",
"description": "Fast and powerful commandline search tool"
},
"WPFInstallfzf": {
"winget": "junegunn.fzf",
"choco": "fzf",
"category": "Utilities",
"panel": "4",
"content": "Fzf",
"link": "https://github.com/junegunn/fzf/",
"description": "A command-line fuzzy finder"
},
"WPFInstalldiscord": {
"winget": "Discord.Discord",
"choco": "discord",
@ -5265,7 +5404,7 @@ $sync.configs.applications = '{
"category": "Communications",
"panel": "0",
"content": "Ferdium",
"link": "https://www.ferdiapp.com/",
"link": "https://ferdium.org/",
"description": "Ferdium is a messaging application that combines multiple messaging services into a single app for easy management."
},
"WPFInstallguilded": {
@ -5664,6 +5803,15 @@ $sync.configs.applications = '{
"link": "https://code.visualstudio.com/",
"description": "Visual Studio Code is a free, open-source code editor with support for multiple programming languages."
},
"WPFInstallanaconda3": {
"winget": "Anaconda.Anaconda3",
"choco": "anaconda3",
"category": "Development",
"panel": "1",
"content": "Anaconda",
"link": "https://www.anaconda.com/products/distribution",
"description": "Anaconda is a distribution of the Python and R programming languages for scientific computing."
},
"WPFInstallvscodium": {
"winget": "Git.Git;VSCodium.VSCodium",
"choco": "vscodium",
@ -5995,7 +6143,7 @@ $sync.configs.applications = '{
"panel": "2",
"content": "Prism Launcher",
"description": "Prism Launcher is a game launcher and manager designed to provide a clean and intuitive interface for organizing and launching your games.",
"link": "https://prismlauncher.com/"
"link": "https://prismlauncher.org/"
},
"WPFInstallsidequest": {
"winget": "SideQuestVR.SideQuest",
@ -6186,6 +6334,15 @@ $sync.configs.applications = '{
"description": "Windows Terminal is a modern, fast, and efficient terminal application for command-line users, supporting multiple tabs, panes, and more.",
"link": "https://aka.ms/terminal"
},
"WPFInstallpowerbi": {
"winget": "Microsoft.PowerBI",
"choco": "powerbi",
"category": "Microsoft Tools",
"panel": "2",
"content": "Power BI",
"description": "Create stunning reports and visualizations with Power BI Desktop. It puts visual analytics at your fingertips with intuitive report authoring. Drag-and-drop to place content exactly where you want it on the flexible and fluid canvas. Quickly discover patterns as you explore a single unified view of linked, interactive visualizations.",
"link": "https://www.microsoft.com/en-us/power-platform/products/power-bi/"
},
"WPFInstallaimp": {
"winget": "AIMP.AIMP",
"choco": "aimp",
@ -6222,15 +6379,33 @@ $sync.configs.applications = '{
"description": "Clementine is a modern music player and library organizer, supporting various audio formats and online radio services.",
"link": "https://www.clementine-player.org/"
},
"WPFInstallclipgrab": {
"winget": "na",
"choco": "clipgrab",
"WPFInstallytdlp": {
"winget": "yt-dlp.yt-dlp",
"choco": "yt-dlp",
"category": "Multimedia Tools",
"panel": "3",
"content": "Clipgrab",
"description": "Clipgrab is a free downloader and converter for YouTube, Vimeo, Facebook, and many other online video sites.",
"link": "https://clipgrab.org/"
"content": "Yt-dlp",
"description": "Command-line tool that allows you to download videos from YouTube and other supported sites. It is an improved version of the popular youtube-dl.",
"link": "https://github.com/yt-dlp/yt-dlp"
},
"WPFInstallvideomass": {
"winget": "GianlucaPernigotto.Videomass",
"choco": "na",
"category": "Multimedia Tools",
"panel": "3",
"content": "Videomass",
"description": "Videomass by GianlucaPernigotto is a cross-platform GUI for FFmpeg, streamlining multimedia file processing with batch conversions and user-friendly features.",
"link": "https://github.com/jeanslack/Videomass"
},
"WPFInstallffmpeg": {
"winget": "Gyan.FFmpeg",
"choco": "ffmpeg-full",
"category": "Multimedia Tools",
"panel": "3",
"content": "Ffmpeg full",
"description": "FFmpeg is a powerful multimedia processing tool that enables users to convert, edit, and stream audio and video files with a vast range of codecs and formats.",
"link": "https://ffmpeg.org/"
},
"WPFInstallcopyq": {
"winget": "hluk.CopyQ",
"choco": "copyq",
@ -6498,7 +6673,7 @@ $sync.configs.applications = '{
"category": "Multimedia Tools",
"panel": "3",
"content": "Strawberry (Music Player)",
"link": "https://strawberry.rocks/",
"link": "https://github.com/strawberrymusicplayer/strawberry/",
"description": "Strawberry is an open-source music player that focuses on music collection management and audio quality. It supports various audio formats and features a clean user interface."
},
"WPFInstalltidal": {
@ -6861,14 +7036,14 @@ $sync.configs.applications = '{
"link": "https://www.voidtools.com/",
"description": "Everything Search is a fast and efficient file search utility for Windows."
},
"WPFInstallfiles": {
"winget": "YairAichenbaum.Files",
"WPFInstallfileconverter": {
"winget": "AdrienAllard.FileConverter",
"choco": "files",
"category": "Utilities",
"panel": "4",
"content": "Files File Explorer",
"link": "https://www.yairaichenbaum.com/files",
"description": "Files is a feature-rich file explorer providing a user-friendly interface for file management."
"content": "File Converter",
"link": "https://file-converter.org/",
"description": "File Converter is a very simple tool which allows you to convert and compress one or several file(s) using the context menu in windows explorer."
},
"WPFInstallflux": {
"winget": "flux.flux",
@ -7214,12 +7389,12 @@ $sync.configs.applications = '{
},
"WPFInstalltwinkletray": {
"winget": "xanderfrangos.twinkletray",
"choco": "na",
"choco": "twinkle-tray",
"category": "Utilities",
"panel": "4",
"content": "Twinkle Tray",
"link": "https://github.com/xanderfrangos/TwinkleTray",
"description": "Twinkle Tray is a small utility that allows you to customize the system tray icons on your Windows taskbar."
"link": "https://twinkletray.com/",
"description": "Twinkle Tray lets you easily manage the brightness levels of multiple monitors."
},
"WPFInstallwindirstat": {
"winget": "WinDirStat.WinDirStat",
@ -7232,11 +7407,11 @@ $sync.configs.applications = '{
},
"WPFInstallwingetui": {
"winget": "SomePythonThings.WingetUIStore",
"choco": "na",
"choco": "wingetui",
"category": "Utilities",
"panel": "4",
"content": "WingetUI",
"link": "https://github.com/lostindark/WingetUIStore",
"link": "https://github.com/marticliment/WingetUI",
"description": "WingetUI is a graphical user interface for Microsoft''s Windows Package Manager (winget)."
},
"WPFInstallwiztree": {
@ -7272,7 +7447,7 @@ $sync.configs.applications = '{
"category": "Utilities",
"panel": "4",
"content": "WiseToys",
"link": "https://www.wisecleaner.com/wisetoys.html",
"link": "https://toys.wisecleaner.com/",
"description": "WiseToys is a set of utilities and tools designed to enhance and optimize your Windows experience."
},
"WPFInstallxdm": {

View File

@ -848,6 +848,11 @@
<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 File extensions (e.g., .txt, .jpg) are visible." />
<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"/>