As an aside, if you need to know what environment variables are available and what information they contain, open a CommandPrompt window and enter SET.
Thank you for your help.
But unfortunately it doesn't work for me.
When I am trying this:
My.Application.GetEnvironmentVariable("USERNAME") - I get errorr message: that I need and object.
When I tried this:
GetEnvironmentVariable("USERNAME") - I get errorr message: sub or function not defined.
Thank you very much earthandfire.
It didn't work for me, but thanks to you I found in VB function "Environ", which give me user name, user domain and computer name.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.