Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


<empty> username returned via remote WMI

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,62906
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> <empty> username returned via remote WMI
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 <empty> username returned via remote WMI - 7/29/2008 8:48:55 AM   
  loyalsoldier

 

Posts: 3
Score: 0
Joined: 7/29/2008
Status: offline
Hello.  I've been working on this script for awhile and can not get it working the way I want it to.  Actually, it does work using an administrator's user/pwd, but not when using a limited users' user/pwd. 

Here is what I'm trying to do: remotely access the WMI from several computers, retrieve the currently logged on username, and calculate how long they have been logged on.  This is for a library environment.  With the administrator account everything works.  With a non-admin account it goes all the way through w/ no errors, but doesn't produce the end results (how long the users have been logged on).  I've narrowed it down to this: The admin account will return the username for the remote computer, but the non-admin account does not.  I'm thinking it is permissions, but I've tried a lot of things to get it to work, including full access to Everyone.  I have the CIMV2 permissions (Remote) & the DCOM permissions (Remote Launch & Remote Activation) set on clients.  I have verified this with the WMI CMI Studio tool (WMI Tools) download from Microsoft.....admin account shows a username while the non-admin account shows <empty>.

The code runs from inside MS Excel as a macro (updates cells with how long each user is logged on).  I've disabled the "Activesheet" lines so it should work as a .vbs file.  Below is the code:

      

Any help with this would be appreciated. 
Thank you.
 
 
Post #: 1
 
 RE: <empty> username returned via remote WMI - 7/29/2008 11:29:08 AM   
  dm_4ever


Posts: 2669
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
So why can't you use an admin account?

_____________________________

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

(in reply to loyalsoldier)
 
 
Post #: 2
 
 RE: <empty> username returned via remote WMI - 7/29/2008 4:48:37 PM   
  loyalsoldier

 

Posts: 3
Score: 0
Joined: 7/29/2008
Status: offline
This is something that is going to be used by the library staff who work the front desk.  It lets them know who has been using the computers the longest so that if all of them are taken they know who to kick off for someone else to use a computer (1 hour limit when busy).  I don't want administrator credentials out in the open for anyone to get to.

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: <empty> username returned via remote WMI - 8/14/2008 3:44:12 AM   
  loyalsoldier

 

Posts: 3
Score: 0
Joined: 7/29/2008
Status: offline
When retrieving information from the ROOT\CIMV2 namespace using WMI, is the information that you can retrieve dependent on what credentials you are using (i.e. administrator verses non-administrator)?  Could that be why I can get the username with an administrator account, but with a non-administrator account it shows <empty>?

Thank you.

(in reply to loyalsoldier)
 
 
Post #: 4
 
 RE: <empty> username returned via remote WMI - 8/14/2008 5:14:55 AM   
  chiltz

 

Posts: 76
Score: 0
Joined: 6/13/2007
Status: offline
what about creating a service account to run the vbscript...give the service account the neccesary admin access.

(in reply to loyalsoldier)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> <empty> username returned via remote WMI Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts