Solved

Domain to which current user is logged on...

Posted on 2006-11-07
5
125 Views
Last Modified: 2010-04-30
i saw that someone had quoted in another question that

environ("DOMAINNAME") should work, but it didn't.

so how can i find out the "domain name" which is shown on "my computer" window, should work on xp and 2000.

also what happens when this is called on a "2003 server"?
0
Comment
Question by:expertfan
5 Comments
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 500 total points
ID: 17895699
Its:

Environ("UserDomain")


But if you dont want to do that, here is an API solution (i prefer this method anyway):

http://vbnet.mvps.org/index.html?code/network/getdomainname.htm


Good Luck..
Brian
0
 
LVL 4

Expert Comment

by:JRCSystems
ID: 17903372
I agree with Brian.

In addition, just in case you don't know...

Do Start/Run, type in CMD and press [Enter].

Type in SET and press [Enter].
It will show you ALL of the Environment variables set on the computer and their values.

JRC
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Share codes 68 114
Public Sub, Empty Cell 7 56
how to open Waze.com/livemap from address saved in DB? 26 152
Vb.net 2008 2 49
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now