diff --git a/Contrib/NSISdl/ReadMe.txt b/Contrib/NSISdl/ReadMe.txt index 0f0605bf..c8ec07f5 100644 --- a/Contrib/NSISdl/ReadMe.txt +++ b/Contrib/NSISdl/ReadMe.txt @@ -43,6 +43,13 @@ NSISdl reads the proxy configuration from Internet Explorer's registry key under HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings. It reads and parses ProxyEnable and ProxyServer. +If you don't want NSISdl to use Internet Explorer's settings, use the +/NOIEPROXY flag. /NOIEPROXY should be used after /TRANSLATE and +/TIMEOUT. For example: + +NSISdl::download /NOIEPROXY http://www.domain.com/file localfile.exe +NSISdl::download /TIMEOUT=30000 /NOIEPROXY http://www.domain.com/file localfile.exe + TRANSLATE --------- diff --git a/Contrib/NSISdl/nsisdl.cpp b/Contrib/NSISdl/nsisdl.cpp index 6bde5ebd..124a126b 100644 --- a/Contrib/NSISdl/nsisdl.cpp +++ b/Contrib/NSISdl/nsisdl.cpp @@ -232,6 +232,7 @@ __declspec(dllexport) void download (HWND parent, char filename[1024]; BOOL bSuccess=FALSE; int timeout_ms=30000; + int getieproxy=1; char *error=NULL; @@ -273,6 +274,10 @@ __declspec(dllexport) void download (HWND parent, timeout_ms=my_atoi(url+9); popstring(url); } + if (!lstrcmpi(url, "/NOIEPROXY")) { + getieproxy=0; + popstring(url); + } popstring(filename); HANDLE hFile = CreateFile(filename,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL); @@ -311,7 +316,7 @@ __declspec(dllexport) void download (HWND parent, char *p=NULL; HKEY hKey; - if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS) + if (getieproxy && RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS) { DWORD l = 4; DWORD t; diff --git a/Plugins/nsisdl.dll b/Plugins/nsisdl.dll index 01e7e155..e2d64a85 100644 Binary files a/Plugins/nsisdl.dll and b/Plugins/nsisdl.dll differ