"Fix" reg load throwing syntax errors

This commit is contained in:
Fierelier 2022-07-27 08:21:12 +02:00
parent 3fdc0e7ff5
commit ec5c716889
1 changed files with 10 additions and 0 deletions

View File

@ -46,6 +46,16 @@ 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: