This file contains 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
# almost entirely based of https://stackoverflow.com/a/56175816 :p | |
from ctypes import windll, Structure, c_long, byref, create_string_buffer | |
import time | |
class POINT(Structure): | |
_fields_ = [("x", c_long)] | |
pt = None | |
while True: |
This file contains 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
# TODO: Currently I need to spawn 2 Admin Powershells, they can probably be reduced to 1 | |
$run = wsl -l --running | |
$run = [string]::join("",($run.Split("`n"))) | |
$running = $false | |
function Run-Elevated ($scriptblock1, $scriptblock2) | |
{ | |
# Wait on this powershell instance to finish changing the time |