When I log onto my workstation, I select my system domain (KRUSTY -- can you tell we have simpson fans as networking??) and my user name, so when I look at the CTRL+ALT+DEL screen it is KRUSTY\scostanz . However when I do
sTemp = Environment.Use rDomainName & "\" & Environment.Use rName
sTemp is = "SCOSTANZO-XP\scostanz" which is my computer name and my user name. Is there another namespace I should be hitting? I remember that there was an API as well in VB 6.
Thanks in advance. 9 1435
One method would be to use:
Environment.Get EnvironmentVari able("USERDOMAI N") & "\" &
Environment.Use rName
AFAIK, this will only work on NT based systems, and not 95/98/ME.
"Stephen Costanzo" <sx********@hot mail.com> wrote in message
news:Or******** *****@TK2MSFTNG P11.phx.gbl...
When I log onto my workstation, I select my system domain (KRUSTY -- can you
tell we have simpson fans as networking??) and my user name, so when I look
at the CTRL+ALT+DEL screen it is KRUSTY\scostanz . However when I do
sTemp = Environment.Use rDomainName & "\" & Environment.Use rName
sTemp is = "SCOSTANZO-XP\scostanz" which is my computer name and my user
name. Is there another namespace I should be hitting? I remember that there
was an API as well in VB 6.
Thanks, now the big question, why? I mean one would think that the
environment variable of UserDomain would also point to the UserDomainName
value.
Also, is there a place in the help file which lists those values so I can
see what else I can pick out of it?
Thanks Jim
"Jim Hughes" <NO*********@Ho tMail.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. One method would be to use: Environment.Get EnvironmentVari able("USERDOMAI N") & "\" & Environment.Use rName
AFAIK, this will only work on NT based systems, and not 95/98/ME.
"Stephen Costanzo" <sx********@hot mail.com> wrote in message news:Or******** *****@TK2MSFTNG P11.phx.gbl... When I log onto my workstation, I select my system domain (KRUSTY -- can
you tell we have simpson fans as networking??) and my user name, so when I
look at the CTRL+ALT+DEL screen it is KRUSTY\scostanz . However when I do sTemp = Environment.Use rDomainName & "\" & Environment.Use rName sTemp is = "SCOSTANZO-XP\scostanz" which is my computer name and my user name. Is there another namespace I should be hitting? I remember that
there was an API as well in VB 6.
Hi Stephen,
I can not reproduce the problem. I tested on Windows XP+sp1, .NET framework
1.1,VS.NET 2003
Module Module1
Sub Main()
Dim sTemp As String
sTemp = Environment.Use rDomainName & "\" & Environment.Use rName
Console.WriteLi ne(sTemp)
sTemp = Environment.Get EnvironmentVari able("USERDOMAI N") & "\" &
Environment.Use rName()
Console.WriteLi ne(sTemp)
End Sub
End Module
I will get the same result in the two line output
above.(<DOMAIN> \<USERNAME>)
Which OS are your using?
As the msdn said,
Environment.Use rDomainName Property
Requirements
Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000,
Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemenvi ronmentclassuse rdomainnametopi c.asp
If you have any concern on this issue, please post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Peter, I was able to reproduce Stephen's issue on Windows 2000 Server Sp4
with Framework 1.1, VS Net 2003, that's why I suggested the workaround.
TextBox1.Text = Environment.Use rDomainName & "\" & Environment.Use rName
TextBox1.Text += vbcrlf & Environment.Get EnvironmentVari able("USERDOMAI N") &
"\" & Environment.Use rName
Returned
COMPUTERNAME\ji m
DOMAINNAME\jim
The server is a member of an Active Directory domain and I am logged in as a
AD user.
Stephen, GetEnvironmentV ariable returns a the contents of the environment
variables that are set from My Computer | Properties | Advanced |
Environment Variables plus some that are set automaticaly like USERDOMAIN.
Open a Command Prompt and type SET to see the full list.
"Peter Huang" <v-******@online.m icrosoft.com> wrote in message
news:BX******** ******@cpmsftng xa07.phx.gbl... Hi Stephen,
I can not reproduce the problem. I tested on Windows XP+sp1, .NET
framework 1.1,VS.NET 2003 Module Module1 Sub Main() Dim sTemp As String sTemp = Environment.Use rDomainName & "\" & Environment.Use rName Console.WriteLi ne(sTemp) sTemp = Environment.Get EnvironmentVari able("USERDOMAI N") & "\" & Environment.Use rName() Console.WriteLi ne(sTemp) End Sub End Module
I will get the same result in the two line output above.(<DOMAIN> \<USERNAME>) Which OS are your using?
As the msdn said,
Environment.Use rDomainName Property
Requirements Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows
2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003
family http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemenvi ronmentclassuse rdomainnametopi c.asp
If you have any concern on this issue, please post here.
Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Framework: NetFramework 1.1
Workstation: XP SP 1
Server: Windows 2000
I do not know if we have AD.
"Peter Huang" <v-******@online.m icrosoft.com> wrote in message
news:BX******** ******@cpmsftng xa07.phx.gbl... Hi Stephen,
I can not reproduce the problem. I tested on Windows XP+sp1, .NET
framework 1.1,VS.NET 2003 Module Module1 Sub Main() Dim sTemp As String sTemp = Environment.Use rDomainName & "\" & Environment.Use rName Console.WriteLi ne(sTemp) sTemp = Environment.Get EnvironmentVari able("USERDOMAI N") & "\" & Environment.Use rName() Console.WriteLi ne(sTemp) End Sub End Module
I will get the same result in the two line output above.(<DOMAIN> \<USERNAME>) Which OS are your using?
As the msdn said,
Environment.Use rDomainName Property
Requirements Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows
2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003
family http://msdn.microsoft.com/library/de...us/cpref/html/ frlrfsystemenvi ronmentclassuse rdomainnametopi c.asp
If you have any concern on this issue, please post here.
Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hi Stephen,
Thank you for you report.
After I have done a deeper research, the behavior will occur only if there
is a same local account with the domain account. i.e. when you have a
domain account domain\user1 and a local account user1.
When you logon to the domain with the domain account domain\user1, the
problem will persists.
I have reported the problem to our product team, but I can not guarantee if
or when it will be fixed.
Now you can follow the Jim's workaround
or
Environment.Exp andEnvironmentV ariables("%USER DOMAIN%")
If you have concern on this issue,please post here.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Thanks for your research Peter!
I can confirm that I did have two accounts using the same name in the domain
and on the workstation. I renamed the local account and
Environment.Use rDomainName now returns the correct result.
"Peter Huang" <v-******@online.m icrosoft.com> wrote in message
news:WO******** ******@cpmsftng xa07.phx.gbl... Hi Stephen,
Thank you for you report.
After I have done a deeper research, the behavior will occur only if there is a same local account with the domain account. i.e. when you have a domain account domain\user1 and a local account user1. When you logon to the domain with the domain account domain\user1, the problem will persists.
I have reported the problem to our product team, but I can not guarantee
if or when it will be fixed.
Now you can follow the Jim's workaround or Environment.Exp andEnvironmentV ariables("%USER DOMAIN%")
If you have concern on this issue,please post here. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
I will try that as well Jim as we, as a general practice, keep a local
account on the machine (if its a laptop) with the same credentials, i.e.
Username/password
"Jim Hughes" <NO*********@Ho tMail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. .. Thanks for your research Peter!
I can confirm that I did have two accounts using the same name in the
domain and on the workstation. I renamed the local account and Environment.Use rDomainName now returns the correct result.
"Peter Huang" <v-******@online.m icrosoft.com> wrote in message news:WO******** ******@cpmsftng xa07.phx.gbl... Hi Stephen,
Thank you for you report.
After I have done a deeper research, the behavior will occur only if
there is a same local account with the domain account. i.e. when you have a domain account domain\user1 and a local account user1. When you logon to the domain with the domain account domain\user1, the problem will persists.
I have reported the problem to our product team, but I can not guarantee if or when it will be fixed.
Now you can follow the Jim's workaround or Environment.Exp andEnvironmentV ariables("%USER DOMAIN%")
If you have concern on this issue,please post here. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no
rights.
Hi Stephen,
I look forward to hearing from you after you have a test.
Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jordan |
last post by:
Suppose I register a domain name, MyDomain.com, through register.com (or any
other of the many domain name registrars).
I own the domain name. The domain name goes into the global DNS database.
As the facilitator in this process, exactly what does the registrar *own*
with respect to my specific domain name and/or the registration process?
Briefly, what role does InterNIC play in all of this?
|
by: Wysiwyg |
last post by:
After a server created cookie is processed on the client I want it removed,
cleared, or expired in the javascript block but have been unable to do this.
If I set a cookie value in the server code behind and don't use a domain
then I can not change or remove that cookie's value on the client. If I
subsequently create the cookie again in the codebehind then I actually end
up with TWO cookies with the same name in the response. The cookie...
|
by: Joe User |
last post by:
Hi - I found the class below on another website (www.devx.com)
and can't seem to figure out how to make a call to this class to
retrieve the machines and put them in a listbox.
I am definitely a beginner in vb programming, and would really
appreciate the help.
TIA!
|
by: Dany C. |
last post by:
We have install a valid SSL certificate issued to www.mycompany.com on our
web server running IIS 6.0 / win2003 SP1. Then we have created a sub domain
pointing to the same server for our web services at ws.mycompany.com. We have
properly installed the server certificate on the client machine.
When the client try to connect to our secure webservice at
https:\\ws.mycompany.com we have the foolwing error:
System.Net.WebException: The...
|
by: Adam Tibi |
last post by:
Hello,
I want to get the right most name of the a domain name, for example:
if the domain is www.myweb.com , I want to get myweb.com
something.myweb.com --> myweb.com
www.myweb.com.au --> myweb.com.au
something.myweb.com.au --> myweb.com.au
www.myweb.tv --> myweb.tv
www.something.myweb.net --> myweb.net
| |
by: johkar |
last post by:
I am getting an Access denied error when I write to a new window. The
situation and code are outlined below. I am setting the domain in the
main window. The problem is that the window I am popping up never gets
it domain set, even though I have coded it to be the same as the main
window. I get an Access Denied errror.
Four different domains:
*localhost.mycompany.com
*test.mycompany.com
*pilot.mycompany.com
|
by: Sridhar |
last post by:
HI,
I am having problems setting up a website so that it will be available
only inside the domain. We have three servers. One is iis server and second
one is internal server and the third one is sql server. I have deployed the
web application in the internal server. It is not able to access the sql
server that is on another server. If I deploy the same application on IIS, it
is working fine. How should I set up the web application in the...
|
by: Sam |
last post by:
Validate domain name context
Hello , Today I want to make sure from a given text is a domain style
or not.
for example : the domain can be
example.com or example.com.us or example.us so , what is the pattren
to check the given string is a domain style or not?
|
by: Guy Macon |
last post by:
While I agree with the sentiment, the oringinal title on this thread
("OT: Specially for , why you should always use example.com
for obfuscating domains") is wrong. There are other reserved domain
names besides example.com.
The search for reserved domain names should start with RFC 2606
( http://www.faqs.org/rfcs/rfc2606.html ) which defines;
*.test
*.example
|
by: yaghout |
last post by:
Hi,
i need to check and retrive the mx records for a domain using asp .net , i am using .net 1.1 and prefer to use this framework version .
ok , i found that i should use DNS protocol to retrive various DNS records (A,MX,TXT,CNAME, etc), and here we need mx records. i found a third party library called QueryDNS to do dns queries.
the first thing we need in this scenario is a Dns Server to query , ok i used a whois website to retrive...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |