#39705 - 2003-05-02 03:00 PM
Re: get current web page
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
Those who have Win2K or XP will run a logoff script to turn off the proxy settings. Those who have NT and 9X will have a shortcut to this code on their desktop...
code:
BREAK ON ;---------------------------------------------------------------------------------------- GLOBAL $IEArray, $NSArray ;---------------------------------------------------------------------------------------- $Form=CreateObject('Kixtart.Form') $Form.Caption='ITSoft - Proxy Settings' $Form.Width=450 $Form.Height=250 $Form.SysMenu=1 $Form.BackColor=204,204,204 $Form.FontName='Courier' $Form.FontSize=10 $Form.Center ;---------------------------------------------------------------------------------------- $Logo=$Form.Image(@SCRIPTDIR+'\proxy_title.bmp',-6,0,450,80) $Logo.Border=0 ;---------------------------------------------------------------------------------------- $Frame1=$Form.Frame('',5,80,435,110) ;---------------------------------------------------------------------------------------- $Label1=$Form.Label('NOTE:',15,95) $Label2=$Form.Label('You need to close and re-open your web browser',15,110) $Label3=$Form.Label('in order for the settings to take effect.',15,125) $Label4=$Form.Label('-> The Proxy Settings.',220,156) $EnableY=$Form.OptionButton('Enable ',20,151) $EnableN=$Form.OptionButton('Disable ',120,151) $EnableY.Enabled=1 $EnableY.Value=1 $EnableN.Enabled=1 ;---------------------------------------------------------------------------------------- $Submit=$Form.CommandButton('GO!',285,195,70,22) $Cancel=$Form.CommandButton('Close',365,195,70,22) $Submit.OnClick='Submit_Click()' $Submit.Default=1 $Cancel.OnClick='Cancel_Click()' ;---------------------------------------------------------------------------------------- $Form.Show ;---------------------------------------------------------------------------------------- WHILE $Form.Visible $RC=Execute($Form.DoEvents()) LOOP ;---------------------------------------------------------------------------------------- QUIT(1) ;---------------------------------------------------------------------------------------- Function Cancel_Click() $RC=$Form.Hide EndFunction ;---------------------------------------------------------------------------------------- Function Submit_Click() SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q iexplore.exe > ie.dat' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q netsc*.exe > ns.dat' $RC=Open(1,@SCRIPTDIR+'\ie.dat',2) $IEdat=ReadLine(1) $RC=Close(1) IF($IEdat<>'') $IEArray=Split($IEdat,Chr(9)) $IE_exe=$IEArray[3] ENDIF $RC=Open(2,@SCRIPTDIR+'\ns.dat',2) $NSdat=ReadLine(2) $RC=Close(2) IF($NSdat<>'') $NSArray=Split($NSdat,Chr(9)) $NS_exe=$NSArray[3] ENDIF SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f iexplore.exe' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f netsc*.exe' IF($EnableY.Value=1) SELECT ;*-------------------------------------------------------------------- CASE(InGroup('Mansfield')) $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','1','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','172.16.0.214:8080','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') ;*-------------------------------------------------------------------- CASE( (InGroup('Junebox'))OR (InGroup('Cedar Falls'))OR (InGroup('Lyons'))OR (InGroup('Southaven'))OR (InGroup('Sportime'))OR (InGroup('SportimeCS'))OR (InGroup('Appleton'))OR (InGroup('IS Dept'))OR (InGroup('Fresno')) ) $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','1','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','10.56.1.214:8080','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') ;*-------------------------------------------------------------------- CASE 1 ;?'[ WebMarshal ]' ENDSELECT $Label5=$Form.Label('Proxy Settings = ON',20,200) ELSE $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','0','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','0.0.0.0:0000','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') $Label5=$Form.Label('Proxy Settings = OFF',20,200) ENDIF IF($IEdat<>'') RUN $IE_exe ENDIF IF($NSdat<>'') RUN $NS_exe ENDIF EndFunction
So there's my solution.
Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1471 anonymous users online.
|
|
|