1. Are you saying that you don't need to use the syntax
function (argument).
The only reason that I passed the $inifile value was because I needed something to put in the (argument) part of the code. I defined inifile within the function as this time round the location of the inifile will be the same for all clients and logged on users, so I didn't want to define the variable each time in the main scripts. Are you saying that I could just use proxyauthenticate without any arguments in the brackets?
2. Servername is defined at the top of my UDF script as Global. The Servername variable is used throughout my scripts so I have defined it once at the top of the UDF.kix script.
3. I agree with point three. I think that I will rewrite the code so as not to hardcode the array. I need to modify the coding anyway as I don't want the function to write the proxy settings username and password every single login. I would rather the function checked whether the proxy authentication were set or not.
4. Oh yes, I forgot to ask how the readprofilestring works with opening and closing files. I will check that as well. I wasn't sure if it worked the same way as the Readline command.

I want to tokensise all my scripts anyway, not just the file that contains passwords. I have never used the tokenising ability so I don't actually know how it works anyway. I have booked that in to do after I have finished updating the scripts as there are a number of changes that I need to make this week.

I will have a look at that WMIGetAV function now. I didn't notice that one even though I checked the list of functions available. I was probably searching for virus or anti virus rather than AV. Thanks.