in reply to Re: Extracting the name of a logged in user on a remote w2k workstation
in thread Extracting the name of a logged in user on a remote w2k workstation

Thanks for the reply Ben, I have browsed through the scripts you mention and I have gained a few pointers.

The workaround im trying at the moment grabs a hash of all accounts logged into the pc and then grabs a list of all services with specific accounts that are not local system so that I can elimitate some accounts from the hash.

I was hoping that somone would have a 'nice' way around this. Perfect solution would be to grab %USERNAME% from the local enviroment variables, but this doens't seem possible.

Thanks again for your imput.

  • Comment on Re: Re: Extracting the name of a logged in user on a remote w2k workstation

Replies are listed 'Best First'.
Re: Re: Re: Extracting the name of a logged in user on a remote w2k workstation
by Kanji (Parson) on Aug 17, 2003 at 16:04 UTC

    Does my $username - $ENV{'USERNAME'}; not work for you? It should if %USERNAME% is an environment variable.

    Update: D'oh! Managed to skip the 'remote' part of the question entirely...

        --k.


      Yes that works to grab the USERNAME environment variable from the local machine but what about a remote pc?

      It may be me just being thick and not be able to work something out (must get more sleep), sorry in advance if this is the case.