First off, placing Kix on every workstation just for login script processing is a major maintenance issue, and placing it into the Windows folder structure can be considered a security issue, even resulting in Kix being removed by some AV software. Put Kix32.exe and your login script in the NETLOGON share of one of your DCs and let it replicate. Simply specify "Kix32 login.kix" in the login script field of your user's profile. Your method also significantly impacts the performance of the login script!

Second issue - you are mixing VBScript with Kix. I imagine you're getting all kinds of errors posted. Use one or the other and remove anything that isn't appropriate for the script type.

Third issue - you have open clauses - If without EndIf, for example.

Finally, you are complicating this unnecessarily by attempting this via a login process. This is an administrative task, and should be performed BY an administrator. User's in a well managed organization generally don't have the access rights necessary to perform tasks like this. There are several ways you can accomplish this right from your desk, logged in as ad admin (or even simply running a command prompt as an admin and running the command from there.)

Method 1 - Use a remote execute method to call the NET command to manipulate the local accounts using tools available on every version of windows. There are Kix UDFs available to accomplish this, or even PSExec.exe, which can be used with a batch script. Type "NET HELP USER" at a command prompt for more info.

Method 2 - Use the task scheduler to run a task with network administrator rights. You can schedule this to run on all systems at a preset time (download tsAdm from my web site to accomplish this) or use a script to define and immediately execute the task (tcLib provides all the UDFs needed to do this). If you download and install the tsAdm package on your workstation and create a list of computer names to update (notepad, one computer name per line) you can use the Task Blast to push the update task to all computers with one procedure, and it would be done with proper admin rights.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D