this along with the other responses to it's parent should be of interest to you.
In reply to Re: Accessing passwords in a script by marto in thread Accessing passwords in a script by nysus