OS9 DHCP renew

Is there a scripting addition to allow a DHCP renew request to be sent? I’m trying to make a one-click fix for a user who has trouble moving his powerbook between home LAN and work LAN- the IP address isn’t being reliably changed. My theory is that a DHCP RENEW request will fix it up.
I see that IPNetMonitor is scriptable, but if this can be handled within one AS app, that would be even better.
Thanks!

: Is there a scripting addition to allow a DHCP renew request to be
: sent? I’m trying to make a one-click fix for a user who has
: trouble moving his powerbook between home LAN and work LAN-
: the IP address isn’t being reliably changed. My theory is that
: a DHCP RENEW request will fix it up.
While you’re probably correct that a DHCP release/renew cycle will fix the problem, this will likely only cure the symptom, not the actual problem.
I’ve seen this problem with flaky DHCP servers. Either the server at work or the server at home isn’t responding to DHCP requests properly. Suspect the server where the problem lies.
I realize this doesn’t answer your question, but I thought you should know that your friend should be able to reliably switch between networks without kludges.
Chris

Steve,
Here’s a script that may do what you need. It requires Dialog Director osax, and presents a list of your TCP/IP configurations. It’s based on script I found around here somewhere by Myke Olson.
George

set cfg to TCP config
set now to current config of cfg
set alts to available configs of cfg
set alts2 to order list alts
set alts to alts2
set ll to length of now
set thewidth to ((350 - ll) / 2) - ll - (ll) - 7 set gg to thewidth
set theDialog to {size:{350, 335}, style:standard window, closeable:false, name:"Network Settings", default item:5, contents:{¬
{class:static text, bounds:{90, 60, 259, 96}, contents:"Choose A Network Setting."}, ¬
{class:static text, bounds:{123, 238, 325, 255}, contents:"Current Setting:"}, ¬
{class:static text, bounds:{gg, 256, 345, 267}, contents:now, font:{name:"Geneva", size:10}}, ¬
{class:list box, bounds:{69, 96, 281, 227}, value:0, contents:alts}, ¬
{class:push button, bounds:{255, 300, 334, 319}, name:"OK"}, ¬
{class:push button, bounds:{165, 300, 240, 319}, name:"Cancel"}, ¬
{class:icon, bounds:{156, 16, 188, 48}, contents:6001}}} dd auto dialog theDialog with fonts {name:"Gadget", size:12} with grayscale
try
	set x to result
	set b to item 5 of x
	if b = false then
	else
		set y to item 4 of x
		if y = 0 then
			beep
		else
			set z to item y of alts
			if z = now then
				beep
			else
				set TCP config to z
				display dialog "One Moment Please." buttons {"OK"} default button 1 giving up after 1 with icon note
				set_TCPIP_to(false)
				set_TCPIP_to(true)
				display dialog "TCP/IP Has Been Reset." buttons {"OK"} default button 1 giving up after 2 with icon note
			end if
		end if
	end if
end try
on set_TCPIP_to(the status_indicator)
	tell application "Network Setup Scripting"
		try
			open database
				begin transaction
					set TCPIP active of ¬
						transport options "TCP/IP Globals" to status_indicator
				end transaction
			close database
		on error
			try
				abort transaction
			end try
			try
				close database
			end try
		end try
	end tell 
end set_TCPIP_to