How to get current user name from process started using RunAs command with diffrent profile.
From: Marek Suski (None_at_none.pl)
Date: 02/07/05
- Next message: OLIM: "Re: ADSL connected, is it open without loging-in?"
- Previous message: fgravelle_at_woh.rr.com: "16 bit MS-DOS Subsystem"
- Next in thread: Matt Gibson: "Re: How to get current user name from process started using RunAs command with diffrent profile."
- Reply: Matt Gibson: "Re: How to get current user name from process started using RunAs command with diffrent profile."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 7 Feb 2005 14:15:31 +0100
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
- Next message: OLIM: "Re: ADSL connected, is it open without loging-in?"
- Previous message: fgravelle_at_woh.rr.com: "16 bit MS-DOS Subsystem"
- Next in thread: Matt Gibson: "Re: How to get current user name from process started using RunAs command with diffrent profile."
- Reply: Matt Gibson: "Re: How to get current user name from process started using RunAs command with diffrent profile."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|