I'm one of the fortunate many who has not been forced into Vista, so I'm afraid I cannot help much.

I've googled Vista & Elevated, and I can see why you might have been directed to look at it from a Vista pespective (wow! sneaky tautology).

If you explain how you intend to use the script then other board members may be better able to help.

Especially useful would be to know if the script is part of a deployment package run as a user with admin privilege, or if it is intended to be run as a normal user with none-admin privilege.