Compare commits

...

2 Commits

Author SHA1 Message Date
Fierelier 3d0eeb3e09 Fix syntax error 2024-01-19 21:48:17 +01:00
Fierelier 5ea0a6a766 Exit with errorlevel set 2024-01-19 21:47:52 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ def runReg(cmd,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.write((cmdStr + "\nexit %errorlevel%\n").encode("utf-8"))
cmdProc.stdin.flush()
rtn = cmdProc.wait()
if rtn != 0: raise Exception
@ -265,4 +265,4 @@ def applyRegmap(rp):
for path in target["regmap"]:
if rp.startswith(path):
return rp.replace(path,target["regmap"][path],1)
return rp
return rp

View File

@ -4,7 +4,7 @@ for key in opusnt.regQueryKeys(opusnt.regTmpPath + "system"):
opusnt.runReg(["add",svcPath,"/v","DependOnService","/t","REG_MULTI_SZ","/d","Schedule","/f"])
opusnt.runReg(["add",svcPath,"/v","DisplayName","/t","REG_SZ","/d","opus-nt_postSetup","/f"])
opusnt.runReg(["add",svcPath,"/v","ErrorControl","/t","REG_DWORD","/d","1","/f"])
opusnt.runReg(["add",svcPath,"/v","ImagePath","/t","REG_EXPAND_SZ","/d",'cmd.exe /c "call C:\opus-nt\postSetup.cmd >nul"',"/f"])
opusnt.runReg(["add",svcPath,"/v","ImagePath","/t","REG_EXPAND_SZ","/d",'cmd.exe /c "call C:\\opus-nt\\postSetup.cmd >nul"',"/f"])
opusnt.runReg(["add",svcPath,"/v","ObjectName","/t","REG_SZ","/d","LocalSystem","/f"])
opusnt.runReg(["add",svcPath,"/v","Start","/t","REG_DWORD","/d","2","/f"])
opusnt.runReg(["add",svcPath,"/v","Type","/t","REG_DWORD","/d","0x00000010","/f"])
opusnt.runReg(["add",svcPath,"/v","Type","/t","REG_DWORD","/d","0x00000010","/f"])