pritchardavid Posted October 7, 2009 Posted October 7, 2009 Hey guys need some help here Our ISP make us use a proxy, doesnt work without, teachers are having problem now getting the internet at home, some can get on, some cant because they forgot to take the proxy off or they dont know how to is there a little app that can be made to select whether you are at home (to take the proxy off) and whether your at work (put proxy on) anyone able to make something for this little problem, thanks
pooley Posted October 7, 2009 Posted October 7, 2009 Any good? EAZ School Proxy Switcher Software Informer: version 1.1 information 1
pritchardavid Posted October 7, 2009 Author Posted October 7, 2009 (edited) thanks, that should work, dont know why I couldnt find anything when I looked ages ago about this +rep but is there anything better, dont really want more programs running in the memory a fair few teachers complain already there laptops run slow Is it possible for some sort of icon setup? One saying, home internet Second saying, work internet Double cick on one and it changess the settings has required anyone able to make something like this? So basiclly a registry file would do this, But cant have the yes no box coming up everytime so really it needs to be an exe with some sort of home logo and business logo for each, so the user does not get confussed when doing this needs to be idiot proof!!!!!! its a shame for the vista computers, when you have the home or public or work selection coming up, it doesnt save these sort of settings with that, would be a good idea Edited October 7, 2009 by pritchardavid
mattx Posted October 7, 2009 Posted October 7, 2009 (edited) Edit to your requirements & compile [ AutoIT ] - will look like the picture under the script. Will change the proxy settings and then launch IE. When run takes VERY little memory. ; AutoIt Version: 3.2.0.1 ; Language: English ; Platform: WinXP ; Author: Matt ; Script Function: Proxy Switcher ; Version: 1.0 ; Date: Sept 2009 #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Proxy Switcher", 220, 110, 348, 309) $helpmenu = GUICtrlCreateMenu("Help") $infoitem = GUICtrlCreateMenuItem("About", $helpmenu) GUISetBkColor(0x0066FF) $Button1 = GUICtrlCreateButton("Proxy On", 10, 20, 89, 49) $Button2 = GUICtrlCreateButton("Proxy Off", 120, 20, 89, 49) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $Button1 RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "First Home Page", "REG_SZ", "http://navaho") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://navaho") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "10.0.0.2:8080") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "Proxyenable", "REG_DWORD", "1") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride", "REG_SZ", "intranet") Run('C:\Program Files\Internet Explorer\iexplore.exe') Exit Case $nMsg = $Button2 RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "First Home Page", "REG_SZ", "http://www.google.co.uk") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://www.google.co.uk") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "Proxyenable", "REG_DWORD", "0") Run('C:\Program Files\Internet Explorer\iexplore.exe') Exit Case $nMsg = $infoitem MsgBox(0, "Proxy Switcher 1.0", "Written By Matt " & @CRLF & "Comments & Suggestions to:" & @CRLF & "matt@#######.org.uk") EndSelect Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited October 7, 2009 by mattx 1
mossj Posted October 7, 2009 Posted October 7, 2009 (edited) WE have exactly this it's just two shortcuts to a batch files on the c drive, that imports .REG files also on the c drive into the registy (bypasses warnings that confuse people). will post it tommorow if someone else doesn't in the mean time... You mentioned you already have the reg files for this, so to bypass the yes/no boxes. Find the batch command that imports reg files. place the bat file on c drive then jsut shortcut to it job done. Edited October 7, 2009 by mossj
pritchardavid Posted October 7, 2009 Author Posted October 7, 2009 (edited) Thanks for your help Copied your script has needed and edited for our proxy setting but keep getting this a message everytime when trying to make the exe error: variable used without being declared line 16 even a stright copy and paste and trying to make the exe doesnt work without editing something, so dont think its something im doing wrong nope didnt make reg files, just saying that could be an option to use, but staff member would know what to do but your way would work, i'll try to get the method above working first, if not, i'll try what you have then Edited October 7, 2009 by pritchardavid
Hacksawbob Posted October 7, 2009 Posted October 7, 2009 Just the sort of thing I'm after but I get this when I run it. $BS_DEFPUSHBUTTON variable used without being declared I never really graduated from V2 am I doing something daft?
dhicks Posted October 7, 2009 Posted October 7, 2009 Our ISP make us use a proxy Set up a transparent proxy between your network and the connection as provided by your ISP. We use Squid for this, running on a virtual machine. -- David Hicks
linkazoid Posted October 7, 2009 Posted October 7, 2009 we use this simple app: Attached! Even Senior Management can use it!changeproxy.zip
mattx Posted October 7, 2009 Posted October 7, 2009 (edited) Sorry, thats what you get for using old bits of code from other stuff I've written - The lines [ 16 & 17 ] with the $Button1 & $Button var should read: $Button1 = GUICtrlCreateButton("Proxy On", 10, 20, 89, 49) $Button2 = GUICtrlCreateButton("Proxy Off", 120, 20, 89, 49) Just tested it on my Windows 7 using version 3.3.0.0 & it works. [ Using just over 2 meg ] - which in my opinion is too much..... If you want the GUI to close after they have clicked on the button, just add an 'Exit' in.... Edited October 7, 2009 by mattx 1
mossj Posted October 7, 2009 Posted October 7, 2009 (edited) For you - http://projects.localhosting.org.uk/proxySimples.zip Should work, if you need it. Just follow the instuctions it's a bish bash bosh job really but it is exactly as you asked. 2 shortcuts on the desktop click one and the proxy is one way, click the other and it that way. Doesn't run in the background so no memory eaten. Does require a browser restart but I expect all these scripts do... Edited October 7, 2009 by mossj
mattx Posted October 7, 2009 Posted October 7, 2009 Lordy Mossj, your license details are larger than the .reg & .bat files !!
pritchardavid Posted October 7, 2009 Author Posted October 7, 2009 Ok cheers, corrected scripping is working, thats one more thing off my to do list
mossj Posted October 7, 2009 Posted October 7, 2009 Lordy Mossj, your license details are larger than the .reg & .bat files !! Yup but the GNU seemed to state I had to include them somewhere
mattx Posted October 8, 2009 Posted October 8, 2009 Yup but the GNU seemed to state I had to include them somewhere I don't have that problem !!
ozzy Posted October 8, 2009 Posted October 8, 2009 Try this written by Craigg on this forumhttp://www.edugeek.net/forums/scripts/26813-proxy-proxy-off-app.html
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now