Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is the question in better format.
1. I have a list of computer names in text file format.
2. I would like to resolve the current username to each computername in the textfile.
3. This is an additional question how can i incorporate the list in the program and make it editable by users in my vb form application?
4. Would it be possible to make querys to active directory to find computernames with 52MHMX-NC??? or -WNC??? and let the user select those active computers into the list in the program and save it?

Sincerely,
Chris

I know im asking many questions in one question but if i could figure this out it would be amazing. An if i could get examples of how to make all of this happen it would be even better.
Posted
Comments
Sergey Alexandrovich Kryukov 21-Jan-15 16:50pm    
I don't thinks you can do it without having a special service running of each of those computers. It would be unsafe to disclose the current user name. However, if you want the user logged in AD, please see:
.
—SA
[no name] 21-Jan-15 22:06pm    
I have found that you can retrieve the username through wmic as posted here http://blogs.msdn.com/b/alejacma/archive/2008/03/04/how-to-get-the-logged-on-user-with-wmi-vbscript.aspx
However, I am an System Administrator and have Admin rights to all clients. I would like to create the program to not loop but execute with button click and then run the query against a list of computernames stored in the application. Then return the current users associated with the computers in the list.

1 solution

Found from Technet everything i needed to make a resolution on this, I would recommend that if you have programming question ask them here and also read through technet from Microsoft. :-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900