Compare commits

...

3 Commits

Author SHA1 Message Date
Fierelier 1b363a1701 Update version 2022-07-27 08:26:59 +02:00
Fierelier 18e7e4f187 Ditto 2022-07-27 08:21:55 +02:00
Fierelier ec5c716889 "Fix" reg load throwing syntax errors 2022-07-27 08:21:12 +02:00
3 changed files with 21 additions and 2 deletions

View File

@ -46,12 +46,30 @@ def runReg(cmd,check = True):
cmd[1] = applyRegmap(cmd[1])
if cmd[0] == "unload":
if not cmd[1].startswith(regTmpPath): return
doAsShell = False
if cmd[0] in ["load","unload"]:
doAsShell = True
index = 0
while index < len(cmd):
cmd[index] = cmd[index].replace("&","^&")
if " " in cmd[index]:
cmd[index] = '"' +cmd[index]+ '"'
index += 1
cmd = ["reg"] + cmd
try:
if dummyMode:
print(cmd)
else:
subprocess.run(cmd,stdout=subprocess.DEVNULL,check=True)
if not doAsShell:
subprocess.run(cmd,stdout=subprocess.DEVNULL,check=True)
else:
cmdStr = " ".join(cmd)
cmdProc = subprocess.Popen(["cmd.exe"],stdin=subprocess.PIPE,stdout=subprocess.DEVNULL)
cmdProc.stdin.write((cmdStr + "\nexit\n").encode("utf-8"))
cmdProc.stdin.flush()
rtn = cmdProc.wait()
if rtn != 0: raise Exception
except Exception as e:
if check == True: raise e

View File

@ -0,0 +1 @@
quality

View File

@ -1,2 +1,2 @@
@echo off
exit /b 13
exit /b 14