Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc3, 0.4rc4, and 0.4

tortoise: register overlay and context menu as approved extensions

some users need this for the TortoiseHg extensions to work in Explorer.

Changeset 997eb001c711

Parent 340028f30d8f

by TK Soh

Changes to one file · Browse files at 997eb001c711 Showing diff from parent 340028f30d8f Diff from another changeset...

Change 1 of 2 Show Entire File tortoisehg.py Stacked
 
73
74
75
 
 
 
 
 
 
 
 
76
77
78
 
84
85
86
 
 
 
 
 
 
 
 
 
87
88
89
 
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@@ -73,6 +73,14 @@
  # Add the appropriate shell extension registry keys   for category, keyname in cls.registry_keys:   _winreg.SetValue(category, keyname, _winreg.REG_SZ, cls._reg_clsid_) + + # register the extension on Approved list + try: + apath = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved' + key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, apath, 0, _winreg.KEY_WRITE) + _winreg.SetValueEx(key, cls._reg_clsid_, 0, _winreg.REG_SZ, 'TortoiseHg') + except: + pass     print cls._reg_desc_, "registration complete."   @@ -84,6 +92,15 @@
  import errno   if details.errno != errno.ENOENT:   raise + + # unregister the extension from Approved list + try: + apath = r'SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved' + key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, apath, 0, _winreg.KEY_WRITE) + _winreg.DeleteValue(key, cls._reg_clsid_) + except: + pass +   print cls._reg_desc_, "unregistration complete."    if __name__=='__main__':