Commit b0a45e4c authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin

Merge branch 'fix-update' of /home/git/repositories/proinfodata/unstable

parents 88e9aa07 0e8941a7
......@@ -37,11 +37,12 @@ def getRegistryValue(key, subkey, value):
key = getattr(_winreg, key)
handle = _winreg.OpenKey(key, subkey)
(value, type) = _winreg.QueryValueEx(handle, value)
return value
return value.split('\n')[0]
# Return INEP
def getINEP():
return getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "INEP")[:-1]
return getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "INEP")
# Return Windows version
def getOSInfo(key):
......
......@@ -104,10 +104,10 @@ def callClient(args):
# Get proxy information from Windows registry
def getProxyInfo():
phost = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyHost")[:-1]
pport = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyPort")[:-1]
puser = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyUser")[:-1]
ppass = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyPass")[:-1]
phost = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyHost")
pport = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyPort")
puser = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyUser")
ppass = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\ProInfoData", "ProxyPass")
return (phost, pport, puser, ppass)
# Check for updates
......@@ -295,8 +295,8 @@ if not elapsedTime():
# Collect data
try:
collectData = collect.collect()
except:
log.write("ERROR(8): Failed to collect data.")
except Exception, e:
log.write("ERROR(8): Failed to collect data: " + str(e))
log.close()
sys.exit(8)
......
......@@ -121,16 +121,6 @@ Function .onInit
está em execução."
Abort
;Kill proinfodataAgent.exe process
StrCpy $0 "proinfodataAgent.exe"
DetailPrint "Killing all processes called '$0'"
KillProc::KillProcesses
;Kill datasidAgent.exe process
StrCpy $0 "netmon.exe"
DetailPrint "Killing all processes called '$0'"
KillProc::KillProcesses
;Verify if INEP exists in Windows registry
ClearErrors
ReadRegStr $R2 HKLM "SOFTWARE\${PRODUCT_NAME}" "INEP"
......@@ -143,7 +133,17 @@ FunctionEnd
;Main installer section
Section "SeçãoPrincipal" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
SetOverwrite on
;Kill proinfodataAgent.exe process
StrCpy $0 "proinfodataAgent.exe"
DetailPrint "Killing all processes called '$0'"
KillProcDLL::KillProc "proinfodataAgent.exe"
;Kill netmon.exe process
StrCpy $0 "netmon.exe"
DetailPrint "Killing all processes called '$0'"
KillProcDLL::KillProc "netmon.exe"
;Verify INEP in Windows registry. If not exists, creates a new one.
ClearErrors
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment