i wrote a similar script that i bind to my voice softkey. actually, my mortscript cab installs this script and binds the key
# dcd connection toggle.mscr - 9-9-07 r3
ShowWaitCursor
If ( NOT Connected() )
RegWriteDword("HKLM","\Comm\ConnMgr\Providers\{7C4 B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\Sprint PCS","Enabled","1")
Vibrate(100)
Connect( "The Internet" )
Else
RegWriteDword("HKLM","\Comm\ConnMgr\Providers\{7C4 B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections\Sprint PCS","Enabled","0")
Vibrate(100)
Sleep(200)
Vibrate(100)
Disconnect
EndIf
HideWaitCursor