From 32b07aeb9abe845c87d9d773085f825137cc42cf Mon Sep 17 00:00:00 2001 From: Fierelier Date: Sun, 2 Jun 2019 17:56:33 +0200 Subject: [PATCH] Added Windows Integration Tool Add UML to Windows' context menu with this tool. --- extras/Windows Integration Tool/Remove.reg | Bin 0 -> 196 bytes .../Windows Integration Tool.py | 68 ++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 extras/Windows Integration Tool/Remove.reg create mode 100644 extras/Windows Integration Tool/Windows Integration Tool.py diff --git a/extras/Windows Integration Tool/Remove.reg b/extras/Windows Integration Tool/Remove.reg new file mode 100644 index 0000000000000000000000000000000000000000..7ad60eb5ba64f22c437c8b8f4aa82355186a75ae GIT binary patch literal 196 zcmXYrTMEKZ5JS(m;2ydG#UB?SS`btOpNN%Gtmp-4p%tZ@SC3M{FeG7;`Mmc83UW$b z)I_Yfa8;{$P|>KwxWd`ZYp max: return -1 + return integer + +def init(): + holdShift = False + execPath = p(pUp(pUp(sp)),"launch.bat").replace(os.sep,reg.path.sep) + iconPath = p(pUp(pUp(sp)),"assets","logo.ico").replace(os.sep,reg.path.sep) + + print("This tool will add Universal Modloader to your context menu.") + input("\nPress ENTER to continue.") + + while True: + clear() + print("Would you like the option to only appear while holding SHIFT? [Y/N]") + yn = input("Choice: ").lower() + if yn == "y": holdShift = True; break + if yn == "n": break + + regFile = open("Output.reg","w") + regFile.write('Windows Registry Editor Version 5.00\n') + regFile.write('\n') + regFile.write('[-HKEY_CLASSES_ROOT\\Directory\\shell\\UniversalModloader]\n') + regFile.write('\n') + regFile.write('[HKEY_CLASSES_ROOT\\Directory\\shell\\UniversalModloader]\n') + regFile.write('@="Open with Universal Modloader"\n') + if holdShift == True: regFile.write('"Extended"=""\n') + regFile.write('"Icon"="\\"' +iconPath+ '\\""\n') + regFile.write('\n') + regFile.write('[HKEY_CLASSES_ROOT\\Directory\\shell\\UniversalModloader\\command]\n') + regFile.write('@="\\"' +execPath+ '\\" \\"%1\\""\n') + regFile.write('\n') + regFile.close() + clear() + print("An Output.reg file has been generated, simply execute it.") + print("If you seek to disable the integeration, use Remove.reg.") + input("\nPress ENTER to quit.") + +if __name__ == "__main__": + init() \ No newline at end of file