Add mod: postSetup
This commit is contained in:
parent
cf372f114b
commit
2237c147e2
9
mods/[all]/postSetup/data/opus-nt/postSetup.cmd
Normal file
9
mods/[all]/postSetup/data/opus-nt/postSetup.cmd
Normal 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
|
2
mods/[all]/postSetup/data/opus-nt/postSetup/hello.cmd
Normal file
2
mods/[all]/postSetup/data/opus-nt/postSetup/hello.cmd
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
@echo off
|
||||||
|
echo hello world
|
10
mods/[all]/postSetup/modscript.py
Normal file
10
mods/[all]/postSetup/modscript.py
Normal 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"])
|
Loading…
Reference in New Issue
Block a user