Did you really intend to publish your local admin password?
This is SO easy if you treat it as an admin task, instead of trying to do it during the login.
The login process reads the registry and notifies a central system that an update is needed (see the script vault for ideas).
When the central server gets the notification, it simply copies a small batch file to the workstation, and creates a scheduled task with no triggers, supplying an appropriate admin account. It then issues a Run Now command for the task. The tcLib function library can do all of this.
The batch file maps a drive to a share where the install file is and then invokes the install process. It runs hidden and silent. Of course, your install script must be an unattended process, but that seems to be what you're after, anyway.
All of this runs with admin rights to the client. The time that elapsed between the login script requesting the update, and the update being triggered will be a few seconds (depending on the cycle time of the central service). No wacky procedures to give users elevated rights, no potential security exposures.
I use this general process to allow our Operations staff to deploy web updates to servers that they have no user access to. They (instead of a login script) use a GUI to generate the request file on a server, which then performs the deployment using specific credentials. It's simple, effective, and reliable.. not to mention secure.
Glenn
_________________________
Actually I
am a Rocket Scientist!