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.
To resolve this, allow/whitelist the script in your anti-virus software settings, or temporarily disable real-time protection. Since the project is open source, you may audit the code if security is a concern.
### Download not working
If `christitus.com/win` is not working, or you want to download the code from GitHub directly, you can use the direct download link:
If you are seeing errors referencing TLS or security, you may be running an older version of Windows where TLS 1.2 is not the default security protocol used for network connections. The following commands will force .NET to use TLS 1.2, and download the script directly using .NET instead of PowerShell:
If it still isn't working and you live in India, it might be due to India blocking GitHub's content domain and preventing downloads. See more on [Times of India](https://timesofindia.indiatimes.com/gadgets-news/github-content-domain-blocked-for-these-indian-users-reports/articleshow/96687992.cms).
1. Ensure you are running PowerShell as admin: Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
2. In the PowerShell window, type this to allow unsigned code to execute and run the installation script:
```ps1
Set-ExecutionPolicy Unrestricted -Scope Process -Force
irm christitus.com/win | iex
```
## Runtime Issues
### WinGet configuration
If you have not installed anything using PowerShell before, you may be prompted to configure WinGet. This requires user interaction on first run. You will need to manually type `y` into the PowerShell console and press enter to continue. Once you do it the first time, you will not be prompted again.
### MicroWin: Error `0x80041031`
This error code typically indicates an issue related to Windows Management Instrumentation (WMI). Here are a few steps you can try to resolve the issue:
1.**Reboot Your Computer:**
Sometimes, a simple reboot can resolve temporary issues. Restart your computer and try mounting the ISO again.
3.**Check for System Corruption:**
Run the System File Checker (SFC) utility to scan and repair system files that may be corrupted.
```powershell
sfc /scannow
```
4.**Update Your System:**
Make sure your operating system is up-to-date. Check for Windows updates and install any pending updates.
5.**Check WMI Service:**
Ensure that the Windows Management Instrumentation (WMI) service is running. You can do this through the Services application:
- Press `Win`+`R` to open the Run dialog.
- Type `services.msc` and press Enter.
- Locate *Windows Management Instrumentation* in the list.
- Make sure to set its status to "Running" and the startup type to "Automatic".
6.**Check for Security Software Interference:**
Security software can sometimes interfere with WMI operations. Temporarily disable your anti-virus or security software and check if the issue persists. WMI is a common attack/infection vector, so many anti-virus programs will limit its usage.
7.**Event Viewer:**
Check the Event Viewer for more detailed error information. Look for entries related to the `80041031` error and check if there are any additional details that can help identify the cause.
- Press `Win`+`X` and select *Event Viewer*.
- Navigate to *Windows Logs* > *Application* or *System*.
- Look for entries with the source related to WMI or the application use to mount the ISO.
8.**ISO File Integrity:**
Ensure that the ISO file you are trying to mount is uncorrupted. Try mounting a different ISO file to see if the issue persists.
If the problem persists after trying these steps, additional troubleshooting is required. Consider seeking assistance from Microsoft support or community forums for more specific guidance based on your system configuration and the software you use to mount the ISO.
## Windows Issues
### Windows takes longer to shut down
This could be for a number of reasons:
- Turn on fast startup: Press `Windows key`+`R`, then type:
```bat
control /name Microsoft.PowerOptions /page pageGlobalSettings
```
- If that doesn't work, disable Hibernation:
- Press `Windows Key`+`X` and select *PowerShell (Admin)* in Windows 10, or `Windows Terminal (Admin)` in Windows 11.
- In the PowerShell window, type:
```bat
powercfg /H off
```
Related issue: [#69](https://github.com/ChrisTitusTech/winutil/issues/69)
### Windows Search does not work
Enable Background Apps. Related issues: [#69](https://github.com/ChrisTitusTech/winutil/issues/69) [95](https://github.com/ChrisTitusTech/winutil/issues/95) [#232](https://github.com/ChrisTitusTech/winutil/issues/232)
### Xbox Game Bar Activation Broken
Set the Xbox Accessory Management Service to Automatic:
If you're using a laptop or tablet and find your battery drains too fast, please try the below troubleshooting steps, and report the results back to the Winutil community.
- Open the generated HTML report to review information about battery health and usage. A battery with poor health may hold less charge, discharge faster, or cause other issues.
These troubleshooting steps are generic, but should help in most situations. You should have these key takeaways:
- Battery health is the most significant limiter on your device's runtime. A battery in poor health usually cannot be made to last like it used to, simply by closing some applications. Consider replacing your battery.
- Background applications that use CPU and memory, make lots of or large network requests, read/write to disk frequently, or that keep your PC awake when it could be conserving energy are the next major concern. Avoid installing programs you don't need, only use programs you trust, and configure applications to use as little power and run as infrequently as possible.
- Windows performs a lot of tasks that may affect battery life by default. Changing settings, stopping scheduled tasks, and disabling features can help the system stay in lower power states to conserve battery.
- Bad chargers, inconsistent power input, and high temperatures will cause batteries to degrade and discharge faster. Use trusted high-quality chargers, ensure input power is steady, clean any fans or airflow ports, and keep the battery/PC cool.