Page 1 of 1 1
Topic Options
#71234 - 2002-10-28 09:20 PM proxy scripts
neptune_bet Offline
Lurker

Registered: 2002-10-28
Posts: 1
What would be the proper script for modifying the registry for proxyenable key and proxy server underneath hkey_current_user\.\.\..\internet settings.
Top
#71235 - 2002-10-28 09:27 PM Re: proxy scripts
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
This is what I use:
code:
Function SetAutoProxy ($Proxy)
; This function sets the corporate autoproxy for the client
dim $Proxy, $key, $rc_write, $RC1, $RC2, $RC3, $RC4
$key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$RC1=WriteValue($key,"ProxyEnable","0","REG_DWORD")
$RC2=WriteValue($key,"AutoConfigURL",$Proxy,"REG_SZ")
$RC3=WriteValue($key,"ProxyServer","","REG_SZ")
$RC4=WriteValue($key,"ProxyOverride","","REG_SZ")
if ($RC1+$RC2+$RC3+$RC4)>0
$ErrorState=1
WriteLog("Error setting AutoProxy registry settings. 0=success (RC1=$RC1, RC2=$RC2, RC3=$RC3, RC4=$RC4)")
endif
$file = "c:\Program Files\Plus!\Microsoft Internet\CUSTOM\install.ins"
If Exist($file)=1
$rc_write=WriteProfileString($file,"URL","AutoConfigURL","http://proxy.xyz.com/auto.proxy")
$rc_write=WriteProfileString($file,"URL","AutoConfigJSURL","")
$rc_write=WriteProfileString($file,"Proxy","HTTP_Proxy_Server","")
$rc_write=WriteProfileString($file,"Proxy","FTP_Proxy_Server","")
$rc_write=WriteProfileString($file,"Proxy","Secure_Proxy_Server","")
$rc_write=WriteProfileString($file,"Proxy","Gopher_Proxy_Server","")
$rc_write=WriteProfileString($file,"Proxy","Socks_Proxy_Server","")
$rc_write=WriteProfileString($file,"Proxy","Proxy_Enable","0")
Endif
Endfunction

_________________________
Home page: http://www.kixhelp.com/hb/

Top
#71236 - 2002-10-28 09:28 PM Re: proxy scripts
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Welcome to the board. Question like this should be posted to the "Starters" forum. If you tried searching the board you would likely find around 100 samples.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71237 - 2004-01-27 07:40 PM Re: proxy scripts
Boad Offline
Lurker

Registered: 2004-01-27
Posts: 3
I just want to be sure I understand this...

I want to set this up so my proxy is being used but not for secure sites.

Could I use this?

Top
#71238 - 2004-01-27 07:43 PM Re: proxy scripts
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Yes.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 884 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.053 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org