Login | |
|
 |
RE: Help needed - 2/7/2007 9:53:56 AM
|
|
 |
|
| |
dm_4ever
Posts: 2726
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
You don't need this line: Set objWMIService = GetObject("winmgmts:\\" & strUserName & "\root\cimv2") If you want the username of the person using the computer you're querying then you need to query another class to get this information. You can try querying Win32_ComputerSystem and the UserName property or like I saw one of the members here do in another script (which you may want to search for) is to query Win32_Process for the explorer.exe instance and get the owner of it.
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: Help needed - 2/8/2007 12:00:51 AM
|
|
 |
|
| |
h1t3ch
Posts: 20
Score: 0
Joined: 1/21/2007
From: Nashville, TN.
Status: offline
|
Thanks for your reply....
|
|
| |
|
|
|
 |
RE: Help needed - 2/8/2007 1:36:09 AM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
You are quering Active Directory for a List of all computers then checking if they have a folder called C:\whatever. Maybe try a different root of reading a list of computers into the script, pinging them and getting the username.
< Message edited by gdewrance -- 2/8/2007 5:05:37 PM >
|
|
| |
|
|
|
|
|