in reply to su on winnt

Use the Win32::AdminMisc module available from

Here's how to use ppm

PPM> set repository roth PPM> install Win32-AdminMisc
As long as the program is runing as the system user, you can use this piece of code to change the user.
I hope this helps.