Re: Logon

From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 01/17/05


Date: Mon, 17 Jan 2005 11:32:12 -0500

Note, though, that that's not a particularly secure way, as it's trivial to
reset Environment Variables (using the Set command)

A far superior approach is to use the GetUserName API.
http://www.mvps.org/access/api/api0008.htm at "The Access Web" is a complete
example.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)
"HJD" <HJD@discussions.microsoft.com> wrote in message
news:88AB6DC3-E8A0-426B-9493-AB6CF65339C3@microsoft.com...
> Hi Alvin
> The easiest way is to check the environment variable Username;
>
> mUserName = VBA.Interaction.Environ("USERNAME")
> msgbox mUserName
>
> Greetings
> H
>
> "Alvin Hansen" wrote:
>
> > Hi!!
> >
> > I try to find my username
> > i logon to a server with a name
> > but on my Pc i am "Admin" so if i use
> > currentusername i get "admin" and not my name i
> > use to logon to the server, is there a way to grab the username??
> >
> > Best regards alvin
> >


Relevant Pages

  • Re: Mapping drives and request logon credentials
    ... You can use MapNetworkDrive to connect directly to a shared folder or any child folder beneath a shared folder. ... Password for the user identified by the UserName argument. ... The following example demonstrates how MapNetworkDrive can be used in a users logon script to connect to two network shares. ... The user name can be retrieved from the DOS environment variables, ...
    (microsoft.public.scripting.vbscript)
  • Re: X11 forwarding after suing
    ... I think it is just some configuration changes, ... > preserves the environment variables. ... Ie, sudo -u username -s gets you a shell as username, ...
    (SSH)
  • Re: Get Clients Windows Logon ID
    ... Can you please advice me how to get the Clients' windows logon user ... name in perl? ... Using environment variables to find username are risky! ...
    (perl.beginners)
  • Re: %username% and friends
    ... %username% is an environment variable. ... To display your current environment variables open a Command Prompt... ... HOW TO Manage Environment Variables in Windows XP ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Logon
    ... >> use to logon to the server, is there a way to grab the username?? ... >> Best regards alvin ...
    (microsoft.public.access.modulesdaovba)