This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import logging | |
import pprint | |
import requests | |
import tempfile | |
import zipfile | |
from dataclasses import dataclass, fields, is_dataclass | |
from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regKeyPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" | |
$current = Get-ItemPropertyValue -Path $regKeyPath -Name SystemUsesLightTheme | |
$new = 1 - $current | |
Set-ItemProperty -Path $regKeyPath -Name SystemUsesLightTheme -Value $new -Type DWord -Force | |
Set-ItemProperty -Path $regKeyPath -Name AppsUseLightTheme -Value $new -Type DWord -Force | |
# Update system settings | |
Add-Type -TypeDefinition @" | |
using System; | |
using System.Runtime.InteropServices; |