Update check uses IE's proxy settings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1435 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7e2b0ca40e
commit
68f61cc7f1
5 changed files with 57 additions and 8 deletions
|
@ -313,3 +313,23 @@ void ShowDocs() {
|
|||
if ((int)ShellExecute(g_sdata.hwnd,"open",pathf,NULL,NULL,SW_SHOWNORMAL)<=32)
|
||||
ShellExecute(g_sdata.hwnd,"open",DOCPATH,NULL,NULL,SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
int getProxyInfo(char *out) {
|
||||
DWORD v=0;
|
||||
HKEY hKey;
|
||||
if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&hKey) == ERROR_SUCCESS) {
|
||||
DWORD l = 4;
|
||||
DWORD t;
|
||||
if (RegQueryValueEx(hKey,"ProxyEnable",NULL,&t,(unsigned char *)&v,&l) == ERROR_SUCCESS && t == REG_DWORD) {
|
||||
l=8192;
|
||||
if (RegQueryValueEx(hKey,"ProxyServer",NULL,&t,(unsigned char *)out,&l ) != ERROR_SUCCESS || t != REG_SZ) {
|
||||
v=0;
|
||||
*out=0;
|
||||
}
|
||||
}
|
||||
else v=0;
|
||||
out[8192-1]=0;
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return v;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue