I have a requirement to be able to run a command from the start menu as an arbitrary user, given the username and password. Any idea how I can accomplish this in Win32?
Win32::Process does not allow this (I've looked), and it appears I could just use the "RunAs" command, but the problem with that is you can't specify the password on the command line -- I intend to gather the password from a Tk dialog. So, if I did use RunAs, I'd need to drive it with something like Expect (but for Win32). Any ideas how to do this cleanly?
Any good module recommendations? I'd rather not shell out to runas if I can help it, since I'm not sure runas ships with all Windows versions, and I'm not sure how to feed the password to the RunAs.exe binary once it is running.
Thanks folks -- I appreciate your help!