Allow running multiple instances of script
This commit is contained in:
parent
cb01674406
commit
2e32dba026
|
@ -1,4 +1,4 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
hmods-*/
|
hmods-*/
|
||||||
path/
|
path/
|
||||||
tmp/
|
tmp.*/
|
|
@ -1,8 +1,6 @@
|
||||||
## Opus-NT
|
## Opus-NT
|
||||||
A windows homebrew kit and collection of mods. Can mod .WIM (this is where main-support is) and offline windows installations. Mods are written for 7 and up, but are likely to work with Vista and up. **Certain parts are still untested, so bear with me.**
|
A windows homebrew kit and collection of mods. Can mod .WIM (this is where main-support is) and offline windows installations. Mods are written for 7 and up, but are likely to work with Vista and up. **Certain parts are still untested, so bear with me.**
|
||||||
|
|
||||||
**DON'T RUN MULTIPLE INSTANCES OF THIS SCRIPT.**
|
|
||||||
|
|
||||||
## Mods
|
## Mods
|
||||||
[View mod documentation](docs/index.md) - Can also be viewed locally, in a browser (index.html).
|
[View mod documentation](docs/index.md) - Can also be viewed locally, in a browser (index.html).
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ target = {
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpPath = "tmp"
|
tmpPath = "tmp"
|
||||||
regTmpPath = "HKEY_LOCAL_MACHINE\\opus-nt_"
|
regTmpPath = "HKEY_LOCAL_MACHINE\\opus-nt." +str(os.getpid())+ "_"
|
||||||
|
|
||||||
def runReg(cmd,check = True):
|
def runReg(cmd,check = True):
|
||||||
if target["type"] == "online":
|
if target["type"] == "online":
|
||||||
|
|
2
run.py
2
run.py
|
@ -141,7 +141,7 @@ def main():
|
||||||
opusnt.target["type"] = "offline"
|
opusnt.target["type"] = "offline"
|
||||||
opusnt.target["path"] = arglist["path"]
|
opusnt.target["path"] = arglist["path"]
|
||||||
|
|
||||||
opusnt.tmpPath = p(sp,"tmp")
|
opusnt.tmpPath = p(sp,"tmp." +str(os.getpid()))
|
||||||
if "tmp" in arglist: opusnt.tmpPath = arglist["tmp"]
|
if "tmp" in arglist: opusnt.tmpPath = arglist["tmp"]
|
||||||
if os.path.isdir(opusnt.tmpPath):
|
if os.path.isdir(opusnt.tmpPath):
|
||||||
subprocess.run(["rmdir","/s","/q",opusnt.tmpPath],check=True,shell=True)
|
subprocess.run(["rmdir","/s","/q",opusnt.tmpPath],check=True,shell=True)
|
||||||
|
|
Loading…
Reference in New Issue