added /NOIEPROXY (based on memph's code)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3643 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-09-02 21:07:12 +00:00
parent ff8e9a7662
commit 4cb6161b0f
3 changed files with 13 additions and 1 deletions

View file

@ -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
---------

View file

@ -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;

Binary file not shown.