ProxySettings: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
mNo edit summary |
mNo edit summary |
||
Line 15: | Line 15: | ||
The following example shows how to change the proxy-settings for all | The following example shows how to change the proxy-settings for all | ||
dialup-connections but only for http-proxy: | dialup-connections but only for http-proxy: | ||
<highlight-nsis> | |||
... | ... | ||
ProxySettings::GetConnectionCount | |||
pop $0 | |||
ProxySetLoop: | |||
ProxySetLoop: | |||
intop $0 $0 - 1 | |||
ProxySettings::GetConnectionName $0 | |||
intcmp $0 0 | pop $1 | ||
... | ProxySettings::SetConnectionProxyByProtocol $1 _ | ||
"servername.com:80" "http" | |||
ProxySettings::GetConnectionProxy $1 | |||
pop $2 | |||
DetailPrint "Proxy of $1 changed to $2" | |||
intcmp $0 0 ProxySetLoopDone ProxySetLoopDone ProxySetLoop | |||
ProxySetLoopDone: | |||
... | |||
</highlight-nsis> | |||
Please read the documentation for verbose descriptions how to use the plugin. | Please read the documentation for verbose descriptions how to use the plugin. | ||
== Credits == | == Credits == |
Revision as of 16:06, 7 February 2008
Author: M.Ratz (talk, contrib) |
ProxySettings Plugin ©2008 by M.Ratz,
Download Link
ProxySettings.zip (93 KB)
Zip-file contains binary, source and documentation.
Description
This plugin makes it possible to set and read proxy-settings and connection information for dialup-connections and LAN-connection
Usage of plugin
The following example shows how to change the proxy-settings for all dialup-connections but only for http-proxy:
... ProxySettings::GetConnectionCount pop $0 ProxySetLoop: intop $0 $0 - 1 ProxySettings::GetConnectionName $0 pop $1 ProxySettings::SetConnectionProxyByProtocol $1 _ "servername.com:80" "http" ProxySettings::GetConnectionProxy $1 pop $2 DetailPrint "Proxy of $1 changed to $2" intcmp $0 0 ProxySetLoopDone ProxySetLoopDone ProxySetLoop ProxySetLoopDone: ...
Please read the documentation for verbose descriptions how to use the plugin.
Credits
- Written by M.Ratz
- last edited 06/02/2008