Once again, running a process with elevated rights during a login script will violate most security policies at any reputable company. (and possibly even at a few that aren't ;\) ) If your users aren't local admins, there's probably a good reason for it.

Using the task scheduler, you can create a task, define credentials for the task, and then trigger that task, all without the user having elevated rights. You can call a tokenized script from your login process so the logic to create the task, along with the credentials, is obsured from prying eyes.

The process becomes:
 Code:
Login script runs..
  batch file to perform admin task copied to workstation, uses generic name
  Script to create scheduled task is called
   Task created
   Task executed - runs the batch file with specific account
  Sub-script ends
Login script ends

The advantage is that the task with the elevated rights runs in a separate context, not in the user context. This makes it easy to do and quite safe.

You need to look for the tcLib UDF library for this to work. The SchedTask UDF provides a simple method to create scheduled tasks, but does not have the granular control to create & execute triggerless tasks. There is full documentation in the zip with example scripts.

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