mc22 Posted July 26, 2008 Posted July 26, 2008 Hi all, I have a question concerning the 'RunAs' function (AutoIt v3.2.12.1) and the 'saved credentials' of Windows XP Prof. Background: Im writing a script which displays a password dialog when executed as 'normal' user, asking for the password for an administrator account. The script then executes itself using the 'RunAs' function with the username/password of the administrator account. When started with administrator privileges, the script tries to execute a program in the context of a 'normal' user, using 'runas.exe' with the 'savecred' parameter (I use the 'savecred' parameter because I dont want to enter the password for the 'normal' user). Run(@SystemDir & '\runas.exe /savecred /u: & @Computername & \' & $user & ' "cmd /c start \"no title\" /B \"' & $cmd & '""') Problem: It seems like the RunAs function of AutoIt works in a way, that prevents one to access the saved credentials of an account. Because of that the listed call of the 'Run' function ends up in a shell asking for the password of the non-admin user. Example: Lets say the administrator account is called 'admin' and the user account is called 'usr'. When using the 'Run As' functionality of Windows XP to execute 'rundll32.exe keymgr.dll, KRShowKeyMgr' (which displays a dialog listing all saved credentials of an account) as user 'admin', I can see the saved credentials for 'admin' including the password for 'usr'. When executing 'rundll32.exe keymgr.dll, KRShowKeyMgr' with the 'RunAs' function of AutoIt (again as user 'admin') the saved credential dialog is empty. Is it possible to use the 'RunAs' function in way, that allows one to access the saved credentials of an account? Thanks in advance for your help!
mc22 Posted July 31, 2008 Author Posted July 31, 2008 It seems like no one ever wanted to access saved credentials from a process executed with the new RunAs function?!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now