Add mod: postSetup

This commit is contained in:
Fierelier 2021-11-15 00:12:04 +01:00
parent cf372f114b
commit 2237c147e2
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,9 @@
@echo off
setlocal EnableDelayedExpansion
cd /d "%~dp0"
cd postSetup
for /f "tokens=*" %%f in ('dir /b /s "*.cmd"') do (
start /b /wait cmd /c call "%%f"
)
reg delete "HKLM\SYSTEM\CurrentControlSet\services\opus-nt_postSetup" /f

View File

@ -0,0 +1,2 @@
@echo off
echo hello world

View File

@ -0,0 +1,10 @@
for key in opusnt.regQueryKeys(opusnt.regTmpPath + "system"):
if not key.lower().startswith(opusnt.regTmpPath.lower() + "system\\controlset"): continue
svcPath = key+ "\\services\\opus-nt_postSetup"
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","0x00000001","/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","0x00000002","/f"])
opusnt.runReg(["add",svcPath,"/v","Type","/t","REG_DWORD","/d","0x00000010","/f"])