kestrel1 Posted June 20, 2008 Posted June 20, 2008 (edited) DSapseid: Yes you can do that easily enough if doing it manually, but the UAC blocks you if you try to do it from a batch file, which is what I am trying to do. I basically want to create an executable file, which I did for my previous script, that automatically installs everything in the correct place & gets the program running at start up. I have been using a batch file to copy the files to a folder called iproxy on drive c:\, but when it comes to getting the lnk file into the startup folder it fails because of permissions on that folder. I found a program called sudo.exe (as you would use sudo in Linux) that will elevate permissions, but for some reason it had a problem with copy. Sudo can be found here: Sudo.exe I then tried schtasks.exe to schedule a task to run, but you need admin rights, so I used Sudo. This worked a treat, but as explained earlier the scheduled task failed. I created the task manually, just to make sure I had everything right, but this also failed. I can run iproxy with the path to the settings.ini file from a command line in Vista, but it fails if used in a scheduled task. I used a settings file that was in a different folder to the exe to test this out, so it was using the ini file that was stated in the command. I ran it like this: c:\iproxy\iproxy.exe c:\internet\settings.ini The settings file had different proxies set to the one in the iproxy folder & they have been used correctly. There may be something else that I have missed, If I think of it I will post it. Thanks Edited June 20, 2008 by kestrel1
DSapseid Posted June 23, 2008 Posted June 23, 2008 Glad to see people using it , if you have any suggestions for improvements or find any bugs please do let me know. I use it and its great, the only thing is that it unticks the box that says "bypass proxy server for local addresses'" is it possible that you could try and add this to it. Thanks Dan @kestrel1 - ah sorry must have missed your point there:o:)
bmdixon Posted June 23, 2008 Posted June 23, 2008 I use it and its great, the only thing is that it unticks the box that says "bypass proxy server for local addresses'" is it possible that you could try and add this to it. Thanks Dan @kestrel1 - ah sorry must have missed your point there:o:) "To instruct Internet Explorer to bypass the proxy server for local addresses set this value to . To instruct Internet Explorer not to bypass the proxy server for local addresses set the ProxyOverride value to 127.0.0.1." So if you add to the settings file in the override section it should bypass the proxy. There isn't a registry entry for that setting so this is the only way i think... 1
kestrel1 Posted June 23, 2008 Posted June 23, 2008 (edited) "To instruct Internet Explorer to bypass the proxy server for local addresses set this value to . To instruct Internet Explorer not to bypass the proxy server for local addresses set the ProxyOverride value to 127.0.0.1." So if you add to the settings file in the override section it should bypass the proxy. There isn't a registry entry for that setting so this is the only way i think... I tried this, but it doesn't tick the bypass proxy box. There is a registry entry that can be set for this, as follows: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyOverride"="" This is an extract from a .reg file that I use. You can add any addresses that you want after if you use ; to separate them i.e. "ProxyOverride"=";192.168.0.1;192.168.0.2" This is set as a string value & does tick the bypass box. Hope that helps. Edited June 23, 2008 by kestrel1
bmdixon Posted June 23, 2008 Posted June 23, 2008 I tried this, but it doesn't tick the bypass proxy box. There is a registry entry that can be set for this, as follows: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyOverride"="" This is an extract from a .reg file that I use. You can add any addresses that you want after if you use ; to separate them i.e. "ProxyOverride"=";192.168.0.1;192.168.0.2" This is set as a string value & does tick the bypass box. Hope that helps. Yes, that's what iProxy does. It sets the proxyoverride setting to whatever you put in the settings file, so it should do the same as manually setting it. Not sure why it isn't checking the box but it should work...
Irazmus Posted June 23, 2008 Posted June 23, 2008 I sort this problem using an automated configuration script. I have a proxy.pac file stored on an internally (not externally) accessible web server (if the script is available externally the proxy will always be used). When on the school network the settings in the .pac are used, when off site the file isn't available so no proxy settings are applied. The best thing is that no user action is needed so staff don't even know it's there, and thus can't forget to switch between home and school. function FindProxyForURL (url, host) { if ( host.match("(helpdesk|booking|loki|webmail|artemis|cerberus|thor|sspr).school.county.sch.uk") || dnsDomainLevels(host) == 0 ) { return "DIRECT"; } else { return "PROXY proxy.gfl.suffolk.org.uk:8084; DIRECT"; } } 1
kestrel1 Posted June 23, 2008 Posted June 23, 2008 Irasmus: Must admit hadn't thought of using a pac file. I have got yours working with a bit of a tweak, but will look in to it further before deploying. I prefer to know what is going on first if you know what I mean.
kestrel1 Posted June 27, 2008 Posted June 27, 2008 Using a slightly different pac file that could be used internally or externally, as it looks at the IP Address & subnet that you are on & uses the proxy as required. Looks like this: function FindProxyForURL(url, host) { if (isInNet(myIpAddress(), "192.168.0.0.", "255.255.255.0")) return "PROXY 192.168.0.1:80"; else return "DIRECT"; } I am now using the pac file on laptops & have a reg file that enters the relevant info for IE. Works on Vista as well. I still don't like Vista though. Give me Linux any day.
thatley Posted July 2, 2008 Posted July 2, 2008 Hi Michael, This works really well. Could you do one for my LA (Wandsworth) proxy settings are: proxy1.equinoxsolutions.com:80 Thanks ) Trevor Hatley
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