I just played with the script and it works a treat. Thanks. I'm off to the autoit site to have a play. :D
Printable View
This only happens using a teacher laptop at home, any other computer (not a member of the domain) will access it fine, just as any domain PC (including teacher laptop) has no issue connecting when on the school's network.
To re-emphasise the point, I do not expect any problem to be with my script, or whether proxy is turned on/off but rather I believe some other function somewhere is confusing the matter.
I do appreciate the efforts so far, and perhaps I have not explained the difficulty very well - which is part of the reason I have had no success in 'googleing' this problem.
https://domainname/ resolves but shows page not found (regardless of location)
https://ipaddress/ shows page not found (regardless of location)
http://domainname/ tells me i must use https (regardless of location)
http://ipaddress/ tells me i must use https (regardless of location)
http://domainname/owa tells me i must use https (regardless of location)
http://ipaddress/owa tells me i must use https (regardless of location)
https://ipaddress/owa displays fine (regardless of location)
https://domainname/owa displays on laptop when in school, displays on all PCs outside of school. However, teacher laptops (members of the school domain), when not connected to the school domain, are unable to get this page (and it has just occurred to me I need to double check the response code, but is either blank or 404 I'm sure).
I suspect it's something to do with IIS. Have you checked the configuration of that?
Hi,
Was just working on something similar using Autoit when I stumbled across your posting. Can I suggest adding in the code below, (incomplete, but you get the idea). That way the complied script can be put in the logon script / Start folder, so that no user interaction is required.
Begin Code ================
$ip = Stringmid(@IPAddress1,1,8)
if $IP = "192.168." Then
MsgBox ( 0, "WSA Location Finder", "You are on the LAN")
call ("SetLanProxy")
Else
MsgBox ( 0, "WSA Location Finder", "You are somewhere else")
call ("SetNoProxy")
EndIf
exit
Func SetLanProxy()
;Check IE is closed
;~ HttpSetProxy ( 2, "192.168.3.4:8080" )
EndFunc
Func SetNoProxy()
;Check IE is closed
;~ HttpSetProxy ( 1, "192.168.3.4:8080" )
EndFunc
END CODE==================
My logic with this code is that our DHCP server hands out 192.168.* addresses, and a home networks tend not to (big assumption I am sure!). So the script runs, see's if it has a DHCP IP, if it does, it must be on the lan so runs the appropriate .reg files.
Anyway hope this is helpful. This is my first ever post in EduGeek forums and hope the posting of code is OK.
Richard.
Posting code is fine, but you might want to use the code tags in the post editor to keep the formatting nice.
As for the idea of going off IP address, I think you might be safer trying to ping a specific IP address on your network as that's much less likely to give a false positive than going off 192.168.* which many home routers will be dishing out.
Rob van der Woude's awesome site has this handy code snippet for testing if a server is pingable in a batch:
HTH!Code:A well known way to check if a server is still "on the air" is
PING server | FIND "TTL=" >NUL
IF ERRORLEVEL 1 ECHO Error pinging server
In Windows 95/98/NT this will result in 4 tries from PING to detect the presence of server.
When checking large amounts of servers, some time could be saved by a fast check, followed by a more thorough check only when the first check fails.
PING server -n 1 | FIND "TTL=" >NUL
IF NOT ERRORLEVEL 1 GOTO Next
PING server -w 3000 | FIND "TTL=" >NUL
IF ERRORLEVEL 1 ECHO Error pinging server
:Next