Hi all
How to get current user name (name of the user that logged on) from process
that was started using "RunAs" command?
For example
User "MarkSmith" has started a VB application using RunAs command where user
name was "Admin". Now VB app needs to copy some file to MarkSmith
application data folder (C:\Documents and Settings\marksmith\Application
Data\). I need to know how to get user name to do that. If I use %username%
or WshMetwork.UserName I am getting "Admin" instead "MarkSmith".
Maybe I could read user name from registry?
Thank you for your help
Marek Suski
How to get current user name from process started using RunAs command with diffrent profile.
Posts: n/a