Hacksawbob (7th October 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
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
Last edited by pritchardavid; 7th October 2009 at 09:41 PM.
updated
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.
Code:; AutoIt Version: 3.2.0.1 ; Language: English ; Platform: WinXP ; Author: Matt ; Script Function: Proxy Switcher ; Version: 1.0 ; Date: Sept 2009 #include <GUIConstants.au3> #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
Last edited by mattx; 8th October 2009 at 12:08 AM.
Hacksawbob (7th October 2009)
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.
Last edited by mossj; 7th October 2009 at 10:05 PM.
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
Last edited by pritchardavid; 7th October 2009 at 10:43 PM.
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?
we use this simple app:
Attached!
Even Senior Management can use it!
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:
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.....Code:$Button1 = GUICtrlCreateButton("Proxy On", 10, 20, 89, 49) $Button2 = GUICtrlCreateButton("Proxy Off", 120, 20, 89, 49)
If you want the GUI to close after they have clicked on the button, just add an 'Exit' in....
Last edited by mattx; 8th October 2009 at 12:40 AM.
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...
Last edited by mossj; 8th October 2009 at 12:30 AM.
Lordy Mossj, your license details are larger than the .reg & .bat files !!
Ok cheers, corrected scripping is working, thats one more thing off my to do list![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)