Statistics: Posted by McGeifer — 03 Apr 2014, 09:11
Statistics: Posted by Domino — 08 Feb 2014, 21:22
Statistics: Posted by Ze_PilOt — 08 Feb 2014, 21:06
Statistics: Posted by Domino — 08 Feb 2014, 17:42
Statistics: Posted by Domino — 29 Jan 2014, 20:31
sverpath = os.getcwd()
cpath = os.path.join(sverpath, "miniserver.log")
if os.path.isfile(cpath):
os.remove(cpath)
Statistics: Posted by Domino — 29 Jan 2014, 19:24
settings = QtCore.QSettings("ForgedAllianceEditor", "FA Editor")
settings.beginGroup("ForgedAllianceEditor")
settings.setValue("app/path", path)
settings.endGroup()
settings.sync()
Statistics: Posted by Domino — 29 Jan 2014, 18:58
Statistics: Posted by Domino — 29 Jan 2014, 17:48
Statistics: Posted by Ze_PilOt — 23 Jan 2014, 21:19
def showsupcomfapath(self):
import errno
import win32com.client
import _winreg
shell = win32com.client.Dispatch('WScript.Shell')
proc_arch = shell.ExpandEnvironmentStrings(r'%PROCESSOR_ARCHITECTURE%').lower()
if proc_arch == 'x86':
arch_keys = {0}
elif proc_arch == 'amd64':
arch_keys = {_winreg.KEY_WOW64_32KEY, _winreg.KEY_WOW64_64KEY}
else:
raise Exception("Unhandled arch: %s" % arch)
for arch_key in arch_keys:
key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{31D95937-B237-405D-920C-A3EF4E482395}", 0, _winreg.KEY_READ | arch_key)
for i in xrange(0, _winreg.QueryInfoKey(key)[0]-1):
skey_name = _winreg.EnumKey(key, i)
skey = _winreg.OpenKey(key, skey_name)
try:
print _winreg.QueryValueEx(skey, 'InstallLocation')[0]
except OSError as e:
if e.errno == errno.ENOENT:
# DisplayName doesn't exist in this skey
pass
finally:
skey.Close()
Statistics: Posted by Domino — 23 Jan 2014, 20:23