Anyone know how to set to use DHCP with Revolution?
sarahr at genesearch.com.au
Wed Oct 2 18:13:01 EDT 2002
> Thanks for this information about how to get the network settings.
> I'm still at a loss as to how one goes about making the setting to
> DHCP. I've tried all kinds of techniques from:
> "set configuration method of TCP v4 configuration 1 to DHCP"
> to various effort to "unlock" the control-settings.
> I think this is going to take some heavy-lifting/network guru type to
> figure this one out. Is there anyone else who's tried something like
> this before (setting the user's Networking Control panel to DHCP via
> Applescript) Perhaps I could pay someone to write a routine for me,
> if it can be done at all.
Here is Ken's script with an added section that changes the relevant
setting to DHCP. As Ken mentioned, this just handles the first TCP
configuration it finds, so you might need to add a check for other
configs, but it should get you started:
set configMethod to ""
set configName to ""
set cfg to ""
tell application "Network Setup Scripting"
set config to current configuration set
repeat with i from 1 to count of configuration of config
if (class of configuration i of config) is (TCPIP v4 configuration)
set cfg to configuration i of config
set configName to name of config -- so you can check the name to see
if it's the right one
set configMethod to configuration method of cfg
if configMethod ≠ "DHCP" then
set protec to get protection of configuration method of cfg
if protec = locked then return "Setting is locked"
set the configuration method of cfg to DHCP
on error errMsg number errNum
return "Error: " & errMsg & " " & errNum
return "Setting changed to DHCP"
Note: there is a line above that uses the Mac's Not-equal sign
(option-equal): if configMethod **not-equal** "DHCP" then
It may not translate via email. Also beware of long lines wrapping. If
you want me to send you the actual script, send me an email off-list.
More information about the Use-livecode