diff --git a/windows-collect/src/collect.py b/windows-collect/src/collect.py index 12ff742a8a8c39f3d98672c5a4da5d49562b7e5f..5389906eb31ae38a965f960536330a1463042d48 100644 --- a/windows-collect/src/collect.py +++ b/windows-collect/src/collect.py @@ -37,7 +37,8 @@ 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] def getPointInfo(info): ptInfoFile = open(DATASIDPATH + "\\conf\\pointInfo", "r") diff --git a/windows-collect/src/datasidAgent.py b/windows-collect/src/datasidAgent.py index 959c2bfc7a5d440448d4f3198a821c1634b533ea..27c2fcd6a84a37fe579eef775fba6e00170d064e 100644 --- a/windows-collect/src/datasidAgent.py +++ b/windows-collect/src/datasidAgent.py @@ -99,10 +99,10 @@ def callClient(args): # Get proxy information from Windows registry def getProxyInfo(): - phost = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyHost")[:-1] - pport = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyPort")[:-1] - puser = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyUser")[:-1] - ppass = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyPass")[:-1] + phost = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyHost") + pport = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyPort") + puser = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyUser") + ppass = collect.getRegistryValue("HKEY_LOCAL_MACHINE", "SOFTWARE\\DataSID", "ProxyPass") return (phost, pport, puser, ppass) # Check for updates diff --git a/windows-installer/install-essencials.sh b/windows-installer/install-essencials.sh index a258a7a1205398071122afb8ab0f12efdbab2c3e..6f979680d4b576e8dc2e3b5e75a439e525fb56c4 100755 --- a/windows-installer/install-essencials.sh +++ b/windows-installer/install-essencials.sh @@ -44,9 +44,9 @@ if ! test -f "$(dirname $0)/7zS.sfx";then cp "/tmp/7z-extra/7zS.sfx" "$(dirname $0)/" fi -if ! test -f ~/.wine/drive_c/Program\ Files/NSIS/Unicode/Plugins/KillProc.dll; then - mkdir -p "/tmp/KillProc" - wget "http://mulder.googlecode.com/files/NSIS-KillProc-Plugin.2011-04-09.zip" -O "/tmp/KillProc.zip" - unzip -u -d "/tmp/KillProc" "/tmp/KillProc.zip" - cp "/tmp/KillProc/KillProc.dll" ~/.wine/drive_c/Program\ Files/NSIS/Unicode/Plugins/ +if ! test -f ~/.wine/drive_c/Program\ Files/NSIS/Unicode/Plugins/KillProcDLL.dll; then + mkdir -p "/tmp/KillProcDLL" + wget "http://downloads.sourceforge.net/project/findkillprocuni/bin/KillProcDLL%20Unicode%20bin.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ffindkillprocuni%2Ffiles%2Fbin%2F&ts=1395250878&use_mirror=ufpr" -O "/tmp/KillProcDLL.zip" + unzip -u -d "/tmp/KillProcDLL" "/tmp/KillProcDLL.zip" + cp "/tmp/KillProcDLL/KillProcDLL.dll" ~/.wine/drive_c/Program\ Files/NSIS/Unicode/Plugins/ fi \ No newline at end of file diff --git a/windows-installer/src/installer.nsi b/windows-installer/src/installer.nsi index d0e2b0dad054af47fc58bf28eae8fdded624bb0a..35b1a8d63a4bf9de1390ed6e2f8ec6144f2ecc4c 100644 --- a/windows-installer/src/installer.nsi +++ b/windows-installer/src/installer.nsi @@ -41,8 +41,6 @@ RequestExecutionLevel admin XPStyle on BrandingText "DataSID - C3SL" -;!addplugindir "~/.wine/drive_c/Program Files/NSIS/Unicode/Plugins" - ;Installer headers !include "nsDialogs.nsh" !include "MUI.nsh" @@ -112,25 +110,25 @@ Function .onInit está em execução." Abort - ;Kill datasidAgent.exe process - StrCpy $0 "datasidAgent.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 - FunctionEnd ;Main installer section Section "SeçãoPrincipal" SEC01 SetOutPath "$INSTDIR" - SetOverwrite ifnewer + SetOverwrite on - ClearErrors + ;Kill datasidAgent.exe process + StrCpy $0 "datasidAgent.exe" + DetailPrint "Killing all processes called '$0'" + KillProcDLL::KillProc "datasidAgent.exe" + + ;Kill netmon.exe process + StrCpy $0 "netmon.exe" + DetailPrint "Killing all processes called '$0'" + KillProcDLL::KillProc "netmon.exe" + + ClearErrors ReadRegStr $R2 HKLM "SOFTWARE\${PRODUCT_NAME}" "ProxyHost" ${If} ${Errors} WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "ProxyHost" $ProxyHost @@ -139,7 +137,7 @@ Section "SeçãoPrincipal" SEC01 WriteRegStr HKLM "SOFTWARE\${PRODUCT_NAME}" "ProxyPass" $ProxyPass ${EndIf} - ;Add DatasidAgent task in Windows task scheduler + ;Add DatasidAgent task in Windows task scheduler nsExec::Exec "schtasks /Create /SC HOURLY /MO 1 /TN DatasidAgent \ /TR $\"\$\"${PRODUCT_TASK}$\"\$\" /RU System /F" @@ -233,6 +231,7 @@ Section Uninstall Delete "$INSTDIR\bin\agent\library.zip" Delete "$INSTDIR\bin\agent\POWRPROF.dll" Delete "$INSTDIR\bin\agent\datasidAgent.exe" + Delete "$INSTDIR\bin\agent\netmon.exe" Delete "$INSTDIR\bin\agent\pyexpat.pyd" Delete "$INSTDIR\bin\agent\python27.dll" Delete "$INSTDIR\bin\agent\pythoncom27.dll"